aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/importlib
diff options
context:
space:
mode:
authorThomas Grainger <tagrain@gmail.com>2022-07-17 02:07:53 +0100
committerGitHub <noreply@github.com>2022-07-16 18:07:53 -0700
commit6da988a46c8955755624ad9878288d5214fceb4e (patch)
treebc3d48d836bb49b52f76761f776ec8c0440793a2 /Lib/importlib
parent2e9da8e3522764d09f1d6054a2be567e91a30812 (diff)
downloadcpython-6da988a46c8955755624ad9878288d5214fceb4e.tar.gz
cpython-6da988a46c8955755624ad9878288d5214fceb4e.zip
gh-91181: drop support for bytes on sys.path (GH-31934)
Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it. Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap_external.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 007127b9fd4..b6c6716e907 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -1475,7 +1475,7 @@ class PathFinder:
# the list of paths that will become its __path__
namespace_path = []
for entry in path:
- if not isinstance(entry, (str, bytes)):
+ if not isinstance(entry, str):
continue
finder = cls._path_importer_cache(entry)
if finder is not None: