Skip to content

Adding in support for Python 3.13 #2014

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

Merged
merged 5 commits into from
Oct 13, 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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install dependencies
run: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

services:
mariadb:
Expand Down Expand Up @@ -73,7 +73,8 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
# Skip 3.13 here, it needs the psycopg3 / postgis3 database
python-version: ['3.9', '3.10', '3.11', '3.12']
database: [postgresql, postgis]
# Add psycopg3 to our matrix for modern python versions
include:
Expand All @@ -83,6 +84,10 @@ jobs:
database: psycopg3
- python-version: '3.12'
database: psycopg3
- python-version: '3.13'
database: psycopg3
- python-version: '3.13'
database: postgis3

services:
postgres:
Expand Down Expand Up @@ -145,7 +150,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -192,7 +197,7 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Get pip cache dir
id: pip-cache
Expand Down
4 changes: 1 addition & 3 deletions debug_toolbar/toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

import re
import uuid
from collections import OrderedDict
from functools import lru_cache

# Can be removed when python3.8 is dropped
from typing import OrderedDict

from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
Expand Down
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Change log
Pending
-------

* Added Python 3.13 to the CI matrix.
* Removed support for Python 3.8 as it has reached end of life.

5.0.0-alpha (2024-09-01)
------------------------

Expand Down
3 changes: 1 addition & 2 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.8"
requires-python = ">=3.9"
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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
16 changes: 10 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ isolated_build = true
envlist =
docs
packaging
py{38,39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
py{39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
py{310,311,312}-dj{42,50,51,main}-{sqlite,postgresql,psycopg3,postgis,mysql}
py{313}-dj{51,main}-{sqlite,psycopg3,postgis3,mysql}

[testenv]
deps =
Expand All @@ -15,6 +16,7 @@ deps =
postgresql: psycopg2-binary
psycopg3: psycopg[binary]
postgis: psycopg2-binary
postgis3: psycopg[binary]
mysql: mysqlclient
coverage[toml]
Jinja2
Expand Down Expand Up @@ -49,33 +51,34 @@ 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,51,main}-{postgresql,psycopg3}]
[testenv:py{39,310,311,312,313}-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,51,main}-postgis]
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-{postgis,postgis3}]
setenv =
{[testenv]setenv}
DB_BACKEND = postgis
DB_PORT = {env:DB_PORT:5432}


[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-mysql]
[testenv:py{39,310,311,312,313}-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,51,main}-sqlite]
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-sqlite]
setenv =
{[testenv]setenv}
DB_BACKEND = sqlite3
DB_NAME = ":memory:"


[testenv:docs]
commands = make -C {toxinidir}/docs {posargs:spelling}
deps =
Expand All @@ -94,16 +97,17 @@ skip_install = true

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[gh-actions:env]
DB_BACKEND =
mysql: mysql
postgresql: postgresql
psycopg3: psycopg3
postgis: postgis
postgis3: postgis3
sqlite3: sqlite