Skip to content

Commit

Permalink
Drop support for Python 2, Django 1.11 and 2.2. Add support for Pytho…
Browse files Browse the repository at this point in the history
…n 3.7+, Django 3+.
  • Loading branch information
SupImDos committed Jan 30, 2024
1 parent 2bb9753 commit 95539a4
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 21 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,21 @@ jobs:
strategy:
matrix:
python-version:
- py27-django111
- py3-django2
- py3-django3
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: ${{ matrix.python-version }}

- run: pip install tox
- run: tox -e ${{ matrix.python-version }}
- run: pip install tox tox-gh-actions
- run: tox

############
# Coverage #
Expand All @@ -40,10 +43,10 @@ jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v1
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
- uses: actions/checkout@v2

- run: pip install coverage
- run: pip install coverage setuptools

- run: python setup.py install
- run: coverage run runtests.py
Expand All @@ -69,7 +72,7 @@ jobs:
with:
python-version: "3.7"

- run: python -m pip install black==19.10b0
- run: python -m pip install black==19.10b0 click==8.0.4
- run: black --safe --check --diff .


Expand All @@ -83,7 +86,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "2.7"
python-version: "3.7"

- run: python -m pip install flake8==3.3.0
- run: flake8 --config=.flake8 .
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Installation
Supported versions
------------------

* Python (2.7, 3.7)
* Django (1.11, 2.2, 3.0)
* Python 3.7+
* Django 3.0+


License
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ target-version = ['py27']
exclude = '''
/(
\.git
| \.venv([23])?
| \.venv
)/
'''

Expand All @@ -18,7 +18,7 @@ import_heading_firstparty = 'local'
lines_after_imports = 2
atomic = true
combine_star = true
skip = ['.git', '.venv2', '.venv3']
skip = ['.git', '.venv']
# These settings makes isort compatible with Black:
# https://github.com/psf/black#how-black-wraps-lines
multi_line_output = 3
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
django-bulk-update
django-chunkator
django-chunkator<2
2 changes: 2 additions & 0 deletions tests/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
SECRET_KEY = "j^owl8=_)2do0don9sk@5k7obl!vxm!_404wf%yvk9rp3@a83#"

DATABASES = {"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}}

DEFAULT_AUTO_FIELD = "django.db.models.AutoField"
21 changes: 16 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
[tox]
envlist = py27-django{111}, py3-django{2,3}
envlist =
py{37,38,39,310,311,312}-django{3}
py{38,39,310,311,312}-django{4}
py{310,311,312}-django{5}

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
deps =
py27: mock
django111: Django>=1.11,<2
django2: Django>=2,<3
django3: Django>=3,<4
django4: Django>=4,<5
django5: Django>=5,<6
-r tests/requirements.txt

commands = ./runtests.py
commands = python runtests.py

setenv =
PYTHONDONTWRITEBYTECODE=1

0 comments on commit 95539a4

Please sign in to comment.