]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-125245: Fix race condition when importing `collections.abc` (#125415)
authorSam Gross <colesbury@gmail.com>
Thu, 24 Oct 2024 22:12:51 +0000 (18:12 -0400)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2024 22:12:51 +0000 (18:12 -0400)
commitfed501d7247053ce46a2ba512bf0e4bb4f483be6
tree11005e6c0fd2af498b0eb019b26809aea672c2f9
parent332356b880576a1a00b5dc34f03d7d3995dd4512
gh-125245: Fix race condition when importing `collections.abc` (#125415)

If multiple threads concurrently imported `collections.abc`, some of the
threads might incorrectly see the "shim" `Lib/collections/abc.py` module
instead of the correct `Lib/_collections_abc.py` module.  This affected
both the free threading build and the default GIL-enabled build.
Lib/collections/__init__.py
Lib/collections/abc.py [deleted file]
Misc/NEWS.d/next/Library/2024-10-11-00-40-13.gh-issue-125245.8vReM-.rst [new file with mode: 0644]