Skip to content

Bump djangorestframework from 3.15.2 to 3.17.2 - #38104

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/uv/djangorestframework-3.17.2
Open

Bump djangorestframework from 3.15.2 to 3.17.2#38104
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/uv/djangorestframework-3.17.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 1, 2026

Copy link
Copy Markdown
Contributor

Bumps djangorestframework from 3.15.2 to 3.17.2.

Release notes

Sourced from djangorestframework's releases.

3.17.2

What's Changed

Bug fixes

Full Changelog: encode/django-rest-framework@3.17.1...3.17.2

3.17.1

What's Changed

Bug fixes

Full Changelog: encode/django-rest-framework@3.17.0...3.17.1

3.17.0

What's Changed

Breaking changes

Features

Bug fixes

Translations

... (truncated)

Commits
  • ad309f3 Release 3.17.2 (#10014)
  • 2912dc9 Enforce DATA_UPLOAD_MAX_MEMORY_SIZE for request.data parsing (#10013)
  • 71f8194 Fix disclosure of GET-protected data in case of validation error with `AdminR...
  • 22e231c Prepare bug fix release 3.17.1 (#9931)
  • 8e99b53 Add condition to skip pushed tags from forks (#9924)
  • c0407de Fix HTMLFormRenderer with empty datetime values (#9928)
  • 30d58a7 Fix the book sizing in the documentation (#9926)
  • 6f03b79 Tweak order of changes in release notes
  • 021ab56 Bump version and update release notes for 3.17.0 (#9921)
  • 19ebad7 Bump mkdocs-material[imaging] from 9.7.4 to 9.7.5 (#9923)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [djangorestframework](https://github.com/encode/django-rest-framework) from 3.15.2 to 3.17.2.
- [Release notes](https://github.com/encode/django-rest-framework/releases)
- [Commits](encode/django-rest-framework@3.15.2...3.17.2)

---
updated-dependencies:
- dependency-name: djangorestframework
  dependency-version: 3.17.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added the product/invisible Change has no end-user visible impact label Sep 1, 2026
@dependabot
dependabot Bot requested a review from a team as a code owner September 1, 2026 22:16
@dependabot dependabot Bot added the product/invisible Change has no end-user visible impact label Sep 1, 2026
@dimagimon dimagimon added the dependencies Pull requests that update a dependency file label Sep 1, 2026
@claude

claude Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔍 Dependency Analysis Summary

This is a lock-file-only bump of djangorestframework (3.15.2 → 3.17.2), spanning two minor releases. The important context for reviewers: CommCare HQ uses DRF purely as a serialization library, not as a web frameworkrest_framework is not in INSTALLED_APPS, and only three modules import it. That excludes essentially every behavioural change in this range, which is concentrated in renderers, views, parsers, filters, schemas, and the token admin.

  • Overall risk assessment: LOW

📋 Detailed Changelog Review

djangorestframework 3.15.2 → 3.17.2

Changes (aggregated across 3.16.0, 3.16.1, 3.17.0, 3.17.1, 3.17.2):

Platform support

  • Added official support for Django 5.1, 5.2 and 6.0, and Python 3.13 / 3.14.
  • Dropped Python 3.8 (3.16.0) and Python 3.9 (3.17.0).
  • Packaging migrated from setup.py/MANIFEST.in to pyproject.toml; releases now go out via a trusted publisher. This is why the sdist shrank (~1.07 MB → ~0.91 MB) — less ancillary content is shipped.

Features

  • COERCE_BIGINT_TO_STRING setting for serializing BigIntegerField as a string — defaults to False, so existing output is unchanged.
  • DurationField gained an output format argument (opt-in; default representation unchanged).
  • UniqueTogetherValidator now honours violation_error_code / violation_error_message from UniqueConstraint.
  • JSONEncoder handles ipaddress objects.
  • New function-based-view decorators: @versioning_class(), @content_negotiation_class(), @metadata_class().

Bug fixes relevant to serializers

  • Several UniqueTogetherValidator / unique_together fixes: respecting UniqueConstraint conditions, nullable fields, fields declared with source, SerializerMethodField, and read-only fields in conditions.
  • Many-to-many validation fixed when default=None.
  • MultipleChoiceField now preserves input ordering.
  • DecimalField accepts integers as min_value/max_value without a noisy warning.

Bug fixes in areas HQ does not exercise

  • AdminRenderer no longer leaks GET-protected data on validation error.
  • request.data parsing now enforces DATA_UPLOAD_MAX_MEMORY_SIZE.
  • HTMLFormRenderer datetime-local formatting fixes (browsable API).
  • TokenAdmin respects the user model's USERNAME_FIELD; reduced risk of Token overwrite.
  • OrderingFilter mutable default arguments fixed.

Breaking Changes

  • Dropped Python 3.9 — HQ requires >=3.13 (pyproject.toml), so this is a non-issue.
  • Dropped deprecated coreapi supportcoreapi/coreschema are not in uv.lock and HQ has no AutoSchema/DocumentationRenderer usage. Non-issue.
  • Removed long-deprecated request-wrapper internals and AutoSchema._get_reference (3.16.0) — not referenced in HQ.

Migration Notes

  • None. No settings were removed or renamed; settings.py:2081's REST_FRAMEWORK = {'DATETIME_FORMAT': ...} is still valid and honoured.

⚠️ Impact Assessment

Breaking Changes Found: No — none that apply to this codebase.

Each of the upstream breaking/behavioural changes was checked against actual usage:

Upstream change HQ exposure
Python 3.9 drop None — requires-python = ">=3.13"
coreapi removal None — not a dependency, no schema generation
DATA_UPLOAD_MAX_MEMORY_SIZE on request.data None — no DRF views/parsers; settings.py:1055 sets it to None anyway
AdminRenderer / HTMLFormRenderer / browsable API None — DRF not in INSTALLED_APPS, no renderers configured
TokenAdmin, OrderingFilter None — not used
COERCE_BIGINT_TO_STRING Defaults to False; BlobMeta.content_length, LedgerTransaction.delta/updated_balance keep integer output
DurationField format No DurationField on any serialized model
MultipleChoiceField ordering Not used; XFormStateField subclasses ChoiceField
UniqueTogetherValidator fixes HQ serializers are read-only (.data on an instance); validators never run, so no behaviour change even though LedgerValue has a unique_together

Affected Files — none require changes, but these are the DRF surface area:

Direct imports

  • corehq/form_processor/serializers.py — the bulk of it (form/case/ledger/attachment ModelSerializers)
  • corehq/apps/sms/serializers.pySMSSerializer, MobileBackendSerializer
  • corehq/apps/receiverwrapper/tests/test_submissions.pyfrom rest_framework import status (constants only)

Consumers whose JSON output is produced by those serializers

  • corehq/form_processor/models/forms.py:722, models/cases.py:422,428, models/ledgers.py:85
  • corehq/apps/sms/models.py:308,1810
  • corehq/apps/hqwebapp/doc_lookup.py:96,102 (raw-doc lookup views)

These serializers feed case/form document JSON that flows into APIs and Elasticsearch, so the thing that actually matters for this upgrade is output-shape stability, not API compatibility.

Test Impact: No test updates expected. corehq/form_processor/tests/test_serialization.py also asserts query counts around the lazy(...)-wrapped attachment/history serializers, so it will catch any change in when DRF evaluates nested fields.

Configuration Changes: None.


🛠️ Recommendations

Action Required

  • Nothing blocking. Worth confirming CI is green rather than hand-verifying — I was not able to run the test suite in this environment (no uv/virtualenv available), so the assessment above is from changelog review and static analysis only.

Testing Focus

  1. corehq/form_processor/tests/test_serialization.py — output shape plus the lazy-evaluation query-count assertions.
  2. Case/form JSON round-trips: XFormInstanceRawDocSerializer, CommCareCaseRawDocSerializer, CommCareCaseAPISerializer, and the Elasticsearch/API paths that consume to_json(). Any silent change in a field's representation would show up as a document-shape diff.
  3. LedgerValueSerializer and CommCareCaseAPISerializer both mutate self.fields before calling super().__init__() (corehq/form_processor/serializers.py:227 and the lite kwarg handling). This is pre-existing, and it's inverted relative to DeletableModelSerializer/XFormInstanceRawDocSerializer, which call super() first. It relies on ModelSerializer.get_fields() not depending on instance state set in __init__ — exactly the kind of internal that a DRF upgrade can shift. Make sure the ledger-serialization and lite=True case-API paths are exercised; consider normalising the ordering as a follow-up.
  4. SMS document serialization (SMS.to_json() / SQLMobileBackend).

Follow-up Tasks

  • Nothing required by this PR. For planning: DRF 3.18.0 drops Django 4.2/5.0/5.1 (HQ is on Django 5.2.16, so still supported) and changes many=True list-serializer errors to a dict format. That error-format change is only relevant if HQ starts using DRF for validation — currently it does not.

Merge Recommendation: APPROVE (pending green CI)


📚 Useful Links

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

Labels

dependencies Pull requests that update a dependency file product/invisible Change has no end-user visible impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant