Title: Python 3.12 tokenize generates invalid locations for f'\N{unicode}' · Issue #115154 · python/cpython · GitHub
Open Graph Title: Python 3.12 tokenize generates invalid locations for f'\N{unicode}' · Issue #115154 · python/cpython
X Title: Python 3.12 tokenize generates invalid locations for f'\N{unicode}' · Issue #115154 · python/cpython
Description: Bug report Bug description: from tokenize import untokenize, generate_tokens from io import StringIO untokenize(generate_tokens(StringIO("f'\\N{EXCLAMATION MARK}'").readline)) ValueError: start (1,22) precedes previous end (1,24) CPython...
Open Graph Description: Bug report Bug description: from tokenize import untokenize, generate_tokens from io import StringIO untokenize(generate_tokens(StringIO("f'\\N{EXCLAMATION MARK}'").readline)) ValueError: start (1,...
X Description: Bug report Bug description: from tokenize import untokenize, generate_tokens from io import StringIO untokenize(generate_tokens(StringIO("f'\\N{EXCLAMATION MARK}'").readline)) Val...
Opengraph URL: https://github.com/python/cpython/issues/115154
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python 3.12 tokenize generates invalid locations for f'\\N{unicode}'","articleBody":"# Bug report\n\n### Bug description:\n\n```python\nfrom tokenize import untokenize, generate_tokens\nfrom io import StringIO\n\nuntokenize(generate_tokens(StringIO(\"f'\\\\N{EXCLAMATION MARK}'\").readline))\n```\nValueError: start (1,22) precedes previous end (1,24)\n\n### CPython versions tested on:\n\n3.12\n\n### Operating systems tested on:\n\nWindows\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-115171\n* gh-115662\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/smartbomb","@type":"Person","name":"smartbomb"},"datePublished":"2024-02-08T06:59:37Z","url":"https://github.com/python/cpython/issues/115154"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:86b1588d-9e5a-1d49-3f31-60bc0cb75bb6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ED7A:2A087:E1A5E4:12F5476:6B00588E |
| html-safe-nonce | 433a00f100b333c86a070afa46baa254e0b86a69a530bbfa9b786558fee754e2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDdBOjJBMDg3OkUxQTVFNDoxMkY1NDc2OjZCMDA1ODhFIiwidmlzaXRvcl9pZCI6IjM5MjY4NDE3NTEwMjQ3MjAwMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f9eb4e65879c79f623407028097357b27116c71d32a7dfe2176534a6ae765df0 |
| hovercard-subject-tag | issue:2124480851 |
| 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/115154/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a744971d53132a5be7b31c390ecbabdf4abf96acf87d84c28d4e1259ec447421/python/cpython/issues/115154 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a744971d53132a5be7b31c390ecbabdf4abf96acf87d84c28d4e1259ec447421/python/cpython/issues/115154 |
| og:image:alt | Bug report Bug description: from tokenize import untokenize, generate_tokens from io import StringIO untokenize(generate_tokens(StringIO("f'\\N{EXCLAMATION MARK}'").readline)) ValueError: start (1,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | smartbomb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 29be975efff6507a5d135de9c7d634cf7ff8f0c55222a64386ab3202209aaf73 |
| 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 | eacd927ba6112e3b01ba99c762bd699a4a4f5df7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width