Skip to content

Commit

Permalink
Merge pull request #1176 from jazzband/python-django-version-update
Browse files Browse the repository at this point in the history
Add support for Python 3.12 and Django 5.0
  • Loading branch information
aleksihakli authored Mar 4, 2024
2 parents 048b1f9 + a069a42 commit 3986334
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 23 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,36 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: ['3.2', '4.1', '4.2']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['3.2', '4.2', '5.0']
include:
# Tox configuration for QA environment
- python-version: '3.11'
- python-version: '3.12'
django-version: 'qa'
# Django main
- python-version: '3.11'
- python-version: '3.12'
django-version: 'main'
experimental: true
# PyPy 3.8
- python-version: 'pypy-3.8'
# PyPy 3.10
- python-version: 'pypy-3.10'
django-version: '3.2'
experimental: true
- python-version: 'pypy-3.8'
django-version: '4.1'
experimental: true
- python-version: 'pypy-3.8'
- python-version: 'pypy-3.10'
django-version: '4.2'
experimental: true
- python-version: 'pypy-3.10'
django-version: '5.0'
experimental: true
exclude:
# Exclude Python 3.11 for Django 3.2 and Django 4.0
- python-version: '3.11'
django-version: '3.2'
- python-version: '3.12'
django-version: '3.2'
- python-version: '3.8'
django-version: '5.0'
- python-version: '3.9'
django-version: '5.0'



steps:
Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ DJANGO_SETTINGS_MODULE = "tests.settings"
legacy_tox_ini = """
[tox]
envlist =
py{38,39,310,py38}-dj32
py{38,39,310,311,py38}-dj41
py{38,39,310,311,py38}-dj42
py{38,39,310,py310}-dj32
py{38,39,310,311,py310}-dj42
py{310,311,py310}-dj50
py311-djmain
py311-djqa
Expand All @@ -22,7 +22,8 @@ python =
3.9: py39
3.10: py310
3.11: py311
pypy-3.8: pypy38
3.12: py312
pypy-3.10: pypy310
[gh-actions:env]
DJANGO =
Expand All @@ -37,8 +38,8 @@ DJANGO =
deps =
-r requirements-test.txt
dj32: django>=3.2,<3.3
dj41: django>=4.1,<4.2
dj42: django>=4.1,<4.2
dj50: django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.tar.gz
usedevelop = true
commands = pytest
Expand All @@ -47,13 +48,13 @@ setenv =
# Django development version is allowed to fail the test matrix
ignore_outcome =
djmain: True
pypy38: True
pypy310: True
ignore_errors =
djmain: True
pypy38: True
pypy310: True
# QA runs type checks, linting, and code formatting checks
[testenv:py311-djqa]
[testenv:py312-djqa]
deps = -r requirements-qa.txt
commands =
mypy axes
Expand Down
1 change: 0 additions & 1 deletion requirements-qa.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
black==24.2.0
mypy==1.8.0
prospector==1.10.3
types-pkg_resources # Type stub
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"Environment :: Plugins",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
Expand All @@ -60,6 +60,7 @@
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Internet :: Log Analysis",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

from django.test import override_settings
from django.urls import reverse
from pkg_resources import get_distribution

from axes import __version__
from axes.apps import AppConfig
from axes.models import AccessAttempt, AccessLog
from tests.base import AxesTestCase

_BEGIN = "AXES: BEGIN version %s, %s"
_VERSION = get_distribution("django-axes").version
_VERSION = __version__


@patch("axes.apps.AppConfig.initialized", False)
Expand Down

0 comments on commit 3986334

Please sign in to comment.