cpython/Lib/test/test_importlib
Miss Islington (bot) 46f821d62b
[3.11] gh-114763: Protect lazy loading modules from attribute access races (GH-114781) (GH-115871)
gh-114763: Protect lazy loading modules from attribute access races (GH-114781)

Setting the __class__ attribute of a lazy-loading module to ModuleType enables other threads to attempt to access attributes before the loading is complete. Now that is protected by a lock.
(cherry picked from commit 200271c61d)

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
2024-02-26 20:50:55 +00:00
..
builtin
data
data01
data02
data03
extension
frozen
import_
namespace_pkgs
namespacedata01
partial
resources
source
zipdata01
zipdata02
__init__.py
__main__.py
abc.py
fixtures.py
stubs.py
test_abc.py
test_api.py
test_compatibilty_files.py
test_contents.py
test_files.py
test_lazy.py
test_locks.py
test_main.py
test_metadata_api.py
test_namespace_pkgs.py
test_open.py
test_path.py
test_pkg_import.py
test_read.py
test_reader.py
test_resource.py
test_spec.py
test_threaded_import.py
test_util.py
test_windows.py
test_zip.py
threaded_import_hangers.py
update-zips.py
util.py