From 563b04376828a9c3d4d0c3232c1dad342627168b Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 10 Oct 2020 17:34:00 +0100 Subject: [PATCH] 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. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index d5e769764..df6387d5e 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ DJANGO = master: djangomaster [testenv] -commands = ./runtests.py --fast --coverage {posargs} +commands = python -W error::DeprecationWarning -W error::PendingDeprecationWarning runtests.py --fast --coverage {posargs} envdir = {toxworkdir}/venvs/{envname} setenv = PYTHONDONTWRITEBYTECODE=1