Error on deprecation and pending deprecation warnings (#7586)

Erroring on deprecation or pending deprecation warnings means they are caught early. This will avoid the cycle of releasing with 'support for Django X', then chasing all the deprecation warnings one-by-one. Instead, when a new Django version is added to the test matrix, it will fail until all the relevant warnings are fixed. This avoids passing these warnings on to users, some of whom don't upgrade until they are all fixed.
This commit is contained in:
Adam Johnson 2020-10-10 17:34:00 +01:00 committed by GitHub
parent 79c37d0dc3
commit 563b043768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ DJANGO =
master: djangomaster master: djangomaster
[testenv] [testenv]
commands = ./runtests.py --fast --coverage {posargs} commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --fast --coverage {posargs}
envdir = {toxworkdir}/venvs/{envname} envdir = {toxworkdir}/venvs/{envname}
setenv = setenv =
PYTHONDONTWRITEBYTECODE=1 PYTHONDONTWRITEBYTECODE=1