Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Django 5.x in setup.py #240

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ jobs:
max-parallel: 4
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
django-version: [4.0, 4.1, 4.2]
django-version: [4.0, 4.1, 4.2, "5.0"]
exclude:
# Django 5 requires python>=3.10
- python-version: 3.8
django-version: "5.0"
- python-version: 3.9
django-version: "5.0"

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This project aims to keep compatibility with the supported Django releases.
As such our versions of python and django are designed to match that cadence as much as possible.


We are currently compatible with Django 4. Python versions 3.8 to 3.10.
We are currently compatible with Django 5. Python versions 3.8 to 3.11.

Documentation
-------------
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django>=2.2,<4.3
Django>=4.0,<6
Sphinx>=1.2.0
phonenumbers>=7.0.2
django-phonenumber-field==6.1.0
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
INSTALL_PYTHON_REQUIRES = []
# We are intending to keep up to date with the supported Django versions.
# For the official support, please visit:
# https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django
if sys.version_info[1] in [8, 9, 10, 11]:
django_python_version_install = "Django>=4.0,<=5.0"
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
if py_minor_version := sys.version_info[1] in [8, 9, 10, 11]:
django_python_version_install = (
f"Django>=4.0,<{'6' if py_minor_version >= 10 else '5'}"
)
INSTALL_PYTHON_REQUIRES.append(django_python_version_install)

setup(
Expand Down
Loading