Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
salty-ivy committed Aug 25, 2024
2 parents 830c964 + b9d34d3 commit e355468
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
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}})
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change log
Pending
-------

* Added Django 5.1 to the CI matrix.
* Support select and explain buttons for ``UNION`` queries on PostgreSQL.
* Fixed internal toolbar requests being instrumented if the Django setting
``FORCE_SCRIPT_NAME`` was set.
Expand All @@ -13,6 +14,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
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ classifiers = [
"Framework :: Django",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
Expand Down Expand Up @@ -74,16 +75,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
11 changes: 6 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ envlist =
docs
packaging
py{38,39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
py{310,311,312}-dj{42,50,main}-{sqlite,postgresql,psycopg3,postgis,mysql}
py{310,311,312}-dj{42,50,51,main}-{sqlite,postgresql,psycopg3,postgis,mysql}

[testenv]
deps =
dj42: django~=4.2.1
dj50: django~=5.0.2
dj51: django~=5.1.0
djmain: https://github.com/django/django/archive/main.tar.gz
postgresql: psycopg2-binary
psycopg3: psycopg[binary]
Expand Down Expand Up @@ -48,28 +49,28 @@ pip_pre = True
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}


[testenv:py{38,39,310,311,312}-dj{42,50,main}-{postgresql,psycopg3}]
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-{postgresql,psycopg3}]
setenv =
{[testenv]setenv}
DB_BACKEND = postgresql
DB_PORT = {env:DB_PORT:5432}


[testenv:py{38,39,310,311,312}-dj{42,50,main}-postgis]
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-postgis]
setenv =
{[testenv]setenv}
DB_BACKEND = postgis
DB_PORT = {env:DB_PORT:5432}


[testenv:py{38,39,310,311,312}-dj{42,50,main}-mysql]
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-mysql]
setenv =
{[testenv]setenv}
DB_BACKEND = mysql
DB_PORT = {env:DB_PORT:3306}


[testenv:py{38,39,310,311,312}-dj{42,50,main}-sqlite]
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-sqlite]
setenv =
{[testenv]setenv}
DB_BACKEND = sqlite3
Expand Down

0 comments on commit e355468

Please sign in to comment.