mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-33169: Remove values of None
from sys.path_importer_cache when invalidating caches (GH-6402)
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
This commit is contained in:
parent
3a9ccee0e5
commit
9e2be60634
6 changed files with 652 additions and 620 deletions
|
@ -1081,7 +1081,12 @@ find and load modules.
|
|||
.. classmethod:: invalidate_caches()
|
||||
|
||||
Calls :meth:`importlib.abc.PathEntryFinder.invalidate_caches` on all
|
||||
finders stored in :attr:`sys.path_importer_cache`.
|
||||
finders stored in :data:`sys.path_importer_cache` that define the method.
|
||||
Otherwise entries in :data:`sys.path_importer_cache` set to ``None`` are
|
||||
deleted.
|
||||
|
||||
.. versionchanged:: 3.7
|
||||
Entries of ``None`` in :data:`sys.path_importer_cache` are deleted.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Calls objects in :data:`sys.path_hooks` with the current working
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue