Skip to content

tox fails to install dependencies (possible ini parsing issue?) #2569

@holmanb

Description

@holmanb

Issue

I noticed a dependency resolution failure from an env specified in tox.ini while kicking the tires on tox4 (installed via pip install tox==4.0.0rc1).

The problem manifests as dependency install failure. Based on the output (pasted below), it looks like perhaps the ini variables containing pinned dependency versions are not getting resolved to their values. Note the {[format_deps]types-jsonschema} bits in the output where there should be version numbers.

ERROR: Could not find a version that satisfies the requirement types-jsonschema=={[format_deps]types-jsonschema} (from versions: 3.2.0, 3.2.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 4.4.8, 4.4.9, 4.6.0, 4.7.0, 4.9.0, 4.12.0, 4.12.1, 4.14.0, 4.15.0, 4.15.1, 4.16.0, 4.16.1, 4.16.1.1, 4.17.0.0, 4.17.0.1)

This should be reproducible via:

git clone git@github.com:canonical/cloud-init.git
cd cloud-init
tox -e check_format

The test itself may fail on working versions of tox; that's not the issue I'm reporting. See attached logs.

Environment

Provide at least:

  • OS: Ubuntu 22.04
  • pip list of the host python where virtualenv is installed:
    pip-list.txt

Output of the virtual environment creation

Make sure to run the creation with -vvv:
check_fmt_tox.log
check_fmt_tox_vvv.log

For @ssbarnea:

$ tox -r -e check_format
check_format: remove tox env folder /home/holmanb/cloud-init/.tox/check_format
.pkg: remove tox env folder /home/holmanb/cloud-init/.tox/.pkg
check_format: install_deps> python -I -m pip install black===22.3.0 flake8===4.0.1 hypothesis===6.31.6 hypothesis_jsonschema===0.20.1 isort===5.10.1 mypy===0.950 pylint===2.13.9 pytest===7.0.1 'types-jsonschema=={[format_deps]types-jsonschema}' 'types-oauthlib=={[format_deps]types-oauthlib}' 'types-pyyaml=={[format_deps]types-PyYAML}' 'types-requests=={[format_deps]types-requests}' 'types-setuptools=={[format_deps]types-setuptools}' 'typing-extensions=={[format_deps]typing-extensions}' -r /home/holmanb/cloud-init/test-requirements.txt -r /home/holmanb/cloud-init/integration-requirements.txt
Collecting pycloudlib@ git+https://github.com/canonical/pycloudlib.git@d76228e24d400937ba99cdb516460dd757dd3348
  Using cached pycloudlib-18.8-py3-none-any.whl
Collecting black===22.3.0
  Using cached black-22.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
Collecting flake8===4.0.1
  Using cached flake8-4.0.1-py2.py3-none-any.whl (64 kB)
Collecting hypothesis===6.31.6
  Using cached hypothesis-6.31.6-py3-none-any.whl (377 kB)
Collecting hypothesis_jsonschema===0.20.1
  Using cached hypothesis_jsonschema-0.20.1-py3-none-any.whl (28 kB)
Collecting isort===5.10.1
  Using cached isort-5.10.1-py3-none-any.whl (103 kB)
Collecting mypy===0.950
  Using cached mypy-0.950-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (17.9 MB)
Collecting pylint===2.13.9
  Using cached pylint-2.13.9-py3-none-any.whl (438 kB)
Collecting pytest===7.0.1
  Using cached pytest-7.0.1-py3-none-any.whl (296 kB)
ERROR: Ignored the following versions that require a different python version: 1.9.5 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <3.7
ERROR: Could not find a version that satisfies the requirement types-jsonschema=={[format_deps]types-jsonschema} (from versions: 3.2.0, 3.2.1, 4.2.0, 4.3.0, 4.3.1, 4.3.2, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 4.4.8, 4.4.9, 4.6.0, 4.7.0, 4.9.0, 4.12.0, 4.12.1, 4.14.0, 4.15.0, 4.15.1, 4.16.0, 4.16.1, 4.16.1.1, 4.17.0.0, 4.17.0.1)
ERROR: No matching distribution found for types-jsonschema=={[format_deps]types-jsonschema}
check_format: exit 1 (2.72 seconds) /home/holmanb/cloud-init> python -I -m pip install black===22.3.0 flake8===4.0.1 hypothesis===6.31.6 hypothesis_jsonschema===0.20.1 isort===5.10.1 mypy===0.950 pylint===2.13.9 pytest===7.0.1 'types-jsonschema=={[format_deps]types-jsonschema}' 'types-oauthlib=={[format_deps]types-oauthlib}' 'types-pyyaml=={[format_deps]types-PyYAML}' 'types-requests=={[format_deps]types-requests}' 'types-setuptools=={[format_deps]types-setuptools}' 'typing-extensions=={[format_deps]typing-extensions}' -r /home/holmanb/cloud-init/test-requirements.txt -r /home/holmanb/cloud-init/integration-requirements.txt pid=17373
  check_format: FAIL code 1 (3.71 seconds)
  evaluation failed :( (3.79 seconds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions