Skip to content

Commit

Permalink
In PathFinder.invalidate_caches, also invoke MetadataPathFinder.inval…
Browse files Browse the repository at this point in the history
…idate_caches.
  • Loading branch information
jaraco committed Mar 14, 2024
1 parent e8b6d1e commit 9fad461
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/importlib/_bootstrap_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,9 @@ def invalidate_caches():
# 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'."""
Expand Down

0 comments on commit 9fad461

Please sign in to comment.