cpython/Lib/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
..
metadata gh-103661: Apply bugfix from importlib_metadata 6.5.1 and restore test. (#103681) 2023-04-22 13:52:51 -04:00
resources [3.12] Add missed stream argument (GH-111775) (#115716) 2024-02-20 11:36:55 -05:00
__init__.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
_abc.py gh-102515: Remove unused imports in the Lib/ directory (#102516) 2023-03-08 11:45:38 +00:00
_bootstrap.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
_bootstrap_external.py [3.12] gh-112983: Add the known magic value of 3495 for Python 3.11 bytecode (GH-112985) (#113023) 2023-12-12 18:24:28 +00:00
abc.py gh-98040: Remove find_loader, find_module and other deprecated APIs (#98059) 2023-05-03 04:55:22 -07:00
machinery.py bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049) 2021-10-20 14:05:29 -07:00
readers.py bpo-46118: Move importlib.resources to its own package. (#30176) 2021-12-30 21:00:48 -05:00
simple.py bpo-46118: Move importlib.resources to its own package. (#30176) 2021-12-30 21:00:48 -05:00
util.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