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 — [3.14] gh-144601: Avoid sharing exception objects raised in a `PyInit` function across multiple interpreters (GH-144602) by miss-islington · Pull Request #144633 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Feb 9, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

(cherry picked from commit fd6b639)

Co-authored-by: Peter Bierma [email protected]

  • 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 @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
miss-islington requested review from brettcannon, ericsnowcurrently, kumaraditya303, ncoghlan and warsaw as code owners February 9, 2026 15:57
@bedevere-app bedevere-app Bot added the awaiting review label Feb 9, 2026
This was referenced Feb 9, 2026
Extensions that raise exceptions in their PyInit* cause a crash in subinterpreters #144601
Closed
gh-144601: Avoid sharing exception objects raised in a PyInit function across multiple interpreters #144602
Merged
@bedevere-app bedevere-app Bot added the topic-subinterpreters label Feb 9, 2026
@brettcannon
brettcannon removed their request for review February 9, 2026 22:39
@ZeroIntensity

ZeroIntensity commented Feb 10, 2026

Copy link
Copy Markdown
Member

Hm, I'm very confused as to why the test is failing here, especially since this worked fine on main. I'll investigate tomorrow.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ZeroIntensity
ZeroIntensity marked this pull request as draft February 10, 2026 02:29
@bedevere-app bedevere-app Bot removed the awaiting review label Feb 10, 2026
@ZeroIntensity

ZeroIntensity commented Feb 11, 2026

Copy link
Copy Markdown
Member

Ah, found the problem. The issue is that in <3.15, there's an unused import to _testsinglephase in test_importlib.util, so import_extension_from_file can't even be imported from the subinterpreter:

cpython/Lib/test/test_importlib/util.py

Line 18 in bbd682d

_testsinglephase = import_helper.import_module("_testsinglephase")

This was removed on main by #141785, but that wasn't backported. @encukou -- I'm not familiar with _testmultiphase. Is there any reason we can't switch to also importing _testmultiphase on 3.14?

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou

encukou commented Feb 12, 2026

Copy link
Copy Markdown
Member

None that I can think of.
Sorry that I embedded that in a bigger change. I'd be happy to review a partial backport.

ZeroIntensity reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@ZeroIntensity ZeroIntensity mentioned this pull request Feb 12, 2026
[3.14] gh-144601: Use _testmultiphase instead of _testsinglephase in test_importlib #144769
Merged
@ZeroIntensity
Merge branch '3.14' into backport-fd6b639-3.14
3e6c3ca
@ZeroIntensity
ZeroIntensity marked this pull request as ready for review February 16, 2026 15:34
@bedevere-app bedevere-app Bot added the awaiting review label Feb 16, 2026
@ZeroIntensity
ZeroIntensity merged commit 907958c into python:3.14 Feb 16, 2026
49 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting review label Feb 16, 2026
@miss-islington
miss-islington deleted the backport-fd6b639-3.14 branch February 16, 2026 15:37
@ZeroIntensity ZeroIntensity added the needs backport to 3.13 only security fixes label Feb 16, 2026
@miss-islington-app

miss-islington-app Bot commented Feb 16, 2026

Copy link
Copy Markdown

Thanks @miss-islington for the PR, and @ZeroIntensity for merging it 🌮🎉.. I'm working now to backport this PR to: 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 commented Feb 16, 2026

Copy link
Copy Markdown

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

cherry_picker 907958c4ba3f310d18810f7132f1ecd6798dd5c5 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 ZeroIntensity Feb 16, 2026
@ZeroIntensity ZeroIntensity 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 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

Uh oh!

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

Assignees

@ZeroIntensity ZeroIntensity

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

@miss-islington @ZeroIntensity @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.