Skip to content

Commit

Permalink
Drop Django 3.2 to 4.1 support (#295)
Browse files Browse the repository at this point in the history
These versions are all EOL since April.
  • Loading branch information
adamchainz authored Oct 29, 2024
1 parent c676d0b commit 1a2704e
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 1,486 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,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 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.

1.16.0 (2024-10-11)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Requirements

Python 3.9 to 3.13 supported.

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

WSGI supported on all Django versions. ASGI supported on Django 4.2+.

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ authors = [
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"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 All @@ -39,7 +36,7 @@ classifiers = [
]
dependencies = [
"asgiref>=3.6",
"django>=3.2",
"django>=4.2",
]
urls.Changelog = "https://github.com/adamchainz/django-browser-reload/blob/main/CHANGELOG.rst"
urls.Funding = "https://adamj.eu/books/"
Expand Down
6 changes: 0 additions & 6 deletions src/django_browser_reload/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,6 @@ def events(request: HttpRequest) -> HttpResponseBase:
event_stream: Callable[[], AsyncGenerator[bytes]] | Callable[[], Generator[bytes]]

if isinstance(request, ASGIRequest):
if django.VERSION < (4, 2):
return HttpResponse(
"ASGI requires Django 4.2+",
status=HTTPStatus.NOT_IMPLEMENTED,
content_type="text/plain",
)

async def event_stream() -> AsyncGenerator[bytes]:
while True:
Expand Down
70 changes: 0 additions & 70 deletions tests/requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,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 @@ -61,36 +31,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 @@ -121,16 +61,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
199 changes: 0 additions & 199 deletions tests/requirements/py310-django32.txt

This file was deleted.

Loading

0 comments on commit 1a2704e

Please sign in to comment.