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

setup.py's install_requires overwrites tox.ini's deps yet there is no failure :( #513

Open
zsoldosp opened this issue Apr 28, 2017 · 2 comments
Labels
area:reporting area:testenv-creation feature:new something does not exist yet, but should help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement

Comments

@zsoldosp
Copy link

It would be nice to have tox verify that it got the versions that it expected from its inputs or fail running the tests, as this way I can get false confidence that it works with a given dep version, when in reality, it doesn't.

Haven't found any open github issues in this area (closest is #42, but that's quite different)

To repro

given the following tox.ini

[tox]
envlist = py{27,34}-django1{8,9}

[testenv]
commands =
    make test
setenv =
    DJANGO_SETTINGS_MODULE = settings
deps =
    django18: Django>=1.8,<1.9
    django19: Django>=1.9,<1.10
whitelist_externals = make

and in setup.py we have

...
setup(
    ....,
    install_requires=[
        'Django>=1.8,<=1.8',  # note it isn't upgraded to 1.9 'coz of developer oversight
    ]
)
...

running tox -e py27-django19 will end up with Django 1.8 installed in the virtualenv (below the test is simply checking for the correct django version (hardcoded for repro's sake) in the Makefile).

test:
        pip freeze
        pip freeze | grep "Django==1\.9"

versions

$ python --version
Python 2.7.6
$ pip freeze | grep tox
tox==2.7.0
$ lsb_version -a
Distributor ID: Ubuntu
Description:    Ubuntu 14.04.5 LTS
Release:        14.04
Codename:       trusty
@obestwalter obestwalter added area:reporting area:commands-execution feature:new something does not exist yet, but should level:hard rought estimate that this might be quite hard to implement area:testenv-creation and removed area:commands-execution enhancement labels Sep 4, 2017
@gaborbernat gaborbernat added this to the 3.5 milestone Sep 18, 2018
@gaborbernat gaborbernat modified the milestones: 3.5, 3.6 Oct 8, 2018
@gaborbernat gaborbernat modified the milestones: 3.6, 3.7 Dec 16, 2018
@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label May 3, 2019
@stinovlas
Copy link

I just stumbled into this issue with tox==3.23.0 and was quite confused by it. I confirm that it's still happening. Maybe I'll find some time to help with the issue, but unfortunatelly not right now.

@gaborbernat gaborbernat modified the milestones: 3.7, 4.2 Jan 13, 2022
@gaborbernat
Copy link
Member

The only way we could prevent this is to unroll after the environment setup all the dependencies installed and see if there are any conflicting requirements in it. A PR against version 4 would do something like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:reporting area:testenv-creation feature:new something does not exist yet, but should help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. level:hard rought estimate that this might be quite hard to implement
Projects
None yet
Development

No branches or pull requests

4 participants