Skip to content

Commit 5870a05

Browse files
Add support for Django 4.1
Enable testing for Python 3.9, 3.10, 3.10 Drop testing for Django < 2.2
1 parent d15a3c3 commit 5870a05

File tree

6 files changed

+37
-30
lines changed

6 files changed

+37
-30
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
Changelog
33
*********
44

5+
Dev
6+
===
7+
8+
- Add support for Django 4.1
9+
510
2.1
611
===
712

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
FROM andreyfedoseev/django-static-precompiler:18.04
2-
RUN apt-get update && \
3-
apt-get install -y \
2+
ARG DEBIAN_FRONTEND=noninteractive
3+
ENV TZ=Etc/UTC
4+
RUN apt update && \
5+
apt install software-properties-common -y && \
6+
add-apt-repository ppa:deadsnakes/ppa -y && \
7+
apt install -y \
48
python3.6-dev \
59
python3.8-dev \
10+
python3.9-dev \
11+
python3.9-distutils \
12+
python3.10-dev \
13+
python3.10-distutils \
14+
python3.11-dev \
15+
python3.11-distutils \
616
python3-pip \
717
sqlite3
818
RUN mkdir /app

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
all:
2-
docker-compose build
2+
docker compose build
33

44
shell:
5-
docker-compose run --rm app /bin/bash
5+
docker compose run --rm app /bin/bash
66

77
test:
8-
docker-compose run --rm app tox
8+
docker compose run --rm app tox
99

1010
upload:
1111
python setup.py sdist upload
1212

1313
check-flake8:
14-
docker-compose run --rm app flake8
14+
docker compose run --rm app flake8
1515

1616
check-black:
17-
docker-compose run --rm app black --check ./static_precompiler
17+
docker compose run --rm app black --check ./static_precompiler
1818

1919
apply-black:
20-
docker-compose run --rm app black ./static_precompiler
20+
docker compose run --rm app black ./static_precompiler
2121

2222
check-isort:
23-
docker-compose run --rm app isort --check ./static_precompiler
23+
docker compose run --rm app isort --check ./static_precompiler
2424

2525
apply-isort:
26-
docker-compose run --rm app isort ./static_precompiler
26+
docker compose run --rm app isort ./static_precompiler

requirements-test.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
pytest<4
2-
pytest-django==3.1.2
1+
pytest==6.2.5
2+
pytest-django==4.5.2
33
pretend
44
watchdog
55
libsass
66
coverage
7-
pytest-cov==2.5.1
7+
pytest-cov==4.0.0
88
tox

static_precompiler/management/commands/compilestatic.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class Command(django.core.management.base.BaseCommand):
8383

8484
help = "Compile static files."
8585

86-
requires_system_checks = False
86+
requires_system_checks = []
8787

8888
def add_arguments(self, parser):
8989
for argument, parameters in ARGUMENTS:
@@ -129,9 +129,5 @@ def handle(self, **options):
129129
watch_dirs(scanned_dirs, verbosity)
130130

131131

132-
if django.VERSION < (1, 8):
133-
import optparse
134-
135-
Command.option_list = django.core.management.base.NoArgsCommand.option_list + tuple(
136-
optparse.make_option(argument, **argument_parameters) for argument, argument_parameters in ARGUMENTS
137-
)
132+
if django.VERSION < (3, 2):
133+
Command.requires_system_checks = False

tox.ini

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
[tox]
22
envlist =
3-
py36-django20,
4-
py36-django21,
53
py36-django22,
6-
py36-django30,
7-
py36-django31,
8-
py38-django40
9-
4+
py38-django32,
5+
py39-django40
6+
py310-django41
7+
py311-django41
108
[testenv]
119
passenv = GEM_PATH
1210
deps =
1311
-rrequirements-test.txt
14-
django20: Django>=2.0,<2.1
15-
django21: Django>=2.1,<2.2
1612
django22: Django>=2.2,<3.0
17-
django30: Django>=3.0,<3.1
18-
django31: Django>=3.1,<4
13+
django32: Django>=3.2,<4
1914
django40: Django>=4.0,<4.1
15+
django41: Django>=4.1,<4.2
2016
commands = py.test static_precompiler --cov static_precompiler --cov-report xml --cov-append
2117
setenv =
2218
PYTHONPATH = {toxinidir}

0 commit comments

Comments
 (0)