Releases: encode/django-rest-framework
v3.16.1
This release fixes a few bugs, clean-up some old code paths for unsupported Python versions and improve translations.
Minor changes
- Cleanup optional backports.zoneinfodependency 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_togethervalidation withSerializerMethodFieldin #9712
- Fix UniqueTogetherValidatorto handle fields withsourceattribute 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-restwindand update outdated images inbrowsable-api.mdin #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-guardian2todjangorestframework-guardianin #9734
- Add note to tutorial about required requestin serializer context when usingHyperlinkedModelSerializerin #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 pyupgradetopre-commithooks in #9682
- Fix test with Django 5 when pytzis available in #9715
New Contributors
- @araggohnxd made their first contribution in #9673
- @mbeijen made their first contribution in #9660
- @stefan6419846 made their first contribution in #9676
- @ren000thomas made their first contribution in #9675
- @ulgens made their first contribution in #9682
- @bukh-sal made their first contribution in #9595
- @rezatn0934 made their first contribution in #9576
- @Rohit10jr made their first contribution in #9693
- @kushibayev made their first contribution in #9713
- @alihassancods made their first contribution in #9732
- @kulikjak made their first contribution in #9715
- @Natgho made their first contribution in #9749
Full Changelog: 3.16.0...3.16.1
v3.16.0
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 LoginRequiredMiddlewarein #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 UniqueConstraintin #9360
- Fix raising on nullable fields part of UniqueConstraintin #9531
- Fix unique_togethervalidation with source in #9482
- Added protections to AttributeErrorraised within properties in #9455
- Fix get_template_contextto 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 DecimalFieldin #9515
- Fix usages of open()insetup.pyin #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_referencemethod in #9525
Documentation and internal changes
- Provide tests for hashing of OperandHolderin #9437
- Update documentation: Add adrfthird 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 querysetattribute in #9528
- Fix Transifex link in #9541
- Fix example httpiecall in docs in #9543
- Fix example for serializer field with choices in docs in #9563
- Remove extra <>in validators example in #9590
- Update strftimelink in the docs in #9624
- Switch to codecov GHA in #9618
- Add note regarding availability of the actionattribute in 'Introspecting ViewSet actions' docs section in #9633
- Improved description of allowed throttling rates in documentation in #9640
- Add rest-framework-gm2m-relationspackage 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-pyoidcas a third party authentication library in #9667
New Contributors
- @maerteijnmade their first contribution in #9198
- @FraCata00made their first contribution in #9444
- @AlvaroVegamade their first contribution in #9451
- @james-mchugh made their first contribution in #9455
- @ifeanyidavidmade their first contribution in #9479
- @p-schlickmann made their first contribution in #9480
- @akkumanmade their first contribution in #9505
- @rafaelgramoschimade their first contribution in #9509
- @Sinaatkdmade their first contribution in #9521
- @gtkaczmade their first contribution in #9535
- @slivercmade their first contribution in #9556
- @gabrielromagnoli1987made their first contribution in #9543
- @cheehong1030made their first contribution in #9563
- @amansharma612made their first contribution in #9590
- @Glurodamade their first contribution in #9616
- @deepakangadimade their first contribution in #9624
- @EXG1Omade their first contribution in #9633
- @decadenzamade their first contribution in #9640
- @mojtabaakbari221bmade their first contribution in #9063
- @mikemangermade their first contribution in #9661
- @gbipmade their first contribution in #9667
Full Changelog: 3.15.2...3.16.0
3.15.2
What's Changed
- Add @api_view example to caching documentation by @BradWells in #9131
- Update docstring by @jthevos in #9340
- Apply black formatting to caching markdown by @jthevos in #9341
- Update renderers documentation example by @mgaligniana in #9362
- Removing live examples of tutorial code that are no longer hosted by @TGoddessana in #9363
- Docs: Remove an unnecessary step from quickstart.md by @Gogowitsch in #9387
- Documentation: Add Python 3.12 to the requirements by @Szaroslav in #9382
- Tweak README.md links. by @tomchristie in #9375
- Revert "Ensure CursorPagination respects nulls in the ordering field" by @max-muoto in #9381
- use warnings rather than logging a warning for DecimalField warnings by @terencehonles in #9367
- 20240426 docs by @peterthomassen in #9392
- Cleanup by @peterthomassen in #9393
- tests: Check urlpatterns after cleanups by @stanislavlevin in #9400
- docs: Correct some evaluation results and a httpie option in Tutorial1 by @wkwkhautbois in #9421
- Add __hash__method forpermissions.OperandHolderclass by @vanya909 in #9417
- Fix potential XSS vulnerability in break_long_headers template filter by @ch4n3-yoon in #9435
- Version 3.15.2. by @tomchristie in #9439
New Contributors
- @BradWells made their first contribution in #9131
- @jthevos made their first contribution in #9340
- @Gogowitsch made their first contribution in #9387
- @Szaroslav made their first contribution in #9382
- @wkwkhautbois made their first contribution in #9421
- @ch4n3-yoon made their first contribution in #9435
Full Changelog: 3.15.1...3.15.2
Version 3.15.1
What's Changed
- Update the message to be consistent with the Django `HttpResponseBa⦠by @maycuatroi in #9287
- Make inflectionpackage truly optional by @browniebroke in #9303
- Fix broken links in release notes for 3.15 by @browniebroke in #9305
- TokenAdmin.autocomplete_fields Breaks Some Use Cases, Revert by @alexdlaird in #9301
- Add drf-sendables to third-party-packages.md by @amikrop in #9261
- Revert "feat: Add some changes to ValidationError to support django style vadβ¦" by @auvipy in #9326
- Revert "Re-prefetch related objects after updating" by @auvipy in #9327
- Revert #8863 by @tomchristie in #9330
- Revert #8009 by @tomchristie in #9332
- Revert #9030 by @tomchristie in #9333
- Revert "Fix NamespaceVersioning ignoring DEFAULT_VERSION on non-None namespaces" by @auvipy in #9335
- SearchFilter.get_search_termsreturns list. by @tomchristie in #9338
- Version 3.15.1 by @tomchristie in #9339
New Contributors
- @maycuatroi made their first contribution in #9287
- @alexdlaird made their first contribution in #9301
Full Changelog: 3.15.0...3.15.1
Version 3.14.0
- Django 2.2 is no longer supported. #8662
- Django 4.1 compatibility. #8591
- Add --api-versionCLI option togenerateschemamanagement command. #8663
- Enforce is_valid(raise_exception=False)as a keyword-only argument. #7952
- Stop calling set_contexton Validators. #8589
- Return NotImplementedfromErrorDetails.__ne__. #8538
- Don't evaluate DateTimeField.default_timezonewhen a custom timezone is set. #8531
- Make relative URLs clickable in Browseable API. #8464
- Support ManyRelatedFieldfalling back to the default value when the attribute specified by dot notation doesn't exist. MatchesManyRelatedField.get_attributetoField.get_attribute. #7574
- Make schemas.openapi.get_referencepublic. #7515
- Make ReturnDictsupportdictunion operators on Python 3.9 and later. #8302
- Update throttling to check if request.useris set before checking if the user is authenticated. #8370
Version 3.13.1
- Revert schema naming changes with function based @api_view. #8297
Version 3.13.0
- Django 4.0 compatability. #8178
- Add max_lengthandmin_lengthoptions toListSerializer. #8165
- Add get_request_serializerandget_response_serializerhooks toAutoSchema. #7424
- Fix OpenAPI representation of null-able read only fields. #8116
- Respect UNICODE_JSONsetting in API schema outputs. #7991
- Fix for RemoteUserAuthentication. #7158
- Make Field constructors keyword-only. #7632
3.12.4
version 3.12.4
Version 3.9.3
This is the last Django REST Framework release that will support Python 2.
Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10.
- Adjusted the compat check for django-guardian to allow the last guardian
 version (v1.4.9) compatible with Python 2. #6613
Version 3.9.2
See Release Notes for details.