Title: `patchcheck.py` raises `SystemError` on `main` · Issue #105820 · python/cpython · GitHub
Open Graph Title: `patchcheck.py` raises `SystemError` on `main` · Issue #105820 · python/cpython
X Title: `patchcheck.py` raises `SystemError` on `main` · Issue #105820 · python/cpython
Description: Bug report Following #105801, running python Tools/patchcheck/patchcheck.py now results in SystemError being raised. To reproduce Make any change to a .py file, e.g.: --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -19,6...
Open Graph Description: Bug report Following #105801, running python Tools/patchcheck/patchcheck.py now results in SystemError being raised. To reproduce Make any change to a .py file, e.g.: --- a/Lib/test/test_fstring.py...
X Description: Bug report Following #105801, running python Tools/patchcheck/patchcheck.py now results in SystemError being raised. To reproduce Make any change to a .py file, e.g.: --- a/Lib/test/test_fstring.py...
Opengraph URL: https://github.com/python/cpython/issues/105820
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`patchcheck.py` raises `SystemError` on `main`","articleBody":"# Bug report\r\n\r\nFollowing #105801, running `python Tools/patchcheck/patchcheck.py` now results in `SystemError` being raised.\r\n\r\n# To reproduce\r\n\r\n1. Make any change to a `.py` file, e.g.:\r\n\r\n```diff\r\n--- a/Lib/test/test_fstring.py\r\n+++ b/Lib/test/test_fstring.py\r\n@@ -19,6 +19,7 @@\r\n\r\n a_global = 'global variable'\r\n\r\n+\r\n```\r\n\r\n2. Run `python Tools/patchcheck/patchcheck.py`:\r\n\r\n```\r\nC:\\Users\\alexw\\coding\\cpython\u003epython Tools/patchcheck/patchcheck.py\r\nRunning Release|x64 interpreter...\r\nGetting base branch for PR ... upstream/main\r\nGetting the list of files that have been added/changed ... 1 file\r\nFixing Python file whitespace ... Traceback (most recent call last):\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\patchcheck.py\", line 325, in \u003cmodule\u003e\r\n main()\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\patchcheck.py\", line 293, in main\r\n normalize_whitespace(python_files)\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\patchcheck.py\", line 35, in call_fxn\r\n result = fxn(*args, **kwargs)\r\n ^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\patchcheck.py\", line 188, in normalize_whitespace\r\n and reindent.check(os.path.join(SRCDIR, path))\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\reindent.py\", line 138, in check\r\n if r.run():\r\n ^^^^^^^\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Tools\\patchcheck\\reindent.py\", line 203, in run\r\n for _token in tokens:\r\n File \"C:\\Users\\alexw\\coding\\cpython\\Lib\\tokenize.py\", line 537, in _generate_tokens_from_c_tokenizer\r\n for info in it:\r\nSystemError: Negative size passed to PyUnicode_New\r\n```\r\n\r\nThis failure was visible on the Azure Pipelines job on the PR FYI: https://dev.azure.com/Python/cpython/_build/results?buildId=130389\u0026view=logs\u0026j=256d7e09-002a-52d7-8661-29ee3960640e\u0026t=3d7276d3-4e8d-5309-55ad-fb0b172d9925\r\n\r\n# Your environment\r\n\r\n```\r\nPython 3.13.0a0 (heads/main:c5111aec2b, Jun 15 2023, 10:53:37) [MSC v.1932 64 bit (AMD64)] on win32\r\n```\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-105828\n* gh-105832\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/AlexWaygood","@type":"Person","name":"AlexWaygood"},"datePublished":"2023-06-15T10:02:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/105820/cpython/issues/105820"}
| 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:943de81a-c640-d791-9303-002de035f386 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 890E:57C20:FC97DB:14FCBAA:6969926A |
| html-safe-nonce | 8ca60c6ad0c9e2ec381ec1ae07243a8bbed4a8b836b2869a9b09b50c49f9f9e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OTBFOjU3QzIwOkZDOTdEQjoxNEZDQkFBOjY5Njk5MjZBIiwidmlzaXRvcl9pZCI6IjM5MDY5Nzc3NTA1OTIzNjEwNjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d46a976c61db6ba338df479e9f165e66546ace4daa2f1de06340282ba0418544 |
| hovercard-subject-tag | issue:1758478970 |
| 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/105820/issue_layout |
| twitter:image | https://opengraph.githubassets.com/759fb3341966e2de74860f312c343aaaa3d33fdb54f5a6914d374c158dfb5f62/python/cpython/issues/105820 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/759fb3341966e2de74860f312c343aaaa3d33fdb54f5a6914d374c158dfb5f62/python/cpython/issues/105820 |
| og:image:alt | Bug report Following #105801, running python Tools/patchcheck/patchcheck.py now results in SystemError being raised. To reproduce Make any change to a .py file, e.g.: --- a/Lib/test/test_fstring.py... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AlexWaygood |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| 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 | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width