-
-
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
3.15 Release #9210
3.15 Release #9210
Changes from 67 commits
988bc3a
965e9bc
18f7567
428b584
5313ae6
7b57ec4
7f55921
631b8c1
7848ffd
ff803c8
f5b08ff
3fc4baa
d7df722
9324a23
088f912
8aaf97f
42b78d0
3ef5fe2
5d0c331
9765941
aa27efb
1a61130
7a374ea
0e73dfb
98a5b9a
555b2ef
5d1be7e
398aa1e
3e88e65
ba2bb6e
d428aed
ab7bb95
2b27c85
bfbb04a
402b0f4
40f2289
f0b6150
c8b935e
fecd1bf
1b7e0bd
e32b879
cc5b572
1ae36c5
3017b72
1a2323a
50ff175
c4044d4
60b9ca6
8a0382c
fd0edb3
81a5487
914002b
cda0ec6
0660d66
70a4432
09325ac
da6e6dc
af6313a
f2dc192
9e0003c
53b5f62
69baf94
dbba90a
204ef05
7549bdc
b42d1ae
4b74fe0
a45dd07
51fd06e
de2407f
79cc4a6
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,58 @@ | ||
<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.15 | ||
|
||
At the Internet, on March 15th, 2024, with 176 commits by 138 authors, we are happy to announce the release of Django REST framework 3.15. | ||
|
||
## Django 5.0 and Python 3.12 support | ||
|
||
The latest release now fully supports Django 5.0 and Python 3.12. | ||
|
||
The current minimum versions of Django still is 3.0 and Python 3.6. | ||
|
||
## Primary Support of UniqueConstraint | ||
|
||
`ModelSerializer` generates validators for [UniqueConstraint](https://docs.djangoproject.com/en/4.0/ref/models/constraints/#uniqueconstraint) (both UniqueValidator and UniqueTogetherValidator) | ||
|
||
## ValidationErrors improvements | ||
|
||
The `ValidationError` has been aligned with Django's, currently supporting the same style (signature) and nesting. | ||
|
||
## SimpleRouter non-regex matching support | ||
|
||
By default the URLs created by `SimpleRouter` use regular expressions. This behavior can be modified by setting the `use_regex_path` argument to `False` when instantiating the router. | ||
|
||
## ZoneInfo as the primary source of timezone data | ||
|
||
Dependency on pytz has been removed and deprecation warnings have been added, Django will provide ZoneInfo instances as long as USE_DEPRECATED_PYTZ is not enabled. More info on the migration can be found [in this guide](https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html). | ||
|
||
## Align `SearchFilter` behaviour to `django.contrib.admin` search | ||
|
||
Searches now may contain _quoted phrases_ with spaces, each phrase is considered as a single search term, and it will raise a validation error if any null-character is provided in search. See the [Filtering API guide](../api-guide/filtering.md) for more information. | ||
|
||
## Default values propagation | ||
|
||
Model fields' default values are now propagated to serializer fields, for more information see the [Serializer fields API guide](../api-guide/fields.md#default). | ||
|
||
## Other fixes and improvements | ||
|
||
There are a number of fixes and minor improvements in this release, ranging from documentation, internal infrastructure (typing, testing, requirements, deprecation, etc.), security and overall behaviour. | ||
|
||
See the [release notes](release-notes.md) page for a complete listing. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,91 @@ You can determine your currently installed version using `pip show`: | |
|
||
--- | ||
|
||
## 3.15.x series | ||
|
||
### 3.15.0 | ||
|
||
Date: 15th March 2024 | ||
|
||
* Django 5.0 and Python 3.12 support [[#9157] (https://github.com/encode/django-rest-framework/pull/9157)] | ||
* Use POST method instead of GET to perform logout in browsable API [[9208] (https://github.com/encode/django-rest-framework/pull/9208)] | ||
* Added jQuery 3.7.1 support & dropped previous version [[#9094](https://github.com/encode/django-rest-framework/pull/9094)] | ||
tomchristie marked this conversation as resolved.
Show resolved
Hide resolved
tomchristie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Use str as default path converter [[#9066](https://github.com/encode/django-rest-framework/pull/9066)] | ||
* Document support for http.HTTPMethod in the @action decorator added in Python 3.11 [[#9067](https://github.com/encode/django-rest-framework/pull/9067)] | ||
* Update exceptions.md [[#9071](https://github.com/encode/django-rest-framework/pull/9071)] | ||
* Partial serializer should not have required fields [[#7563](https://github.com/encode/django-rest-framework/pull/7563)] | ||
* Propagate 'default' from model field to serializer field. [[#9030](https://github.com/encode/django-rest-framework/pull/9030)] | ||
* Allow to override child.run_validation call in ListSerializer [[#8035](https://github.com/encode/django-rest-framework/pull/8035)] | ||
* Align SearchFilter behaviour to django.contrib.admin search [[#9017](https://github.com/encode/django-rest-framework/pull/9017)] | ||
* Class name added to unknown field error [[#9019](https://github.com/encode/django-rest-framework/pull/9019)] | ||
* Fix: Pagination response schemas. [[#9049](https://github.com/encode/django-rest-framework/pull/9049)] | ||
* Fix choices in ChoiceField to support IntEnum [[#8955](https://github.com/encode/django-rest-framework/pull/8955)] | ||
* Fix `SearchFilter` rendering search field with invalid value [[#9023](https://github.com/encode/django-rest-framework/pull/9023)] | ||
* Fix OpenAPI Schema yaml rendering for `timedelta` [[#9007](https://github.com/encode/django-rest-framework/pull/9007)] | ||
* Fix `NamespaceVersioning` ignoring `DEFAULT_VERSION` on non-None namespaces [[#7278](https://github.com/encode/django-rest-framework/pull/7278)] | ||
* Added Deprecation Warnings for CoreAPI [[#7519](https://github.com/encode/django-rest-framework/pull/7519)] | ||
* Removed usage of `field.choices` that triggered full table load [[#8950](https://github.com/encode/django-rest-framework/pull/8950)] | ||
* Permit mixed casing of string values for `BooleanField` validation [[#8970](https://github.com/encode/django-rest-framework/pull/8970)] | ||
* Fixes `BrowsableAPIRenderer` for usage with `ListSerializer`. [[#7530](https://github.com/encode/django-rest-framework/pull/7530)] | ||
* Change semantic of `OR` of two permission classes [[#7522](https://github.com/encode/django-rest-framework/pull/7522)] | ||
* Remove dependency on `pytz` [[#8984](https://github.com/encode/django-rest-framework/pull/8984)] | ||
* Fix validation for ListSerializer [[#8979](https://github.com/encode/django-rest-framework/pull/8979)] | ||
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. 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.
@TGoddessana please see same implemented @, thank you, 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. Although I'm not a maintainer, I'm very interested in the maintenance of the project, so I took a look at the issues.
Would love to hear your thoughts @tomchristie 🥲 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. IMO the problem is that #8926 was addressed ignoring the advice regarding "Customizing multiple update"
Thus the proposed solution (#8979) only addesses a single use case while ignoring out many others which are now not supported by the framework. For example: using PS: there is also an issue with the current implementation of 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 was thinking about reverting that for this release 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. #9283 let me know your thoughts, and we can wait for a better fix in future 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. If this change is not released in 3.15, which release do you think is the right one to fix and release it in: 3.16 or 3.15.1? 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. if it is just reverted it will not be included in 3.15, as it is a big thing, it should be included in a major release like 3.16/3.17 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 just want to avoid including any not fully functional feature for 3.15 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 agree with you. Thank you for your efforts!
tomchristie marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Make set_value a method within `Serializer` [[#8001](https://github.com/encode/django-rest-framework/pull/8001)] | ||
* Fix URLPathVersioning reverse fallback [[#7247](https://github.com/encode/django-rest-framework/pull/7247)] | ||
* Warn about Decimal type in min_value and max_value arguments of DecimalField [[#8972](https://github.com/encode/django-rest-framework/pull/8972)] | ||
* Fix mapping for choice values [[#8968](https://github.com/encode/django-rest-framework/pull/8968)] | ||
* Refactor read function to use context manager for file handling [[#8967](https://github.com/encode/django-rest-framework/pull/8967)] | ||
* Fix: fallback on CursorPagination ordering if unset on the view [[#8954](https://github.com/encode/django-rest-framework/pull/8954)] | ||
* Replaced `OrderedDict` with `dict` [[#8964](https://github.com/encode/django-rest-framework/pull/8964)] | ||
* Refactor get_field_info method to include max_digits and decimal_places attributes in SimpleMetadata class [[#8943](https://github.com/encode/django-rest-framework/pull/8943)] | ||
* Implement `__eq__` for validators [[#8925](https://github.com/encode/django-rest-framework/pull/8925)] | ||
* Ensure CursorPagination respects nulls in the ordering field [[#8912](https://github.com/encode/django-rest-framework/pull/8912)] | ||
* Use ZoneInfo as primary source of timezone data [[#8924](https://github.com/encode/django-rest-framework/pull/8924)] | ||
* Add username search field for TokenAdmin (#8927) [[#8934](https://github.com/encode/django-rest-framework/pull/8934)] | ||
* Handle Nested Relation in SlugRelatedField when many=False [[#8922](https://github.com/encode/django-rest-framework/pull/8922)] | ||
* Bump version of jQuery to 3.6.4 & updated ref links [[#8909](https://github.com/encode/django-rest-framework/pull/8909)] | ||
* Support UniqueConstraint [[#7438](https://github.com/encode/django-rest-framework/pull/7438)] | ||
* Allow Request, Response, Field, and GenericAPIView to be subscriptable. This allows the classes to be made generic for type checking. [[#8825](https://github.com/encode/django-rest-framework/pull/8825)] | ||
* Feat: Add some changes to ValidationError to support django style validation errors [[#8863](https://github.com/encode/django-rest-framework/pull/8863)] | ||
* Fix Respect `can_read_model` permission in DjangoModelPermissions [[#8009](https://github.com/encode/django-rest-framework/pull/8009)] | ||
* Add SimplePathRouter [[#6789](https://github.com/encode/django-rest-framework/pull/6789)] | ||
* Re-prefetch related objects after updating [[#8043](https://github.com/encode/django-rest-framework/pull/8043)] | ||
* Fix FilePathField required argument [[#8805](https://github.com/encode/django-rest-framework/pull/8805)] | ||
* Raise ImproperlyConfigured exception if `basename` is not unique [[#8438](https://github.com/encode/django-rest-framework/pull/8438)] | ||
* Use PrimaryKeyRelatedField pkfield in openapi [[#8315](https://github.com/encode/django-rest-framework/pull/8315)] | ||
* replace partition with split in BasicAuthentication [[#8790](https://github.com/encode/django-rest-framework/pull/8790)] | ||
* Fix BooleanField's allow_null behavior [[#8614](https://github.com/encode/django-rest-framework/pull/8614)] | ||
* Handle Django's ValidationErrors in ListField [[#6423](https://github.com/encode/django-rest-framework/pull/6423)] | ||
* Remove a bit of inline CSS. Add CSP nonce where it might be required and is available [[#8783](https://github.com/encode/django-rest-framework/pull/8783)] | ||
* Use autocomplete widget for user selection in Token admin [[#8534](https://github.com/encode/django-rest-framework/pull/8534)] | ||
* Make browsable API compatible with strong CSP [[#8784](https://github.com/encode/django-rest-framework/pull/8784)] | ||
* Avoid inline script execution for injecting CSRF token [[#7016](https://github.com/encode/django-rest-framework/pull/7016)] | ||
* Mitigate global dependency on inflection #8017 [[#8017](https://github.com/encode/django-rest-framework/pull/8017)] [[#8781](https://github.com/encode/django-rest-framework/pull/8781)] | ||
* Register Django urls [[#8778](https://github.com/encode/django-rest-framework/pull/8778)] | ||
* Implemented Verbose Name Translation for TokenProxy [[#8713](https://github.com/encode/django-rest-framework/pull/8713)] | ||
* Properly handle OverflowError in DurationField deserialization [[#8042](https://github.com/encode/django-rest-framework/pull/8042)] | ||
* Fix OpenAPI operation name plural appropriately [[#8017](https://github.com/encode/django-rest-framework/pull/8017)] | ||
* Represent SafeString as plain string on schema rendering [[#8429](https://github.com/encode/django-rest-framework/pull/8429)] | ||
* Fix #8771 - Checking for authentication even if `_ignore_model_permissions = True` [[#8772](https://github.com/encode/django-rest-framework/pull/8772)] | ||
* Fix 404 when page query parameter is empty string [[#8578](https://github.com/encode/django-rest-framework/pull/8578)] | ||
* Fixes instance check in ListSerializer.to_representation [[#8726](https://github.com/encode/django-rest-framework/pull/8726)] [[#8727](https://github.com/encode/django-rest-framework/pull/8727)] | ||
* FloatField will crash if the input is a number that is too big [[#8725](https://github.com/encode/django-rest-framework/pull/8725)] | ||
* Add missing DurationField to SimpleMetada label_lookup [[#8702](https://github.com/encode/django-rest-framework/pull/8702)] | ||
* Add support for Python 3.11 [[#8752](https://github.com/encode/django-rest-framework/pull/8752)] | ||
* Make request consistently available in pagination classes [[#8764](https://github.com/encode/django-rest-framework/pull/9764)] | ||
* Possibility to remove trailing zeros on DecimalFields representation [[#6514](https://github.com/encode/django-rest-framework/pull/6514)] | ||
* Add a method for getting serializer field name (OpenAPI) [[#7493](https://github.com/encode/django-rest-framework/pull/7493)] | ||
* Add `__eq__` method for `OperandHolder` class [[#8710](https://github.com/encode/django-rest-framework/pull/8710)] | ||
* Avoid importing `django.test` package when not testing [[#8699](https://github.com/encode/django-rest-framework/pull/8699)] | ||
* Preserve exception messages for wrapped Django exceptions [[#8051](https://github.com/encode/django-rest-framework/pull/8051)] | ||
* Include `examples` and `format` to OpenAPI schema of CursorPagination [[#8687] (https://github.com/encode/django-rest-framework/pull/8687)] [[#8686](https://github.com/encode/django-rest-framework/pull/8686)] | ||
* Fix infinite recursion with deepcopy on Request [[#8684](https://github.com/encode/django-rest-framework/pull/8684)] | ||
* Refactor: Replace try/except with contextlib.suppress() [[#8676](https://github.com/encode/django-rest-framework/pull/8676)] | ||
* Minor fix to SerializeMethodField docstring [[#8629](https://github.com/encode/django-rest-framework/pull/8629)] | ||
* Minor refactor: Unnecessary use of list() function [[#8672](https://github.com/encode/django-rest-framework/pull/8672)] | ||
* Unnecessary list comprehension [[#8670](https://github.com/encode/django-rest-framework/pull/8670)] | ||
* Use correct class to indicate present deprecation [[#8665](https://github.com/encode/django-rest-framework/pull/8665)] | ||
|
||
## 3.14.x series | ||
|
||
### 3.14.0 | ||
|
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.
The current minimum versions of Django is 3.0 and Python 3.7.
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.
That was, given that my 3.6 removal PR was taken into this release. But the PR now removes 3.6 and 3.7, and given DRF still officialy supports django 3.0. which supports python 3.6 and 3.7, we can't take it for the 3.15 release.
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 think Django 3.0 can be supported with Python 3.7 only, it doesn't seems a bad thing to me
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.
what's the point of doing that?
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.
It would alleviate the CI while still accepting bugs from Django 3.0.
Dropping support for a version means "no bugs on that stack will be addressed nor the backward compatibility will be checked" to me.
In the case of a bug arising from Django 3 and Python 3.6, it should be encouraged to upgrade Python and see if it persists.
It would still be compatible with your PR as Django 3 supports Python 3.6-3.9 (https://docs.djangoproject.com/en/5.0/releases/3.0/). With your PR, the minimum version of the stack checked (or fully supported) would be Django >= 3, Python >= 3.8
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.
Moving to Django 4.0+ and Python 3.8+ would prob be sensible.
3.2 LTS is almost at EOL... https://www.djangoproject.com/download/#supported-versions
We could then tie into their release cadence.
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 think keeping support of django 3.2 LTS would be a good idea now. we should keep two LTS working for easier upgrades from existing projects.