Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132542: Set native thread ID after fork#132701

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 5 commits intopython:mainfromnoamcohen97:fork-tid
May 20, 2025

Conversation

noamcohen97
Copy link
Contributor

@noamcohen97noamcohen97 commentedApr 18, 2025
edited by bedevere-appbot
Loading

Since most of Python's runtime state, including thread-related data, is only consistent afterPyOS_AfterFork_Child() is called, updatingnative_id in theafter_fork handler ensures correctness and aligns with Python’s existing fork-handling mechanisms.

taegyunkim reacted with thumbs up emoji
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

Needs a blurb entry.

@ZeroIntensityZeroIntensity added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelApr 19, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@ZeroIntensity for commit6ebd095 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132701%2Fmerge

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelApr 19, 2025
Copy link
Member

@ZeroIntensityZeroIntensity left a comment

Choose a reason for hiding this comment

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

LGTM

noamcohen97 reacted with rocket emoji
@serhiy-storchakaserhiy-storchaka added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
@noamcohen97noamcohen97 requested a review fromgpsheadMay 20, 2025 15:58
Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍👍

@serhiy-storchakaserhiy-storchakaenabled auto-merge (squash)May 20, 2025 16:15
@serhiy-storchakaserhiy-storchaka merged commit6b73502 intopython:mainMay 20, 2025
43 checks passed
@miss-islington-app
Copy link

Thanks@noamcohen97 for the PR, and@serhiy-storchaka for merging it 🌮🎉.. 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 requestMay 20, 2025
(cherry picked from commit6b73502)Co-authored-by: Noam Cohen <noam@noam.me>
@miss-islington-app
Copy link

Sorry,@noamcohen97 and@serhiy-storchaka, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker 6b735023132a4ac9dc5b849d982104eeb1e8bdad 3.13
noamcohen97 reacted with eyes emoji

@bedevere-app
Copy link

GH-134356 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 20, 2025
@bedevere-app
Copy link

GH-134361 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 20, 2025
serhiy-storchaka pushed a commit that referenced this pull requestMay 20, 2025
)(cherry picked from commit6b73502)Co-authored-by: Noam Cohen <noam@noam.me>
serhiy-storchaka pushed a commit that referenced this pull requestMay 20, 2025
@noamcohen97noamcohen97 deleted the fork-tid branchMay 20, 2025 17:31
@kulikjak
Copy link
Contributor

kulikjak commentedMay 21, 2025
edited
Loading

Hi, the newly added test fails on systems withoutnative_id:

Traceback (most recent call last):  File"<string>", line6, in<module>    parent_thread_native_id= threading.current_thread().native_id^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError:'_MainThread' object has no attribute 'native_id'

(whileLib/threading.py does check for its existence, the test does not)

noamcohen97 reacted with eyes emoji

@noamcohen97
Copy link
ContributorAuthor

@kulikjak Thank you for noticing. I apologize for that.
I have created#134408 to address the issue.

@serhiy-storchaka Can you please help with merging the fix?

kulikjak reacted with rocket emoji

@kulikjak
Copy link
Contributor

No worries, thanks for the fix!

noamcohen97 reacted with laugh emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@ZeroIntensityZeroIntensityZeroIntensity approved these changes

@gpsheadgpsheadAwaiting requested review from gpshead

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@noamcohen97@bedevere-bot@kulikjak@gpshead@serhiy-storchaka@ZeroIntensity

[8]ページ先頭

©2009-2025 Movatter.jp