Skip to content

Commit cc8eaaa

Browse files
committed
Error on specific warnings
* This also skips the RedirectsPanel's deprecation warning from raising errors. * Ignore the deprecated template partials warning explicitly.
1 parent 155f6ac commit cc8eaaa

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

docs/changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Pending
2121
limits. When ``SQLParseError`` is raised, the SQL panel now automatically
2222
disables grouping and retries formatting, preventing crashes with large
2323
queries.
24+
* Updated tox configuration to treat ``DeprecationWarning``,
25+
``ResourceWarning``, and ``PendingDeprecationWarning`` as errors.
2426

2527
6.3.0 (2026-04-01)
2628
------------------

tox.ini

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ passenv=
3333
GITHUB_*
3434
setenv =
3535
PYTHONPATH = {toxinidir}
36-
PYTHONWARNINGS = d
36+
PYTHONWARNINGS =\
37+
error::ResourceWarning,\
38+
error::DeprecationWarning,\
39+
error::PendingDeprecationWarning,\
40+
ignore:The RedirectsPanel is deprecated:DeprecationWarning,\
41+
# This can be removed when we're fully to 6.0
42+
ignore:The 'partial'and 'partialdef' template tags are now part of Django core:DeprecationWarning
3743
DB_NAME = {env:DB_NAME:debug_toolbar}
3844
DB_USER = {env:DB_USER:debug_toolbar}
3945
DB_HOST = {env:DB_HOST:localhost}
@@ -43,7 +49,7 @@ allowlist_externals = make
4349
pip_pre = True
4450
dependency_groups =
4551
dev
46-
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}
52+
commands = python -b -m coverage run -m django test -v2 {posargs:tests}
4753

4854

4955
[testenv:py{310,311,312,313,314}-dj{52,60,main}-{postgresql,psycopg3}]

0 commit comments

Comments
 (0)