Skip to content

[deps] Added support for djangorestframework 3.17.0#348

Merged
nemesifier merged 6 commits intoopenwisp:masterfrom
jcardali:joe.cardali/drf-3.17
May 3, 2026
Merged

[deps] Added support for djangorestframework 3.17.0#348
nemesifier merged 6 commits intoopenwisp:masterfrom
jcardali:joe.cardali/drf-3.17

Conversation

@jcardali
Copy link
Copy Markdown
Contributor

@jcardali jcardali commented Mar 27, 2026

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #347

Description of Changes

Declare support for djangorestframework~=3.17.0

Modeled after #334

3.17.0 - https://github.com/encode/django-rest-framework/releases/tag/3.17.0:

  • Drops support for Python 3.9
  • Adds support for Python 3.14
  • Adds support for Django 6.0

I'm unsure if these changes should be made as part of this, or separately.

Screenshot

N/A

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

📝 Walkthrough

Walkthrough

Updates to CI and dependency metadata to add official support for django-rest-framework 3.17. setup.py expands the djangorestframework install_requires from <3.17 to <3.18. tox.ini adds a new djangorestframework317 environment factor and pins it to ~=3.17.0. .github/workflows/ci.yml updates the tox matrix, adding and remapping DRF 3.15/3.16 entries and introducing multiple DRF 3.17 combinations across Python 3.10–3.13 and Django 5.0–5.2. CHANGES.rst and README.rst are updated to document the new supported DRF range.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description covers all required sections: completed checklist, linked issue reference (#347), and clear description of changes. However, the CHANGES.rst changelog entry mentions only a version bump without specifying the actual code compatibility validation.
Linked Issues check ✅ Passed The PR successfully updates dependency declarations in setup.py, tox.ini, and README.rst to support DRF 3.17, directly addressing issue #347's requirement to update package metadata to allow DRF 3.17 installation.
Out of Scope Changes check ✅ Passed All changes are directly related to adding DRF 3.17 support: CI workflow updates, dependency constraint changes, test matrix expansion, and documentation updates. No unrelated changes detected.
Bug Fixes ✅ Passed Custom check for bug fixes is not applicable; this PR updates dependency version constraints, not core user-facing functionality.
Title check ✅ Passed The title uses the required [deps] prefix and clearly describes the main change: adding support for djangorestframework 3.17.0, which is directly supported by changes to setup.py, tox.ini, CI workflow, and README.rst.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

64-72: ⚠️ Potential issue | 🟡 Minor

DRF 3.16 missing Django 5.2 coverage.

DRF 3.15 has Django 5.2 entries (lines 56-63), but DRF 3.16 does not. For consistency, consider adding Django 5.2 coverage for DRF 3.16 as well, since tox.ini defines these combinations.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 64 - 72, Add Django 5.2 job entries
for DRF 3.16 in the CI matrix: update the DRF 3.16 block to include TOXENV
values matching tox.ini naming (e.g., py311-django52-djangorestframework316 and
py312-django52-djangorestframework316) alongside the existing py311/py312
entries; ensure the python versions align (3.11 and 3.12) and follow the same
pattern used for DRF 3.15 so the CI covers Django 5.2 for
djangorestframework316.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Around line 73-81: The DRF 3.17 CI matrix is incomplete; update the matrix in
.github/workflows/ci.yml to include all tox environments defined in tox.ini for
DRF 3.17 by adding TOXENV entries for py310-django50-djangorestframework317,
py310-django51-djangorestframework317, py310-django52-djangorestframework317,
py313-django50-djangorestframework317, py313-django51-djangorestframework317,
py313-django52-djangorestframework317, and also add
py311-django52-djangorestframework317 and py312-django52-djangorestframework317
so that all py{310,311,312,313}-django52-djangorestframework317 combinations are
covered; mirror the existing pattern used for TOXENV values around the DRF 3.17
block.

In `@tox.ini`:
- Around line 5-7: The tox envlist currently includes DRF 3.17 test combinations
for Python versions py{310,311,312,313} across Django versions django{50,51,52}
(the pattern lines like
"py{310,311,312,313}-django{50}-djangorestframework{315,316,317}{,-pytest}"
etc.), which is broader than the CI matrix; either narrow the tox envlist to
match CI by removing the django52-djangorestframework317 combinations (and any
Python versions not covered in CI) or expand the CI workflow (ci.yml) to include
the missing combos (e.g., add Django 5.2 and Python 3.10/3.13 entries for DRF
3.17) so tox and CI are aligned. Ensure the change targets the envlist patterns
in tox.ini (the py{...}-django{...}-djangorestframework{...}{,-pytest} entries)
or the CI matrix job definitions to keep both consistent.

---

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 64-72: Add Django 5.2 job entries for DRF 3.16 in the CI matrix:
update the DRF 3.16 block to include TOXENV values matching tox.ini naming
(e.g., py311-django52-djangorestframework316 and
py312-django52-djangorestframework316) alongside the existing py311/py312
entries; ensure the python versions align (3.11 and 3.12) and follow the same
pattern used for DRF 3.15 so the CI covers Django 5.2 for
djangorestframework316.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f92fe6c6-d377-4efd-8230-414253a61d2a

📥 Commits

Reviewing files that changed from the base of the PR and between 3629c3f and 0d9eee4.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • setup.py
  • tox.ini
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: Python==3.10 | py310-django52-djangorestframework315
  • GitHub Check: Python==3.12 | py312-django50-djangorestframework317
  • GitHub Check: Python==3.13 | py313-django52-djangorestframework315
  • GitHub Check: Python==3.10 | py310-django50-djangorestframework315
  • GitHub Check: Python==3.11 | py311-django51-djangorestframework317
  • GitHub Check: Python==3.12 | py312-django51-djangorestframework317
  • GitHub Check: Python==3.11 | py311-django51-djangorestframework316
  • GitHub Check: Python==3.11 | py311-django52-djangorestframework315
  • GitHub Check: Python==3.12 | py312-django51-djangorestframework316
  • GitHub Check: Python==3.12 | py312-django50-djangorestframework316
  • GitHub Check: Python==3.13 | py313-django51-djangorestframework315
  • GitHub Check: Python==3.12 | py312-django52-djangorestframework315
  • GitHub Check: Python==3.12 | py312-django51-djangorestframework315
  • GitHub Check: Python==3.10 | py310-django51-djangorestframework315
  • GitHub Check: Python==3.13 | py313-django50-djangorestframework315
  • GitHub Check: Python==3.11 | py311-django51-djangorestframework315
  • GitHub Check: Python==3.10 | py310-django42-djangorestframework314
  • GitHub Check: Python==3.11 | py311-django50-djangorestframework315
  • GitHub Check: Python==3.9 | py39-django42-djangorestframework314
🔇 Additional comments (2)
tox.ini (1)

28-28: Dependency mapping for DRF 3.17 is correct.

The ~=3.17.0 version specifier correctly pins to the 3.17.x series.

setup.py (1)

30-30: Version constraint update is correct. The upper bound change from <3.17 to <3.18 properly allows DRF 3.17.x installations while excluding future 3.18+ versions.

Comment thread .github/workflows/ci.yml
Comment on lines +73 to +81
# DRF 3.17
- python: "3.11"
TOXENV: py311-django52-djangorestframework315
TOXENV: py311-django50-djangorestframework317
- python: "3.12"
TOXENV: py312-django52-djangorestframework315
- python: "3.13"
TOXENV: py313-django52-djangorestframework315
TOXENV: py312-django50-djangorestframework317
- python: "3.11"
TOXENV: py311-django51-djangorestframework317
- python: "3.12"
TOXENV: py312-django51-djangorestframework317
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

DRF 3.17 CI matrix coverage is incomplete.

The CI matrix for DRF 3.17 only tests Python 3.11 and 3.12 with Django 5.0 and 5.1. However, tox.ini defines combinations for Python 3.10, 3.11, 3.12, 3.13 across Django 5.0, 5.1, and 5.2.

Missing entries:

  • py310-django{50,51,52}-djangorestframework317
  • py313-django{50,51,52}-djangorestframework317
  • py{310,311,312,313}-django52-djangorestframework317

Additionally, DRF 3.16 is also missing Django 5.2 coverage while DRF 3.15 has it.

Suggested additions to complete DRF 3.17 coverage
           # DRF 3.17
+          - python: "3.10"
+            TOXENV: py310-django50-djangorestframework317
           - python: "3.11"
             TOXENV: py311-django50-djangorestframework317
           - python: "3.12"
             TOXENV: py312-django50-djangorestframework317
+          - python: "3.13"
+            TOXENV: py313-django50-djangorestframework317
+          - python: "3.10"
+            TOXENV: py310-django51-djangorestframework317
           - python: "3.11"
             TOXENV: py311-django51-djangorestframework317
           - python: "3.12"
             TOXENV: py312-django51-djangorestframework317
+          - python: "3.13"
+            TOXENV: py313-django51-djangorestframework317
+          - python: "3.10"
+            TOXENV: py310-django52-djangorestframework317
+          - python: "3.11"
+            TOXENV: py311-django52-djangorestframework317
+          - python: "3.12"
+            TOXENV: py312-django52-djangorestframework317
+          - python: "3.13"
+            TOXENV: py313-django52-djangorestframework317
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yml around lines 73 - 81, The DRF 3.17 CI matrix is
incomplete; update the matrix in .github/workflows/ci.yml to include all tox
environments defined in tox.ini for DRF 3.17 by adding TOXENV entries for
py310-django50-djangorestframework317, py310-django51-djangorestframework317,
py310-django52-djangorestframework317, py313-django50-djangorestframework317,
py313-django51-djangorestframework317, py313-django52-djangorestframework317,
and also add py311-django52-djangorestframework317 and
py312-django52-djangorestframework317 so that all
py{310,311,312,313}-django52-djangorestframework317 combinations are covered;
mirror the existing pattern used for TOXENV values around the DRF 3.17 block.

Comment thread tox.ini
Comment on lines +5 to +7
py{310,311,312,313}-django{50}-djangorestframework{315,316,317}{,-pytest}
py{310,311,312,313}-django{51}-djangorestframework{315,316,317}{,-pytest}
py{310,311,312,313}-django{52}-djangorestframework{315,316,317}{,-pytest}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Tox envlist includes broader coverage than CI matrix.

The tox configuration defines DRF 3.17 tests for Python 3.10, 3.11, 3.12, and 3.13 across Django 5.0, 5.1, and 5.2. However, the CI matrix in ci.yml only tests Python 3.11 and 3.12 with DRF 3.17, and only for Django 5.0 and 5.1 (no Django 5.2 coverage for DRF 3.17).

Consider aligning the CI matrix to test more combinations, or reduce the tox envlist to match what's actually tested in CI.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tox.ini` around lines 5 - 7, The tox envlist currently includes DRF 3.17 test
combinations for Python versions py{310,311,312,313} across Django versions
django{50,51,52} (the pattern lines like
"py{310,311,312,313}-django{50}-djangorestframework{315,316,317}{,-pytest}"
etc.), which is broader than the CI matrix; either narrow the tox envlist to
match CI by removing the django52-djangorestframework317 combinations (and any
Python versions not covered in CI) or expand the CI workflow (ci.yml) to include
the missing combos (e.g., add Django 5.2 and Python 3.10/3.13 entries for DRF
3.17) so tox and CI are aligned. Ensure the change targets the envlist patterns
in tox.ini (the py{...}-django{...}-djangorestframework{...}{,-pytest} entries)
or the CI matrix job definitions to keep both consistent.

@jcardali jcardali marked this pull request as ready for review March 27, 2026 22:09
auvipy
auvipy previously approved these changes Mar 29, 2026
@kilo-code-bot
Copy link
Copy Markdown

kilo-code-bot Bot commented May 3, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

This PR correctly adds support for Django REST Framework 3.17.0.

Changes Reviewed

File Change Status
setup.py Bumped DRF upper bound <3.17<3.18 ✓ Correct
tox.ini Added djangorestframework317 env and deps ✓ Correct
.github/workflows/ci.yml Added 9 CI matrix entries for DRF 3.17 ✓ Correct
CHANGES.rst Added changelog entry for v1.2.1 ✓ Correct
README.rst Updated compatibility table ✓ Correct

Notes

  • DRF 3.17 drops Python 3.9 support; CI correctly excludes Python 3.9/3.10 from DRF 3.17 test matrix
  • All version constraint updates are consistent across setup.py, tox.ini, and CI configuration
  • Documentation is properly updated
Files Reviewed (5 files)
  • .github/workflows/ci.yml
  • CHANGES.rst
  • README.rst
  • setup.py
  • tox.ini

Reviewed by kimi-k2.5-0127 · 89,050 tokens

@nemesifier nemesifier changed the title [deps] Add support for djangorestframework~=3.17.0 [deps] Added support for djangorestframework 3.17.0 May 3, 2026
@nemesifier nemesifier merged commit 2b837bf into openwisp:master May 3, 2026
38 checks passed
@nemesifier
Copy link
Copy Markdown
Member

Thanks @jcardali 👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[deps] django-rest-framework 3.17 not currently supported

3 participants