Skip to content

Commit ee37bd4

Browse files
committed
chore: drop support for Django 4.2, 5.0 and Python 3.9
- Django 5.0 is no longer supported upstream. - Django 4.2 is still LTS, but it is no longer possible to keep compatibility with upcoming Django 6 and 4.2 (see #557). - Python 3.9 was supported only with Django 4.2.
1 parent 8cc2bdb commit ee37bd4

File tree

5 files changed

+15
-24
lines changed

5 files changed

+15
-24
lines changed

.github/workflows/test.yml

-11
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
strategy:
1616
matrix:
1717
python-version:
18-
- '3.9'
1918
- '3.10'
2019
- '3.11'
2120
- '3.12'
@@ -45,16 +44,6 @@ jobs:
4544
python -m pip install --upgrade pip
4645
pip install tox coverage
4746
48-
- name: Django 4.2.x Test
49-
run: |
50-
tox -e "py${PYTHON_VERSION/\./}-django42"
51-
if: ${{ env.PYTHON_VERSION == '3.9' || env.PYTHON_VERSION == '3.10' || env.PYTHON_VERSION == '3.11' }}
52-
53-
- name: Django 5.0.x Test
54-
run: |
55-
tox -e "py${PYTHON_VERSION/\./}-django50"
56-
if: ${{ env.PYTHON_VERSION == '3.10' || env.PYTHON_VERSION == '3.11' || env.PYTHON_VERSION == '3.12' || env.PYTHON_VERSION == '3.13' }}
57-
5847
- name: Django 5.1.x Test
5948
run: |
6049
tox -e "py${PYTHON_VERSION/\./}-django51"

.pre-commit-config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,13 @@ repos:
6262
rev: v1.6.0
6363
hooks:
6464
- id: zizmor
65+
- repo: https://github.com/adamchainz/djade-pre-commit
66+
rev: 1.4.0
67+
hooks:
68+
- id: djade
69+
args: [--target-version, '5.1']
70+
- repo: https://github.com/adamchainz/django-upgrade
71+
rev: 1.24.0
72+
hooks:
73+
- id: django-upgrade
74+
args: [--target-version, '5.1']

pyproject.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ classifiers = [
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
2929
"Programming Language :: Python :: 3.13",
30-
"Programming Language :: Python :: 3.9",
3130
"Programming Language :: Python",
3231
"Topic :: Internet"
3332
]
3433
dependencies = [
35-
"Django>=4.2",
34+
"Django>=5.1",
3635
"social-auth-core~=4.4"
3736
]
3837
description = "Python Social Authentication, Django integration."
@@ -41,7 +40,7 @@ license = "BSD-3-Clause"
4140
license-files = ["LICENSE"]
4241
name = "social-auth-app-django"
4342
readme = "README.md"
44-
requires-python = ">=3.9"
43+
requires-python = ">=3.10"
4544
version = "5.4.3"
4645

4746
[project.optional-dependencies]
@@ -86,7 +85,7 @@ plugins = [
8685
]
8786

8887
[tool.pyright]
89-
pythonVersion = "3.9"
88+
pythonVersion = "3.10"
9089
reportAttributeAccessIssue = "none"
9190
reportOptionalMemberAccess = "none"
9291
reportPossiblyUnboundVariable = "none"
@@ -106,7 +105,6 @@ exclude = [
106105
]
107106
line-length = 120
108107
output-format = "github"
109-
target-version = "py37"
110108

111109
[tool.ruff.lint]
112110
ignore = []

social_django/models.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""Django ORM models for Social Auth"""
22

3-
from typing import Union
4-
53
from django.conf import settings
64
from django.db import models
75
from django.db.utils import IntegrityError
@@ -45,7 +43,7 @@ class Meta:
4543
abstract = True
4644

4745
@classmethod
48-
def get_social_auth(cls, provider: str, uid: Union[str, int]):
46+
def get_social_auth(cls, provider: str, uid: str | int):
4947
if not isinstance(uid, str):
5048
uid = str(uid)
5149
for social in cls.objects.select_related("user").filter(provider=provider, uid=uid):

tox.ini

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[tox]
22
envlist =
3-
py{39,310,311}-django42
4-
py{310,311,312,313}-django50
53
py{310,311,312,313}-django51
64
py{310,311,312,313}-django52
75
py{312,313}-djangomain
@@ -12,10 +10,8 @@ passenv = *
1210
commands =
1311
coverage run manage.py test
1412
deps =
15-
django42: Django>=4.2,<4.3
16-
django50: Django>=5.0,<5.1
1713
django51: Django>=5.1,<5.2
18-
django52: Django>=5.2a1,<5.3
14+
django52: Django>=5.2,<5.3
1915
djangomain: https://github.com/django/django/archive/main.tar.gz
2016
socialmaster: https://github.com/python-social-auth/social-core/archive/master.tar.gz
2117
.[dev]

0 commit comments

Comments
 (0)