Skip to content

regression in tox 4.4.0, creating an invalid constraints.txt file #2898

@zzzeek

Description

@zzzeek

Issue

tox is creating a constraints file that contains unnamed constraints in this form:

pytest-xdist
pytest<8,>=7.0.0rc1
.[aiosqlite]

this seems like something new, the pip command seems to have been changed and is now failing:

py310-sqlite: install_package_deps> python -I -m pip install importlib-metadata -c/home/classic/tmp/foo/.tox/py310-sqlite/constraints.txt
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement. Discussion can be found at https://github.com/pypa/pip/issues/8210
ERROR: Unnamed requirements are not allowed as constraints

Environment

Provide at least:

  • OS: linux
  • pip list of the host Python where tox is installed:
 .venv/bin/pip list
Package       Version
------------- -------
cachetools    5.3.0
chardet       5.1.0
colorama      0.4.6
distlib       0.3.6
filelock      3.9.0
packaging     23.0
pip           22.3.1
platformdirs  2.6.2
pluggy        1.0.0
pyproject_api 1.5.0
setuptools    65.6.3
tomli         2.0.1
tox           4.4.0
virtualenv    20.17.1
wheel         0.38.4

Output of running tox

Provide the output of tox -rvv:

$ .venv/bin/tox  -rvv
.pkg: 222 W remove tox env folder /home/classic/tmp/foo/.tox/.pkg [tox/tox_env/api.py:321]
py: 264 I find interpreter for spec PythonSpec(path=/home/classic/tmp/foo/.venv/bin/python) [virtualenv/discovery/builtin.py:56]
py: 264 D discover exe for PythonInfo(spec=CPython3.10.0.final.0-64, exe=/home/classic/tmp/foo/.venv/bin/python, platform=linux, version='3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', encoding_fs_io=utf-8-utf-8) in /opt/python-3.10.0 [virtualenv/discovery/py_info.py:437]
py: 264 D filesystem is case-sensitive [virtualenv/info.py:24]
py: 265 D got python info of /opt/python-3.10.0/bin/python3.10 from /home/classic/.local/share/virtualenv/py_info/1/605634180d1d4980184c1762cdd4756f41b5a835942bc27e0f8414f9bcc5a0e9.json [virtualenv/app_data/via_disk_folder.py:129]
py: 275 I proposed PythonInfo(spec=CPython3.10.0.final.0-64, system=/opt/python-3.10.0/bin/python3.10, exe=/home/classic/tmp/foo/.venv/bin/python, platform=linux, version='3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
py: 275 D accepted PythonInfo(spec=CPython3.10.0.final.0-64, system=/opt/python-3.10.0/bin/python3.10, exe=/home/classic/tmp/foo/.venv/bin/python, platform=linux, version='3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
py: 293 I create virtual environment via CPython3Posix(dest=/home/classic/tmp/foo/.tox/py, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:48]
py: 293 D create folder /home/classic/tmp/foo/.tox/py/bin [virtualenv/util/path/_sync.py:9]
py: 293 D create folder /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages [virtualenv/util/path/_sync.py:9]
py: 294 D write /home/classic/tmp/foo/.tox/py/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
py: 294 D 	home = /opt/python-3.10.0/bin [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	version_info = 3.10.0.final.0 [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	base-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	base-exec-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
py: 294 D 	base-executable = /opt/python-3.10.0/bin/python3.10 [virtualenv/create/pyenv_cfg.py:34]
py: 295 D symlink /opt/python-3.10.0/bin/python3.10 to /home/classic/tmp/foo/.tox/py/bin/python [virtualenv/util/path/_sync.py:28]
py: 295 D create virtualenv import hook file /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/_virtualenv.pth [virtualenv/create/via_global_ref/api.py:89]
py: 295 D create /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/_virtualenv.py [virtualenv/create/via_global_ref/api.py:92]
py: 295 D ============================== target debug ============================== [virtualenv/run/session.py:50]
py: 296 D debug via /home/classic/tmp/foo/.tox/py/bin/python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/create/debug.py [virtualenv/create/creator.py:197]
py: 296 D {
  "sys": {
    "executable": "/home/classic/tmp/foo/.tox/py/bin/python",
    "_base_executable": "/home/classic/tmp/foo/.tox/py/bin/python",
    "prefix": "/home/classic/tmp/foo/.tox/py",
    "base_prefix": "/opt/python-3.10.0",
    "real_prefix": null,
    "exec_prefix": "/home/classic/tmp/foo/.tox/py",
    "base_exec_prefix": "/opt/python-3.10.0",
    "path": [
      "/home/classic/tmp/foo/lib",
      "/opt/python-3.10.0/lib/python310.zip",
      "/opt/python-3.10.0/lib/python3.10",
      "/opt/python-3.10.0/lib/python3.10/lib-dynload",
      "/home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "utf-8"
  },
  "version": "3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]",
  "makefile_filename": "/opt/python-3.10.0/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile",
  "os": "<module 'os' from '/opt/python-3.10.0/lib/python3.10/os.py'>",
  "site": "<module 'site' from '/opt/python-3.10.0/lib/python3.10/site.py'>",
  "datetime": "<module 'datetime' from '/opt/python-3.10.0/lib/python3.10/datetime.py'>",
  "math": "<module 'math' from '/opt/python-3.10.0/lib/python3.10/lib-dynload/math.cpython-310-x86_64-linux-gnu.so'>",
  "json": "<module 'json' from '/opt/python-3.10.0/lib/python3.10/json/__init__.py'>"
} [virtualenv/run/session.py:51]
py: 317 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/classic/.local/share/virtualenv) [virtualenv/run/session.py:55]
py: 319 D got embed update of distribution wheel from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/wheel.json [virtualenv/app_data/via_disk_folder.py:129]
py: 319 D got embed update of distribution pip from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/pip.json [virtualenv/app_data/via_disk_folder.py:129]
py: 320 D got embed update of distribution setuptools from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/setuptools.json [virtualenv/app_data/via_disk_folder.py:129]
py: 322 D install wheel from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/wheel-0.38.4-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
py: 322 D install pip from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.3.1-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
py: 322 D install setuptools from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/setuptools-65.6.3-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
py: 323 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/wheel [virtualenv/util/path/_sync.py:36]
py: 323 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/pip [virtualenv/util/path/_sync.py:36]
py: 323 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/setuptools [virtualenv/util/path/_sync.py:36]
py: 328 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.dist-info to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/wheel-0.38.4.dist-info [virtualenv/util/path/_sync.py:36]
py: 330 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.virtualenv to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/wheel-0.38.4.virtualenv [virtualenv/util/path/_sync.py:36]
py: 331 D generated console scripts wheel3.10 wheel3 wheel wheel-3.10 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py: 357 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/_distutils_hack to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/_distutils_hack [virtualenv/util/path/_sync.py:36]
py: 358 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.virtualenv to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/setuptools-65.6.3.virtualenv [virtualenv/util/path/_sync.py:36]
py: 358 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/pkg_resources to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/pkg_resources [virtualenv/util/path/_sync.py:36]
py: 366 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/distutils-precedence.pth to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/distutils-precedence.pth [virtualenv/util/path/_sync.py:36]
py: 366 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.dist-info to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/setuptools-65.6.3.dist-info [virtualenv/util/path/_sync.py:36]
py: 368 D generated console scripts  [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py: 399 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.virtualenv to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/pip-22.3.1.virtualenv [virtualenv/util/path/_sync.py:36]
py: 399 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.dist-info to /home/classic/tmp/foo/.tox/py/lib/python3.10/site-packages/pip-22.3.1.dist-info [virtualenv/util/path/_sync.py:36]
py: 401 D generated console scripts pip3 pip3.10 pip pip-3.10 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
py: 401 I add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [virtualenv/run/session.py:61]
py: 402 D write /home/classic/tmp/foo/.tox/py/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
py: 403 D 	home = /opt/python-3.10.0/bin [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	version_info = 3.10.0.final.0 [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	base-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	base-exec-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
py: 403 D 	base-executable = /opt/python-3.10.0/bin/python3.10 [virtualenv/create/pyenv_cfg.py:34]
py: 405 W install_deps> python -I -m pip install pytest-xdist 'pytest<8,>=7.0.0rc1' [tox/tox_env/api.py:427]
Collecting pytest-xdist
  Using cached pytest_xdist-3.1.0-py3-none-any.whl (36 kB)
Collecting pytest<8,>=7.0.0rc1
  Using cached pytest-7.2.1-py3-none-any.whl (317 kB)
Collecting execnet>=1.1
  Using cached execnet-1.9.0-py2.py3-none-any.whl (39 kB)
Collecting iniconfig
  Using cached iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging
  Using cached packaging-23.0-py3-none-any.whl (42 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting tomli>=1.0.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting attrs>=19.2.0
  Using cached attrs-22.2.0-py3-none-any.whl (60 kB)
Collecting exceptiongroup>=1.0.0rc8
  Using cached exceptiongroup-1.1.0-py3-none-any.whl (14 kB)
Installing collected packages: tomli, pluggy, packaging, iniconfig, execnet, exceptiongroup, attrs, pytest, pytest-xdist
Successfully installed attrs-22.2.0 exceptiongroup-1.1.0 execnet-1.9.0 iniconfig-2.0.0 packaging-23.0 pluggy-1.0.0 pytest-7.2.1 pytest-xdist-3.1.0 tomli-2.0.1
py: 2232 I exit 0 (1.83 seconds) /home/classic/tmp/foo> python -I -m pip install pytest-xdist 'pytest<8,>=7.0.0rc1' pid=853809 [tox/execute/api.py:275]
.pkg: 2234 I find interpreter for spec PythonSpec(path=/home/classic/tmp/foo/.venv/bin/python) [virtualenv/discovery/builtin.py:56]
.pkg: 2235 D discover exe from cache /opt/python-3.10.0 - exact False: PythonInfo({'architecture': 64, 'base_exec_prefix': '/opt/python-3.10.0', 'base_prefix': '/opt/python-3.10.0', 'distutils_install': {'data': '', 'headers': 'include/python3.10/UNKNOWN', 'platlib': 'lib/python3.10/site-packages', 'purelib': 'lib/python3.10/site-packages', 'scripts': 'bin'}, 'exec_prefix': '/opt/python-3.10.0', 'executable': '/home/classic/tmp/foo/.venv/bin/python', 'file_system_encoding': 'utf-8', 'has_venv': True, 'implementation': 'CPython', 'max_size': 9223372036854775807, 'original_executable': '/opt/python-3.10.0/bin/python3.10', 'os': 'posix', 'path': ['/home/classic/.venv3100/lib/python3.10/site-packages/virtualenv/discovery', '/home/classic/dev/alembic/.tox/lib', '/opt/python-3.10.0/lib/python310.zip', '/opt/python-3.10.0/lib/python3.10', '/opt/python-3.10.0/lib/python3.10/lib-dynload', '/home/classic/.local/lib/python3.10/site-packages', '/opt/python-3.10.0/lib/python3.10/site-packages'], 'platform': 'linux', 'prefix': '/opt/python-3.10.0', 'real_prefix': None, 'stdout_encoding': 'utf-8', 'sysconfig': {'makefile_filename': '/opt/python-3.10.0/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile'}, 'sysconfig_paths': {'data': '{base}', 'include': '{installed_base}/include/python{py_version_short}{abiflags}', 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', 'purelib': '{base}/lib/python{py_version_short}/site-packages', 'scripts': '{base}/bin', 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}'}, 'sysconfig_scheme': None, 'sysconfig_vars': {'PYTHONFRAMEWORK': '', 'abiflags': '', 'base': '/opt/python-3.10.0', 'installed_base': '/opt/python-3.10.0', 'platbase': '/opt/python-3.10.0', 'platlibdir': 'lib', 'py_version_short': '3.10'}, 'system_executable': '/opt/python-3.10.0/bin/python3.10', 'system_stdlib': '/opt/python-3.10.0/lib/python3.10', 'system_stdlib_platform': '/opt/python-3.10.0/lib/python3.10', 'version': '3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', 'version_info': VersionInfo(major=3, minor=10, micro=0, releaselevel='final', serial=0)}) [virtualenv/discovery/py_info.py:435]
.pkg: 2235 I proposed PythonInfo(spec=CPython3.10.0.final.0-64, system=/opt/python-3.10.0/bin/python3.10, exe=/home/classic/tmp/foo/.venv/bin/python, platform=linux, version='3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:63]
.pkg: 2235 D accepted PythonInfo(spec=CPython3.10.0.final.0-64, system=/opt/python-3.10.0/bin/python3.10, exe=/home/classic/tmp/foo/.venv/bin/python, platform=linux, version='3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]', encoding_fs_io=utf-8-utf-8) [virtualenv/discovery/builtin.py:65]
.pkg: 2236 I create virtual environment via CPython3Posix(dest=/home/classic/tmp/foo/.tox/.pkg, clear=False, no_vcs_ignore=False, global=False) [virtualenv/run/session.py:48]
.pkg: 2236 D create folder /home/classic/tmp/foo/.tox/.pkg/bin [virtualenv/util/path/_sync.py:9]
.pkg: 2236 D create folder /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages [virtualenv/util/path/_sync.py:9]
.pkg: 2236 D write /home/classic/tmp/foo/.tox/.pkg/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
.pkg: 2236 D 	home = /opt/python-3.10.0/bin [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	version_info = 3.10.0.final.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	base-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	base-exec-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D 	base-executable = /opt/python-3.10.0/bin/python3.10 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2236 D symlink /opt/python-3.10.0/bin/python3.10 to /home/classic/tmp/foo/.tox/.pkg/bin/python [virtualenv/util/path/_sync.py:28]
.pkg: 2237 D create virtualenv import hook file /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/_virtualenv.pth [virtualenv/create/via_global_ref/api.py:89]
.pkg: 2237 D create /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/_virtualenv.py [virtualenv/create/via_global_ref/api.py:92]
.pkg: 2237 D ============================== target debug ============================== [virtualenv/run/session.py:50]
.pkg: 2238 D debug via /home/classic/tmp/foo/.tox/.pkg/bin/python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/create/debug.py [virtualenv/create/creator.py:197]
.pkg: 2237 D {
  "sys": {
    "executable": "/home/classic/tmp/foo/.tox/.pkg/bin/python",
    "_base_executable": "/home/classic/tmp/foo/.tox/.pkg/bin/python",
    "prefix": "/home/classic/tmp/foo/.tox/.pkg",
    "base_prefix": "/opt/python-3.10.0",
    "real_prefix": null,
    "exec_prefix": "/home/classic/tmp/foo/.tox/.pkg",
    "base_exec_prefix": "/opt/python-3.10.0",
    "path": [
      "/home/classic/tmp/foo/lib",
      "/opt/python-3.10.0/lib/python310.zip",
      "/opt/python-3.10.0/lib/python3.10",
      "/opt/python-3.10.0/lib/python3.10/lib-dynload",
      "/home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "utf-8"
  },
  "version": "3.10.0 (default, Nov  5 2021, 17:23:47) [GCC 11.2.1 20210728 (Red Hat 11.2.1-1)]",
  "makefile_filename": "/opt/python-3.10.0/lib/python3.10/config-3.10-x86_64-linux-gnu/Makefile",
  "os": "<module 'os' from '/opt/python-3.10.0/lib/python3.10/os.py'>",
  "site": "<module 'site' from '/opt/python-3.10.0/lib/python3.10/site.py'>",
  "datetime": "<module 'datetime' from '/opt/python-3.10.0/lib/python3.10/datetime.py'>",
  "math": "<module 'math' from '/opt/python-3.10.0/lib/python3.10/lib-dynload/math.cpython-310-x86_64-linux-gnu.so'>",
  "json": "<module 'json' from '/opt/python-3.10.0/lib/python3.10/json/__init__.py'>"
} [virtualenv/run/session.py:51]
.pkg: 2261 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/classic/.local/share/virtualenv) [virtualenv/run/session.py:55]
.pkg: 2264 D got embed update of distribution setuptools from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/setuptools.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 2264 D got embed update of distribution pip from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/pip.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 2265 D got embed update of distribution wheel from /home/classic/.local/share/virtualenv/wheel/3.10/embed/3/wheel.json [virtualenv/app_data/via_disk_folder.py:129]
.pkg: 2265 D install setuptools from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/setuptools-65.6.3-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
.pkg: 2265 D install pip from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/pip-22.3.1-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
.pkg: 2266 D install wheel from wheel /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/virtualenv/seed/wheels/embed/wheel-0.38.4-py3-none-any.whl via CopyPipInstall [virtualenv/seed/embed/via_app_data/via_app_data.py:47]
.pkg: 2267 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/wheel [virtualenv/util/path/_sync.py:36]
.pkg: 2267 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/pip [virtualenv/util/path/_sync.py:36]
.pkg: 2267 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/setuptools [virtualenv/util/path/_sync.py:36]
.pkg: 2272 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.dist-info to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/wheel-0.38.4.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 2273 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/wheel-0.38.4-py3-none-any/wheel-0.38.4.virtualenv to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/wheel-0.38.4.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 2275 D generated console scripts wheel-3.10 wheel3.10 wheel3 wheel [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2313 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/_distutils_hack to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/_distutils_hack [virtualenv/util/path/_sync.py:36]
.pkg: 2314 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.virtualenv to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/setuptools-65.6.3.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 2314 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/pkg_resources to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/pkg_resources [virtualenv/util/path/_sync.py:36]
.pkg: 2322 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/distutils-precedence.pth to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/distutils-precedence.pth [virtualenv/util/path/_sync.py:36]
.pkg: 2322 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/setuptools-65.6.3-py3-none-any/setuptools-65.6.3.dist-info to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/setuptools-65.6.3.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 2324 D generated console scripts  [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2348 D copy /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.virtualenv to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/pip-22.3.1.virtualenv [virtualenv/util/path/_sync.py:36]
.pkg: 2348 D copy directory /home/classic/.local/share/virtualenv/wheel/3.10/image/1/CopyPipInstall/pip-22.3.1-py3-none-any/pip-22.3.1.dist-info to /home/classic/tmp/foo/.tox/.pkg/lib/python3.10/site-packages/pip-22.3.1.dist-info [virtualenv/util/path/_sync.py:36]
.pkg: 2351 D generated console scripts pip3 pip pip3.10 pip-3.10 [virtualenv/seed/embed/via_app_data/pip_install/base.py:41]
.pkg: 2351 I add activators for Bash, CShell, Fish, Nushell, PowerShell, Python [virtualenv/run/session.py:61]
.pkg: 2353 D write /home/classic/tmp/foo/.tox/.pkg/pyvenv.cfg [virtualenv/create/pyenv_cfg.py:30]
.pkg: 2353 D 	home = /opt/python-3.10.0/bin [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	implementation = CPython [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	version_info = 3.10.0.final.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	virtualenv = 20.17.1 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	include-system-site-packages = false [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	base-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	base-exec-prefix = /opt/python-3.10.0 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2353 D 	base-executable = /opt/python-3.10.0/bin/python3.10 [virtualenv/create/pyenv_cfg.py:34]
.pkg: 2355 W install_requires> python -I -m pip install 'setuptools>=47' [tox/tox_env/api.py:427]
Requirement already satisfied: setuptools>=47 in ./.tox/.pkg/lib/python3.10/site-packages (65.6.3)
.pkg: 3236 I exit 0 (0.88 seconds) /home/classic/tmp/foo> python -I -m pip install 'setuptools>=47' pid=853870 [tox/execute/api.py:275]
.pkg: 3237 W _optional_hooks> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:427]
Backend: run command _optional_hooks with args {}
Backend: Wrote response {'return': {'get_requires_for_build_sdist': True, 'prepare_metadata_for_build_wheel': True, 'get_requires_for_build_wheel': True, 'build_editable': True, 'get_requires_for_build_editable': True, 'prepare_metadata_for_build_editable': True}} to /tmp/pep517__optional_hooks-ie56kavm.json
.pkg: 3563 I exit None (0.33 seconds) /home/classic/tmp/foo> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta pid=853903 [tox/execute/api.py:275]
.pkg: 3563 W get_requires_for_build_sdist> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:427]
Backend: run command get_requires_for_build_sdist with args {'config_settings': None}
running egg_info
writing MyProject.egg-info/PKG-INFO
writing dependency_links to MyProject.egg-info/dependency_links.txt
writing requirements to MyProject.egg-info/requires.txt
writing top-level names to MyProject.egg-info/top_level.txt
reading manifest file 'MyProject.egg-info/SOURCES.txt'
writing manifest file 'MyProject.egg-info/SOURCES.txt'
Backend: Wrote response {'return': []} to /tmp/pep517_get_requires_for_build_sdist-r4u84rsf.json
.pkg: 3600 I exit None (0.04 seconds) /home/classic/tmp/foo> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta pid=853903 [tox/execute/api.py:275]
.pkg: 3600 W prepare_metadata_for_build_wheel> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:427]
Backend: run command prepare_metadata_for_build_wheel with args {'metadata_directory': '/home/classic/tmp/foo/.tox/.pkg/.meta', 'config_settings': {'--build-option': []}}
running dist_info
creating /home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info
writing /home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/PKG-INFO
writing dependency_links to /home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/dependency_links.txt
writing requirements to /home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/requires.txt
writing top-level names to /home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/top_level.txt
writing manifest file '/home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/SOURCES.txt'
reading manifest file '/home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/SOURCES.txt'
writing manifest file '/home/classic/tmp/foo/.tox/.pkg/.meta/MyProject.egg-info/SOURCES.txt'
creating '/home/classic/tmp/foo/.tox/.pkg/.meta/MyProject-0.1.dist-info'
Backend: Wrote response {'return': 'MyProject-0.1.dist-info'} to /tmp/pep517_prepare_metadata_for_build_wheel-abt2pbby.json
.pkg: 3633 I exit None (0.03 seconds) /home/classic/tmp/foo> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta pid=853903 [tox/execute/api.py:275]
.pkg: 3635 W build_sdist> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:427]
Backend: run command build_sdist with args {'sdist_directory': '/home/classic/tmp/foo/.tox/.pkg/dist', 'config_settings': None}
running sdist
running egg_info
writing MyProject.egg-info/PKG-INFO
writing dependency_links to MyProject.egg-info/dependency_links.txt
writing requirements to MyProject.egg-info/requires.txt
writing top-level names to MyProject.egg-info/top_level.txt
reading manifest file 'MyProject.egg-info/SOURCES.txt'
writing manifest file 'MyProject.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md

running check
creating MyProject-0.1
creating MyProject-0.1/MyProject.egg-info
copying files to MyProject-0.1...
copying pyproject.toml -> MyProject-0.1
copying setup.cfg -> MyProject-0.1
copying MyProject.egg-info/PKG-INFO -> MyProject-0.1/MyProject.egg-info
copying MyProject.egg-info/SOURCES.txt -> MyProject-0.1/MyProject.egg-info
copying MyProject.egg-info/dependency_links.txt -> MyProject-0.1/MyProject.egg-info
copying MyProject.egg-info/requires.txt -> MyProject-0.1/MyProject.egg-info
copying MyProject.egg-info/top_level.txt -> MyProject-0.1/MyProject.egg-info
Writing MyProject-0.1/setup.cfg
Creating tar archive
removing 'MyProject-0.1' (and everything under it)
Backend: Wrote response {'return': 'MyProject-0.1.tar.gz'} to /tmp/pep517_build_sdist-6t59w4mb.json
.pkg: 3651 I exit None (0.02 seconds) /home/classic/tmp/foo> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta pid=853903 [tox/execute/api.py:275]
.pkg: 3652 D package .tmp/package/4/MyProject-0.1.tar.gz links to .pkg/dist/MyProject-0.1.tar.gz (/home/classic/tmp/foo/.tox) [tox/util/file_view.py:36]
py: 3652 W install_package_deps> python -I -m pip install importlib-metadata -c/home/classic/tmp/foo/.tox/py/constraints.txt [tox/tox_env/api.py:427]
Collecting importlib-metadata
  Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB)
Collecting zipp>=0.5
  Using cached zipp-3.11.0-py3-none-any.whl (6.6 kB)
Installing collected packages: zipp, importlib-metadata
Successfully installed importlib-metadata-6.0.0 zipp-3.11.0
py: 4386 I exit 0 (0.73 seconds) /home/classic/tmp/foo> python -I -m pip install importlib-metadata -c/home/classic/tmp/foo/.tox/py/constraints.txt pid=853961 [tox/execute/api.py:275]
py: 4387 W install_package> python -I -m pip install --force-reinstall --no-deps /home/classic/tmp/foo/.tox/.tmp/package/4/MyProject-0.1.tar.gz [tox/tox_env/api.py:427]
Processing ./.tox/.tmp/package/4/MyProject-0.1.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: MyProject
  Building wheel for MyProject (pyproject.toml) ... done
  Created wheel for MyProject: filename=MyProject-0.1-py3-none-any.whl size=996 sha256=985b589259c09e58f569e81c165da35b03df67667e6b455e9e70573fda88aa7d
  Stored in directory: /home/classic/.cache/pip/wheels/7a/8c/a4/6d0340c4fac87ccb0e4460f9e1e3047e56a611f721a7dd9fa6
Successfully built MyProject
Installing collected packages: MyProject
Successfully installed MyProject-0.1
py: 7377 I exit 0 (2.99 seconds) /home/classic/tmp/foo> python -I -m pip install --force-reinstall --no-deps /home/classic/tmp/foo/.tox/.tmp/package/4/MyProject-0.1.tar.gz pid=854000 [tox/execute/api.py:275]
.pkg: 7378 W _exit> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:427]
Backend: run command _exit with args {}
Backend: Wrote response {'return': 0} to /tmp/pep517__exit-i3ksguw4.json
.pkg: 7379 I exit None (0.00 seconds) /home/classic/tmp/foo> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta pid=853903 [tox/execute/api.py:275]
.pkg: 7421 D delete package /home/classic/tmp/foo/.tox/.tmp/package/4/MyProject-0.1.tar.gz [tox/tox_env/python/virtual_env/package/pyproject.py:179]
  py: OK (7.20 seconds)
  congratulations :) (7.33 seconds)

Minimal example

If possible, provide a minimal reproducer for the issue:

cat <<EOF > tox.ini
[tox]
envlist = py

[testenv]
deps=
     pytest>=7.0.0rc1,<8
     pytest-xdist
     sqlite: .[aiosqlite]

EOF

cat <<EOF > setup.cfg
[metadata]
name = MyProject
version = 0.1

[options]
install_requires =
    importlib-metadata

[options.extras_require]
aiosqlite =
    aiosqlite


EOF


cat <<EOF > pyproject.toml
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=47"]

EOF

tox -e py310-sqlite --notest

full output:

$ ../foo/.venv/bin/tox -e py310-sqlite --notest
py310-sqlite: install_deps> python -I -m pip install pytest-xdist 'pytest<8,>=7.0.0rc1' '.[aiosqlite]'
.pkg: install_requires> python -I -m pip install 'setuptools>=47'
.pkg: _optional_hooks> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: prepare_metadata_for_build_wheel> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py310-sqlite: install_package_deps> python -I -m pip install importlib-metadata -c/home/classic/tmp/bar/.tox/py310-sqlite/constraints.txt
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement. Discussion can be found at https://github.com/pypa/pip/issues/8210
ERROR: Unnamed requirements are not allowed as constraints

py310-sqlite: exit 1 (0.34 seconds) /home/classic/tmp/bar> python -I -m pip install importlib-metadata -c/home/classic/tmp/bar/.tox/py310-sqlite/constraints.txt pid=855074
.pkg: _exit> python /home/classic/tmp/foo/.venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py310-sqlite: FAIL code 1 (6.23 seconds)
  evaluation failed :( (6.38 seconds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions