Skip to content

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented Sep 18, 2025

Noticed while working on GH-136004. Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state and it scheduled for any interpreter. In GH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.


📚 Documentation preview 📚: https://cpython-previews--139117.org.readthedocs.build/

@bedevere-app bedevere-app bot added awaiting core review docs Documentation in the Doc dir labels Sep 18, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Sep 18, 2025
@ZeroIntensity ZeroIntensity added topic-C-API and removed docs Documentation in the Doc dir awaiting core review labels Sep 18, 2025
@ZeroIntensity ZeroIntensity enabled auto-merge (squash) September 18, 2025 12:05
@ZeroIntensity ZeroIntensity merged commit 89ff88b into python:main Sep 18, 2025
50 checks passed
@ZeroIntensity ZeroIntensity deleted the py-addpendingcalls-doc branch September 18, 2025 12:10
@github-project-automation github-project-automation bot moved this from Todo to Done in Sprint 2024 Sep 18, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Sep 18, 2025
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 18, 2025
…ythonGH-139117)

Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In pythonGH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.
(cherry picked from commit 89ff88b)

Co-authored-by: Peter Bierma <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 18, 2025
…ythonGH-139117)

Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In pythonGH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.
(cherry picked from commit 89ff88b)

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

bedevere-app bot commented Sep 18, 2025

GH-139118 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 18, 2025
@bedevere-app
Copy link

bedevere-app bot commented Sep 18, 2025

GH-139119 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 18, 2025
ZeroIntensity added a commit that referenced this pull request Sep 18, 2025
…3.12 (GH-139117) (GH-139119)

Document `Py_AddPendingCall()` change with subinterpreters in 3.12 (GH-139117)

Prior to 3.9, Py_AddPendingCall() would always run pending calls in the main interpreter, but then each interpreter got their own ceval state, and they were scheduled for any interpreter. In GH-104813, this was undone, so Py_AddPendingCall() would always schedule for the main interpreter.
(cherry picked from commit 89ff88b)

Co-authored-by: Peter Bierma <[email protected]>
hugovk pushed a commit that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done
Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant