Skip to content

[deps] Added support for Django 6.0/6.1, dropped Python 3.10 (EOL) - #823

Merged
nemesifier merged 1 commit into
masterfrom
issues/822-django-6-support
Nov 3, 2026
Merged

nemesifier merged 1 commit into
masterfrom
issues/822-django-6-support

Conversation

@dee077

@dee077 dee077 commented Oct 29, 2026

Copy link
Copy Markdown
Member

Checklist

Reference to Existing Issue

Closes #822.

Description of Changes

  • Added Django 6.0 and 6.1 to the CI matrix for Python 3.12 and 3.13.
  • Dropped Django 5.1 from the CI matrix since it reached end of life.
  • Dropped Python 3.10 from the CI matrix and the PyPI build since it reached end of life.
  • Raised python_requires to 3.11 and updated the minimum Python version in the developer installation docs.
  • Added action_location to get_actions() in the admin, which Django 6.1 passes and warns about when missing.
  • Removed the django.VERSION < (5, 0) branches from migrations, since Django 5.2 is now the minimum.
  • Updated admin tests to check the error list id instead of the errors class, since Django 6.1 changed where it is rendered.
  • Removed an outdated Python version check from the tests and the Python 2 coding declaration from runtests.py.

Depends on openwisp/openwisp-users#595, openwisp/openwisp-notifications#526 and openwisp/django-loci#257.
Related to openwisp/openwisp-utils#788.

- Added Django 6.0 and 6.1 to the CI matrix for Python 3.12 and 3.13.
- Dropped Django 5.1 from the CI matrix since it reached end of life.
- Dropped Python 3.10 from the CI matrix and the PyPI build since it reached end of life.
- Raised python_requires to 3.11 and updated the minimum Python version in the docs.
- Added action_location to get_actions() in the admin, which Django 6.1 passes and warns about when missing.
- Removed code needed only for Django < 5.0 from migrations.
- Updated admin tests to check the error list id instead of the errors class, since Django 6.1 changed where it is rendered.
- Removed an outdated Python version check from the tests and the Python 2 coding declaration from runtests.py.

Closes #822
@dee077 dee077 self-assigned this Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fae7a91d-7250-4680-93cb-6ea4d2a1b278
Commits

Reviewing files that changed from the base of the PR and between a8ba964 and ed33184.

Files selected for processing: 11
  • .github/workflows/ci.yml
  • .github/workflows/pypi.yml
  • docs/developer/installation.rst
  • openwisp_radius/admin.py
  • openwisp_radius/migrations/0014_squashed_0042.py
  • openwisp_radius/migrations/0023_registered_user.py
  • openwisp_radius/tests/test_admin.py
  • openwisp_radius/tests/test_api/test_api.py
  • runtests.py
  • setup.py
  • tests/openwisp2/sample_radius/migrations/0022_registered_user.py
Files with no reviewable changes: 1
  • runtests.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Recent review details
Context from checks skipped due to timeout: 9
  • GitHub Check: Python==3.13 | django~=6.1.0
  • GitHub Check: Python==3.11 | django~=5.2.0
  • GitHub Check: Python==3.13 | django~=6.0.0
  • GitHub Check: Python==3.13 | django~=5.2.0
  • GitHub Check: Python==3.12 | django~=6.1.0
  • GitHub Check: Python==3.12 | django~=5.2.0
  • GitHub Check: Python==3.12 | django~=6.0.0
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (python)
Additional context used
Code guidelines: 1
AGENTS.md — auto-discovered
Path-based instructions: 5
Do not complain about dependencies installed from controlled mutable OpenWISP branches.

CodeRabbit configuration file

Files:

  • .github/workflows/pypi.yml
  • .github/workflows/ci.yml
Verify that documentation remains consistent with the implemented behavior and does not reference deprecated or removed functionality.

CodeRabbit configuration file

Files:

  • docs/developer/installation.rst
Ensure tests cover relevant success, error, boundary, and unusual input scenarios.

CodeRabbit configuration file

Files:

  • openwisp_radius/tests/test_admin.py
  • openwisp_radius/tests/test_api/test_api.py
  • tests/openwisp2/sample_radius/migrations/0022_registered_user.py
Flag potential security vulnerabilities Flag obvious performance regressions, such as heavy loops, repeated I/O, or unoptimized queries Flag unused or redundant code Flag outdated or incorrect comments/docstrings Ensure new code handles err...

CodeRabbit configuration file

Files:

  • docs/developer/installation.rst
  • .github/workflows/pypi.yml
  • openwisp_radius/migrations/0014_squashed_0042.py
  • openwisp_radius/tests/test_admin.py
  • setup.py
  • openwisp_radius/migrations/0023_registered_user.py
  • .github/workflows/ci.yml
  • openwisp_radius/tests/test_api/test_api.py
  • tests/openwisp2/sample_radius/migrations/0022_registered_user.py
  • openwisp_radius/admin.py
Source excerpt: Follow the DRY principle: do not duplicate information or code across files.

CodeRabbit inference engine (AGENTS.md)

Files:

  • docs/developer/installation.rst
  • .github/workflows/pypi.yml
  • openwisp_radius/migrations/0014_squashed_0042.py
  • openwisp_radius/tests/test_admin.py
  • setup.py
  • openwisp_radius/migrations/0023_registered_user.py
  • .github/workflows/ci.yml
  • openwisp_radius/tests/test_api/test_api.py
  • tests/openwisp2/sample_radius/migrations/0022_registered_user.py
  • openwisp_radius/admin.py
Additional comments: 10
setup.py: 1

29-29: LGTM!

.github/workflows/ci.yml: 1

35-41: LGTM!

.github/workflows/pypi.yml: 1

32-32: LGTM!

docs/developer/installation.rst: 1

30-30: LGTM!

openwisp_radius/tests/test_api/test_api.py: 1

655-671: LGTM!

openwisp_radius/admin.py: 2

250-253: LGTM!

516-519: LGTM!

openwisp_radius/tests/test_admin.py: 3

736-738: LGTM!

855-855: LGTM!

1544-1544: LGTM!

Walkthrough

The CI matrix removes Python 3.10 and adds Django 6.0 and 6.1 for Python 3.12 and 3.13. Package metadata and installation documentation set Python 3.11 as the minimum, and the publishing workflow uses Python 3.11. Migrations use get_registration_choices across Django versions. Admin action methods accept an optional action_location, and validation tests check field-specific error element IDs.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Suggested reviewers: nemesifier

Merge Risk: Minimal · up to ed331

The compatibility updates are consistent with the repository’s supported Python and Django versions and are ready to merge.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive The PR satisfies the directly reviewable #822 objectives. .github/workflows/ci.yml removes Python 3.10 and Django 5.1, adds Django 6.0 and 6.1, and excludes Python 3.11 from those Django versions. `… Reviewable evidence is required for the Django 6.0 and 6.1 compatibility of the external openwisp-users and openwisp-notifications dependencies referenced by setup.py.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title uses the required "[deps]" prefix and describes the main changes: adding Django 6.0/6.1 support and dropping Python 3.10. It matches the CI matrix, python_requires, and PyPI changes in the c…
Description check Passed The description follows the template. All four checklist items are checked, and it references issue #822 with "Closes #822." It lists the changes in the Description of Changes section, with the CI mat…
Out of Scope Changes check Passed The complete diff stays within #822. The CI and package metadata changes remove obsolete Python and Django versions. The admin changes, migration cleanup, test updates, and documentation update suppor…
Ui Changes, Regression Test, Docs Passed PASS. The PR does not introduce a new end-user UI; the admin changes preserve existing actions while adding Django compatibility. Admin tests cover validation rendering and action behavior, and the JW…
Full details: Title check

Explanation

The title uses the required "[deps]" prefix and describes the main changes: adding Django 6.0/6.1 support and dropping Python 3.10. It matches the CI matrix, python_requires, and PyPI changes in the changeset. It does not mention the other changes, such as the admin get_actions update, migration cleanup, and test updates. Those are secondary to the title's main point. The title is also in sentence case and within a reasonable length.

Full details: Description check

Explanation

The description follows the template. All four checklist items are checked, and it references issue #822 with "Closes #822." It lists the changes in the Description of Changes section, with the CI matrix, Python 3.10 removal, admin get_actions update, migration cleanup, and test updates. It also lists dependent PRs. The Screenshot section is omitted, which is acceptable because screenshots do not apply to this change. The description does not name specific tests or commands for the manual testing claim, which is a minor gap.

Full details: Out of Scope Changes check

Explanation

The complete diff stays within #822. The CI and package metadata changes remove obsolete Python and Django versions. The admin changes, migration cleanup, test updates, and documentation update support the version transition. No unrelated change is demonstrated.

Full details: Ui Changes, Regression Test, Docs

Explanation

PASS. The PR does not introduce a new end-user UI; the admin changes preserve existing actions while adding Django compatibility. Admin tests cover validation rendering and action behavior, and the JWT registration test now runs across supported Python versions. The developer installation documentation updates the minimum Python version to 3.11, and setup.py matches it. Screenshots are therefore not required.

Full details: Linked Issues check

Explanation

The PR satisfies the directly reviewable #822 objectives. .github/workflows/ci.yml removes Python 3.10 and Django 5.1, adds Django 6.0 and 6.1, and excludes Python 3.11 from those Django versions. setup.py sets python_requires to &gt;=3.11. The documentation, compatibility code, admin code, migrations, and tests are updated for the stated version changes. However, #822 also requires the other project dependencies to be updated for these versions. setup.py still references external openwisp-users and openwisp-notifications branches, and this repository does not establish the compatibility of their external code.

Resolution

Reviewable evidence is required for the Django 6.0 and 6.1 compatibility of the external openwisp-users and openwisp-notifications dependencies referenced by setup.py.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@openwisp-companion

Copy link
Copy Markdown

Fix admin add user empty email test failure

Hello @dee077,
(Analysis for commit ed33184)

  • Test Failure: TestUsersAdmin.test_admin_add_user_empty_email failed with an AssertionError because the expected error class "errors field-email" was not found in the response HTML.
  • Fix: Update the test assertion or the form validation logic in openwisp_users (or the corresponding sample test suite) to ensure that submitting an empty email on the user add form correctly renders the errors field-email CSS class on the email field container.

@openwisp-companion

Copy link
Copy Markdown

Fix sample users admin test assertions

Hello @dee077
(Analysis for commit ed33184)

  • Test Failure: test_admin_add_user_empty_email (and other related sample_users admin tests) failed with AssertionError: False is not true : Couldn't find 'errors field-email' in the following response. The admin template returned an error page or different CSS classes for email field errors than what openwisp-users test assertions expected.
  • Fix: Update the affected test assertions in openwisp_users/tests/test_admin.py (or the corresponding test file referenced in the traceback) to match the actual error CSS classes rendered by the current Django admin form template.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 98.217% — issues/822-django-6-support into master. No base build found for master.

@nemesifier nemesifier left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Verified the Django 6 CI rerun is green and the compatibility update is ready to merge.

@nemesifier
nemesifier merged commit 70cb56b into master Nov 3, 2026
31 of 36 checks passed
@nemesifier
nemesifier deleted the issues/822-django-6-support branch November 3, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deps] Add support for Django 6.0 and 6.1, Remove Python 3.10 (EOL)

3 participants