diff options
author | Miguel Brito <5544985+miguendes@users.noreply.github.com> | 2021-05-11 23:27:22 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 23:27:22 (GMT) |
commit | e9d7f88d5643f7e6387bf994c130503766d7eb92 (patch) | |
tree | e42e6c812aa4f7b16ecb79e6dbda897d1ed736e2 /Lib/pkgutil.py | |
parent | 8563a7052ccd98e6a381d361664ce567afd5eb6e (diff) | |
download | cpython-e9d7f88d5643f7e6387bf994c130503766d7eb92.zip cpython-e9d7f88d5643f7e6387bf994c130503766d7eb92.tar.gz cpython-e9d7f88d5643f7e6387bf994c130503766d7eb92.tar.bz2 |
bpo-44061: Fix pkgutil.iter_modules regression when passed a pathlib.Path object (GH-25964)
Diffstat (limited to 'Lib/pkgutil.py')
-rw-r--r-- | Lib/pkgutil.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/pkgutil.py b/Lib/pkgutil.py index 2c34298..48c1479 100644 --- a/Lib/pkgutil.py +++ b/Lib/pkgutil.py @@ -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: |