mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964)
This commit is contained in:
parent
8563a7052c
commit
e9d7f88d56
3 changed files with 49 additions and 0 deletions
|
@ -413,6 +413,7 @@ def get_importer(path_item):
|
|||
The cache (or part of it) can be cleared manually if a
|
||||
rescan of sys.path_hooks is necessary.
|
||||
"""
|
||||
path_item = os.fsdecode(path_item)
|
||||
try:
|
||||
importer = sys.path_importer_cache[path_item]
|
||||
except KeyError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue