Title: 3.12+: TokenError no longer raised for some invalid source (mismatched braces?) · Issue #105714 · python/cpython · GitHub
Open Graph Title: 3.12+: TokenError no longer raised for some invalid source (mismatched braces?) · Issue #105714 · python/cpython
X Title: 3.12+: TokenError no longer raised for some invalid source (mismatched braces?) · Issue #105714 · python/cpython
Description: this comes from the pycodestyle testsuite -- I expect the tokenizer to raise an error for this however it seems to silently accept it now. Bug report yep, this is just a single curly brace } $ python3.11 -m tokenize t.py t.py:2:0: error:...
Open Graph Description: this comes from the pycodestyle testsuite -- I expect the tokenizer to raise an error for this however it seems to silently accept it now. Bug report yep, this is just a single curly brace } $ pyth...
X Description: this comes from the pycodestyle testsuite -- I expect the tokenizer to raise an error for this however it seems to silently accept it now. Bug report yep, this is just a single curly brace } $ pyth...
Opengraph URL: https://github.com/python/cpython/issues/105714
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"3.12+: TokenError no longer raised for some invalid source (mismatched braces?)","articleBody":"this comes from the pycodestyle testsuite -- I expect the tokenizer to raise an error for this however it seems to silently accept it now.\r\n\r\n# Bug report\r\n\r\nyep, this is just a single curly brace\r\n\r\n```python\r\n}\r\n```\r\n\r\n```console\r\n$ python3.11 -m tokenize t.py\r\nt.py:2:0: error: EOF in multi-line statement\r\n$ python3.12 -m tokenize t.py\r\n0,0-0,0: ENCODING 'utf-8' \r\n1,0-1,1: OP '}' \r\n1,1-1,2: NEWLINE '\\n' \r\n2,0-2,0: ENDMARKER '' \r\n```\r\n\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: d310fc776e\r\n- Operating system and architecture: ubuntu 22.04 x86_64\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/asottile","@type":"Person","name":"asottile"},"datePublished":"2023-06-12T23:26:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/105714/cpython/issues/105714"}
| 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:d3abecbf-a99d-2fb6-fd0f-fda39d22efa1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B058:277822:22837A:308CFD:696A0062 |
| html-safe-nonce | c8ea2eb8372152fce3cf9703e32e3b1473e25568a330220619080b1abfba06e9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDU4OjI3NzgyMjoyMjgzN0E6MzA4Q0ZEOjY5NkEwMDYyIiwidmlzaXRvcl9pZCI6IjczMjU0NDk1ODI3NzYyODczMzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9a5d91e5aadad4f09c588723ed869aa12bddf310344f84443c9d1823a7edb17d |
| hovercard-subject-tag | issue:1753747637 |
| 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/105714/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8f2c0f5e0821a972972b6332d61a20fedfa9bd790e1a1dd5030082677416567c/python/cpython/issues/105714 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8f2c0f5e0821a972972b6332d61a20fedfa9bd790e1a1dd5030082677416567c/python/cpython/issues/105714 |
| og:image:alt | this comes from the pycodestyle testsuite -- I expect the tokenizer to raise an error for this however it seems to silently accept it now. Bug report yep, this is just a single curly brace } $ pyth... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | asottile |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7b32f1c7c4549428ee399213e8345494fc55b5637195d3fc5f493657579235e8 |
| 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 | bdde15ad1b403e23b08bbd89b53fbe6bdf688cad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width