Skip to content

The site module must not load _pyrepl if PYTHON_BASIC_REPL env var is set #125096

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vstinner opened this issue Oct 8, 2024 · 2 comments
Closed
Labels
topic-repl Related to the interactive shell

Comments

@vstinner
Copy link
Member

vstinner commented Oct 8, 2024

Even if the new REPL is disabled by setting PYTHON_BASIC_REPL=1 env var, the site module still loads it. I propose to make sure that it's not loaded in this case.

Moreover, PYTHON_BASIC_REPL should be ignored if -E or -I command line options are used.

Linked PRs

@vstinner vstinner added the topic-repl Related to the interactive shell label Oct 8, 2024
@vstinner vstinner changed the title The site module must not load _pyrepl if PYTHON_BASIC_REPL is set The site module must not load _pyrepl if PYTHON_BASIC_REPL env var is set Oct 8, 2024
@vstinner vstinner changed the title The site module must not load _pyrepl if PYTHON_BASIC_REPL env var is set The site module must not load _pyrepl if PYTHON_BASIC_REPL env var is set Oct 8, 2024
vstinner added a commit to vstinner/cpython that referenced this issue Oct 8, 2024
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer loads the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 8, 2024
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 8, 2024
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 8, 2024
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
vstinner added a commit that referenced this issue Oct 8, 2024
If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
vstinner added a commit to vstinner/cpython that referenced this issue Oct 8, 2024
…ython#125097)

If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.

(cherry picked from commit 65ce228)
vstinner added a commit that referenced this issue Oct 8, 2024
…125097) (#125111)

gh-125096: Don't import _pyrepl in site if PYTHON_BASIC_REPL (#125097)

If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.

(cherry picked from commit 65ce228)
@nineteendo
Copy link
Contributor

Can this be closed?

@vstinner
Copy link
Member Author

vstinner commented Oct 8, 2024

Right, it's fixed, I close the PR.

@vstinner vstinner closed this as completed Oct 8, 2024
efimov-mikhail pushed a commit to efimov-mikhail/cpython that referenced this issue Oct 9, 2024
…ython#125097)

If the PYTHON_BASIC_REPL environment variable is set, the site module
no longer imports the _pyrepl module.

Moreover, the site module now respects -E and -I command line
options: ignore PYTHON_BASIC_REPL in this case.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-repl Related to the interactive shell
Projects
None yet
Development

No branches or pull requests

2 participants