mirror of
https://github.com/python/cpython.git
synced 2025-08-09 11:29:45 +00:00
[3.12] gh-116811: Ensure MetadataPathFinder.invalidate_caches is reachable when delegated through PathFinder. (GH-116812) (#116864)
* Make MetadataPathFinder a proper classmethod.
* In PathFinder.invalidate_caches, also invoke MetadataPathFinder.invalidate_caches.
* Add blurb
(cherry picked from commit 5f52d20a93
)
This commit is contained in:
parent
abd079806d
commit
8336cb2b6f
3 changed files with 6 additions and 0 deletions
|
@ -1450,6 +1450,9 @@ class PathFinder:
|
|||
# https://bugs.python.org/issue45703
|
||||
_NamespacePath._epoch += 1
|
||||
|
||||
from importlib.metadata import MetadataPathFinder
|
||||
MetadataPathFinder.invalidate_caches()
|
||||
|
||||
@staticmethod
|
||||
def _path_hooks(path):
|
||||
"""Search sys.path_hooks for a finder for 'path'."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue