From 2321b882c5c578c542248b605c7089342bc0feb1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 3 Aug 2025 09:43:44 +0200 Subject: [PATCH 1/6] [pre-commit.ci] pre-commit autoupdate (#2170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.4 → v0.12.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.4...v0.12.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47388752c..f652544fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: biome-check verbose: true - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.12.4' + rev: 'v0.12.5' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From a1ad2be5bec728b699e1ebc0c0309c1bca66ab79 Mon Sep 17 00:00:00 2001 From: Abdillah Bakari Ali Date: Thu, 14 Aug 2025 16:34:25 +0300 Subject: [PATCH 2/6] Added a note about the default password in make example (#2180) --- docs/changes.rst | 5 +++++ docs/contributing.rst | 3 +++ 2 files changed, 8 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index 5c7c0844b..da6173113 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -1,6 +1,11 @@ Change log ========== +Pending +------- + +* Added a note about the default password in ``make example``. + 6.0.0 (2025-07-22) ------------------ diff --git a/docs/contributing.rst b/docs/contributing.rst index 1ab7077aa..9259750c2 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -40,6 +40,9 @@ For convenience, there's an alias for the second command:: $ make example +The default password is ``p``, it can be overridden by setting the environment +variable ``DJANGO_SUPERUSER_PASSWORD``. + Look at ``example/settings.py`` for running the example with another database than SQLite. From 5133f5fe7bd31f6ab5e2d39a808768a4f8264314 Mon Sep 17 00:00:00 2001 From: Tim Schilling Date: Thu, 14 Aug 2025 19:27:32 +0300 Subject: [PATCH 3/6] Removed logging about the toolbar failing to serialize a value into JSON. (#2181) --- debug_toolbar/store.py | 4 ---- docs/changes.rst | 1 + tests/test_store.py | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/debug_toolbar/store.py b/debug_toolbar/store.py index 76526fcff..02a2a0f72 100644 --- a/debug_toolbar/store.py +++ b/debug_toolbar/store.py @@ -1,6 +1,5 @@ import contextlib import json -import logging from collections import defaultdict, deque from collections.abc import Iterable from typing import Any @@ -13,15 +12,12 @@ from debug_toolbar import settings as dt_settings from debug_toolbar.models import HistoryEntry -logger = logging.getLogger(__name__) - class DebugToolbarJSONEncoder(DjangoJSONEncoder): def default(self, o): try: return super().default(o) except (TypeError, ValueError): - logger.debug("The debug toolbar can't serialize %s into JSON" % o) return force_str(o) diff --git a/docs/changes.rst b/docs/changes.rst index da6173113..701f9d608 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -5,6 +5,7 @@ Pending ------- * Added a note about the default password in ``make example``. +* Removed logging about the toolbar failing to serialize a value into JSON. 6.0.0 (2025-07-22) ------------------ diff --git a/tests/test_store.py b/tests/test_store.py index db70377c9..e2425b4e8 100644 --- a/tests/test_store.py +++ b/tests/test_store.py @@ -14,6 +14,12 @@ def test_serialize(self): '{"hello": {"foo": "bar"}}', ) + def test_serialize_logs_on_failure(self): + self.assertEqual( + store.serialize({"hello": {"foo": b"bar"}}), + '{"hello": {"foo": "bar"}}', + ) + def test_deserialize(self): self.assertEqual( store.deserialize('{"hello": {"foo": "bar"}}'), From 501a1455d458647b6025b87a3184a8d5fc820538 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 22:38:42 +0200 Subject: [PATCH 4/6] [pre-commit.ci] pre-commit autoupdate (#2176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/biomejs/pre-commit: v2.1.2 → v2.1.4](https://github.com/biomejs/pre-commit/compare/v2.1.2...v2.1.4) - [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.5...v0.12.8) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f652544fe..63682ba1c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-toml - id: check-yaml @@ -29,12 +29,12 @@ repos: - id: rst-backticks - id: rst-directive-colons - repo: https://github.com/biomejs/pre-commit - rev: v2.1.2 + rev: v2.1.4 hooks: - id: biome-check verbose: true - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.12.5' + rev: 'v0.12.8' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] From 6061699cc5e48c1457718e509003c5098cc7f319 Mon Sep 17 00:00:00 2001 From: Matthias Kestenholz Date: Sun, 17 Aug 2025 13:44:21 +0200 Subject: [PATCH 5/6] Explicitly call out the selenium job in the GitHub actions matrix (#2182) * Explicitly call out the selenium job in the GitHub actions matrix --- .github/workflows/test.yml | 5 +++++ tox.ini | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a2ded4678..0688bb04c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,6 +88,10 @@ jobs: database: psycopg3 - python-version: '3.13' database: postgis3 + - python-version: '3.13' + database: postgresql + env: + DJANGO_SELENIUM_TESTS=true services: postgres: @@ -143,6 +147,7 @@ jobs: DB_BACKEND: ${{ matrix.database }} DB_HOST: localhost DB_PORT: 5432 + DJANGO_SELENIUM_TESTS: ${{ matrix.env.DJANGO_SELENIUM_TESTS }} sqlite: runs-on: ubuntu-latest diff --git a/tox.ini b/tox.ini index e2dcdd6c6..7e7047717 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,6 @@ passenv= setenv = PYTHONPATH = {toxinidir} PYTHONWARNINGS = d - py311-dj42-postgresql: DJANGO_SELENIUM_TESTS = {env:DJANGO_SELENIUM_TESTS:true} DB_NAME = {env:DB_NAME:debug_toolbar} DB_USER = {env:DB_USER:debug_toolbar} DB_HOST = {env:DB_HOST:localhost} From e2fd4c05d4f43505995ebb992db5f1b2014b9267 Mon Sep 17 00:00:00 2001 From: Lidoca <32785562+Lidoca@users.noreply.github.com> Date: Sun, 17 Aug 2025 20:51:44 +0900 Subject: [PATCH 6/6] =?UTF-8?q?docs:=20move=20the=20import=20statement=20o?= =?UTF-8?q?f=20`debug=5Ftoolbar=5Furls`=20to=20inside=20of=20=E2=80=A6=20(?= =?UTF-8?q?#2174)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: move the import statement of `debug_toolbar_urls` to inside of the if statement for avoiding potential errors * Add change log message for moving the docs --------- Co-authored-by: Tim Schilling --- docs/changes.rst | 2 ++ docs/installation.rst | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 701f9d608..569f88975 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -6,6 +6,8 @@ Pending * Added a note about the default password in ``make example``. * Removed logging about the toolbar failing to serialize a value into JSON. +* Moved the the import statement of ``debug_toolbar.urls`` to within the if + statement's scope on the installation documentation. 6.0.0 (2025-07-22) ------------------ diff --git a/docs/installation.rst b/docs/installation.rst index 7e356da83..995214766 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -183,9 +183,10 @@ You should also modify your URLconf file: .. code-block:: python from django.conf import settings - from debug_toolbar.toolbar import debug_toolbar_urls if not settings.TESTING: + from debug_toolbar.toolbar import debug_toolbar_urls + urlpatterns = [ *urlpatterns, ] + debug_toolbar_urls()