-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Upgrade to tox 4 #8795
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
Upgrade to tox 4 #8795
Conversation
@@ -7,15 +7,6 @@ envlist = | |||
{py311}-{django41,djangomain}, | |||
base,dist,docs, | |||
|
|||
[travis:env] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config for tox-travis, I missed removing it in #7903
{py36,py37,py38,py39}-django30 | ||
{py36,py37,py38,py39}-django31 | ||
{py36,py37,py38,py39,py310}-django32 | ||
{py38,py39,py310}-{django40,django41,djangomain} | ||
{py311}-{django41,djangomain} | ||
base | ||
dist | ||
docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change is not necessary but it will reduce diff noise going forwards
@@ -39,7 +32,7 @@ deps = | |||
-rrequirements/requirements-testing.txt | |||
|
|||
[testenv:dist] | |||
commands = ./runtests.py --no-pkgroot --staticfiles {posargs} | |||
commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --no-pkgroot --staticfiles {posargs} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox no longer allows ./runtests.py
to work, failing with:
dist: failed with ./runtests.py (resolves to ./runtests.py) is not allowed, use allowlist_externals to allow it
but we can use python runtests.py
instead
I also added the warning flags as added to the main [testenv]
in #7900
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks Adam. Merge when you're happy — let's go! 🚀:)
tox -e base,dist,docs | ||
tox -e dist --installpkg ./dist/djangorestframework-*.whl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this run is no longer required because tox now uses isolated builds by default.
We need to remove it because --installpkg
seems to be incompatible with deps
, or some other option we're using, leading to:
ROOT: HandledError| .pkg_external is already defined as a virtualenv-cmd-builder, cannot be virtualenv-pep-517 too
Copy of #458 for this repo.
tox 4 has just been released: https://fosstodon.org/@gaborbernat/109473528072009278
tox-py no longer works with it, but that’s okay since the new
-f
factor option fills the need to run Python 3.X tests in the Python 3.X CI run. I documented this pattern in the package install instructions: https://github.com/adamchainz/tox-py/#installation . Plus, I’ve already changed all the projects I maintain to use it, for example: adamchainz/django-htmx#296tox 4 only supports Python 3.7+. I’ve added a temporary fork on Python version to retain running with old tox and tox-py on Python 3.6. I think we should drop Python 3.6 in a follow-up PR since it’s been EOL for a while now.