From 4b8c8b7f9ae87630ae005008a3450f88e66fe04e Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Wed, 19 Nov 2025 12:13:56 -0600 Subject: [PATCH 1/2] Treat all warnings as errors. Explicitly ignores the RedirectPanel's deprecation warning. --- docs/changes.rst | 1 + tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.rst b/docs/changes.rst index cbd995030..8c61dfa78 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -14,6 +14,7 @@ Pending * Dropped support for the Python 3.9, it has reached its end of life date. * Toggle tracking the toolbar's queries when using ``debug_toolbar.store.DatabaseStore`` with ``SKIP_TOOLBAR_QUERIES``. +* Updated tox configuration to treat all warnings as errors. 6.1.0 (2025-10-30) ------------------ diff --git a/tox.ini b/tox.ini index e7058e0fd..a33254c01 100644 --- a/tox.ini +++ b/tox.ini @@ -43,7 +43,7 @@ passenv= GITHUB_* setenv = PYTHONPATH = {toxinidir} - PYTHONWARNINGS = d + PYTHONWARNINGS = error,ignore:The RedirectsPanel is deprecated:DeprecationWarning DB_NAME = {env:DB_NAME:debug_toolbar} DB_USER = {env:DB_USER:debug_toolbar} DB_HOST = {env:DB_HOST:localhost} @@ -51,7 +51,7 @@ setenv = DJANGO_SETTINGS_MODULE = tests.settings allowlist_externals = make pip_pre = True -commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests} +commands = python -b -m coverage run -m django test -v2 {posargs:tests} [testenv:py{310,311,312,313,314}-dj{42,51,52,60,main}-{postgresql,psycopg3}] From 7061300c2c436e1da4e9c0d550c143755d352934 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Wed, 19 Nov 2025 13:15:14 -0600 Subject: [PATCH 2/2] Use default PYTHONWARNINGS setting. Explicitly ignores the RedirectPanel's deprecation warning. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index a33254c01..9c1a157c6 100644 --- a/tox.ini +++ b/tox.ini @@ -43,7 +43,7 @@ passenv= GITHUB_* setenv = PYTHONPATH = {toxinidir} - PYTHONWARNINGS = error,ignore:The RedirectsPanel is deprecated:DeprecationWarning + PYTHONWARNINGS = default,ignore:The RedirectsPanel is deprecated:DeprecationWarning DB_NAME = {env:DB_NAME:debug_toolbar} DB_USER = {env:DB_USER:debug_toolbar} DB_HOST = {env:DB_HOST:localhost}