Skip to content

Commit f8dff50

Browse files
authored
Drop Django 3.2 to 4.1 support (#614)
These versions are all EOL since April.
1 parent 6450820 commit f8dff50

16 files changed

+26
-416
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ repos:
4444
rev: 1.21.0
4545
hooks:
4646
- id: django-upgrade
47-
args: [--target-version, '3.2']
47+
args: [--target-version, '4.2']
4848
- repo: https://github.com/psf/black-pre-commit-mirror
4949
rev: 24.8.0
5050
hooks:

docs/changelog.rst

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

5+
Unreleased
6+
----------
7+
8+
* Drop Django 3.2 to 4.1 support.
9+
510
* Drop Python 3.8 support.
611

712
* Support Python 3.13.

docs/django.rst

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ caching.
8383

8484
WhiteNoise comes with a storage backend which compresses your files and hashes
8585
them to unique names, so they can safely be cached forever. To use it, set it
86-
as your staticfiles storage backend in your settings file.
87-
88-
On Django 4.2+:
86+
as your staticfiles storage backend in your settings file:
8987

9088
.. code-block:: python
9189
@@ -96,12 +94,6 @@ On Django 4.2+:
9694
},
9795
}
9896
99-
On older Django versions:
100-
101-
.. code-block:: python
102-
103-
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
104-
10597
This combines automatic compression with the caching behaviour provided by
10698
Django's ManifestStaticFilesStorage_ backend. If you want to apply compression
10799
but don't want the caching behaviour then you can use the alternative backend:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ WhiteNoise works with any WSGI-compatible application.
3131

3232
Python 3.8 to 3.13 supported.
3333

34-
Django 3.2 to 5.1 supported.
34+
Django 4.2 to 5.1 supported.
3535

3636
Installation
3737
------------

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ requires-python = ">=3.9"
2323
classifiers = [
2424
"Development Status :: 5 - Production/Stable",
2525
"Framework :: Django",
26-
"Framework :: Django :: 3.2",
27-
"Framework :: Django :: 4.0",
28-
"Framework :: Django :: 4.1",
2926
"Framework :: Django :: 4.2",
3027
"Framework :: Django :: 5.0",
3128
"Framework :: Django :: 5.1",

tests/django_settings.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import os.path
44

5-
import django
6-
75
from tests.utils import TEST_FILE_PATH
86
from tests.utils import AppServer
97

@@ -20,14 +18,11 @@
2018

2119
STATIC_ROOT = os.path.join(TEST_FILE_PATH, "root")
2220

23-
if django.VERSION >= (4, 2):
24-
STORAGES = {
25-
"staticfiles": {
26-
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
27-
},
28-
}
29-
else:
30-
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
21+
STORAGES = {
22+
"staticfiles": {
23+
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
24+
},
25+
}
3126

3227
MIDDLEWARE = ["whitenoise.middleware.WhiteNoiseMiddleware"]
3328

tests/requirements/compile.py

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,6 @@
2222
*sys.argv[1:],
2323
]
2424
run = partial(subprocess.run, check=True)
25-
run(
26-
[
27-
*common_args,
28-
"--python",
29-
"3.9",
30-
"--output-file",
31-
"py39-django32.txt",
32-
],
33-
input=b"Django>=3.2a1,<3.3",
34-
)
35-
run(
36-
[
37-
*common_args,
38-
"--python",
39-
"3.9",
40-
"--output-file",
41-
"py39-django40.txt",
42-
],
43-
input=b"Django>=4.0a1,<4.1",
44-
)
45-
run(
46-
[
47-
*common_args,
48-
"--python",
49-
"3.9",
50-
"--output-file",
51-
"py39-django41.txt",
52-
],
53-
input=b"Django>=4.1a1,<4.2",
54-
)
5525
run(
5626
[
5727
*common_args,
@@ -62,36 +32,6 @@
6232
],
6333
input=b"Django>=4.2a1,<5.0",
6434
)
65-
run(
66-
[
67-
*common_args,
68-
"--python",
69-
"3.10",
70-
"--output-file",
71-
"py310-django32.txt",
72-
],
73-
input=b"Django>=3.2a1,<3.3",
74-
)
75-
run(
76-
[
77-
*common_args,
78-
"--python",
79-
"3.10",
80-
"--output-file",
81-
"py310-django40.txt",
82-
],
83-
input=b"Django>=4.0a1,<4.1",
84-
)
85-
run(
86-
[
87-
*common_args,
88-
"--python",
89-
"3.10",
90-
"--output-file",
91-
"py310-django41.txt",
92-
],
93-
input=b"Django>=4.1a1,<4.2",
94-
)
9535
run(
9636
[
9737
*common_args,
@@ -122,16 +62,6 @@
12262
],
12363
input=b"Django>=5.1a1,<5.2",
12464
)
125-
run(
126-
[
127-
*common_args,
128-
"--python",
129-
"3.11",
130-
"--output-file",
131-
"py311-django41.txt",
132-
],
133-
input=b"Django>=4.1a1,<4.2",
134-
)
13565
run(
13666
[
13767
*common_args,

tests/requirements/py310-django32.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/requirements/py310-django40.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

tests/requirements/py310-django41.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)