-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 3.14.0 proposal #8599
Version 3.14.0 proposal #8599
Changes from all commits
e89cba2
e35d584
4d60fe5
d6b87b0
619485f
d3f5591
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,62 @@ | ||||||
<style> | ||||||
.promo li a { | ||||||
float: left; | ||||||
width: 130px; | ||||||
height: 20px; | ||||||
text-align: center; | ||||||
margin: 10px 30px; | ||||||
padding: 150px 0 0 0; | ||||||
background-position: 0 50%; | ||||||
background-size: 130px auto; | ||||||
background-repeat: no-repeat; | ||||||
font-size: 120%; | ||||||
color: black; | ||||||
} | ||||||
.promo li { | ||||||
list-style: none; | ||||||
} | ||||||
</style> | ||||||
|
||||||
# Django REST framework 3.14 | ||||||
|
||||||
## Django 4.1 support | ||||||
|
||||||
The latest release now fully supports Django 4.1. | ||||||
|
||||||
Our requirements are now: | ||||||
|
||||||
* Python 3.6+ | ||||||
* Django 4.1, 4.0, 3.2, 3.1, 2.2 (LTS) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can do the related clean ups in a separate PR as well. |
||||||
|
||||||
## `raise_exceptions` argument for `is_valid` is now keyword-only. | ||||||
|
||||||
Calling `serializer_instance.is_valid(True)` is no longer acceptable syntax. | ||||||
If you'd like to use the `raise_exceptions` argument, you must use it as a | ||||||
keyword argument. | ||||||
|
||||||
See Pull Request [#7952](https://github.com/encode/django-rest-framework/pull/7952) for more details. | ||||||
|
||||||
## `ManyRelatedField` supports returning the default when the source attribute doesn't exist. | ||||||
|
||||||
Previously, if you used a serializer field with `many=True` with a dot notated source field | ||||||
that didn't exist, it would raise an `AttributeError`. Now it will return the default or be | ||||||
skipped depending on the other arguments. | ||||||
|
||||||
See Pull Request [#7574](https://github.com/encode/django-rest-framework/pull/7574) for more details. | ||||||
|
||||||
|
||||||
## Make Open API `get_reference` public. | ||||||
|
||||||
Returns a reference to the serializer component. This may be useful if you override `get_schema()`. | ||||||
|
||||||
## Change semantic of OR of two permission classes. | ||||||
|
||||||
When OR-ing two permissions, the request has to pass either class's `has_permission() and has_object_permission()`. | ||||||
|
||||||
Previously, both class's `has_permission()` was ignored when OR-ing two permissions together. | ||||||
|
||||||
See Pull Request [#7522](https://github.com/encode/django-rest-framework/pull/7522) for more details. | ||||||
|
||||||
## Minor fixes and improvements | ||||||
|
||||||
There are a number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page for a complete listing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
import django | ||
|
||
__title__ = 'Django REST framework' | ||
__version__ = '3.13.1' | ||
__version__ = '3.14.0' | ||
__author__ = 'Tom Christie' | ||
__license__ = 'BSD 3-Clause' | ||
__copyright__ = 'Copyright 2011-2019 Encode OSS Ltd' | ||
|
@@ -35,3 +35,7 @@ class RemovedInDRF313Warning(DeprecationWarning): | |
|
||
class RemovedInDRF314Warning(PendingDeprecationWarning): | ||
pass | ||
Comment on lines
36
to
37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this and the above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I kept it as per the comments in #8589. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That argument doesn't really convince me, DRF has never kept around the old warning classes for previous versions, e.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather leave that decision up to a maintainer. I wasn't a part of the original discussion so it'd be disingenuous for me to say that by convincing me, the past argument is moot. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry to have missed this thread! I was assuming that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CC @adamchainz - put out a PR to delete the now-unused warnings: #8664 |
||
|
||
|
||
class RemovedInDRF315Warning(PendingDeprecationWarning): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imho this should be 3.7+ but we need #8518 to be merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy merging that but I'll defer to @tomchristie.