gh-93461: Invalidate sys.path_importer_cache entries with relative paths (GH-93653)

(cherry picked from commit 09243b898a)

Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
Miss Islington (bot) 2022-06-12 23:29:59 -07:00 committed by GitHub
parent 536af65e96
commit 3d1c080591
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 36 additions and 14 deletions

View file

@ -395,7 +395,7 @@ def find_module(self, *args):
def invalidate_caches(self):
self.called = True
key = 'gobledeegook'
key = os.path.abspath('gobledeegook')
meta_ins = InvalidatingNullFinder()
path_ins = InvalidatingNullFinder()
sys.meta_path.insert(0, meta_ins)