Skip to content

Commit

Permalink
Add Python 3.12 support.
Browse files Browse the repository at this point in the history
Update tests and test dependencies for Python 3.12.
  • Loading branch information
rtibbles committed Jul 1, 2024
1 parent 116d7a0 commit f708995
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 106 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10', '3.11' ]
python-version: [ 3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12' ]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
testpaths = tests/ morango/
DJANGO_SETTINGS_MODULE = testapp.settings
norecursedirs = dist tmp* .svn .*
markers =
windows: mark a test as a windows test
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# These are for testing
factory-boy==2.7.0
fake-factory==0.5.7
coverage==4.5.1
coverage==6.2
mock==2.0.0
pytest==3.10.1
pytest-cov==2.8.1
pytest-django==3.8.0
pytest==6.2.5
pytest-cov==3.0.0
pytest-django==4.5.2
more-itertools<=8.10.0
typing
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
],
python_requires=">=3.6, <3.12",
python_requires=">=3.6, <3.13",
)
57 changes: 0 additions & 57 deletions tests/patch_pytest.py

This file was deleted.

38 changes: 0 additions & 38 deletions tests/pytest_3.10.patch

This file was deleted.

6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{3.6,3.7,3.8,3.9,3.10,3.11}-cryptography{40.0.2}
py{3.6,3.7,3.8,3.9,3.10,3.11,3.12}-cryptography{40.0.2}
postgres
windows

Expand All @@ -19,6 +19,7 @@ basepython =
py3.9: python3.9
py3.10: python3.10
py3.11: python3.11
py3.12: python3.12
postgres: python3.9
windows: python3.8

Expand All @@ -27,7 +28,6 @@ deps =
cryptography40.0.2: cryptography==40.0.2
commands =
sh -c '! tests/testapp/manage.py makemigrations --dry-run --exit --noinput'
python tests/patch_pytest.py
python -O -m pytest {posargs:--cov=morango --color=no}

[testenv:postgres]
Expand All @@ -38,7 +38,6 @@ setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/tests/testapp
DJANGO_SETTINGS_MODULE = testapp.postgres_settings
commands =
python tests/patch_pytest.py
python -O -m pytest {posargs:--cov=morango --color=no}

[testenv:windows]
Expand All @@ -47,5 +46,4 @@ deps =
setenv =
PYTHONPATH = {toxinidir}{:}{toxinidir}/tests/testapp
commands =
python tests/patch_pytest.py
python -O -m pytest {posargs:--cov=morango --color=no} -m windows

0 comments on commit f708995

Please sign in to comment.