Skip to content

Conversation

yihong0618
Copy link
Contributor

@yihong0618 yihong0618 commented Aug 23, 2025

for mac if environ is valid and it will retrigger all of it

so I checked the code base in repr the os is from init
so make it in__init__ is better and can avoid

and that is not enough, we also need fix it the same way in

_can_colorize theme

cc @pablogsal

in my env it fixed the issue, and I wonder it maybe a litter faster

@yihong0618
Copy link
Contributor Author

the news is the same so maybe we can ignore it?

Signed-off-by: yihong0618 <[email protected]>
@picnixz picnixz changed the title [3.13] gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid value for mac(GH-128653) gh-128636: Fix crash in PyREPL when os.environ is overwritten with an invalid value for mac Aug 23, 2025
@yihong0618
Copy link
Contributor Author

Why only 3.13?

only up to 3.13 new repr has this issue follow this patch title #129186

@picnixz
Copy link
Member

picnixz commented Aug 23, 2025

the news is the same so maybe we can ignore it?

No, because we have already shipped a few releases since then, so we need a fresh one.

@yihong0618
Copy link
Contributor Author

the news is the same so maybe we can ignore it?

No, because we have already shipped a few releases since then, so we need a fresh one.

learned that, thank you very much

@picnixz
Copy link
Member

picnixz commented Aug 23, 2025

only up to 3.13 new repr has this issue follow this patch title #129186

That's the backport. All PRs must first be done against main and we backport them when needed. We only use [3.x] when the fix is specific to the version.

@yihong0618
Copy link
Contributor Author

only up to 3.13 new repr has this issue follow this patch title #129186

That's the backport. All PRs must first be done against main and we backport them when needed. We only use [3.x] when the fix is specific to the version.

copy that, sorry for my wrong understand at first

Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure but caching THEME() seems to go against the comment in THEME().

Signed-off-by: yihong0618 <[email protected]>
@yihong0618
Copy link
Contributor Author

yihong0618 commented Aug 23, 2025

I'm not entirely sure but caching THEME() seems to go against the comment in THEME().

addressed thank you

and add tests

@yihong0618 yihong0618 requested a review from picnixz August 24, 2025 08:12
@bedevere-app
Copy link

bedevere-app bot commented Aug 24, 2025

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@picnixz picnixz dismissed their stale review August 25, 2025 12:48

I'm letting Łukasz shepherd this as I'm not a REPL expert

@yihong0618
Copy link
Contributor Author

fixed thank you for the help

@yihong0618 yihong0618 requested a review from ambv August 25, 2025 13:49
@yihong0618 yihong0618 requested a review from hugovk August 25, 2025 20:55
@yihong0618 yihong0618 requested a review from picnixz September 3, 2025 14:05
@picnixz picnixz removed their request for review September 6, 2025 14:40
Signed-off-by: yihong0618 <[email protected]>
@ambv ambv merged commit 8ef7735 into python:main Sep 15, 2025
53 checks passed
@ambv ambv added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Sep 15, 2025
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

Thanks @yihong0618 for the PR, and @ambv 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 Sep 15, 2025
…ith an invalid value for macOS (pythonGH-138089)

(cherry picked from commit 8ef7735)

Co-authored-by: yihong <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@miss-islington-app
Copy link

Sorry, @yihong0618 and @ambv, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 8ef7735c536e0ffe4a60224e59b7587288f53e9e 3.13

@bedevere-app
Copy link

bedevere-app bot commented Sep 15, 2025

GH-138938 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Sep 15, 2025
ambv pushed a commit to ambv/cpython that referenced this pull request Sep 15, 2025
…ith an invalid value for macOS (pythonGH-138089)

Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
(cherry picked from commit 8ef7735)
ambv added a commit to ambv/cpython that referenced this pull request Sep 15, 2025
…itten with an invalid value for macOS (pythonGH-138089)

(cherry picked from commit 8ef7735)

Co-authored-by: yihong <[email protected]>
Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 15, 2025

GH-138942 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 Sep 15, 2025
ambv added a commit that referenced this pull request Sep 15, 2025
…with an invalid value for macOS (GH-138089) (GH-138942)

Signed-off-by: yihong0618 <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>

(cherry picked from commit 8ef7735)
hugovk pushed a commit that referenced this pull request Sep 16, 2025
…with an invalid value for macOS (GH-138089) (#138938)

Co-authored-by: yihong <[email protected]>
Co-authored-by: Bénédikt Tran <[email protected]>
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.

4 participants