Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #1668: Fixed the unsortable session keys fallback #1994

Merged
merged 2 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion debug_toolbar/panels/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,8 @@ def generate_stats(self, request, response):
(k, request.session.get(k)) for k in sorted(request.session.keys())
]
except TypeError:
session_list = [(k, request.session.get(k)) for k in request.session]
session_list = [
(k, request.session.get(k))
for k in request.session.keys() # (it's not a dict)
]
self.record_stats({"session": {"list": session_list}})
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Pending
* Add translations for Bulgarian and Korean.
* Update translations for several languages.
* Include new translatable strings for translation.
* Fixed a crash which happened in the fallback case when session keys cannot be
sorted.

4.4.6 (2024-07-10)
------------------
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,14 @@ lint.extend-select = [
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"RUF100", # Unused noqa directive
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"UP", # pyupgrade
"W", # pycodestyle warnings
]
lint.extend-ignore = [
"B905", # Allow zip() without strict=
"E501", # Ignore line length violations
"SIM108", # Use ternary operator instead of if-else-block
"UP031", # It's not always wrong to use percent-formatting
"B905", # Allow zip() without strict=
"E501", # Ignore line length violations
"UP031", # It's not always wrong to use percent-formatting
]
lint.per-file-ignores."*/migrat*/*" = [
"N806", # Allow using PascalCase model names in migrations
Expand Down