Title: F-string debug mode does not print correctly when in last line of file · Issue #105831 · python/cpython · GitHub
Open Graph Title: F-string debug mode does not print correctly when in last line of file · Issue #105831 · python/cpython
X Title: F-string debug mode does not print correctly when in last line of file · Issue #105831 · python/cpython
Description: Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example: ```python3 cpython on main via C v14.0.3-clang via 🐍 pyenv 3.11.3 took 15s ❯ cat tmp...
Open Graph Description: Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example: ```python3 cpython on main via C v14.0.3-cla...
X Description: Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example: ```python3 cpython on main via C v14.0.3...
Opengraph URL: https://github.com/python/cpython/issues/105831
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"F-string debug mode does not print correctly when in last line of file","articleBody":"Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example:\r\n\r\n```python3\r\n```python3\r\ncpython on main via C v14.0.3-clang via 🐍 pyenv 3.11.3 took 15s \r\n❯ cat tmp/t.py\r\nprint(f'''{\r\n3\r\n=}''')% \r\n\r\ncpython on main via C v14.0.3-clang via 🐍 pyenv 3.11.3 \r\n❯ ./python.exe tmp/t.py \r\n\r\n3\r\n3\r\n```\r\n\r\nA fix is already up as part of gh-105828, so just opening this to track the issue.\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-105833\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/lysnikolaou","@type":"Person","name":"lysnikolaou"},"datePublished":"2023-06-15T15:50:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/105831/cpython/issues/105831"}
| 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:4a49e6fa-7f6e-317b-2251-bb2e401587e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FBA:189C33:200C6E0:29D3BAB:696B4661 |
| html-safe-nonce | 590f4d63842f2e9466c25bdab20d9849571f915ed44fbf539c28c2d2e1425a73 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkJBOjE4OUMzMzoyMDBDNkUwOjI5RDNCQUI6Njk2QjQ2NjEiLCJ2aXNpdG9yX2lkIjoiNzk1Mjg4MTM3NDg2MTE0OTc5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 902493c5503bfdf3efc190f2c74ad97de4952e6cf01d64a6bbd12e92b4698e17 |
| hovercard-subject-tag | issue:1759126411 |
| 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/105831/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8dddcf49e3025f8650379bec81a6422463dc4d3858f91c83776d8ff84c9d474c/python/cpython/issues/105831 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8dddcf49e3025f8650379bec81a6422463dc4d3858f91c83776d8ff84c9d474c/python/cpython/issues/105831 |
| og:image:alt | Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example: ```python3 cpython on main via C v14.0.3-cla... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lysnikolaou |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width