Skip to content
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

tox 3.14.5 incompatible with virtualenv 20 #1538

Closed
astrofrog opened this issue Mar 19, 2020 · 6 comments · Fixed by pypa/virtualenv#1734
Closed

tox 3.14.5 incompatible with virtualenv 20 #1538

astrofrog opened this issue Mar 19, 2020 · 6 comments · Fixed by pypa/virtualenv#1734
Labels
bug:normal affects many people or has quite an impact

Comments

@astrofrog
Copy link

I am running into issues when using the very latest versions of tox and virtualenv. I am running things in a clean environment:

$ pip freeze
appdirs==1.4.3
distlib==0.3.0
filelock==3.0.12
importlib-metadata==1.5.0
packaging==20.3
pkg-resources==0.0.0
pluggy==0.13.1
py==1.8.1
pyparsing==2.4.6
six==1.14.0
toml==0.10.0
tox==3.14.5
virtualenv==20.0.11
zipp==3.1.0

If I create a simple tox.ini file that specifies a requirement that is not in the current environment:

[tox]
envlist = test
requires =
    setuptools >= 30.3.0
    pip >= 19.3.1
    tox-pypi-filter >= 0.10
skip_install = true
skipsdist = true

[testenv]
command = echo "test"

I get:

$ tox -rvv
using tox.ini: /home/tom/tmp/tox-venv/tox.ini (pid 12943)
  removing /home/tom/tmp/tox-venv/.tox/log
could not satisfy requires MissingDependency(<Requirement('pip>=19.3.1')>)
could not satisfy requires PackageNotFoundError('tox-pypi-filter')
using tox-3.14.5 from /home/tom/tmp/tox-venv/debug/lib/python3.7/site-packages/tox/__init__.py (pid 12943)
.tox start: getenv /home/tom/tmp/tox-venv/.tox/.tox
.tox cannot reuse: -r flag
.tox recreate: /home/tom/tmp/tox-venv/.tox/.tox
/home/tom/tmp/tox-venv/debug/bin/python (/home/tom/tmp/tox-venv/debug/bin/python) is {'executable': '/home/tom/tmp/tox-venv/debug/bin/python', 'name': 'python', 'version_info': [3, 7, 5, 'final', 0], 'version': '3.7.5 (default, Nov 20 2019, 09:21:52) \n[GCC 9.2.1 20191008]', 'is_64': True, 'sysplatform': 'linux'}
.tox uses /home/tom/tmp/tox-venv/debug/bin/python
  removing /home/tom/tmp/tox-venv/.tox/.tox
setting PATH=/home/tom/tmp/tox-venv/.tox/.tox/bin:/home/tom/tmp/tox-venv/debug/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin
[12945] /home/tom/tmp/tox-venv/.tox$ /home/tom/tmp/tox-venv/debug/bin/python -m virtualenv --no-download --python /home/tom/tmp/tox-venv/debug/bin/python .tox
created virtual environment CPython3.7.5.final.0-64 in 68ms
  creator CPython3Posix(dest=/home/tom/tmp/tox-venv/.tox/.tox, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/tom/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
.tox installdeps: setuptools >= 30.3.0, pip >= 19.3.1, tox-pypi-filter >= 0.10, tox >= 3.14.5
setting PATH=/home/tom/tmp/tox-venv/.tox/.tox/bin:/home/tom/tmp/tox-venv/debug/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin
[12953] /home/tom/tmp/tox-venv$ /home/tom/tmp/tox-venv/.tox/.tox/bin/python -m pip install 'setuptools >= 30.3.0' 'pip >= 19.3.1' 'tox-pypi-filter >= 0.10' 'tox >= 3.14.5'
Requirement already satisfied: setuptools>=30.3.0 in ./.tox/.tox/lib/python3.7/site-packages (46.0.0)
Requirement already satisfied: pip>=19.3.1 in ./.tox/.tox/lib/python3.7/site-packages (20.0.2)
Collecting tox-pypi-filter>=0.10
  Using cached tox_pypi_filter-0.10-py2.py3-none-any.whl (5.1 kB)
Collecting tox>=3.14.5
  Using cached tox-3.14.5-py2.py3-none-any.whl (81 kB)
Collecting pypicky>=0.5
  Using cached pypicky-0.5-py2.py3-none-any.whl (4.8 kB)
Collecting py<2,>=1.4.17
  Using cached py-1.8.1-py2.py3-none-any.whl (83 kB)
Collecting filelock<4,>=3.0.0
  Using cached filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting virtualenv>=16.0.0
  Using cached virtualenv-20.0.11-py2.py3-none-any.whl (4.6 MB)
Collecting toml>=0.9.4
  Using cached toml-0.10.0-py2.py3-none-any.whl (25 kB)
Collecting importlib-metadata<2,>=0.12; python_version < "3.8"
  Using cached importlib_metadata-1.5.0-py2.py3-none-any.whl (30 kB)
Collecting six<2,>=1.14.0
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting pluggy<1,>=0.12.0
  Using cached pluggy-0.13.1-py2.py3-none-any.whl (18 kB)
Collecting packaging>=14
  Using cached packaging-20.3-py2.py3-none-any.whl (37 kB)
Processing /home/tom/.cache/pip/wheels/93/84/2f/409c7b2bb3afc3aa727f7ee8787975e0793f74d1165f4d0104/tornado-6.0.4-cp37-cp37m-linux_x86_64.whl
Collecting click
  Using cached click-7.1.1-py2.py3-none-any.whl (82 kB)
Processing /home/tom/.cache/pip/wheels/c6/e5/ef/a12b26033eee476b7ebdd797528faa1765feae6e3b33a3954b/requirements_parser-0.2.0-cp37-none-any.whl
Collecting requests
  Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Processing /home/tom/.cache/pip/wheels/6e/e8/db/c73dae4867666e89ba3cfbc4b5c092446f0e584eda6f409cbb/distlib-0.3.0-cp37-none-any.whl
Collecting appdirs<2,>=1.4.3
  Using cached appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Collecting zipp>=0.5
  Using cached zipp-3.1.0-py3-none-any.whl (4.9 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.6-py2.py3-none-any.whl (67 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
Installing collected packages: tornado, click, requirements-parser, idna, chardet, urllib3, certifi, requests, pypicky, py, filelock, zipp, importlib-metadata, distlib, six, appdirs, virtualenv, toml, pluggy, pyparsing, packaging, tox, tox-pypi-filter
Successfully installed appdirs-1.4.3 certifi-2019.11.28 chardet-3.0.4 click-7.1.1 distlib-0.3.0 filelock-3.0.12 idna-2.9 importlib-metadata-1.5.0 packaging-20.3 pluggy-0.13.1 py-1.8.1 pyparsing-2.4.6 pypicky-0.5 requests-2.23.0 requirements-parser-0.2.0 six-1.14.0 toml-0.10.0 tornado-6.0.4 tox-3.14.5 tox-pypi-filter-0.10 urllib3-1.25.8 virtualenv-20.0.11 zipp-3.1.0
.tox finish: getenv /home/tom/tmp/tox-venv/.tox/.tox after 2.63 seconds
.tox start: finishvenv 
write config to /home/tom/tmp/tox-venv/.tox/.tox/.tox-config1 as 'f266e02cc7b0e6d736bfee1e8174ac05d1fd0a91caf7784720cdee071ead18a0 /home/tom/tmp/tox-venv/debug/bin/python\n3.14.5 0 0 0\n00000000000000000000000000000000 setuptools >= 30.3.0\n00000000000000000000000000000000 pip >= 19.3.1\n00000000000000000000000000000000 tox-pypi-filter >= 0.10\n00000000000000000000000000000000 tox >= 3.14.5'
.tox finish: finishvenv  after 0.01 seconds
.tox start: provision 
[12960] /home/tom/tmp/tox-venv$ /home/tom/tmp/tox-venv/.tox/.tox/bin/python -m tox -rvv
using tox.ini: /home/tom/tmp/tox-venv/tox.ini (pid 12960)
using tox-3.14.5 from /home/tom/tmp/tox-venv/.tox/.tox/lib/python3.7/site-packages/tox/__init__.py (pid 12960)
skipping sdist step
test start: getenv /home/tom/tmp/tox-venv/.tox/test
test cannot reuse: -r flag
test create: /home/tom/tmp/tox-venv/.tox/test
/home/tom/tmp/tox-venv/.tox/.tox/bin/python (/home/tom/tmp/tox-venv/.tox/.tox/bin/python) is {'executable': '/home/tom/tmp/tox-venv/.tox/.tox/bin/python', 'name': 'python', 'version_info': [3, 7, 5, 'final', 0], 'version': '3.7.5 (default, Nov 20 2019, 09:21:52) \n[GCC 9.2.1 20191008]', 'is_64': True, 'sysplatform': 'linux'}
test uses /home/tom/tmp/tox-venv/.tox/.tox/bin/python
  removing /home/tom/tmp/tox-venv/.tox/test
setting PATH=/home/tom/tmp/tox-venv/.tox/test/bin:/home/tom/tmp/tox-venv/debug/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda/bin
[12963] /home/tom/tmp/tox-venv/.tox$ /home/tom/tmp/tox-venv/.tox/.tox/bin/python -m virtualenv --no-download --python .tox/bin/python test
RuntimeError: failed to find interpreter for Builtin discover of python_spec='.tox/bin/python'
ERROR: invocation failed (exit code 1)
ERROR: InvocationError for command /home/tom/tmp/tox-venv/.tox/.tox/bin/python -m virtualenv --no-download --python .tox/bin/python test (exited with code 1)
test finish: getenv /home/tom/tmp/tox-venv/.tox/test after 0.07 seconds
____________________________________________________________ summary ____________________________________________________________
ERROR:   test: InvocationError for command /home/tom/tmp/tox-venv/.tox/.tox/bin/python -m virtualenv --no-download --python .tox/bin/python test (exited with code 1)
.tox finish: provision  after 0.23 seconds

If I add:

    virtualenv < 20

to the requires section, everything works fine.

@astrofrog astrofrog added the bug:normal affects many people or has quite an impact label Mar 19, 2020
@gaborbernat
Copy link
Member

Can you test if it works with virtualenv 20.0.10? Feels this could be pypa/virtualenv#1732

@gaborbernat
Copy link
Member

A fix went in via pypa/virtualenv#1734

@astrofrog
Copy link
Author

Thanks for the fix!

@gaborbernat
Copy link
Member

Will release soon

@gaborbernat
Copy link
Member

Done.

@astrofrog
Copy link
Author

Thanks! 👏

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants