Skip to content

Commit

Permalink
Drop Django 3.2 to 4.1 support (#614)
Browse files Browse the repository at this point in the history
These versions are all EOL since April.
  • Loading branch information
adamchainz authored Oct 28, 2024
1 parent 6450820 commit f8dff50
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 416 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ repos:
rev: 1.21.0
hooks:
- id: django-upgrade
args: [--target-version, '3.2']
args: [--target-version, '4.2']
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
Expand Down
5 changes: 5 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

Unreleased
----------

* Drop Django 3.2 to 4.1 support.

* Drop Python 3.8 support.

* Support Python 3.13.
Expand Down
10 changes: 1 addition & 9 deletions docs/django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ caching.

WhiteNoise comes with a storage backend which compresses your files and hashes
them to unique names, so they can safely be cached forever. To use it, set it
as your staticfiles storage backend in your settings file.

On Django 4.2+:
as your staticfiles storage backend in your settings file:

.. code-block:: python
Expand All @@ -96,12 +94,6 @@ On Django 4.2+:
},
}
On older Django versions:

.. code-block:: python
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
This combines automatic compression with the caching behaviour provided by
Django's ManifestStaticFilesStorage_ backend. If you want to apply compression
but don't want the caching behaviour then you can use the alternative backend:
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ WhiteNoise works with any WSGI-compatible application.

Python 3.8 to 3.13 supported.

Django 3.2 to 5.1 supported.
Django 4.2 to 5.1 supported.

Installation
------------
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
Expand Down
15 changes: 5 additions & 10 deletions tests/django_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import os.path

import django

from tests.utils import TEST_FILE_PATH
from tests.utils import AppServer

Expand All @@ -20,14 +18,11 @@

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

if django.VERSION >= (4, 2):
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}
else:
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}

MIDDLEWARE = ["whitenoise.middleware.WhiteNoiseMiddleware"]

Expand Down
70 changes: 0 additions & 70 deletions tests/requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,6 @@
*sys.argv[1:],
]
run = partial(subprocess.run, check=True)
run(
[
*common_args,
"--python",
"3.9",
"--output-file",
"py39-django32.txt",
],
input=b"Django>=3.2a1,<3.3",
)
run(
[
*common_args,
"--python",
"3.9",
"--output-file",
"py39-django40.txt",
],
input=b"Django>=4.0a1,<4.1",
)
run(
[
*common_args,
"--python",
"3.9",
"--output-file",
"py39-django41.txt",
],
input=b"Django>=4.1a1,<4.2",
)
run(
[
*common_args,
Expand All @@ -62,36 +32,6 @@
],
input=b"Django>=4.2a1,<5.0",
)
run(
[
*common_args,
"--python",
"3.10",
"--output-file",
"py310-django32.txt",
],
input=b"Django>=3.2a1,<3.3",
)
run(
[
*common_args,
"--python",
"3.10",
"--output-file",
"py310-django40.txt",
],
input=b"Django>=4.0a1,<4.1",
)
run(
[
*common_args,
"--python",
"3.10",
"--output-file",
"py310-django41.txt",
],
input=b"Django>=4.1a1,<4.2",
)
run(
[
*common_args,
Expand Down Expand Up @@ -122,16 +62,6 @@
],
input=b"Django>=5.1a1,<5.2",
)
run(
[
*common_args,
"--python",
"3.11",
"--output-file",
"py311-django41.txt",
],
input=b"Django>=4.1a1,<4.2",
)
run(
[
*common_args,
Expand Down
44 changes: 0 additions & 44 deletions tests/requirements/py310-django32.txt

This file was deleted.

42 changes: 0 additions & 42 deletions tests/requirements/py310-django40.txt

This file was deleted.

42 changes: 0 additions & 42 deletions tests/requirements/py310-django41.txt

This file was deleted.

34 changes: 0 additions & 34 deletions tests/requirements/py311-django41.txt

This file was deleted.

48 changes: 0 additions & 48 deletions tests/requirements/py39-django32.txt

This file was deleted.

Loading

0 comments on commit f8dff50

Please sign in to comment.