pypi / djangorestframework
djangorestframework
What changed in djangorestframework 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
9 breaking3 security7 new APIs and options1 behavior and defaults25 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initdjangorestframework 345 changes
Breaking changes 9
Non-text encoding charsets are refused.
Rejects non-finite values such as nan and inf.
Support for Django 4.2, 5.0, and 5.1 is dropped; projects using these versions must upgrade.
Errors for list serializers using many=True are now returned in dict format.
Unsupported list updates for unique-together constraints now raise a clear error.
Enforces DATA_UPLOAD_MAX_MEMORY_SIZE when parsing request.data.
Validation is added for decorators used out of order with @api_view.
Deprecated coreapi support has been dropped.
Support for Python 3.9 has been dropped.
Security 3
Content negotiation is hardened against large Accept headers.
Deleting a TokenProxy now actually deletes the token.
Django REST framework: AdminRenderer may disclose GET-protected data when rendering invalid write requests
New APIs and options 7
Adds a compatibility setting for ListSerializer error formats.
SearchFilter adds unaccent support.
A function-based view decorator for throttle scopes is added.
UniqueTogetherValidator adds nulls_distinct support.
Serialization of BigInteger to string is now optionally supported.
You can now specify the output format for DurationField.
UniqueTogetherValidator now supports violation_error_code and violation_error_message from UniqueConstraint.
Behavior and default changes 1
JSONEncoder now supports ipaddress objects.
Fixes and other changes 25
Restored from 3.18.1 to fix a broken return value.
Python 3.15 is supported.
Validation now works correctly for unique constraints with conditional fields.
Fields with blank=True in unique constraints are no longer treated as required.
Fixes duplicate validation errors for GenericIPAddressField when a protocol is specified.
Fixes int64 format detection for negative IntegerField minimums in OpenAPI schema definitions.
Fixes the list serializer when used with a unique constraint validator.
BooleanField representation values that are unhashable no longer cause a crash.
The choices parameter is now included for non-editable fields.
The cursor pagination template in the browsable API is more accessible.
HTML input for missing DictField fields no longer returns an empty dict.
Django 6.1 is now supported.
Partial form data updates involving ListField are fixed.
OpenAPI schemas now handle zero numeric bounds on ListField children correctly.
Rollback is now limited to initialized connections.
Fixes rendering forms with empty datetime values.
Django 6.0 is now supported.
The renderer now ensures a valid datetime-local format.
Validation is fixed for a many to many field when default=None.
MultipleChoiceField now preserves ordering.
Python 3.14 is now supported.
A small risk of Token overwrite is prevented.
TokenAdmin now respects the user model's USERNAME_FIELD.
Validation is fixed when a condition references a read-only field.
This decorator is now available for function-based views.