Skip to content

Commit 0c9656d

Browse files
committed
Error on specific warnings
This also skips the RedirectsPanel's deprecation warning from raising errors.
1 parent 7061300 commit 0c9656d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/changes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Pending
1414
* Dropped support for the Python 3.9, it has reached its end of life date.
1515
* Toggle tracking the toolbar's queries when using
1616
``debug_toolbar.store.DatabaseStore`` with ``SKIP_TOOLBAR_QUERIES``.
17-
* Updated tox configuration to treat all warnings as errors.
17+
* Updated tox configuration to treat ``DeprecationWarning``,
18+
``ResourceWarning``, and ``PendingDeprecationWarning`` as errors.
1819

1920
6.1.0 (2025-10-30)
2021
------------------

tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ passenv=
4343
GITHUB_*
4444
setenv =
4545
PYTHONPATH = {toxinidir}
46-
PYTHONWARNINGS = default,ignore:The RedirectsPanel is deprecated:DeprecationWarning
46+
PYTHONWARNINGS =\
47+
error::ResourceWarning,\
48+
error::DeprecationWarning,\
49+
error::PendingDeprecationWarning,\
50+
ignore:The RedirectsPanel is deprecated:DeprecationWarning
4751
DB_NAME = {env:DB_NAME:debug_toolbar}
4852
DB_USER = {env:DB_USER:debug_toolbar}
4953
DB_HOST = {env:DB_HOST:localhost}

0 commit comments

Comments
 (0)