]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-125245: Fix race condition when importing `collections.abc` (GH-125415...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 24 Oct 2024 22:38:45 +0000 (00:38 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2024 22:38:45 +0000 (22:38 +0000)
commitd46d291bd390027811937bbf5af2e2600b8398a9
tree5b730c1d5c42ffaf8d5b108d02e2101e8b3d27e2
parent92d301eb678427dbb40aef2e0c9c91f75f278413
[3.13] gh-125245: Fix race condition when importing `collections.abc` (GH-125415) (GH-125944)

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.
(cherry picked from commit fed501d7247053ce46a2ba512bf0e4bb4f483be6)

Co-authored-by: Sam Gross <colesbury@gmail.com>
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]