Skip to content
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
10 changes: 4 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

services:
mariadb:
Expand Down Expand Up @@ -91,11 +91,9 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
database: [postgresql, postgis, psycopg3]
exclude:
- python-version: '3.9'
database: psycopg3
- python-version: '3.13'
database: postgis
- python-version: '3.13'
Expand Down Expand Up @@ -192,7 +190,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -252,7 +250,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: 3.9
python-version: '3.10'

- name: Get pip cache dir
id: pip-cache
Expand Down
4 changes: 2 additions & 2 deletions debug_toolbar/_stubs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Any, NamedTuple, Optional, Protocol
from typing import Any, NamedTuple, Protocol

from django import template as dj_template
from django.http import HttpRequest, HttpResponse
Expand All @@ -15,7 +15,7 @@ class InspectStack(NamedTuple):
index: int


TidyStackTrace = list[tuple[str, int, str, str, Optional[Any]]]
TidyStackTrace = list[tuple[str, int, str, str, Any | None]]


class RenderContext(dj_template.context.RenderContext):
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import re
import socket
from collections.abc import Callable
from functools import cache
from typing import Callable

from asgiref.sync import (
async_to_sync,
Expand Down
2 changes: 1 addition & 1 deletion debug_toolbar/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import logging
import re
import uuid
from collections.abc import Callable
from functools import cache
from typing import Callable

from django.apps import apps
from django.conf import settings
Expand Down
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Pending
resources.
* Show the cache backend alias and cache backend class name instead of
the cache instance in the cache panel.
* Dropped support for the Python 3.9, it has reached its end of life date.

6.1.0 (2025-10-30)
------------------
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license = { text = "BSD-3-Clause" }
authors = [
{ name = "Rob Hudson" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
Expand All @@ -25,7 +25,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down Expand Up @@ -57,7 +56,7 @@ packages = [
path = "debug_toolbar/__init__.py"

[tool.ruff]
target-version = "py39"
target-version = "py310"

fix = true
show-fixes = true
Expand Down
3 changes: 1 addition & 2 deletions tests/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import contextvars
from typing import Optional

import html5lib
from asgiref.local import Local
Expand Down Expand Up @@ -70,7 +69,7 @@ class BaseMixin:
client_class = ToolbarTestClient
async_client_class = AsyncToolbarTestClient

panel: Optional[Panel] = None
panel: Panel | None = None
panel_id = None

def setUp(self):
Expand Down
10 changes: 4 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ isolated_build = true
envlist =
docs
packaging
py{39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
py{310,311}-dj{42,51,52}-{sqlite,postgresql,psycopg3,postgis,mysql}
py{312}-dj{42,51,52,60}-{sqlite,postgresql,psycopg3,postgis,mysql}
py{313}-dj{51,52,60,main}-{sqlite,psycopg3,postgis3,mysql}
Expand Down Expand Up @@ -55,28 +54,28 @@ pip_pre = True
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}


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


[testenv:py{39,310,311,312,313,314}-dj{42,51,52,60,main}-{postgis,postgis3}]
[testenv:py{310,311,312,313,314}-dj{42,51,52,60,main}-{postgis,postgis3}]
setenv =
{[testenv]setenv}
DB_BACKEND = postgis
DB_PORT = {env:DB_PORT:5432}


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


[testenv:py{39,310,311,312,313,314}-dj{42,51,52,60,main}-sqlite]
[testenv:py{310,311,312,313,314}-dj{42,51,52,60,main}-sqlite]
setenv =
{[testenv]setenv}
DB_BACKEND = sqlite3
Expand All @@ -101,7 +100,6 @@ skip_install = true

[gh-actions]
python =
3.9: py39
3.10: py310
3.11: py311
3.12: py312
Expand Down
Loading