Title: bpo-40612: Fix SyntaxError edge cases in traceback formatting by gvanrossum · Pull Request #20072 · python/cpython · GitHub
Open Graph Title: bpo-40612: Fix SyntaxError edge cases in traceback formatting by gvanrossum · Pull Request #20072 · python/cpython
X Title: bpo-40612: Fix SyntaxError edge cases in traceback formatting by gvanrossum · Pull Request #20072 · python/cpython
Description: This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following: Suppress caret if it points left of text Allow caret pointing just past end of line If caret points past end of line, clip to just past end of line The syntax error formatting code in traceback.py was mostly rewritten; small, subtle changes were applied to the C code in pythonrun.c. There's still a difference when the text contains embedded newlines. Neither handles these very well, and I don't think the case occurs in practice. https://bugs.python.org/issue40612 Automerge-Triggered-By: @gvanrossum
Open Graph Description: This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following: Suppress caret if it points left of text A...
X Description: This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following: Suppress caret if it points left of text A...
Opengraph URL: https://github.com/python/cpython/pull/20072
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:28fae043-9962-93ac-42ef-dc273cb0a341 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BBF2:26A866:BE974F:10B68CF:696A2B8E |
| html-safe-nonce | 4068f81529b4f108ee93a9fd8ed907e180219cf66a5a9d5180730270923c4b68 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkYyOjI2QTg2NjpCRTk3NEY6MTBCNjhDRjo2OTZBMkI4RSIsInZpc2l0b3JfaWQiOiIxMTEzMTMwNDg5ODAzODQ0NDk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d0a356bd9cda3f4b992b13741934249c449a0885e318328495b9f2bc65e9abed |
| hovercard-subject-tag | pull_request:417498081 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/20072/checks |
| twitter:image | https://avatars.githubusercontent.com/u/2894642?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2894642?s=400&v=4 |
| og:image:alt | This fixes both the traceback.py module and the C code for formatting syntax errors (in Python/pythonrun.c). They now both consistently do the following: Suppress caret if it points left of text A... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ade130928b3890d20ecf9c887468a17e88d5c9a740ea2a85c2c2162e7c58e623 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c00842167ca2e5b13e8171812965d503e925ece6 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width