Skip to content

Commit d84848a

Browse files
Merge branch 'main' into patch-1
2 parents 0068090 + 6061699 commit d84848a

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ jobs:
8888
database: psycopg3
8989
- python-version: '3.13'
9090
database: postgis3
91+
- python-version: '3.13'
92+
database: postgresql
93+
env:
94+
DJANGO_SELENIUM_TESTS=true
9195

9296
services:
9397
postgres:
@@ -143,6 +147,7 @@ jobs:
143147
DB_BACKEND: ${{ matrix.database }}
144148
DB_HOST: localhost
145149
DB_PORT: 5432
150+
DJANGO_SELENIUM_TESTS: ${{ matrix.env.DJANGO_SELENIUM_TESTS }}
146151

147152
sqlite:
148153
runs-on: ubuntu-latest

.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.4'
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Change log
44
Pending
55
-------
66

7+
* Added a note about the default password in ``make example``.
8+
* Removed logging about the toolbar failing to serialize a value into JSON.
79
* Moved the the import statement of ``debug_toolbar.urls`` to within the if
810
statement's scope on the installation documentation.
911

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"}}'),

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ passenv=
4242
setenv =
4343
PYTHONPATH = {toxinidir}
4444
PYTHONWARNINGS = d
45-
py311-dj42-postgresql: DJANGO_SELENIUM_TESTS = {env:DJANGO_SELENIUM_TESTS:true}
4645
DB_NAME = {env:DB_NAME:debug_toolbar}
4746
DB_USER = {env:DB_USER:debug_toolbar}
4847
DB_HOST = {env:DB_HOST:localhost}

0 commit comments

Comments
 (0)