Skip to content

Commit 19bc144

Browse files
committed
Add Misc/NEWS.d entry for gh-149728
1 parent 29a5951 commit 19bc144

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Fix a race in :mod:`importlib._bootstrap` where the fast path in
2+
``_find_and_load`` could return a module whose ``parent.child`` attribute had
3+
not yet been set. Under free-threaded CPython this caused packages using the
4+
lazy-submodule ``__getattr__`` pattern (e.g. NumPy) to recurse to
5+
:exc:`RecursionError` when multiple threads first-touched the same lazy
6+
submodule concurrently. ``spec._initializing`` is now kept ``True`` until
7+
after ``_find_and_load_unlocked`` has attached the module to its parent.

0 commit comments

Comments
 (0)