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 ≥ 4.0.13 ignores package URL in deps is ignored #2817

Closed
Gallaecio opened this issue Jan 4, 2023 · 4 comments
Closed

Tox ≥ 4.0.13 ignores package URL in deps is ignored #2817

Gallaecio opened this issue Jan 4, 2023 · 4 comments
Labels
bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@Gallaecio
Copy link

Issue

A URL like https://github.com/kmike/pytest-mypy-testing/archive/refs/heads/async-support.zip in deps is ignored.

Minimal example

Given this tox.ini:

[testenv:example]
deps =
    https://github.com/kmike/pytest-mypy-testing/archive/refs/heads/async-support.zip
commands = pip list

The output shows pytest-mypy-testing installed up until tox 4.0.12. Starting with tox 4.0.13, the URL seems to be ignored.

Before (tox 4.0.12):

$ tox --recreate -e example
example: remove tox env folder /home/adrian/temporal/web-poet/.tox/example
.pkg: remove tox env folder /home/adrian/temporal/web-poet/.tox/.pkg
example: install_deps> python -I -m pip install https://github.com/kmike/pytest-mypy-testing/archive/refs/heads/async-support.zip
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
example: install_package_deps> python -I -m pip install andi 'async-lru>=1.0.3' 'attrs>=21.3.0' 'itemadapter>=0.7.0' multidict parsel url-matcher 'w3lib>=1.22.0'
example: install_package> python -I -m pip install --force-reinstall --no-deps /home/adrian/temporal/web-poet/.tox/.tmp/package/21/web-poet-0.6.0.tar.gz
example: commands[0]> pip list
Package             Version
------------------- ---------
andi                0.4.1
async-lru           1.0.3
attrs               22.2.0
certifi             2022.12.7
charset-normalizer  2.1.1
cssselect           1.2.0
exceptiongroup      1.1.0
filelock            3.9.0
idna                3.4
iniconfig           1.1.1
itemadapter         0.7.0
lxml                4.9.2
multidict           6.0.4
mypy                0.991
mypy-extensions     0.4.3
packaging           22.0
parsel              1.7.0
pip                 22.3.1
pluggy              1.0.0
pytest              7.2.0
pytest-mypy-testing 0.0.11
requests            2.28.1
requests-file       1.5.1
setuptools          65.6.3
six                 1.16.0
tldextract          3.4.0
tomli               2.0.1
typing_extensions   4.4.0
url-matcher         0.2.0
urllib3             1.26.13
w3lib               2.1.1
web-poet            0.6.0
wheel               0.38.4
.pkg: _exit> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  example: OK (11.12=setup[10.86]+cmd[0.26] seconds)
  congratulations :) (11.24 seconds)

After (tox 4.0.13):

$ tox --recreate -e example
example: remove tox env folder /home/adrian/temporal/web-poet/.tox/example
.pkg: remove tox env folder /home/adrian/temporal/web-poet/.tox/.pkg
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
example: install_package_deps> python -I -m pip install andi 'async-lru>=1.0.3' 'attrs>=21.3.0' 'itemadapter>=0.7.0' multidict parsel url-matcher 'w3lib>=1.22.0'
example: install_package> python -I -m pip install --force-reinstall --no-deps /home/adrian/temporal/web-poet/.tox/.tmp/package/22/web-poet-0.6.0.tar.gz
example: commands[0]> pip list
Package            Version
------------------ ---------
andi               0.4.1
async-lru          1.0.3
attrs              22.2.0
certifi            2022.12.7
charset-normalizer 2.1.1
cssselect          1.2.0
filelock           3.9.0
idna               3.4
itemadapter        0.7.0
lxml               4.9.2
multidict          6.0.4
packaging          22.0
parsel             1.7.0
pip                22.3.1
requests           2.28.1
requests-file      1.5.1
setuptools         65.6.3
six                1.16.0
tldextract         3.4.0
url-matcher        0.2.0
urllib3            1.26.13
w3lib              2.1.1
web-poet           0.6.0
wheel              0.38.4
.pkg: _exit> python /home/adrian/temporal/web-poet/venv/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  example: OK (6.25=setup[6.00]+cmd[0.25] seconds)
  congratulations :) (6.37 seconds)
@Gallaecio
Copy link
Author

Gallaecio commented Jan 4, 2023

@wRAR found that appending pytest-mypy-testing @ to the URL addresses this issue.

If this is as intended, it may be worth covering in https://tox.wiki/en/latest/upgrading.html.

@gaborbernat gaborbernat added bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. and removed needs:more-info labels Jan 4, 2023
@gaborbernat
Copy link
Member

gaborbernat commented Jan 4, 2023

The problem is that http: prefix acts as a factor filter rather than as a URL. This is a limitation of the config file and a bug in tox 3 that did not work as a factor filter. Prefixing it with pytest-mypy-testing@ works around this issue. I'm not sure of a better solution.

@pdecat
Copy link
Contributor

pdecat commented Jan 4, 2023

@gaborbernat your proposed solution to require a space after the colon should work too here: #2821 (comment)

@gaborbernat
Copy link
Member

Resolved by #2821

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:minor does not affect many people or has no big impact help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

3 participants