summaryrefslogtreecommitdiffstats
path: root/Lib/importlib
diff options
context:
space:
mode:
authoridomic <michael.ido@gmail.com>2020-02-17 09:05:11 (GMT)
committerGitHub <noreply@github.com>2020-02-17 09:05:11 (GMT)
commitd83b6600b25487e4ebffd7949d0f478de9538875 (patch)
tree1c3f49ac635e570066ad1a0c81a47c6247d45542 /Lib/importlib
parent85a2eef473a2c9ed3ab9c6ee339891fe99adbbc9 (diff)
downloadcpython-d83b6600b25487e4ebffd7949d0f478de9538875.zip
cpython-d83b6600b25487e4ebffd7949d0f478de9538875.tar.gz
cpython-d83b6600b25487e4ebffd7949d0f478de9538875.tar.bz2
bpo-38691 Added a switch to ignore PYTHONCASEOK when -E or -I flags passed (#18314)
* Hard reset + cherry piciking the changes. * 📜🤖 Added by blurb_it. * Added @vstinner News * Update Misc/NEWS.d/next/Library/2020-02-11-13-01-38.bpo-38691.oND8Sk.rst Co-Authored-By: Victor Stinner <vstinner@python.org> * Hard reset to master * Hard reset to master + latest changes Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Victor Stinner <vstinner@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 2434cf0..13f0191 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -35,7 +35,7 @@ def _make_relax_case():
def _relax_case():
"""True if filenames must be checked case-insensitively."""
- return key in _os.environ
+ return not sys.flags.ignore_environment and key in _os.environ
else:
def _relax_case():
"""True if filenames must be checked case-insensitively."""