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

[deps] Add Django 5.x & Python 3.11-3.13 support, drop Django 3.2/Python 3.8 #38

Merged

Conversation

Eeshu-Yadav
Copy link
Contributor

@Eeshu-Yadav Eeshu-Yadav commented Apr 2, 2025

Description

  • Adds support for:
    • Django 5.0 & 5.1
    • Python 3.11, 3.12 & 3.13
  • Drops support for:
    • Django 3.2
    • Python 3.8

Checklist

  • Updated setup.py version constraints
  • Added new Python/Django versions to CI

Fixes #35

setup.py Outdated
install_requires=[],
python_requires='>=3.9',
install_requires=[
'django>=4.2,<=5.1',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'django>=4.2,<=5.1',
'django>=4.2,<5.3',

Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eeshu-Yadav the build is failing for QA checks

@github-project-automation github-project-automation bot moved this from To do (general) to In progress in OpenWISP Contributor's Board Apr 2, 2025
Comment on lines 52 to 63
- name: Cache APT packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: |
apt-${{ runner.os }}-

- name: Disable man page auto-update
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codesankalp we're adding this to all the repos to speed up builds

Eeshu-Yadav added a commit to Eeshu-Yadav/django-flat-json-widget that referenced this pull request Apr 2, 2025
Added:
- Support for Django >=5.1,<5.3
- Support for Python 3.12, 3.14

Removed:
- Support for Python < 3.9
- Support for Django < 4.2

Closes openwisp#38
Added:
- Support for Django >=5.1,<5.3
- Support for Python 3.12, 3.14

Removed:
- Support for Python < 3.9
- Support for Django < 4.2

Closes openwisp#38
@Eeshu-Yadav Eeshu-Yadav force-pushed the deps/django-5-python-3-support-35 branch from 669446e to 1b11740 Compare April 2, 2025 21:36
@Eeshu-Yadav
Copy link
Contributor Author

@pandafy now the build is not failing , now it can be merged ?


- django~=5.0.0
- django~=5.1.0
- django~=5.2rc0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- django~=5.2rc0
- django~=5.2.0

- python-version: "3.9"
django-version: django~=5.1.0
- python-version: "3.9"
django-version: django~=5.2rc0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
django-version: django~=5.2rc0
django-version: django~=5.2.0

setup.py Outdated
extras_require={
'test': [
(
'openwisp-utils[qa]'
' @ https://github.com/openwisp/openwisp-utils/tarball/1.2'
),
'django-extensions~=3.2.0',
'django-extensions>=3.2.0,<=3.2.3',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary, if you think is necessary, can you please explain why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the latest version of django-extensions is currently 3.2.3,Pinning to <=3.2.3 ensures we only use tested versions (avoids surprises if a buggy 3.2.4 is released later). i will update it to the old one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eeshu-Yadav Not breaking changes are not included in minor version

setup.py Outdated
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13 :: Only',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure of this? I think it should be:

Suggested change
'Programming Language :: Python :: 3.13 :: Only',
'Programming Language :: Python :: 3.13',

…wisp#38

Added:
- Support for Django >=5.1,<5.3
- Support for Python 3.12, 3.14

Removed:
- Support for Python < 3.9
- Support for Django < 4.2

Closes openwisp#38
@Eeshu-Yadav
Copy link
Contributor Author

@nemesifier all the changes are done

Copy link
Member

@pandafy pandafy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Eeshu-Yadav I have made some minor changes in d602fc4 so we can quickly move forward with merging this PR. Kindly refer them when you make a PR for other modules.

@nemesifier I have tested this with OpenWISP Controller and I don't see any anomalies.

@@ -14,24 +14,53 @@ jobs:

build:
name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

We are explicitly mentioning the Ubuntu version in CI across all modules of OpenWISP. Let's keep that for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okk will change it to 24.04 in other modules , if i work on the ci.yml part.

- django~=4.2.0
- django~=5.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pandafy pandafy moved this from In progress to Needs review in OpenWISP Contributor's Board Apr 4, 2025
@github-project-automation github-project-automation bot moved this from Needs review to In progress in OpenWISP Contributor's Board Apr 4, 2025
@nemesifier nemesifier merged commit e54aa03 into openwisp:master Apr 4, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from In progress to Done in OpenWISP Contributor's Board Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[deps] Add support for Django 5.0 & 5.1 and Python 3.11, 3.12 & 3.13
5 participants