Skip to content

Don't check for PYTHONCASEOK if interpreter started with -E #61030

Closed

Description

@brettcannon
BPO 16826
Nosy @brettcannon, @ncoghlan, @vstinner, @merwok, @meadori, @ericsnowcurrently
Superseder
  • bpo-38691: importlib: PYTHONCASEOK should be ignored when using python3 -E
  • Files
  • issue16826-0.patch
  • issue16826-1.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/meadori'
    closed_at = <Date 2020-05-15.00:47:33.889>
    created_at = <Date 2012-12-31.14:34:51.477>
    labels = ['interpreter-core', 'type-bug', '3.9']
    title = "Don't check for PYTHONCASEOK if interpreter started with -E"
    updated_at = <Date 2020-05-15.00:47:33.888>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2020-05-15.00:47:33.888>
    actor = 'vstinner'
    assignee = 'meador.inge'
    closed = True
    closed_date = <Date 2020-05-15.00:47:33.889>
    closer = 'vstinner'
    components = ['Interpreter Core']
    creation = <Date 2012-12-31.14:34:51.477>
    creator = 'brett.cannon'
    dependencies = []
    files = ['28517', '29858']
    hgrepos = []
    issue_num = 16826
    keywords = ['patch', '3.2regression']
    message_count = 13.0
    messages = ['178679', '178723', '179483', '180001', '186964', '196876', '196880', '196882', '196928', '275077', '275114', '360917', '368886']
    nosy_count = 7.0
    nosy_names = ['brett.cannon', 'ncoghlan', 'vstinner', 'eric.araujo', 'meador.inge', 'python-dev', 'eric.snow']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '38691'
    type = 'behavior'
    url = 'https://bugs.python.org/issue16826'
    versions = ['Python 3.9']

    Activity

    1. brettcannon commented on Dec 31, 2012

      @brettcannon
      MemberAuthor

      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).

    2. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      type-bugAn unexpected behavior, bug, or error
      on Dec 31, 2012
    3. meadori commented on Jan 1, 2013

      @meadori
      Member

      Is the attached OK?

    4. merwok commented on Jan 9, 2013

      @merwok
      Member

      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).

    5. meadori commented on Jan 15, 2013

      @meadori
      Member

      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.

    6. meadori commented on Apr 15, 2013

      @meadori
      Member

      Here is a version which implements the subprocess method for testing
      suggested by Éric.

    7. self-assigned this
      on Sep 1, 2013
    8. python-dev commented on Sep 3, 2013

      python-devmannequin
      Mannequin

      New changeset 934e650abc4d by Meador Inge in branch '3.3':
      Issue bpo-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 bpo-16826: Don't check for PYTHONCASEOK when using -E.
      http://hg.python.org/cpython/rev/ba850a78cbbc

    9. meadori commented on Sep 3, 2013

      @meadori
      Member

      My last commit caused some buildbot failures (http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.3/builds/1069). I am investigating.

    10. python-dev commented on Sep 4, 2013

      python-devmannequin
      Mannequin

      New changeset 7801ef4a4ce3 by Meador Inge in branch '3.3':
      Issue bpo-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 bpo-16826: Revert fix while Windows issues are being worked out.
      http://hg.python.org/cpython/rev/a1282b67b4cf

    11. meadori commented on Sep 4, 2013

      @meadori
      Member

      Reopening to rework test cases.

    12. reopened this on Sep 4, 2013
    13. ericsnowcurrently commented on Sep 8, 2016

      @ericsnowcurrently
      Member

      What ended up happening with this?

    14. meadori commented on Sep 8, 2016

      @meadori
      Member

      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.

    15. brettcannon commented on Jan 29, 2020

      @brettcannon
      MemberAuthor

      This is still occurring. Probably need to add and sys.ignore_environment to

      return key in _os.environ
      .

    16. vstinner commented on May 15, 2020

      @vstinner
      Member

      Issue fixed in bpo-38691:

      commit fc72ab6
      Author: idomic <[email protected]>
      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.
      
    17. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    3.9 (EOL)end of lifeinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions