Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.bugs.dist > #1154246
| From | Michael Prokop <mika@debian.org> |
|---|---|
| Newsgroups | linux.debian.bugs.dist |
| Subject | Bug#1041091: python3-virtualenv: re-execution of virtualenv command removes python-debian's debian directory |
| Date | 2023-07-14 21:30 +0200 |
| Message-ID | <GRwEh-eTo-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
Package: python3-virtualenv Version: 20.17.1+ds-1 Severity: important Hi, as funny as the subject might sound, this took a while to track down. :) Reporting this, since this might bite other folks as well, and I also have STR. The behavior that was present until and incl. bullseye was as follows (newlines between command lines added by myself to make it easier to read/parse/follow): | % podman run --pull=always --rm -i -t debian:bullseye bash | root@9b5d718485de:/# cd | root@9b5d718485de:~# apt update ; apt -y install python3-virtualenv | [...] | root@9b5d718485de:~# virtualenv --python=python3 virtualenv | created virtual environment CPython3.9.2.final.0-64 in 162ms | creator CPython3Posix(dest=/root/virtualenv, clear=False, no_vcs_ignore=False, global=False) | seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) | added seed packages: pip==20.3.4, pkg_resources==0.0.0, setuptools==44.1.1, wheel==0.34.2 | activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator | | root@9b5d718485de:~# . virtualenv/bin/activate | | (virtualenv) root@9b5d718485de:~# pip install python-debian | Collecting python-debian | Downloading python_debian-0.1.49-py3-none-any.whl (132 kB) | |████████████████████████████████| 132 kB 5.9 MB/s | Collecting chardet | Downloading chardet-5.1.0-py3-none-any.whl (199 kB) | |████████████████████████████████| 199 kB 18.4 MB/s | Installing collected packages: chardet, python-debian | Successfully installed chardet-5.1.0 python-debian-0.1.49 | | (virtualenv) root@9b5d718485de:~# python3 -c "from debian import deb822" | | (virtualenv) root@9b5d718485de:~# virtualenv --python=python3 virtualenv | created virtual environment CPython3.9.2.final.0-64 in 142ms | creator CPython3Posix(dest=/root/virtualenv, clear=False, no_vcs_ignore=False, global=False) | seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) | added seed packages: chardet==5.1.0, pip==20.3.4, pkg_resources==0.0.0, python_debian==0.1.49, setuptools==44.1.1, wheel==0.34.2 | activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator | | (virtualenv) root@9b5d718485de:~# python3 -c "from debian import deb822" So everything fine, no problems. But on bookworm, this doesn't behave as such any longer: | % podman run --pull=always --rm -i -t debian:bookworm bash | root@491ed520fc26:/# cd | root@491ed520fc26:~# apt update ; apt -y install python3-virtualenv | [...] | root@491ed520fc26:~# virtualenv --python=python3 virtualenv | created virtual environment CPython3.11.2.final.0-64 in 439ms | creator CPython3Posix(dest=/root/virtualenv, clear=False, no_vcs_ignore=False, global=False) | seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) | added seed packages: pip==23.0.1, setuptools==66.1.1, wheel==0.38.4 | activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator | | root@491ed520fc26:~# . virtualenv/bin/activate | | (virtualenv) root@491ed520fc26:~# pip install python-debian | Collecting python-debian | Downloading python_debian-0.1.49-py3-none-any.whl (132 kB) | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.5/132.5 kB 3.7 MB/s eta 0:00:00 | Collecting chardet | Downloading chardet-5.1.0-py3-none-any.whl (199 kB) | ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.1/199.1 kB 6.5 MB/s eta 0:00:00 | Installing collected packages: chardet, python-debian | Successfully installed chardet-5.1.0 python-debian-0.1.49 | | (virtualenv) root@491ed520fc26:~# python3 -c "from debian import deb822" | | (virtualenv) root@491ed520fc26:~# virtualenv --python=python3 virtualenv | created virtual environment CPython3.11.2.final.0-64 in 341ms | creator CPython3Posix(dest=/root/virtualenv, clear=False, no_vcs_ignore=False, global=False) | seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) | added seed packages: chardet==5.1.0, pip==23.0.1, python_debian==0.1.49, setuptools==66.1.1, wheel==0.38.4 | activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator | | (virtualenv) root@491ed520fc26:~# python3 -c "from debian import deb822" | Traceback (most recent call last): | File "<string>", line 1, in <module> | ModuleNotFoundError: No module named 'debian' So the re-execution of `virtualenv` for some reason removes the debian directory of python-debian on the filesystem. :-/ To highlight this from another run: | (virtualenv) root@b52222d06fb7:~# ls virtualenv/lib/python3.11/site-packages/debian | __init__.py __pycache__ _arch_table.py _deb822_repro _util.py _version.py arfile.py changelog.py copyright.py deb822.py debfile.py debian_support.py debtags.py deprecation.py py.typed substvars.py watch.py | (virtualenv) root@b52222d06fb7:~# virtualenv --python=python3 virtualenv | created virtual environment CPython3.11.2.final.0-64 in 535ms | creator CPython3Posix(dest=/root/virtualenv, clear=False, no_vcs_ignore=False, global=False) | seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv) | added seed packages: chardet==5.1.0, pip==23.0.1, python_debian==0.1.49, setuptools==66.1.1, wheel==0.38.4 | activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator | (virtualenv) root@b52222d06fb7:~# ls virtualenv/lib/python3.11/site-packages/debian | ls: cannot access 'virtualenv/lib/python3.11/site-packages/debian': No such file or directory | (virtualenv) root@b52222d06fb7:~# pip list | Package Version | ------------- ------- | chardet 5.1.0 | pip 23.0.1 | python-debian 0.1.49 | setuptools 66.1.1 | wheel 0.38.4 regards -mika-
Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread
Bug#1041091: python3-virtualenv: re-execution of virtualenv command removes python-debian's debian directory Michael Prokop <mika@debian.org> - 2023-07-14 21:30 +0200
csiph-web