summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2016-07-16 17:44:13 (GMT)
committerBrett Cannon <brett@python.org>2016-07-16 17:44:13 (GMT)
commit7ca63cb7cc0ea962f40559ba57f767e38d7f1af7 (patch)
treeb92cd20d63e51652b1324428ca591ff5e88a301b /Lib/importlib
parent702b0460d20fa699c1c703e00bcc93243e3020a1 (diff)
downloadcpython-7ca63cb7cc0ea962f40559ba57f767e38d7f1af7.zip
cpython-7ca63cb7cc0ea962f40559ba57f767e38d7f1af7.tar.gz
cpython-7ca63cb7cc0ea962f40559ba57f767e38d7f1af7.tar.bz2
Fix regressions introduced by fixes for issue #27083.
Diffstat (limited to 'Lib/importlib')
-rw-r--r--Lib/importlib/_bootstrap_external.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index 6e2ddb5..e54d691 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -21,16 +21,22 @@ work. One should use importlib as the public-facing version of this module.
# anything specified at the class level.
# Bootstrap-related code ######################################################
-
-_CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin'
+_CASE_INSENSITIVE_PLATFORMS_STR_KEY = 'win',
+_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'darwin'
+_CASE_INSENSITIVE_PLATFORMS = (_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY
+ + _CASE_INSENSITIVE_PLATFORMS_STR_KEY)
def _make_relax_case():
if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):
+ if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS_STR_KEY):
+ key = 'PYTHONCASEOK'
+ else:
+ key = b'PYTHONCASEOK'
+
def _relax_case():
"""True if filenames must be checked case-insensitively."""
- return (b'PYTHONCASEOK' in _os.environ
- or 'PYTHONCASEOK' in _os.environ)
+ return key in _os.environ
else:
def _relax_case():
"""True if filenames must be checked case-insensitively."""