Skip to content

Commit a1be882

Browse files
committed
Drop support for Django < 4.2 and Python < 3.9.
1 parent dba3c5a commit a1be882

File tree

3 files changed

+68
-56
lines changed

3 files changed

+68
-56
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ on: [push, pull_request]
55
jobs:
66
test:
77
runs-on: ubuntu-latest
8+
89
strategy:
910
fail-fast: false
1011
max-parallel: 5
1112
matrix:
12-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
13+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
1314

1415
steps:
15-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1617

1718
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
1920
with:
2021
python-version: ${{ matrix.python-version }}
2122

@@ -25,7 +26,7 @@ jobs:
2526
echo "::set-output name=dir::$(pip cache dir)"
2627
2728
- name: Cache
28-
uses: actions/cache@v2
29+
uses: actions/cache@v4
2930
with:
3031
path: ${{ steps.pip-cache.outputs.dir }}
3132
key:

setup.py

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,39 @@
33

44
from polymodels import __version__
55

6-
github_url = 'https://github.com/charettes/django-polymodels'
7-
long_desc = open('README.rst').read()
6+
github_url = "https://github.com/charettes/django-polymodels"
7+
long_desc = open("README.rst").read()
88

99
setup(
10-
name='django-polymodels',
10+
name="django-polymodels",
1111
version=__version__,
12-
description='Polymorphic models implementation for django',
12+
description="Polymorphic models implementation for django",
1313
long_description=long_desc,
14-
long_description_content_type='text/x-rst',
14+
long_description_content_type="text/x-rst",
1515
url=github_url,
16-
author='Simon Charette',
17-
author_email='charette.s@gmail.com',
18-
install_requires=(
19-
'Django>=3.2',
20-
),
21-
packages=find_packages(exclude=['tests', 'tests.*']),
16+
author="Simon Charette",
17+
author_email="charette.s@gmail.com",
18+
install_requires=("Django>=4.2",),
19+
packages=find_packages(exclude=["tests", "tests.*"]),
2220
include_package_data=True,
23-
license='MIT License',
21+
license="MIT License",
2422
classifiers=[
25-
'Development Status :: 5 - Production/Stable',
26-
'Environment :: Web Environment',
27-
'Framework :: Django',
28-
'Framework :: Django :: 3.2',
29-
'Framework :: Django :: 4.0',
30-
'Framework :: Django :: 4.1',
31-
'Framework :: Django :: 4.2',
32-
'Intended Audience :: Developers',
33-
'License :: OSI Approved :: MIT License',
34-
'Operating System :: OS Independent',
35-
'Programming Language :: Python',
36-
'Programming Language :: Python :: 3.7',
37-
'Programming Language :: Python :: 3.8',
38-
'Programming Language :: Python :: 3.9',
39-
'Programming Language :: Python :: 3.10',
40-
'Topic :: Software Development :: Libraries :: Python Modules'
23+
"Development Status :: 5 - Production/Stable",
24+
"Environment :: Web Environment",
25+
"Framework :: Django",
26+
"Framework :: Django :: 4.2",
27+
"Framework :: Django :: 5.0",
28+
"Framework :: Django :: 5.1",
29+
"Framework :: Django :: 5.2",
30+
"Intended Audience :: Developers",
31+
"License :: OSI Approved :: MIT License",
32+
"Operating System :: OS Independent",
33+
"Programming Language :: Python",
34+
"Programming Language :: Python :: 3.9",
35+
"Programming Language :: Python :: 3.10",
36+
"Programming Language :: Python :: 3.11",
37+
"Programming Language :: Python :: 3.12",
38+
"Programming Language :: Python :: 3.13",
39+
"Topic :: Software Development :: Libraries :: Python Modules",
4140
],
4241
)

tox.ini

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,65 +2,77 @@
22
skipsdist = true
33
args_are_paths = false
44
envlist =
5-
flake8,
6-
isort,
7-
pypi,
8-
py37-3.2,
9-
py{38,39}-{3.2,4.0,4.1,4.2},
10-
py310-{3.2,4.0,4.1,4.2,main}
11-
py311-{3.2,4.0,4.1,4.2,main}
5+
black
6+
flake8
7+
isort
8+
pypi
9+
py39-4.2
10+
py310-{4.2,5.0,5.1,5.2,main}
11+
py{311,312}-{4.2,5.0,5.1,5.2,main}
12+
py313-{5.1,5.2,main}
1213

1314
[gh-actions]
1415
python =
15-
3.7: py37
16-
3.8: py38
17-
3.9: py39
16+
3.9: py39, black, flake8, isort
1817
3.10: py310
1918
3.11: py311
19+
3.12: py312
20+
3.13: py313
2021

2122
[testenv]
2223
basepython =
23-
py37: python3.7
24-
py38: python3.8
2524
py39: python3.9
2625
py310: python3.10
2726
py311: python3.11
27+
py312: python3.12
28+
py313: python3.13
2829
usedevelop = true
30+
setenv =
31+
DJANGO_SETTINGS_MODULE=tests.settings
32+
passenv =
33+
GITHUB_*
34+
DB_*
2935
commands =
30-
{envpython} -R -Wonce {envbindir}/coverage run -a -m django test -v2 --settings=tests.settings {posargs}
36+
{envpython} -R -Wonce {envbindir}/coverage run -a -m django test -v2 {posargs}
3137
coverage report
3238
deps =
3339
coverage
34-
3.2: Django>=3.2a1,<4
35-
4.0: Django>=4.0,<4.1
36-
4.1: Django>=4.1,<4.2
3740
4.2: Django>=4.2,<5
41+
5.0: Django>=5,<5.1
42+
5.1: Django>=5.1,<5.2
43+
5.2: Django>=5.2a1,<6.0
3844
main: https://github.com/django/django/archive/main.tar.gz
39-
passenv =
40-
GITHUB_*
45+
ignore_outcome =
46+
main: true
47+
48+
[testenv:black]
49+
usedevelop = false
50+
basepython = python3.9
51+
commands = black --check polymodels tests
52+
deps = black
4153

4254
[testenv:flake8]
4355
usedevelop = false
44-
basepython = python3.7
56+
basepython = python3.9
4557
commands = flake8
4658
deps = flake8
4759

4860
[testenv:isort]
4961
usedevelop = false
50-
basepython = python3.7
51-
commands = isort --recursive --check-only --diff polymodels tests
62+
basepython = python3.9
63+
commands = isort --check-only --diff polymodels tests
5264
deps =
5365
isort
54-
Django
66+
Django>=4.2
5567

5668
[testenv:pypi]
5769
usedevelop = false
58-
basepython = python3.7
70+
basepython = python3.9
5971
commands =
6072
python setup.py sdist --format=gztar bdist_wheel
6173
twine check dist/*
6274
deps =
6375
pip
6476
setuptools
6577
twine
66-
wheel
78+
wheel

0 commit comments

Comments
 (0)