Skip to content

Commit 0c15dde

Browse files
authored
Merge branch 'django-commons:main' into main
2 parents 427ec23 + 501a145 commit 0c15dde

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-toml
66
- id: check-yaml
@@ -29,12 +29,12 @@ repos:
2929
- id: rst-backticks
3030
- id: rst-directive-colons
3131
- repo: https://github.com/biomejs/pre-commit
32-
rev: v2.1.2
32+
rev: v2.1.4
3333
hooks:
3434
- id: biome-check
3535
verbose: true
3636
- repo: https://github.com/astral-sh/ruff-pre-commit
37-
rev: 'v0.12.5'
37+
rev: 'v0.12.8'
3838
hooks:
3939
- id: ruff
4040
args: [--fix, --exit-non-zero-on-fix]

debug_toolbar/store.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import contextlib
22
import json
3-
import logging
43
from collections import defaultdict, deque
54
from collections.abc import Iterable
65
from typing import Any
@@ -13,15 +12,12 @@
1312
from debug_toolbar import settings as dt_settings
1413
from debug_toolbar.models import HistoryEntry
1514

16-
logger = logging.getLogger(__name__)
17-
1815

1916
class DebugToolbarJSONEncoder(DjangoJSONEncoder):
2017
def default(self, o):
2118
try:
2219
return super().default(o)
2320
except (TypeError, ValueError):
24-
logger.debug("The debug toolbar can't serialize %s into JSON" % o)
2521
return force_str(o)
2622

2723

docs/changes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Change log
22
==========
33

4+
Pending
5+
-------
6+
7+
* Added a note about the default password in ``make example``.
8+
* Removed logging about the toolbar failing to serialize a value into JSON.
9+
410
6.0.0 (2025-07-22)
511
------------------
612

docs/contributing.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ For convenience, there's an alias for the second command::
4040

4141
$ make example
4242

43+
The default password is ``p``, it can be overridden by setting the environment
44+
variable ``DJANGO_SUPERUSER_PASSWORD``.
45+
4346
Look at ``example/settings.py`` for running the example with another database
4447
than SQLite.
4548

tests/test_store.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ def test_serialize(self):
1414
'{"hello": {"foo": "bar"}}',
1515
)
1616

17+
def test_serialize_logs_on_failure(self):
18+
self.assertEqual(
19+
store.serialize({"hello": {"foo": b"bar"}}),
20+
'{"hello": {"foo": "bar"}}',
21+
)
22+
1723
def test_deserialize(self):
1824
self.assertEqual(
1925
store.deserialize('{"hello": {"foo": "bar"}}'),

0 commit comments

Comments
 (0)