René's URL Explorer Experiment


Title: Python3.13 is mishandling OSC 633 sequences · Issue #126131 · python/cpython · GitHub

Open Graph Title: Python3.13 is mishandling OSC 633 sequences · Issue #126131 · python/cpython

X Title: Python3.13 is mishandling OSC 633 sequences · Issue #126131 · python/cpython

Description: Bug report Bug description: Bug Report Related: #122622 Bug description: VS Code has set of custom escape sequences that allow shell integration. We have a custom pythonrc file that we set equal to user's PYTHONSTARTUP file and effective...

Open Graph Description: Bug report Bug description: Bug Report Related: #122622 Bug description: VS Code has set of custom escape sequences that allow shell integration. We have a custom pythonrc file that we set equal to...

X Description: Bug report Bug description: Bug Report Related: #122622 Bug description: VS Code has set of custom escape sequences that allow shell integration. We have a custom pythonrc file that we set equal to...

Opengraph URL: https://github.com/python/cpython/issues/126131

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python3.13 is mishandling OSC 633 sequences","articleBody":"# Bug report\n\n### Bug description:\n\nBug Report\n-------------------------------------------\n\nRelated: https://github.com/python/cpython/issues/122622\n\n### Bug description: \n\nVS Code has set of [custom escape sequences](https://code.visualstudio.com/docs/terminal/shell-integration#_vs-code-custom-sequences-osc-633-st) that allow shell integration. \n\nWe have a [custom pythonrc file](https://github.com/microsoft/vscode-python/blob/main/python_files/pythonrc.py#L77) that we set equal to user's PYTHONSTARTUP file and effectively override user's sys.ps1(this can be improved once we have the pre-exec hook mentioned in the related PR) This allows us to get features that VS Code shell integration offers.\n\nWith the new REPL that 3.13 offers, we have noticed that the cursor location is wrongly placed whenever REPL from Python3.13 is launched from our terminal. See: \n\u003cimg width=\"986\" alt=\"Screenshot 2024-10-29 at 8 48 48 AM\" src=\"https://github.com/user-attachments/assets/14441c5f-b4aa-4895-9ef1-210e5877a3f6\">\n\n\nAfter investigation we found out it is because Python3.13 is somehow handling our custom sequences such as \n```\ncommand_line=\"\\x1b]633;E;\" + str(get_last_command()) + \"\\x07\",\n```\ninstead of ignoring them as it did in the previous versions of Python. This is what is leads to the wrong cursor location at the end. Removing these sequences brought back the cursor to the \"right\" position in terminal.\n\nCPython should ignore these custom sequences instead of wrongly handling them.\n\n\n\nEdit: Workaround could be temporarily disabling PyREPL via env var injection \nexporting `PYTHON_BASIC_REPL=1`\n \n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nmacOS\n\n### Linked PR\n\ncoming soon (would appreciate advice on where to start digging in but I assume it is somewhere https://github.com/python/cpython/tree/main/Lib/_pyrepl)","author":{"url":"https://github.com/anthonykim1","@type":"Person","name":"anthonykim1"},"datePublished":"2024-10-29T15:49:34Z","url":"https://github.com/python/cpython/issues/126131"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:cb9b66f6-fc32-b83f-25d9-633a124826c6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8A64:81000:8ED43:C7648:6AFDA78C
html-safe-noncea98577f3971e6ccb1dee0577c763f5960d790c7fa6cdf519d2a2e56644f32d94
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTY0OjgxMDAwOjhFRDQzOkM3NjQ4OjZBRkRBNzhDIiwidmlzaXRvcl9pZCI6IjQxNTY2NTMwNDI4NzI5ODU0ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac117136699eade9254a2a0cd7d912e48c9ecf80252446f3646d6737ae1d043e99
hovercard-subject-tagissue:2621674155
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/126131/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5032570569b491d3c6b024a954d7a995421629869cb0679e6d43e6d04650f706/python/cpython/issues/126131
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5032570569b491d3c6b024a954d7a995421629869cb0679e6d43e6d04650f706/python/cpython/issues/126131
og:image:altBug report Bug description: Bug Report Related: #122622 Bug description: VS Code has set of custom escape sequences that allow shell integration. We have a custom pythonrc file that we set equal to...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameanthonykim1
hostnamegithub.com
expected-hostnamegithub.com
Nonebc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0ddf53eb35c87f1f8df13dbf75c3bdadbfc6e969
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/126131#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126131
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F126131
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/126131
Reloadhttps://github.com/python/cpython/issues/126131
Reloadhttps://github.com/python/cpython/issues/126131
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126131
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/126131
Python3.13 is mishandling OSC 633 sequenceshttps://github.com/python/cpython/issues/126131#top
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-replRelated to the interactive shellhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-repl%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/anthonykim1
anthonykim1https://github.com/anthonykim1
on Oct 29, 2024https://github.com/python/cpython/issues/126131#issue-2621674155
#122622https://github.com/python/cpython/issues/122622
custom escape sequenceshttps://code.visualstudio.com/docs/terminal/shell-integration#_vs-code-custom-sequences-osc-633-st
custom pythonrc filehttps://github.com/microsoft/vscode-python/blob/main/python_files/pythonrc.py#L77
https://private-user-images.githubusercontent.com/62267334/381204447-14441c5f-b4aa-4895-9ef1-210e5877a3f6.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUwMDg2OTYsIm5iZiI6MTc5NTAwODM5NiwicGF0aCI6Ii82MjI2NzMzNC8zODEyMDQ0NDctMTQ0NDFjNWYtYjRhYS00ODk1LTllZjEtMjEwZTU4NzdhM2Y2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjExMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYxMTE4VDEzMjYzNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk4MmNmMDc2Mjk4NDc3NDJmYjU2ZDcwMzhkYmExMmE2NWZmNDA1MjY0MzkxMjU0NjJkZDM2MjEyMWM1ZDIzNDImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.sR5H1DuBaacqrFvqfmO_HeLqzI0BPh3FkXt_mARDPkI
https://github.com/python/cpython/tree/main/Lib/_pyreplhttps://github.com/python/cpython/tree/main/Lib/_pyrepl
anthonykim1https://github.com/anthonykim1
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Oct 29, 2024https://github.com/python/cpython/issues/126131#event-14987161869
anthonykim1https://github.com/anthonykim1
on Oct 29, 2024https://github.com/python/cpython/issues/126131#event-14987226598
https://github.com/Tyriar
Tyriarhttps://github.com/Tyriar
on Oct 29, 2024https://github.com/python/cpython/issues/126131#issuecomment-2444702738
Eclips4https://github.com/Eclips4
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
topic-replRelated to the interactive shellhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-repl%22
on Oct 29, 2024https://github.com/python/cpython/issues/126131#event-14987586898
picnixzhttps://github.com/picnixz
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
on Oct 29, 2024https://github.com/python/cpython/issues/126131#event-14989572488
anthonykim1https://github.com/anthonykim1
on Dec 9, 2024https://github.com/python/cpython/issues/126131#event-15579529184
Fix) Prevent keyboard interrupt for Python3.13 REPL non-Windows (#24555)https://github.com/microsoft/vscode-python/commit/faf37e28ca7f146d65931f093cf36b8fe9733756
#24555https://github.com/microsoft/vscode-python/pull/24555
faf37e2https://github.com/microsoft/vscode-python/commit/faf37e28ca7f146d65931f093cf36b8fe9733756
anthonykim1https://github.com/anthonykim1
on Feb 4, 2025https://github.com/python/cpython/issues/126131#event-16184245061
Use sendText to send Python code to Terminal REPL for Python >= 3.13 (#…https://github.com/microsoft/vscode-python/commit/6b784e53e70a30c0895cafd60c8ad76b2b087749
#…https://github.com/microsoft/vscode-python/pull/24765
6b784e5https://github.com/microsoft/vscode-python/commit/6b784e53e70a30c0895cafd60c8ad76b2b087749
anthonykim1https://github.com/anthonykim1
on Jun 26, 2025https://github.com/python/cpython/issues/126131#event-18339585355
Disable PyREPL (#25216)https://github.com/microsoft/vscode-python/commit/01d872b0a709fc3000546da68088f4248b443ee9
#25216https://github.com/microsoft/vscode-python/pull/25216
01d872bhttps://github.com/microsoft/vscode-python/commit/01d872b0a709fc3000546da68088f4248b443ee9
https://github.com/anthonykim1
anthonykim1https://github.com/anthonykim1
on Nov 7, 2025https://github.com/python/cpython/issues/126131#issuecomment-3503844345
microsoft/vscode-python#25521https://github.com/microsoft/vscode-python/pull/25521
anthonykim1https://github.com/anthonykim1
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Nov 7, 2025https://github.com/python/cpython/issues/126131#event-20793872151
StanFromIrelandhttps://github.com/StanFromIreland
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Nov 7, 2025https://github.com/python/cpython/issues/126131#event-20793956259
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/126131
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/126131
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
topic-replRelated to the interactive shellhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-repl%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.