From 727fce0edcbd2d0e6848cc02842a9a171aff790c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Wed, 19 Jun 2024 16:49:09 +0100 Subject: [PATCH] Support Django 5.1 (#588) --- docs/changelog.rst | 2 ++ docs/index.rst | 2 +- pyproject.toml | 1 + requirements/compile.py | 30 +++++++++++++++++++++++ requirements/py310-django51.txt | 42 +++++++++++++++++++++++++++++++++ requirements/py311-django51.txt | 34 ++++++++++++++++++++++++++ requirements/py312-django51.txt | 34 ++++++++++++++++++++++++++ tox.ini | 6 ++--- 8 files changed, 147 insertions(+), 4 deletions(-) create mode 100644 requirements/py310-django51.txt create mode 100644 requirements/py311-django51.txt create mode 100644 requirements/py312-django51.txt diff --git a/docs/changelog.rst b/docs/changelog.rst index ad0aa2b9..43c4a60f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +* Support Django 5.1. + 6.6.0 (2023-10-11) ------------------ diff --git a/docs/index.rst b/docs/index.rst index 1dc23c5a..a4c5ad5d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -31,7 +31,7 @@ WhiteNoise works with any WSGI-compatible application. Python 3.8 to 3.12 supported. -Django 3.2 to 5.0 supported. +Django 3.2 to 5.1 supported. Installation ------------ diff --git a/pyproject.toml b/pyproject.toml index 85c52585..94aa654b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ classifiers = [ "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", + "Framework :: Django :: 5.1", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", diff --git a/requirements/compile.py b/requirements/compile.py index d19a0f4c..3fe12373 100755 --- a/requirements/compile.py +++ b/requirements/compile.py @@ -152,6 +152,16 @@ ], input=b"Django>=5.0a1,<5.1", ) + run( + [ + *common_args, + "--python", + "3.10", + "--output-file", + "py310-django51.txt", + ], + input=b"Django>=5.1a1,<5.2", + ) run( [ *common_args, @@ -182,6 +192,16 @@ ], input=b"Django>=5.0a1,<5.1", ) + run( + [ + *common_args, + "--python", + "3.11", + "--output-file", + "py311-django51.txt", + ], + input=b"Django>=5.1a1,<5.2", + ) run( [ *common_args, @@ -202,3 +222,13 @@ ], input=b"Django>=5.0a1,<5.1", ) + run( + [ + *common_args, + "--python", + "3.12", + "--output-file", + "py312-django51.txt", + ], + input=b"Django>=5.1a1,<5.2", + ) diff --git a/requirements/py310-django51.txt b/requirements/py310-django51.txt new file mode 100644 index 00000000..94c19a4e --- /dev/null +++ b/requirements/py310-django51.txt @@ -0,0 +1,42 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --constraint - requirements.in --python 3.10 --output-file py310-django51.txt +asgiref==3.8.1 + # via django +brotli==1.1.0 + # via -r requirements.in +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage==7.5.3 + # via -r requirements.in +django==5.1a1 + # via -r requirements.in +exceptiongroup==1.2.1 + # via pytest +idna==3.7 + # via requests +iniconfig==2.0.0 + # via pytest +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.2.2 + # via + # -r requirements.in + # pytest-randomly +pytest-randomly==3.15.0 + # via -r requirements.in +requests==2.32.3 + # via -r requirements.in +sqlparse==0.5.0 + # via django +tomli==2.0.1 + # via + # coverage + # pytest +typing-extensions==4.12.2 + # via asgiref +urllib3==2.2.2 + # via requests diff --git a/requirements/py311-django51.txt b/requirements/py311-django51.txt new file mode 100644 index 00000000..e92e108b --- /dev/null +++ b/requirements/py311-django51.txt @@ -0,0 +1,34 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --constraint - requirements.in --python 3.11 --output-file py311-django51.txt +asgiref==3.8.1 + # via django +brotli==1.1.0 + # via -r requirements.in +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage==7.5.3 + # via -r requirements.in +django==5.1a1 + # via -r requirements.in +idna==3.7 + # via requests +iniconfig==2.0.0 + # via pytest +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.2.2 + # via + # -r requirements.in + # pytest-randomly +pytest-randomly==3.15.0 + # via -r requirements.in +requests==2.32.3 + # via -r requirements.in +sqlparse==0.5.0 + # via django +urllib3==2.2.2 + # via requests diff --git a/requirements/py312-django51.txt b/requirements/py312-django51.txt new file mode 100644 index 00000000..287aa778 --- /dev/null +++ b/requirements/py312-django51.txt @@ -0,0 +1,34 @@ +# This file was autogenerated by uv via the following command: +# uv pip compile --constraint - requirements.in --python 3.12 --output-file py312-django51.txt +asgiref==3.8.1 + # via django +brotli==1.1.0 + # via -r requirements.in +certifi==2024.6.2 + # via requests +charset-normalizer==3.3.2 + # via requests +coverage==7.5.3 + # via -r requirements.in +django==5.1a1 + # via -r requirements.in +idna==3.7 + # via requests +iniconfig==2.0.0 + # via pytest +packaging==24.1 + # via pytest +pluggy==1.5.0 + # via pytest +pytest==8.2.2 + # via + # -r requirements.in + # pytest-randomly +pytest-randomly==3.15.0 + # via -r requirements.in +requests==2.32.3 + # via -r requirements.in +sqlparse==0.5.0 + # via django +urllib3==2.2.2 + # via requests diff --git a/tox.ini b/tox.ini index 90401b29..9600dfe9 100644 --- a/tox.ini +++ b/tox.ini @@ -2,10 +2,10 @@ requires = tox>=4.2 env_list = - py312-django{50, 42} - py311-django{50, 42, 41} + py312-django{51, 50, 42} + py311-django{51, 50, 42, 41} py311-codegen - py310-django{50, 42, 41, 40, 32} + py310-django{51, 50, 42, 41, 40, 32} py39-django{42, 41, 40, 32} py38-django{42, 41, 40, 32}