classification
Title: Don't check for PYTHONCASEOK if interpreter started with -E
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: duplicate
Dependencies: Superseder: importlib: PYTHONCASEOK should be ignored when using python3 -E
View: 38691
Assigned To: meador.inge Nosy List: brett.cannon, eric.araujo, eric.snow, meador.inge, ncoghlan, python-dev, vstinner
Priority: normal Keywords: 3.2regression, patch

Created on 2012-12-31 14:34 by brett.cannon, last changed 2020-05-15 00:47 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
issue16826-0.patch meador.inge, 2013-01-01 03:21 review
issue16826-1.patch meador.inge, 2013-04-15 00:56 review
Messages (13)
msg178679 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2012-12-31 14:34
Importlib, when checking for PYTHONCASEOK, does not respect -E as it did in Python 3.2 and earlier (http://hg.python.org/cpython/file/0786dfc3b2b4/Python/import.c#l1933).
msg178723 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2013-01-01 03:21
Is the attached OK?
msg179483 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2013-01-09 18:10
Code patch looks good, but for tests, I prefer to run subprocesses with the options and output I want, instead of changing the expected results depending on the python-running-tests’ options (and thus, having two tests into one, but always running only one).
msg180001 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2013-01-15 03:25
I agree that it is better to cover both cases in one test irrespective of the interpreter command line options.  I will take a look at creating a subprocess.  Thanks for the review.
msg186964 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2013-04-15 00:56
Here is a version which implements the subprocess method for testing
suggested by Éric.
msg196876 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-03 22:49
New changeset 934e650abc4d by Meador Inge in branch '3.3':
Issue #16826: Don't check for PYTHONCASEOK when using -E.
http://hg.python.org/cpython/rev/934e650abc4d

New changeset ba850a78cbbc by Meador Inge in branch 'default':
Issue #16826: Don't check for PYTHONCASEOK when using -E.
http://hg.python.org/cpython/rev/ba850a78cbbc
msg196880 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2013-09-03 23:45
My last commit caused some buildbot failures (http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1069).  I am investigating.
msg196882 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-09-04 00:54
New changeset 7801ef4a4ce3 by Meador Inge in branch '3.3':
Issue #16826: Revert fix while Windows issues are being worked out.
http://hg.python.org/cpython/rev/7801ef4a4ce3

New changeset a1282b67b4cf by Meador Inge in branch 'default':
Issue #16826: Revert fix while Windows issues are being worked out.
http://hg.python.org/cpython/rev/a1282b67b4cf
msg196928 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2013-09-04 17:38
Reopening to rework test cases.
msg275077 - (view) Author: Eric Snow (eric.snow) * (Python committer) Date: 2016-09-08 17:36
What ended up happening with this?
msg275114 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2016-09-08 18:57
Nothing.  I didn't have a Windows box handy to investigate at the time.  I do now and can look into this in the next day or so.
msg360917 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2020-01-29 00:33
This is still occurring. Probably need to add `and sys.ignore_environment` to https://github.com/python/cpython/blob/0cd5bff6b7da3118d0c5a88fc2b80f80eb7c3059/Lib/importlib/_bootstrap_external.py#L38.
msg368886 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-15 00:47
Issue fixed in bpo-38691:

commit fc72ab6913f2b5337ae7fda711f2de846d38f479
Author: idomic <michael.ido@gmail.com>
Date:   Mon Mar 9 07:57:53 2020 -0400

    bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)
    
    The importlib module now ignores the PYTHONCASEOK
    environment variable when the -E or -I command line
    options are being used.
History
Date User Action Args
2020-05-15 00:47:33vstinnersetstatus: open -> closed

superseder: importlib: PYTHONCASEOK should be ignored when using python3 -E

nosy: + vstinner
messages: + msg368886
resolution: duplicate
stage: needs patch -> resolved
2020-01-29 00:33:23brett.cannonsetmessages: + msg360917
versions: + Python 3.9, - Python 3.6
2016-09-08 18:57:09meador.ingesetmessages: + msg275114
2016-09-08 17:36:29eric.snowsetnosy: + eric.snow

messages: + msg275077
versions: + Python 3.6, - Python 3.3, Python 3.4
2013-09-04 17:38:34meador.ingesetstatus: closed -> open
resolution: fixed -> (no value)
messages: + msg196928

stage: resolved -> needs patch
2013-09-04 00:54:58python-devsetmessages: + msg196882
2013-09-03 23:45:12meador.ingesetmessages: + msg196880
2013-09-03 22:50:30meador.ingesetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2013-09-03 22:49:38python-devsetnosy: + python-dev
messages: + msg196876
2013-09-01 17:12:17meador.ingesetassignee: meador.inge
stage: patch review -> commit review
2013-04-15 00:56:17meador.ingesetfiles: + issue16826-1.patch

messages: + msg186964
2013-01-15 03:25:30meador.ingesetmessages: + msg180001
2013-01-09 18:10:57eric.araujosetnosy: + eric.araujo
messages: + msg179483
2013-01-01 03:21:16meador.ingesetfiles: + issue16826-0.patch

nosy: + meador.inge
messages: + msg178723

keywords: + patch
stage: test needed -> patch review
2012-12-31 15:15:51ncoghlansetnosy: + ncoghlan
2012-12-31 14:34:51brett.cannoncreate