cpython/Lib/test/test_importlib
Miss Islington (bot) 7b91b9001a
[3.12] gh-114763: Protect lazy loading modules from attribute access races (GH-114781) (GH-115870)
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:43:44 +00:00
..
builtin gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
data bpo-44893: Implement EntryPoint as simple class with attributes. (GH-30150) 2021-12-16 15:49:42 -05:00
extension [3.12] gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) (GH-113429) 2023-12-23 11:50:01 +00:00
frozen gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
import_ [3.12] gh-112414: Add additional unit tests for calling repr() on a namespace package (GH-112475) (#112480) 2023-11-28 00:39:01 +00:00
namespace_pkgs
partial bpo-43517: Fix false positive in detection of circular imports (#24895) 2021-03-20 20:07:44 +01:00
resources gh-97930: Apply changes from importlib_resources 5.12. (GH-102010) 2023-02-18 16:29:22 -05:00
source gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
__init__.py
__main__.py
_context.py Sync with importlib_metadata 6.5 (GH-103584) 2023-04-20 22:12:48 -04:00
_path.py Sync with importlib_metadata 6.5 (GH-103584) 2023-04-20 22:12:48 -04:00
abc.py
fixtures.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
stubs.py
test_abc.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
test_api.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
test_lazy.py [3.12] gh-114763: Protect lazy loading modules from attribute access races (GH-114781) (GH-115870) 2024-02-26 20:43:44 +00:00
test_locks.py [3.12] gh-109974: Fix threading lock_tests race conditions (#110057) (#110346) 2023-10-04 11:26:45 +00:00
test_main.py [3.12] gh-106300: Improve assertRaises(Exception) usages in tests (GH-106302) (GH-106534) 2023-07-07 14:25:24 -07:00
test_metadata_api.py gh-103661: Apply bugfix from importlib_metadata 6.5.1 and restore test. (#103681) 2023-04-22 13:52:51 -04:00
test_namespace_pkgs.py [3.12] gh-112414: Fix AttributeError when calling repr() on a namespace package imported with a custom loader (GH-112425) (#112440) 2023-11-27 08:53:57 +00:00
test_pkg_import.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181) 2021-04-05 13:11:23 +09:00
test_spec.py gh-97850: Remove deprecated functions from importlib.utils (#97898) 2022-10-06 17:57:10 -07:00
test_threaded_import.py [3.12] Fix test_importlib.test_side_effect_import() (GH-104840) (#104842) 2023-05-25 02:36:13 +02:00
test_util.py [3.12] Update the expected bytecode magic in test_importlib.test_util (#107626) 2023-08-04 13:41:03 +00:00
test_windows.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
test_zip.py bpo-46425: Partially revert "bpo-46425: fix direct invocation of test_importlib (GH-30682)" (GH-30799) 2022-01-22 21:38:26 -05:00
threaded_import_hangers.py
util.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00