Skip to content

Releases: encode/django-rest-framework

3.17.1

24 Mar 16:58
22e231c

Choose a tag to compare

What's Changed

Bug fixes

Full Changelog: 3.17.0...3.17.1

3.17.0

18 Mar 20:34
021ab56

Choose a tag to compare

What's Changed

Breaking changes

Features

  • Add ability to specify output format for DurationField by @sevdog in #8532
  • Add missing decorators: @versioning_class(), @content_negotiation_class(), @metadata_class() for function-based views by @qqii in #9719
  • Add support for Python 3.14 by @cclauss in #9780
  • Support violation_error_code and violation_error_message from UniqueConstraint in UniqueTogetherValidator by @s-aleshin in #9766
  • Add support for ipaddress objects in JSONEncoder by @corenting in #9087
  • Add optional support to serialize BigInteger to string by @HoodyH in #9775
  • Add Django 6.0 support by @MehrazRumman in #9819

Bug fixes

Translations

Packaging

Other changes

New Contributors

Full Changelog: 3.16.1...3.17.0

v3.16.1

06 Aug 17:56
de018df

Choose a tag to compare

This release fixes a few bugs, clean-up some old code paths for unsupported Python versions and improve translations.

Minor changes

  • Cleanup optional backports.zoneinfo dependency and conditions on unsupported Python 3.8 and lower in #9681. Python versions prior to 3.9 were already unsupported so this isn't considered as a breaking change.

Bug fixes

  • Fix regression in unique_together validation with SerializerMethodField in #9712
  • Fix UniqueTogetherValidator to handle fields with source attribute in #9688
  • Drop HTML line breaks on long headers in browsable API in #9438

Translations

  • Add Kazakh locale support in #9713
  • Update translations for Korean translations in #9571
  • Update German translations in #9676
  • Update Chinese translations in #9675
  • Update Arabic translations-sal in #9595
  • Update Persian translations in #9576
  • Update Spanish translations in #9701
  • Update Turkish Translations in #9749
  • Fix some typos in Brazilian Portuguese translations in #9673

Documentation

  • Removed reference to GitHub Issues and Discussions in #9660
  • Add drf-restwind and update outdated images in browsable-api.md in #9680
  • Updated funding page to represent current scope in #9686
  • Fix broken Heroku JSON Schema link in #9693
  • Update Django documentation links to use stable version in #9698
  • Expand docs on unique constraints cause 'required=True' in #9725
  • Revert extension back from djangorestframework-guardian2 to djangorestframework-guardian in #9734
  • Add note to tutorial about required request in serializer context when using HyperlinkedModelSerializer in #9732

Internal changes

  • Update GitHub Actions to use Ubuntu 24.04 for testing in #9677
  • Update test matrix to use Django 5.2 stable version in #9679
  • Add pyupgrade to pre-commit hooks in #9682
  • Fix test with Django 5 when pytz is available in #9715

New Contributors

Full Changelog: 3.16.0...3.16.1

v3.16.0

28 Mar 14:28
ac50cec

Choose a tag to compare

This release is considered a significant release to improve upstream support with Django and Python. Some of these may change the behaviour of existing features and pre-existing behaviour. Specifically, some fixes were added to around the support of UniqueConstraint with nullable fields which will improve built-in serializer validation.

Features

  • Add official support for Django 5.1 and its new LoginRequiredMiddleware in #9514 and #9657
  • Add official Django 5.2a1 support in #9634
  • Add support for Python 3.13 in #9527 and #9556
  • Support Django 2.1+ test client JSON data automatically serialized in #6511 and fix a regression in #9615

Bug fixes

  • Fix unique together validator to respect condition's fields from UniqueConstraint in #9360
  • Fix raising on nullable fields part of UniqueConstraint in #9531
  • Fix unique_together validation with source in #9482
  • Added protections to AttributeError raised within properties in #9455
  • Fix get_template_context to handle also lists in #9467
  • Fix "Converter is already registered" deprecation warning. in #9512
  • Fix noisy warning and accept integers as min/max values of DecimalField in #9515
  • Fix usages of open() in setup.py in #9661

Translations

  • Add some missing Chinese translations in #9505
  • Fix spelling mistakes in Farsi language were corrected in #9521
  • Fixing and adding missing Brazilian Portuguese translations in #9535

Removals

  • Remove support for Python 3.8 in #9670
  • Remove long deprecated code from request wrapper in #9441
  • Remove deprecated AutoSchema._get_reference method in #9525

Documentation and internal changes

  • Provide tests for hashing of OperandHolder in #9437
  • Update documentation: Add adrf third party package in #9198
  • Update tutorials links in Community contributions docs in #9476
  • Fix usage of deprecated Django function in example from docs in #9509
  • Move path converter docs into a separate section in #9524
  • Add test covering update view without queryset attribute in #9528
  • Fix Transifex link in #9541
  • Fix example httpie call in docs in #9543
  • Fix example for serializer field with choices in docs in #9563
  • Remove extra <> in validators example in #9590
  • Update strftime link in the docs in #9624
  • Switch to codecov GHA in #9618
  • Add note regarding availability of the action attribute in 'Introspecting ViewSet actions' docs section in #9633
  • Improved description of allowed throttling rates in documentation in #9640
  • Add rest-framework-gm2m-relations package to the list of 3rd party libraries in #9063
  • Fix a number of typos in the test suite in the docs in #9662
  • Add django-pyoidc as a third party authentication library in #9667

New Contributors

Full Changelog: 3.15.2...3.16.0

3.15.2

28 Dec 10:24
c7a7eae

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.15.1...3.15.2

Version 3.15.1

06 May 08:38
3285916

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.15.0...3.15.1

3.15.0

19 Apr 00:22
2d8e9ad

Choose a tag to compare

What's Changed

Released 15th March 2024

  • Django 5.0 and Python 3.12 support [#9157]
  • Use POST method instead of GET to perform logout in browsable API [9208]
  • Added jQuery 3.7.1 support & dropped previous version [#9094]
  • Use str as default path converter [#9066]
  • Document support for http.HTTPMethod in the @action decorator added in Python 3.11 [#9067]
  • Update exceptions.md [#9071]
  • Partial serializer should not have required fields [#7563]
  • Propagate 'default' from model field to serializer field. [#9030]
  • Allow to override child.run_validation call in ListSerializer [#8035]
  • Align SearchFilter behavior to django.contrib.admin search [#9017]
  • Class name added to unknown field error [#9019]
  • Fix: Pagination response schemas. [#9049]
  • Fix choices in ChoiceField to support IntEnum [#8955]
  • Fix SearchFilter rendering search field with invalid value [#9023]
  • Fix OpenAPI Schema yaml rendering for timedelta [#9007]
  • Fix NamespaceVersioning ignoring DEFAULT_VERSION on non-None namespaces [#7278]
  • Added Deprecation Warnings for CoreAPI [#7519]
  • Removed usage of field.choices that triggered full table load [#8950]
  • Permit mixed casing of string values for BooleanField validation [#8970]
  • Fixes BrowsableAPIRenderer for usage with ListSerializer. [#7530]
  • Change semantic of OR of two permission classes [#7522]
  • Remove dependency on pytz [#8984]
  • Make set_value a method within Serializer [#8001]
  • Fix URLPathVersioning reverse fallback [#7247]
  • Warn about Decimal type in min_value and max_value arguments of DecimalField [#8972]
  • Fix mapping for choice values [#8968]
  • Refactor read function to use context manager for file handling [#8967]
  • Fix: fallback on CursorPagination ordering if unset on the view [#8954]
  • Replaced OrderedDict with dict [#8964]
  • Refactor get_field_info method to include max_digits and decimal_places attributes in SimpleMetadata class [#8943]
  • Implement __eq__ for validators [#8925]
  • Ensure CursorPagination respects nulls in the ordering field [#8912]
  • Use ZoneInfo as primary source of timezone data [#8924]
  • Add username search field for TokenAdmin (#8927) [#8934]
  • Handle Nested Relation in SlugRelatedField when many=False [#8922]
  • Bump version of jQuery to 3.6.4 & updated ref links [#8909]
  • Support UniqueConstraint [#7438]
  • Allow Request, Response, Field, and GenericAPIView to be subscriptable. This allows the classes to be made generic for type checking. [#8825]
  • Feat: Add some changes to ValidationError to support django style validation errors [#8863]
  • Fix Respect can_read_model permission in DjangoModelPermissions [#8009]
  • Add SimplePathRouter [#6789]
  • Re-prefetch related objects after updating [#8043]
  • Fix FilePathField required argument [#8805]
  • Raise ImproperlyConfigured exception if basename is not unique [#8438]
  • Use PrimaryKeyRelatedField pkfield in openapi [#8315]
  • replace partition with split in BasicAuthentication [#8790]
  • Fix BooleanField's allow_null behavior [#8614]
  • Handle Django's ValidationErrors in ListField [#6423]
  • Remove a bit of inline CSS. Add CSP nonce where it might be required and is available [#8783]
  • Use autocomplete widget for user selection in Token admin [#8534]
  • Make browsable API compatible with strong CSP [#8784]
  • Avoid inline script execution for injecting CSRF token [#7016]
  • Mitigate global dependency on inflection [#8017] [#8781]
  • Register Django urls [#8778]
  • Implemented Verbose Name Translation for TokenProxy [#8713]
  • Properly handle OverflowError in DurationField deserialization [#8042]
  • Fix OpenAPI operation name plural appropriately [#8017]
  • Represent SafeString as plain string on schema rendering [#8429]
  • Fix #8771 - Checking for authentication even if _ignore_model_permissions = True [#8772]
  • Fix 404 when page query parameter is empty string [#8578]
  • Fixes instance check in ListSerializer.to_representation [#8726] [#8727]
  • FloatField will crash if the input is a number that is too big [#8725]
  • Add missing DurationField to SimpleMetadata label_lookup [#8702]
  • Add support for Python 3.11 [#8752]
  • Make request consistently available in pagination classes [#8764]
  • Possibility to remove trailing zeros on DecimalFields representation [#6514]
  • Add a method for getting serializer field name (OpenAPI) [#7493]
  • Add __eq__ method for OperandHolder class [#8710]
  • Avoid importing django.test package when not testing [#8699]
  • Preserve exception messages for wrapped Django exceptions [#8051]
  • Include examples and format to OpenAPI schema of CursorPagination [#8687] [#8686]
  • Fix infinite recursion with deepcopy on Request [#8684]
  • Refactor: Replace try/except with contextlib.suppress() [#8676]
  • Minor fix to SerializeMethodField docstring [#8629]
  • Minor refactor: Unnecessary use of list() function [#8672]
  • Unnecessary list comprehension [#8670]
  • Use correct class to indicate present deprecation [#8665]

Full Changelog: https://github.com/encode/django-rest-framework/compa...

Read more

Version 3.14.0

08 Nov 10:37

Choose a tag to compare

  • Django 2.2 is no longer supported. #8662
  • Django 4.1 compatibility. #8591
  • Add --api-version CLI option to generateschema management command. #8663
  • Enforce is_valid(raise_exception=False) as a keyword-only argument. #7952
  • Stop calling set_context on Validators. #8589
  • Return NotImplemented from ErrorDetails.__ne__. #8538
  • Don't evaluate DateTimeField.default_timezone when a custom timezone is set. #8531
  • Make relative URLs clickable in Browseable API. #8464
  • Support ManyRelatedField falling back to the default value when the attribute specified by dot notation doesn't exist. Matches ManyRelatedField.get_attribute to Field.get_attribute. #7574
  • Make schemas.openapi.get_reference public. #7515
  • Make ReturnDict support dict union operators on Python 3.9 and later. #8302
  • Update throttling to check if request.user is set before checking if the user is authenticated. #8370

Version 3.13.1

08 Nov 10:37

Choose a tag to compare

  • Revert schema naming changes with function based @api_view. #8297

Version 3.13.0

08 Nov 10:37
7a84dc7

Choose a tag to compare

  • Django 4.0 compatability. #8178
  • Add max_length and min_length options to ListSerializer. #8165
  • Add get_request_serializer and get_response_serializer hooks to AutoSchema. #7424
  • Fix OpenAPI representation of null-able read only fields. #8116
  • Respect UNICODE_JSON setting in API schema outputs. #7991
  • Fix for RemoteUserAuthentication. #7158
  • Make Field constructors keyword-only. #7632