Skip to content

gh-128509: Add tests on sys._is_immortal() - #157376

Merged
vstinner merged 4 commits into
python:mainfrom
vstinner:is_immortal
Sep 13, 2026
Merged

vstinner merged 4 commits into
python:mainfrom
vstinner:is_immortal

Conversation

@vstinner

@vstinner vstinner commented Sep 12, 2026

Copy link
Copy Markdown
Member

@vstinner vstinner added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Sep 12, 2026
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Sep 12, 2026
@vstinner

Copy link
Copy Markdown
Member Author

@ZeroIntensity: As the sys._is_immortal() author, would you mind to review my tests please?

Comment thread Lib/test/test_sys.py
@vstinner

Copy link
Copy Markdown
Member Author

test_sys fails if Lib/test/__pycache__/test_sys.cpython-316.pyc cache already exists. The problem is that the marshal module is unable to get 1-byte string singletons. I wrote PR gh-157398 to enhance the marshal module.

I would prefer to fix the marshal module and then update this PR to remove the workaround that I just pushed.

@vstinner
vstinner merged commit fb46c67 into python:main Sep 13, 2026
52 checks passed
@vstinner
vstinner deleted the is_immortal branch September 13, 2026 18:13
@miss-islington-app

Copy link
Copy Markdown

Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Sep 13, 2026

Copy link
Copy Markdown

GH-157445 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Sep 13, 2026
@bedevere-app

bedevere-app Bot commented Sep 13, 2026

Copy link
Copy Markdown

GH-157446 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 13, 2026
@vstinner

Copy link
Copy Markdown
Member Author

Merged, thanks for the review!

vstinner added a commit that referenced this pull request Sep 13, 2026
gh-128509: Add tests on sys._is_immortal() (GH-157376)
(cherry picked from commit fb46c67)

Co-authored-by: Victor Stinner <vstinner@python.org>
johnslavik pushed a commit to johnslavik/cpython that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants