Title: test added in gh-104067 has an fstring with an invalid escape sequence · Issue #105784 · python/cpython · GitHub
Open Graph Title: test added in gh-104067 has an fstring with an invalid escape sequence · Issue #105784 · python/cpython
X Title: test added in gh-104067 has an fstring with an invalid escape sequence · Issue #105784 · python/cpython
Description: Bug report In response to #104049, a fix and a new test were added in #104067 and related PRs. The test in test_httpserver.py uses an fstring with an escape sequence, but does not use r: f'listing for {self.base_url}/\?x=123' I think the...
Open Graph Description: Bug report In response to #104049, a fix and a new test were added in #104067 and related PRs. The test in test_httpserver.py uses an fstring with an escape sequence, but does not use r: f'listing ...
X Description: Bug report In response to #104049, a fix and a new test were added in #104067 and related PRs. The test in test_httpserver.py uses an fstring with an escape sequence, but does not use r: f'list...
Opengraph URL: https://github.com/python/cpython/issues/105784
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test added in gh-104067 has an fstring with an invalid escape sequence","articleBody":"\u003c!--\r\n If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not\r\n the right place to seek help. Consider the following options instead:\r\n\r\n - reading the Python tutorial: https://docs.python.org/3/tutorial/\r\n - posting in the \"Users\" category on discuss.python.org: https://discuss.python.org/c/users/7\r\n - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list\r\n - searching our issue tracker (https://github.com/python/cpython/issues) to see if\r\n your problem has already been reported\r\n--\u003e\r\n\r\n# Bug report\r\n\r\nIn response to #104049, a fix and a new test were added in #104067 and related PRs. The test [in test_httpserver.py](https://github.com/python/cpython/pull/104067/files#diff-5c8de474c50a44ead423e2d9ce85c1932b9c87ba9f5a3215c0b8b996c65e62b9R424) uses an fstring with an escape sequence, but does not use `r`:\r\n```\r\nf'listing for {self.base_url}/\\?x=123'\r\n```\r\n\r\nI think the code (in two places) should be include an `r`: `fr'listing for ...`\r\n\r\nOn PyPy this is causing the `test___all__.py` test to fail, since it emits a warning when compiling the `*.py` to `*.pyc`. I am not sure why CPython is not seeing a similar problem. Perhaps `compileall` is run first? Or the warning filter captures the compilation as well as the import?\r\n\r\n# Your environment\r\n\r\n\u003c!-- Include as many relevant details as possible about the environment you experienced the bug in --\u003e\r\n\r\n- CPython versions tested on: PyPy3.9 HEAD using stdlib 3.9.17\r\n- Operating system and architecture: any\r\n\r\n\u003c!--\r\nYou can freely edit this text. Remove any lines you believe are unnecessary.\r\n--\u003e\r\n","author":{"url":"https://github.com/mattip","@type":"Person","name":"mattip"},"datePublished":"2023-06-14T14:29:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/105784/cpython/issues/105784"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ebb272f1-a6d1-193c-f663-35b0bd589d46 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C0A0:14C034:7242C:9B358:6969CB53 |
| html-safe-nonce | 9d5598c2f1d9049a765c72c12ab0670dea87d8417353a47f329991e90599b6c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEEwOjE0QzAzNDo3MjQyQzo5QjM1ODo2OTY5Q0I1MyIsInZpc2l0b3JfaWQiOiI1NzM0NDk2NzUwMzM2MDY4NDM2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bb5c98d3442018b6e7da1132b2f57e10cff34a5ae6b95bda0973202027284372 |
| hovercard-subject-tag | issue:1757046452 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/105784/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f1586fda09b81645cd4bf8a8868afc3ecbed9cd79065b212f303e874c8264ad8/python/cpython/issues/105784 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f1586fda09b81645cd4bf8a8868afc3ecbed9cd79065b212f303e874c8264ad8/python/cpython/issues/105784 |
| og:image:alt | Bug report In response to #104049, a fix and a new test were added in #104067 and related PRs. The test in test_httpserver.py uses an fstring with an escape sequence, but does not use r: f'listing ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mattip |
| hostname | github.com |
| expected-hostname | github.com |
| None | acedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 83c08c21cdda978090dc44364b71aa5bc6dcea79 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width