Skip to content

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Jan 8, 2025

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!

@tomasr8
Copy link
Member Author

tomasr8 commented Jan 9, 2025

I'll look into the test failure later today

@pablogsal
Copy link
Member

Thanks for the PR @tomasr8 !

@pablogsal pablogsal merged commit ba9a4b6 into python:main Jan 22, 2025
50 checks passed
@miss-islington-app
Copy link

Thanks @tomasr8 for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 22, 2025
… with an invalid value (pythonGH-128653)

(cherry picked from commit ba9a4b6)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jan 22, 2025

GH-129186 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jan 22, 2025
pablogsal pushed a commit that referenced this pull request Jan 22, 2025
…n with an invalid value (GH-128653) (#129186)

gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (GH-128653)
(cherry picked from commit ba9a4b6)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
@tomasr8 tomasr8 deleted the pyrepl-environ branch January 22, 2025 16:54
@bedevere-app
Copy link

bedevere-app bot commented Aug 23, 2025

GH-138089 is a backport of this pull request to the 3.13 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants