cpython/Lib/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
..
metadata [3.11] gh-98706: Sync with importlib_metadata 4.13.0. (GH-98875) 2022-11-05 06:55:04 -07:00
resources [3.11] Add missed stream argument (GH-111775) (#115717) 2024-02-20 11:36:59 -05:00
__init__.py bpo-42135 Correct version slated for importlib.find_loader removal (GH-28312) 2021-09-13 15:57:50 -07:00
_abc.py bpo-42136: Deprecate module_repr() as found in importlib (GH-25022) 2021-03-26 11:55:07 -07:00
_bootstrap.py [3.11] GH-102700: allow built-in modules to be submodules (GH-103162) (GH-103322) 2023-04-06 16:06:02 -07:00
_bootstrap_external.py gh-91181: drop support for bytes on sys.path (GH-31934) 2022-07-16 18:31:25 -07:00
abc.py bpo-46118: Move importlib.resources to its own package. (#30176) 2021-12-30 21:00:48 -05: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.11] gh-114763: Protect lazy loading modules from attribute access races (GH-114781) (GH-115871) 2024-02-26 20:50:55 +00:00