Handle non-JSON mapping keys in toolbar storage - #2376
Merged
tim-schilling merged 2 commits intoMay 25, 2026
Merged
Conversation
Member
|
Thanks! It would be nice to have a test which actually goes through the cache panel (or some other panel) and shows how it handles things (better). |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
Contributor
Author
|
This is covered now by Rechecked locally:
|
matthiask
approved these changes
May 24, 2026
matthiask
left a comment
Member
There was a problem hiding this comment.
Thanks! I think this looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2189.
Toolbar storage now passes
skipkeys=Trueto JSON serialization so panel data containing non-JSON-compatible mapping keys is stored without raising a server error. Valid JSON-compatible keys in the same data remain serialized. This follows the maintainer suggestion on the issue and adds coverage inSerializationTestCase.test_serialize_unexpected.Checklist:
docs/changes.rst.AI/LLM Usage
AI/LLM details: OpenAI GPT-5 assisted with the patch and validation.
Tests
UV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv uv run --group dev make test TEST_ARGS=tests.test_store.SerializationTestCaseUV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv uv run --group dev make test TEST_ARGS=tests.test_storeUV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv uv run --group dev make testUV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv-ruff uv run --with ruff ruff check debug_toolbar/store.py tests/test_store.pyUV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv-ruff uv run --with ruff ruff format --check debug_toolbar/store.py tests/test_store.pyUV_CACHE_DIR=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.uv-cache UV_PROJECT_ENVIRONMENT=/Users/deepakkudi23/ai-resume-contrib-100/django-debug-toolbar/.venv uv run --group dev black --check debug_toolbar/store.py tests/test_store.pygit diff --check