Content-Length: 300384 | pFad | https://github.com/python/cpython/issues/149319

ad Make `asyncio` REPL respect `python -E` · Issue #149319 · python/cpython · GitHub
Skip to content

Make asyncio REPL respect python -E #149319

Description

@jonathandung

Feature or enhancement

Proposal:

To my knowledge, python -E asks the interpreter to ignore all documented environment variables starting with the PYTHON prefix that might be set. The REPL of asyncio, however, does not follow this:

  1. It does not include a conditional checking sys.flags.ignore_environment, before looking at PYTHON_BASIC_REPL.
  2. Executing PYTHONSTARTUP is guarded by a sys.flag.isolated check (-I) as opposed to sys.flags.ignore_environment (-E). Is this a flaw in the documentation? I think it makes sense to special-case PYTHONSTARTUP.

See the relevant portions of the code here and here, and the documentation part here.

I am making this a feature, because I am not sure if the second part is a bug or intended, in which case it is a documentation fault.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-asynciotopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/149319

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy