Skip to content

Commit 22c92e4

Browse files
Adding in support for Python 3.13 (#2014)
Shout-out to London Django Meetup for the Hacktoberfest Hackathon inspiration. Removed support for Python 3.8 end of life Co-authored-by: Matthias Kestenholz <[email protected]>
1 parent 244d4fd commit 22c92e4

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up Python
1919
uses: actions/setup-python@v5
2020
with:
21-
python-version: 3.8
21+
python-version: 3.9
2222

2323
- name: Install dependencies
2424
run: |

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
max-parallel: 5
1616
matrix:
17-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
17+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1818

1919
services:
2020
mariadb:
@@ -73,7 +73,8 @@ jobs:
7373
fail-fast: false
7474
max-parallel: 5
7575
matrix:
76-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
76+
# Skip 3.13 here, it needs the psycopg3 / postgis3 database
77+
python-version: ['3.9', '3.10', '3.11', '3.12']
7778
database: [postgresql, postgis]
7879
# Add psycopg3 to our matrix for modern python versions
7980
include:
@@ -83,6 +84,10 @@ jobs:
8384
database: psycopg3
8485
- python-version: '3.12'
8586
database: psycopg3
87+
- python-version: '3.13'
88+
database: psycopg3
89+
- python-version: '3.13'
90+
database: postgis3
8691

8792
services:
8893
postgres:
@@ -145,7 +150,7 @@ jobs:
145150
fail-fast: false
146151
max-parallel: 5
147152
matrix:
148-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
153+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
149154

150155
steps:
151156
- uses: actions/checkout@v4
@@ -192,7 +197,7 @@ jobs:
192197
- name: Set up Python ${{ matrix.python-version }}
193198
uses: actions/setup-python@v5
194199
with:
195-
python-version: 3.8
200+
python-version: 3.9
196201

197202
- name: Get pip cache dir
198203
id: pip-cache

debug_toolbar/toolbar.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44

55
import re
66
import uuid
7+
from collections import OrderedDict
78
from functools import lru_cache
89

9-
# Can be removed when python3.8 is dropped
10-
from typing import OrderedDict
11-
1210
from django.apps import apps
1311
from django.conf import settings
1412
from django.core.exceptions import ImproperlyConfigured

docs/changes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Change log
44
Pending
55
-------
66

7+
* Added Python 3.13 to the CI matrix.
8+
* Removed support for Python 3.8 as it has reached end of life.
9+
710
5.0.0-alpha (2024-09-01)
811
------------------------
912

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ license = { text = "BSD-3-Clause" }
1212
authors = [
1313
{ name = "Rob Hudson" },
1414
]
15-
requires-python = ">=3.8"
15+
requires-python = ">=3.9"
1616
classifiers = [
1717
"Development Status :: 5 - Production/Stable",
1818
"Environment :: Web Environment",
@@ -25,7 +25,6 @@ classifiers = [
2525
"Operating System :: OS Independent",
2626
"Programming Language :: Python",
2727
"Programming Language :: Python :: 3 :: Only",
28-
"Programming Language :: Python :: 3.8",
2928
"Programming Language :: Python :: 3.9",
3029
"Programming Language :: Python :: 3.10",
3130
"Programming Language :: Python :: 3.11",

tox.ini

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ isolated_build = true
33
envlist =
44
docs
55
packaging
6-
py{38,39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
6+
py{39,310,311,312}-dj{42}-{sqlite,postgresql,postgis,mysql}
77
py{310,311,312}-dj{42,50,51,main}-{sqlite,postgresql,psycopg3,postgis,mysql}
8+
py{313}-dj{51,main}-{sqlite,psycopg3,postgis3,mysql}
89

910
[testenv]
1011
deps =
@@ -15,6 +16,7 @@ deps =
1516
postgresql: psycopg2-binary
1617
psycopg3: psycopg[binary]
1718
postgis: psycopg2-binary
19+
postgis3: psycopg[binary]
1820
mysql: mysqlclient
1921
coverage[toml]
2022
Jinja2
@@ -49,33 +51,34 @@ pip_pre = True
4951
commands = python -b -W always -m coverage run -m django test -v2 {posargs:tests}
5052

5153

52-
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-{postgresql,psycopg3}]
54+
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-{postgresql,psycopg3}]
5355
setenv =
5456
{[testenv]setenv}
5557
DB_BACKEND = postgresql
5658
DB_PORT = {env:DB_PORT:5432}
5759

5860

59-
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-postgis]
61+
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-{postgis,postgis3}]
6062
setenv =
6163
{[testenv]setenv}
6264
DB_BACKEND = postgis
6365
DB_PORT = {env:DB_PORT:5432}
6466

6567

66-
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-mysql]
68+
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-mysql]
6769
setenv =
6870
{[testenv]setenv}
6971
DB_BACKEND = mysql
7072
DB_PORT = {env:DB_PORT:3306}
7173

7274

73-
[testenv:py{38,39,310,311,312}-dj{42,50,51,main}-sqlite]
75+
[testenv:py{39,310,311,312,313}-dj{42,50,51,main}-sqlite]
7476
setenv =
7577
{[testenv]setenv}
7678
DB_BACKEND = sqlite3
7779
DB_NAME = ":memory:"
7880

81+
7982
[testenv:docs]
8083
commands = make -C {toxinidir}/docs {posargs:spelling}
8184
deps =
@@ -94,16 +97,17 @@ skip_install = true
9497

9598
[gh-actions]
9699
python =
97-
3.8: py38
98100
3.9: py39
99101
3.10: py310
100102
3.11: py311
101103
3.12: py312
104+
3.13: py313
102105

103106
[gh-actions:env]
104107
DB_BACKEND =
105108
mysql: mysql
106109
postgresql: postgresql
107110
psycopg3: psycopg3
108111
postgis: postgis
112+
postgis3: postgis3
109113
sqlite3: sqlite

0 commit comments

Comments
 (0)