Closed navytux closed 1 year ago
This works for me on the macOs. Do you have a repro via a Docker image?
Yes, I can reproduces that in debian
docker image e.g. via docker run --name test -it debian
:
If my bisect is correct, the regression comes from 9569493453a39d63064ed7c20653987ba15c99e5
If my bisect is correct, the regression comes from 9569493
The reproduction steps were about using python3 to create a python2 virtualenv. Before 9569493, the created 1.venv/bin/python
is a symlink to system python2 executable and python -S -c "import os"
works fine. After, it is a copy.
But it seems the symlinking was accidental, the intention was to copy executable for python2. In
https://github.com/pypa/virtualenv/commit/9569493453a39d63064ed7c20653987ba15c99e5#diff-e87e31e7905a55448cbbeda24d36cc6ae4eb6cca03ee0b31224872c53c6baa26R53-R55 there is a change to check if the target python is python2 instead of checking if the python running virtualenv is python2. When creating a python2 environment using python2, python -S -c "import os"
does not work before or after 9569493.
So 9569493 just fixes an inconsistency when running python3 and does not introduce a regression.
We no longer support python 2.
Issue
Hello up there. I've discovered that
python -S
is broken in virtualenv created for python2. It works ok for python3. Please find details below:Thanks beforehand, Kirill
Environment
Provide at least:
Linux deco 5.9.0-3-amd64 #1 SMP Debian 5.9.9-1 (2020-11-19) x86_64 GNU/Linux
pip list
of the host python wherevirtualenv
is installed:Output of the virtual environment creation
Make sure to run the creation with
-vvv --with-traceback
: