Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
BHUVANSH855
left a comment
There was a problem hiding this comment.
- Rename
Misc/NEWS.d/next/Core and Builtins/toMisc/NEWS.d/next/Core_and_Builtins/. - Use literal markup in the NEWS entry:
_threading_localandthreadinginstead of single-backtick/default-role markup.
The Docs failure is caused by the unresolved Sphinx reference to _threading_local. Once fixed, please push the update and rerun CI.
|
See #156357 (comment). And why are you both updating the |
Fixes #156341.
When
_thread._localis unavailable, importingthreadingfalls back to the pure Python_threading_localimplementation. The fallback currently creates a circular initialization path that preventsthreadingfrom importing.This change delays
_thread_local_infoinitialization until after the main thread is registered and updates the fallback implementation to use thethreadingmodule explicitly.Adds a regression test for the fallback import path.
threadingand_threading_local#156341