René's URL Explorer Experiment


Title: gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value by tomasr8 · Pull Request #128653 · python/cpython · GitHub

Open Graph Title: gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value by tomasr8 · Pull Request #128653 · python/cpython

X Title: gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value by tomasr8 · Pull Request #128653 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: This fixes the crash by catching TypeError and ValueError in addition to KeyError. I'm not sure if this the best fix, but it's the least invasive one. Feedback welcome! Issue: Py313 REPL ...

X Description: This fixes the crash by catching TypeError and ValueError in addition to KeyError. I'm not sure if this the best fix, but it's the least invasive one. Feedback welcome! Issue: Py3...

Opengraph URL: https://github.com/python/cpython/pull/128653

X: @github

direct link

Domain: github.com

route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:4b52bb9a-8a1a-e64e-b435-0d896ac56ee5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9202:1F9AF:4F4CE1:7045D5:6A5489CD
html-safe-nonce166e69d9321c5b27ce4617f9d59b96c3eeb3d2ac1822b663136f2177dd56f04c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MjAyOjFGOUFGOjRGNENFMTo3MDQ1RDU6NkE1NDg5Q0QiLCJ2aXNpdG9yX2lkIjoiNTc4NjQyMjEwMTgwMTIwODI2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdfea5fb3b27b6f6b623022a219d62b4b60e3f338f09b02f0acc8fb98258418f4
hovercard-subject-tagpull_request:2267109312
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/python/cpython/128653/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/0583d577e3713a577789722583cc022bb0d9e07347e33f5216744c9d97f11465/python/cpython/pull/128653
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0583d577e3713a577789722583cc022bb0d9e07347e33f5216744c9d97f11465/python/cpython/pull/128653
og:image:altThis fixes the crash by catching TypeError and ValueError in addition to KeyError. I'm not sure if this the best fix, but it's the least invasive one. Feedback welcome! Issue: Py313 REPL ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametomasr8
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-cache
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
release03ccb116376fd46e8ba2a4cdc541e35f13f70734
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/128653#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F128653
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F128653
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/128653
Reloadhttps://github.com/python/cpython/pull/128653
Reloadhttps://github.com/python/cpython/pull/128653
Please reload this pagehttps://github.com/python/cpython/pull/128653
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/128653
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
pablogsalhttps://github.com/pablogsal
python:mainhttps://github.com/python/cpython/tree/main
tomasr8:pyrepl-environhttps://github.com/tomasr8/cpython/tree/pyrepl-environ
Conversationhttps://github.com/python/cpython/pull/128653
Commits4 (4)https://github.com/python/cpython/pull/128653/commits
Checkshttps://github.com/python/cpython/pull/128653/checks
Files changedhttps://github.com/python/cpython/pull/128653/files
gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid valuehttps://github.com/python/cpython/pull/128653#top
pablogsalhttps://github.com/pablogsal
python:mainhttps://github.com/python/cpython/tree/main
tomasr8:pyrepl-environhttps://github.com/tomasr8/cpython/tree/pyrepl-environ
https://github.com/tomasr8
tomasr8https://github.com/tomasr8
Jan 8, 2025https://github.com/python/cpython/pull/128653#issue-2776400984
Please reload this pagehttps://github.com/python/cpython/pull/128653
Py313 REPL crash on malformed os.environ #128636https://github.com/python/cpython/issues/128636
Please reload this pagehttps://github.com/python/cpython/pull/128653
tomasr8https://github.com/tomasr8
January 8, 2025 22:32https://github.com/python/cpython/pull/128653#commits-pushed-b9582da
https://github.com/tomasr8
Fix PyREPL failure when os.environ is overwrittenhttps://github.com/python/cpython/pull/128653/commits/b9582dab762e7257cd61664cdf456fe8880fd708
b9582dahttps://github.com/python/cpython/pull/128653/commits/b9582dab762e7257cd61664cdf456fe8880fd708
https://github.com/tomasr8
Add news entryhttps://github.com/python/cpython/pull/128653/commits/48ae6c2aa0e9f27ba192bb592c42983011a861da
48ae6c2https://github.com/python/cpython/pull/128653/commits/48ae6c2aa0e9f27ba192bb592c42983011a861da
https://github.com/tomasr8
tomasr8https://github.com/tomasr8
ambvhttps://github.com/ambv
lysnikolaouhttps://github.com/lysnikolaou
pablogsalhttps://github.com/pablogsal
code ownershttps://github.com/python/cpython/blob/58a9133fc2caea15d11116f0b5bd6832374cb88c/.github/CODEOWNERS#L49
January 8, 2025 21:40https://github.com/python/cpython/pull/128653#event-15860317685
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jan 8, 2025 https://github.com/python/cpython/pull/128653#ref-issue-2775590137
Py313 REPL crash on malformed os.environ #128636 https://github.com/python/cpython/issues/128636
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jan 8, 2025https://github.com/python/cpython/pull/128653#event-15860318471
https://github.com/tomasr8
tomasr8https://github.com/tomasr8
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
Jan 8, 2025https://github.com/python/cpython/pull/128653#event-15860326540
https://github.com/tomasr8
tomasr8https://github.com/tomasr8
Jan 9, 2025https://github.com/python/cpython/pull/128653#issuecomment-2579956712
Please reload this pagehttps://github.com/python/cpython/pull/128653
tomasr8https://github.com/tomasr8
January 9, 2025 22:23https://github.com/python/cpython/pull/128653#commits-pushed-df63da0
https://github.com/tomasr8
ioctl can raise OSErrorhttps://github.com/python/cpython/pull/128653/commits/df63da0c7ecc6be979ceb743f22d8470c808e3f4
df63da0https://github.com/python/cpython/pull/128653/commits/df63da0c7ecc6be979ceb743f22d8470c808e3f4
https://github.com/tomasr8
Merge branch 'main' into pyrepl-environhttps://github.com/python/cpython/pull/128653/commits/ef7e5987c494dedf12cdcc7855ddd87be8c68d06
ef7e598https://github.com/python/cpython/pull/128653/commits/ef7e5987c494dedf12cdcc7855ddd87be8c68d06
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Jan 22, 2025 https://github.com/python/cpython/pull/128653#pullrequestreview-2567656573
View reviewed changes https://github.com/python/cpython/pull/128653/files/ef7e5987c494dedf12cdcc7855ddd87be8c68d06
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
awaiting review https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20review%22
Jan 22, 2025https://github.com/python/cpython/pull/128653#event-16031473615
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
Jan 22, 2025https://github.com/python/cpython/pull/128653#issuecomment-2607656668
@tomasr8https://github.com/tomasr8
Please reload this pagehttps://github.com/python/cpython/pull/128653
https://github.com/pablogsal
pablogsalhttps://github.com/pablogsal
ba9a4b6https://github.com/python/cpython/commit/ba9a4b621577b92f36d88388cc9f791c2dc7d7ba
Jan 22, 2025https://github.com/python/cpython/pull/128653#event-16031572557
https://github.com/apps/miss-islington-app
miss-islington-apphttps://github.com/apps/miss-islington-app
Jan 22, 2025https://github.com/python/cpython/pull/128653#issuecomment-2607673652
@tomasr8https://github.com/tomasr8
@pablogsalhttps://github.com/pablogsal
Please reload this pagehttps://github.com/python/cpython/pull/128653
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
awaiting merge https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22awaiting%20merge%22
Jan 22, 2025https://github.com/python/cpython/pull/128653#event-16031573925
miss-islingtonhttps://github.com/miss-islington
Jan 22, 2025 https://github.com/python/cpython/pull/128653#ref-commit-3260bd0
https://github.com/tomasr8
https://github.com/miss-islington
pythongh-128636https://github.com/python/cpython/issues/128636
: Fix crash in PyREPL whenhttps://github.com/miss-islington/cpython/commit/3260bd00c416620ef101ed2609a43142283e077f
os.environhttps://github.com/miss-islington/cpython/commit/3260bd00c416620ef101ed2609a43142283e077f
is overwritten…https://github.com/miss-islington/cpython/commit/3260bd00c416620ef101ed2609a43142283e077f
3260bd0https://github.com/miss-islington/cpython/commit/3260bd00c416620ef101ed2609a43142283e077f
pythonGH-128653https://github.com/python/cpython/pull/128653
ba9a4b6https://github.com/miss-islington/cpython/commit/ba9a4b621577b92f36d88388cc9f791c2dc7d7ba
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Jan 22, 2025https://github.com/python/cpython/pull/128653#issuecomment-2607674277
GH-129186https://github.com/python/cpython/pull/129186
3.13 branchhttps://github.com/python/cpython/tree/3.13
Please reload this pagehttps://github.com/python/cpython/pull/128653
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
needs backport to 3.13 https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22needs%20backport%20to%203.13%22
Jan 22, 2025https://github.com/python/cpython/pull/128653#event-16031577274
pablogsalhttps://github.com/pablogsal
Jan 22, 2025 https://github.com/python/cpython/pull/128653#ref-commit-0b90dc8
https://github.com/miss-islington
https://github.com/tomasr8
[3.13]https://github.com/python/cpython/commit/0b90dc8e89465ef02bbea06ae3f237cb5a190e57
gh-128636https://github.com/python/cpython/issues/128636
: Fix crash in PyREPL whenhttps://github.com/python/cpython/commit/0b90dc8e89465ef02bbea06ae3f237cb5a190e57
os.environhttps://github.com/python/cpython/commit/0b90dc8e89465ef02bbea06ae3f237cb5a190e57
is overwritte…https://github.com/python/cpython/commit/0b90dc8e89465ef02bbea06ae3f237cb5a190e57
0b90dc8https://github.com/python/cpython/commit/0b90dc8e89465ef02bbea06ae3f237cb5a190e57
GH-128653https://github.com/python/cpython/pull/128653
#129186https://github.com/python/cpython/pull/129186
gh-128636https://github.com/python/cpython/issues/128636
GH-128653https://github.com/python/cpython/pull/128653
ba9a4b6https://github.com/python/cpython/commit/ba9a4b621577b92f36d88388cc9f791c2dc7d7ba
https://github.com/tomasr8
tomasr8https://github.com/tomasr8
January 22, 2025 16:54https://github.com/python/cpython/pull/128653#event-16032118525
https://github.com/apps/bedevere-app
bedevere-apphttps://github.com/apps/bedevere-app
Aug 23, 2025https://github.com/python/cpython/pull/128653#issuecomment-3217014405
GH-138089https://github.com/python/cpython/pull/138089
3.13 branchhttps://github.com/python/cpython/tree/3.13
Please reload this pagehttps://github.com/python/cpython/pull/128653
https://github.co/hiddenchars
https://github.com/python/cpython/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F128653
https://github.com/pablogsal
pablogsal https://github.com/pablogsal
https://github.com/python/cpython/pull/128653/files/ef7e5987c494dedf12cdcc7855ddd87be8c68d06
https://github.com/lysnikolaou
lysnikolaou https://github.com/lysnikolaou
https://github.com/ambv
ambv https://github.com/ambv
Please reload this pagehttps://github.com/python/cpython/pull/128653
https://github.com/tomasr8
https://github.com/pablogsal
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.