-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
C: testsTesting and related thingsTesting and related thingstype: maintenanceRelated to Development and Maintenance ProcessesRelated to Development and Maintenance Processes
Description
Environment
- pip version: 20.1.1
- Python version: all (tested 2.7.18, 3.6.10, 3.7.7, 3.8.3)
- OS: Gentoo Linux
Description
After upgrading to virtualenv-20.0.18, all pip tests fail due to missing path_locations
. I know you know that but I couldn't find any bug tracking this.
Expected behavior
I would expect pip tests to work with current releases of virtualenv, however crazy that sounds.
How to Reproduce
Change tools/requirements/tests.txt
to list plain virtualenv
instead of legacy branch. Run tox
.
Output
$ sed -i -e '/virtualenv/s:.*:virtualenv:' tools/requirements/tests.txt
$ tox -e py38 -- -x
GLOB sdist-make: /tmp/pip/setup.py
py38 inst-nodeps: /tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip
^CERROR: got KeyboardInterrupt signal
_____________________________________________________________________ summary _____________________________________________________________________
py38: commands succeeded
congratulations :)
^Cmgorny@pomiot /tmp/pip $ ^C
mgorny@pomiot /tmp/pip $ rm -rf .tox/
mgorny@pomiot /tmp/pip $ tox -e py38 -- -x
GLOB sdist-make: /tmp/pip/setup.py
py38 create: /tmp/pip/.tox/py38
py38 installdeps: -r/tmp/pip/tools/requirements/tests.txt
py38 inst: /tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip
py38 installed: apipkg==1.5,appdirs==1.4.4,atomicwrites==1.4.0,attrs==19.3.0,cffi==1.14.0,coverage==5.1,cryptography==2.8,csv23==0.3.1,distlib==0.3.0,execnet==1.7.1,filelock==3.0.12,freezegun==0.3.15,mock==4.0.2,more-itertools==8.3.0,pip @ file:///tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.20,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3.1,scripttest==1.3,setuptools==42.0.2,six==1.14.0,virtualenv==20.0.20,Werkzeug==0.16.0,wheel==0.33.6
py38 run-test-pre: PYTHONHASHSEED='39579200'
py38 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /tmp/pip/tests/data/common_wheels
py38 run-test-pre: commands[1] | python /tmp/pip/tools/tox_pip.py wheel -w /tmp/pip/tests/data/common_wheels -r /tmp/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0
Using cached setuptools-46.4.0-py3-none-any.whl (583 kB)
Saved ./tests/data/common_wheels/setuptools-46.4.0-py3-none-any.whl
Collecting wheel
Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py38 run-test: commands[0] | pytest --timeout 300 -x
=============================================================== test session starts ===============================================================
platform linux -- Python 3.8.3, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /tmp/pip, inifile: setup.cfg
plugins: xdist-1.27.0, forked-1.1.3, timeout-1.3.4, rerunfailures-6.0, cov-2.8.1
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 2006 items
tests/functional/test_broken_stdout.py ... [ 0%]
tests/functional/test_cache.py E
===================================================================== ERRORS ======================================================================
________________________________________________________ ERROR at setup of test_cache_dir _________________________________________________________
request = <SubRequest 'virtualenv_template' for <Function 'test_cache_dir'>>
tmpdir_factory = <_pytest.tmpdir.TempdirFactory object at 0x7f9499734910>, pip_src = Path('/tmp/pytest-of-mgorny/pytest-0/pip_src0/pip_src')
setuptools_install = Path('/tmp/pytest-of-mgorny/pytest-0/setuptools0/install'), common_wheels = Path('/tmp/pip/tests/data/common_wheels')
@pytest.fixture(scope='session')
def virtualenv_template(request, tmpdir_factory, pip_src,
setuptools_install, common_wheels):
if six.PY3 and request.config.getoption('--use-venv'):
venv_type = 'venv'
else:
venv_type = 'virtualenv'
# Create the virtual environment
tmpdir = Path(str(tmpdir_factory.mktemp('virtualenv')))
> venv = VirtualEnvironment(
tmpdir.joinpath("venv_orig"), venv_type=venv_type
)
tests/conftest.py:303:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/venv.py:31: in __init__
self._update_paths()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <VirtualEnvironment /tmp/pytest-of-mgorny/pytest-0/virtualenv0/venv_orig>
def _update_paths(self):
> home, lib, inc, bin = _virtualenv.path_locations(self.location)
E AttributeError: module 'virtualenv' has no attribute 'path_locations'
tests/lib/venv.py:35: AttributeError
============================================================= short test summary info =============================================================
ERROR tests/functional/test_cache.py::test_cache_dir
======================================================== 3 passed, 1 error in 6.14 seconds ========================================================
ERROR: InvocationError for command /tmp/pip/.tox/py38/bin/pytest --timeout 300 -x (exited with code 1)
_____________________________________________________________________ summary _____________________________________________________________________
ERROR: py38: commands failed
Metadata
Metadata
Assignees
Labels
C: testsTesting and related thingsTesting and related thingstype: maintenanceRelated to Development and Maintenance ProcessesRelated to Development and Maintenance Processes