GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-144601: Avoid sharing exception objects raised in a `PyInit` function across multiple interpreters by ZeroIntensity · Pull Request #144602 · python/cpython

Conversation

@ZeroIntensity

@ZeroIntensity ZeroIntensity commented Feb 8, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: Extensions that raise exceptions in their PyInit* cause a crash in subinterpreters #144601

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ZeroIntensity added 4 commits February 8, 2026 12:30
@ZeroIntensity
Don't use exception object across interpreters.
6f63e57
@ZeroIntensity
Add a test case.
48920c6
@ZeroIntensity
Add a comment.
8a4f224
@ZeroIntensity
Add blurb.
0fb0707
@ZeroIntensity ZeroIntensity added the needs backport to 3.13 only security fixes label Feb 8, 2026
@ZeroIntensity
ZeroIntensity requested a review from ericsnowcurrently as a code owner February 8, 2026 17:50
@ZeroIntensity ZeroIntensity added the needs backport to 3.14 bugs and security fixes label Feb 8, 2026
@ZeroIntensity
ZeroIntensity requested review from brettcannon, kumaraditya303, ncoghlan and warsaw as code owners February 8, 2026 17:50
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 8, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Feb 8, 2026
Extensions that raise exceptions in their PyInit* cause a crash in subinterpreters #144601
Closed
@ZeroIntensity ZeroIntensity added the topic-subinterpreters label Feb 8, 2026
encukou
encukou approved these changes Feb 9, 2026
View reviewed changes

@encukou encukou left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Feb 9, 2026
@encukou
encukou merged commit fd6b639 into python:main Feb 9, 2026
59 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Feb 9, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 9, 2026
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 9, 2026
@ZeroIntensity @miss-islington
pythongh-144601: Avoid sharing exception objects raised in a PyInit…
7725c61
… function across multiple interpreters (pythonGH-144602)

(cherry picked from commit fd6b639)

Co-authored-by: Peter Bierma <[email protected]>
@miss-islington-app

miss-islington-app Bot commented Feb 9, 2026

Copy link
Copy Markdown

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

cherry_picker fd6b639a49dd1143c6fd8729fc49f17b3114a965 3.13
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app miss-islington-app Bot assigned encukou Feb 9, 2026
@bedevere-app

bedevere-app Bot commented Feb 9, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Feb 9, 2026
@bedevere-bot

bedevere-bot commented Feb 9, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Clang Installed 3.x (tier-3) has failed when building commit fd6b639.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1645/builds/2096) and take a look at the build logs.
  4. Check if the failure is related to this commit (fd6b639) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1645/builds/2096

Summary of the results of the build (if available):

Click to see traceback logs
fatal: unable to access 'https://github.com/python/cpython.git/': The requested URL returned error: 502

chmod: cannot access 'target/': No such file or directory

make: *** No rule to make target 'distclean'.  Stop.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Feb 9, 2026

Copy link
Copy Markdown
Member

GitHub is having issues; that builder got a 502 Bad Gateway.

ZeroIntensity reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Feb 9, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Fedora Stable Clang Installed 3.x (tier-2) has failed when building commit fd6b639.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/350/builds/9323) and take a look at the build logs.
  4. Check if the failure is related to this commit (fd6b639) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/350/builds/9323

Summary of the results of the build (if available):

Click to see traceback logs
fatal: unable to access 'https://github.com/python/cpython.git/': The requested URL returned error: 502

chmod: cannot access 'target/': No such file or directory

make: *** No rule to make target 'distclean'.  Stop.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ZeroIntensity
ZeroIntensity deleted the subinterp-import-crash branch February 11, 2026 02:11
@ZeroIntensity ZeroIntensity mentioned this pull request Feb 12, 2026
[3.14] gh-144601: Use _testmultiphase instead of _testsinglephase in test_importlib #144769
Merged
thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@ZeroIntensity @thunder-coding
pythongh-144601: Avoid sharing exception objects raised in a PyInit…
bf9df37
… function across multiple interpreters (pythonGH-144602)
ZeroIntensity added a commit that referenced this pull request Feb 16, 2026
@miss-islington @ZeroIntensity
[3.14] gh-144601: Avoid sharing exception objects raised in a `PyInit…
907958c
…` function across multiple interpreters (GH-144602) (GH-144633)

gh-144601: Avoid sharing exception objects raised in a `PyInit` function across multiple interpreters (GH-144602)
(cherry picked from commit fd6b639)

Co-authored-by: Peter Bierma <[email protected]>
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Feb 16, 2026
@ZeroIntensity
[3.13] pythongh-144601: Avoid sharing exception objects raised in a `…
1b2c2a4
…PyInit` function across multiple interpreters (pythonGH-144602)

(cherry picked from commit fd6b639)

Co-authored-by: Peter Bierma <[email protected]>
@bedevere-app

bedevere-app Bot commented Feb 16, 2026

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 16, 2026
ZeroIntensity added a commit to ZeroIntensity/cpython that referenced this pull request Feb 16, 2026
@miss-islington @ZeroIntensity
[3.13] pythongh-144601: Avoid sharing exception objects raised in a `…
b00f9b0
…PyInit` function across multiple interpreters (pythonGH-144602) (pythonGH-144633)

pythongh-144601: Avoid sharing exception objects raised in a `PyInit` function across multiple interpreters (pythonGH-144602)
(cherry picked from commit fd6b639)
(cherry picked from commit 907958c)

Co-authored-by: Miss Islington (bot) <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
ZeroIntensity added a commit that referenced this pull request Feb 16, 2026
@ZeroIntensity
[3.13] gh-144601: Avoid sharing exception objects raised in a `PyInit…
9314ec2
…` function across multiple interpreters (GH-144602) (GH-144880)

(cherry picked from commit fd6b639)
This was referenced Feb 16, 2026
Python 3.13 breaks circular imports through single-phase extension modules using non-isolated subinterpreters #138045
Closed
gh-138045: Fix importing numpy in legacy subinterpreters by skipping switch to main interpreter when not needed #142979
Closed
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@ZeroIntensity @ljfp
pythongh-144601: Avoid sharing exception objects raised in a PyInit…
864dfa3
… function across multiple interpreters (pythonGH-144602)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@encukou encukou

Labels

topic-subinterpreters

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@ZeroIntensity @bedevere-bot @encukou
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.