diff --git a/docs/changes.rst b/docs/changes.rst index 752f9eedb..063957f43 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -16,6 +16,8 @@ Pending ``debug_toolbar.store.DatabaseStore`` with ``SKIP_TOOLBAR_QUERIES``. * Fixed font family for code blocks and stack traces in the toolbar. * Added test to confirm Django's ``TestCase.assertNumQueries`` works. +* Updated tox configuration to treat ``DeprecationWarning``, + ``ResourceWarning``, and ``PendingDeprecationWarning`` as errors. 6.1.0 (2025-10-30) ------------------ diff --git a/tox.ini b/tox.ini index e7058e0fd..5223bd56a 100644 --- a/tox.ini +++ b/tox.ini @@ -43,7 +43,11 @@ passenv= GITHUB_* setenv = PYTHONPATH = {toxinidir} - PYTHONWARNINGS = d + PYTHONWARNINGS =\ + error::ResourceWarning,\ + error::DeprecationWarning,\ + error::PendingDeprecationWarning,\ + 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 +55,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}]