Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update threading checks to be compatible with Python 3.13 #551

Merged

Conversation

bsteffensmeier
Copy link
Member

Python 3.13 is changing the way threading.active_count() works in sub-interpreters. In previous versions when no other threads in the interpreter are active then there is only 1 active thread. New in Python 3.13 the main thread if the main interpreter is included in the active_count() of sub-interpreters so there will always be 2 active threads. Since we check for active threads before ending the interpreter those checks are being updated for compatibility. The changes to Python that made this change necessary were made under python/cpython#114271. This problem was discovered in Python 3.13rc1 and the change has been verified in that version.

Copy link
Member

@ndjensen ndjensen left a comment

Choose a reason for hiding this comment

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

Looks good.

@bsteffensmeier bsteffensmeier merged commit e3a8029 into ninia:dev_4.2 Aug 31, 2024
1 check passed
@bsteffensmeier bsteffensmeier deleted the python313-threading-updates branch October 22, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants