You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make pyvenv.cfg-relocation part of the interpreter initialization instead of the site module #126985
Currently, the mechanism behind virtual environments is implemented in the site module. This means that disabling the site 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 setting sys.prefix to sys.exec_prefix to the virtual environment prefix in getpath.
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.
Activity
pythonGH-126985: move pyconf.cfg detection from site to getpath
Merge branch 'main' into pythongh-126985
GH-126985: move pyvenv.cfg detection from site to getpath (#126987)
pythonGH-126985: Don't override venv dectection whith PYTHONHOME
GH-126985: Don't override venv detection with PYTHONHOME (#127968)
pythonGH-126985: Don't override venv detection with PYTHONHOME (pytho…
pythonGH-126985: move pyvenv.cfg detection from site to getpath (pyth…
befeleme commentedon Jan 13, 2025
Cross-referencing for visibility: #128779 - this has started to happen since Python 3.14.0a3