-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Make pyvenv.cfg
-relocation part of the interpreter initialization instead of the site
module
#126985
Labels
type-feature
A feature request or enhancement
Comments
FFY00
added a commit
to FFY00/cpython
that referenced
this issue
Nov 18, 2024
Signed-off-by: Filipe Laíns <lains@riseup.net>
FFY00
added a commit
to FFY00/cpython
that referenced
this issue
Nov 22, 2024
FFY00
added a commit
that referenced
this issue
Nov 26, 2024
FFY00
added a commit
to FFY00/cpython
that referenced
this issue
Dec 15, 2024
PYTHONHOME should only override the base prefix calculation, it should have no effect on detecting if we are running inside a virtual environment. Signed-off-by: Filipe Laíns <lains@riseup.net
FFY00
added a commit
that referenced
this issue
Dec 15, 2024
srinivasreddy
pushed a commit
to srinivasreddy/cpython
that referenced
this issue
Jan 8, 2025
ebonnal
pushed a commit
to ebonnal/cpython
that referenced
this issue
Jan 12, 2025
Cross-referencing for visibility: #128779 - this has started to happen since Python 3.14.0a3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature or enhancement
Proposal:
Currently, the mechanism behind virtual environments is implemented in the
site
module. This means that disabling thesite
initialization (passing-S
) disables virtual environments.I would like to move the virtual environment detection from
site
to the interpreter initialization (getpath
), which would essentially consist of settingsys.prefix
tosys.exec_prefix
to the virtual environment prefix ingetpath
.The motivation is the same as GH-126793, the same UX example applies. Running
python -S -m ensurepip
inside a virtual environment would install to the system, instead of the virtual environment.Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: