Skip to content

[deps] Add support for djangorestframework~=3.17.0#348

Open
jcardali wants to merge 5 commits intoopenwisp:masterfrom
jcardali:joe.cardali/drf-3.17
Open

[deps] Add support for djangorestframework~=3.17.0#348
jcardali wants to merge 5 commits intoopenwisp:masterfrom
jcardali:joe.cardali/drf-3.17

Conversation

@jcardali
Copy link
Copy Markdown

@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

This pull request updates dependency constraints and CI/test configurations to add support for Django REST Framework 3.17. setup.py expands the allowed djangorestframework range from <3.17 to <3.18. tox.ini adds a djangorestframework317 factor and corresponding deps entry. .github/workflows/ci.yml expands the tox matrix to include DRF 3.17 combinations across Python 3.11–3.13 and Django 5.0–5.2, and adjusts existing DRF 3.16/3.15 matrix entries.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description addresses the main objective and references issue #347, but lacks detail on test additions and documentation updates claimed in the checklist. Clarify whether test cases were added for DRF 3.17 support and specify what documentation was updated, or update the checklist to reflect actual completion status.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title '[deps] Add support for djangorestframework~=3.17.0' follows the required format and clearly describes the main change of extending dependency support.
Linked Issues check ✅ Passed The PR successfully updates dependency constraints in setup.py from <3.17 to <3.18, and adds comprehensive tox/CI configurations for DRF 3.17 support across Python 3.10-3.13 and Django 5.0-5.2.
Out of Scope Changes check ✅ Passed All changes are directly related to adding DRF 3.17 support: setup.py dependency constraint, tox.ini test matrix, and CI workflow configuration. No unrelated modifications detected.
Bug Fixes ✅ Passed This PR is a dependency/compatibility enhancement, not a bug fix, so the custom check for bug fixes is not applicable.

✏️ 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
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

2 participants