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 fails in py27 because of requirements.txt difference #2

Closed
spoltier opened this issue Oct 9, 2019 · 4 comments
Closed

Tox fails in py27 because of requirements.txt difference #2

spoltier opened this issue Oct 9, 2019 · 4 comments

Comments

@spoltier
Copy link
Member

spoltier commented Oct 9, 2019

Problem

Running pip-compile in a Python 3.6 virtual environment will produce a requirements.txt file with dependency versions that are not available under Python 2.7.
Switching manually to a 2.7 venv and running pip-compile -U fixes the tests in 2.7, but breaks them for 3.6.

Desired solution

Ideally, we would find a way to regenerate requirements.txt within each virtual environment in tox, before test commands are run.

Steps taken

I tried moving regeneration and installation to the commands in tox.ini,but that didn't generate a different requirements file, which means that tox calls the wrong pip-compile (e.g. whichever is in the enclosing environment, not the one that should be called given the environment the test commands are run in).

@spoltier
Copy link
Member Author

spoltier commented Oct 9, 2019

Note that tox-dev/tox#167 does not solve the problem, as commands_pre are not run prior to installing dependencies.

@lambiase
Copy link

lambiase commented Oct 9, 2019

@spoltier : Python 2.7 will not be maintained anymore next year (https://pythonclock.org) - do you really need to test against it?

@spoltier
Copy link
Member Author

spoltier commented Oct 9, 2019

@lambiase I'm aware. Just documenting the issue with the project as is, tox.ini does have py27 configured. We can also decide to remove Python 2.7 as a target, especially if this type of problem only happens going from 2 to 3.

@spoltier spoltier closed this as completed Nov 6, 2019
@spoltier
Copy link
Member Author

spoltier commented Nov 6, 2019

removed py27 in tox.ini

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants