Skip to content

Commit eb3d078

Browse files
author
Carlton Gibson
authored
Version 3.7: Announcement etc (#5437)
* Set version number for 3.7.0 release * Rename release notes section Moved issue links to top for easier access. (Can move back later) * Add release note for #5273 * Add release note for #5440 * Add release note for #5265 Strict JSON handling * Add release note for #5250 * Add release notes for #5170 * Add release notes for #5443 * Add release notes for #5448 * Add release notes for #5452 * Add release not for #5342 * Add release notes for 5454 * Add release notes for #5058 & #5457 Remove Django 1.8 & 1.9 from README and setup.py * Release notes for merged 3.6.5 milestone tickets Tickets migrated to 3.7.0 milestone. * Add release notes for #5469 * Add release notes from AM 2ndOct * Add final changes to the release notes. * Add date and milestone link Move issue links back to bottom. * Update translations from transifex * Begin releae anouncement * Add release note for #5482 * 3.7 release announcement & related docs.
1 parent b2ca2c1 commit eb3d078

File tree

13 files changed

+257
-31
lines changed

13 files changed

+257
-31
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ There is a live example API for testing purposes, [available here][sandbox].
5252

5353
# Requirements
5454

55-
* Python (2.7, 3.2, 3.3, 3.4, 3.5, 3.6)
56-
* Django (1.8, 1.9, 1.10, 1.11)
55+
* Python (2.7, 3.4, 3.5, 3.6)
56+
* Django (1.10, 1.11, 2.0 alpha)
5757

5858
# Installation
5959

Diff for: docs/api-guide/schemas.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Basic usage is just to provide the title for your schema and call
155155
generator = schemas.SchemaGenerator(title='Flight Search API')
156156
schema = generator.get_schema()
157157

158-
### Per-View Schema Customisation
158+
## Per-View Schema Customisation
159159

160160
By default, view introspection is performed by an `AutoSchema` instance
161161
accessible via the `schema` attribute on `APIView`. This provides the
@@ -191,7 +191,7 @@ To customise the `Link` generation you may:
191191

192192
class CustomSchema(AutoSchema):
193193
def get_link(...):
194-
# Implemet custom introspection here (or in other sub-methods)
194+
# Implement custom introspection here (or in other sub-methods)
195195

196196
class CustomView(APIView):
197197
...
@@ -784,3 +784,4 @@ in [OpenAPI][open-api] format.
784784
[api-blueprint]: https://apiblueprint.org/
785785
[static-files]: https://docs.djangoproject.com/en/stable/howto/static-files/
786786
[named-arguments]: https://docs.djangoproject.com/en/stable/topics/http/urls/#named-groups
787+

Diff for: docs/img/bayer.png

41.9 KB
Loading

Diff for: docs/index.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ continued development by **[signing up for a paid plan][funding]**.
8787
REST framework requires the following:
8888

8989
* Python (2.7, 3.2, 3.3, 3.4, 3.5, 3.6)
90-
* Django (1.8, 1.9, 1.10, 1.11)
90+
* Django (1.10, 1.11, 2.0 alpha)
9191

9292
The following packages are optional:
9393

@@ -247,6 +247,7 @@ General guides to using REST framework.
247247
* [3.4 Announcement][3.4-announcement]
248248
* [3.5 Announcement][3.5-announcement]
249249
* [3.6 Announcement][3.6-announcement]
250+
* [3.7 Announcement][3.7-announcement]
250251
* [Kickstarter Announcement][kickstarter-announcement]
251252
* [Mozilla Grant][mozilla-grant]
252253
* [Funding][funding]
@@ -377,6 +378,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
377378
[3.4-announcement]: topics/3.4-announcement.md
378379
[3.5-announcement]: topics/3.5-announcement.md
379380
[3.6-announcement]: topics/3.6-announcement.md
381+
[3.7-announcement]: topics/3.7-announcement.md
380382
[kickstarter-announcement]: topics/kickstarter-announcement.md
381383
[mozilla-grant]: topics/mozilla-grant.md
382384
[funding]: topics/funding.md

Diff for: docs/topics/3.7-announcement.md

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
<style>
3+
.promo li a {
4+
float: left;
5+
width: 130px;
6+
height: 20px;
7+
text-align: center;
8+
margin: 10px 30px;
9+
padding: 150px 0 0 0;
10+
background-position: 0 50%;
11+
background-size: 130px auto;
12+
background-repeat: no-repeat;
13+
font-size: 120%;
14+
color: black;
15+
}
16+
.promo li {
17+
list-style: none;
18+
}
19+
</style>
20+
21+
# Django REST framework 3.7
22+
23+
The 3.7 release focuses on improvements to schema generation and the interactive API documentation.
24+
25+
This release has been made possible by [Bayer](https://www.bayer.com/) who have sponsored the release.
26+
27+
<a href="https://www.bayer.com/"><img src="/img/bayer.png"/></a>
28+
29+
---
30+
31+
## Funding
32+
33+
If you use REST framework commercially and would like to see this work continue, we strongly encourage you to invest in its continued development by
34+
**[signing up for a paid&nbsp;plan][funding]**.
35+
36+
<ul class="premium-promo promo">
37+
<li><a href="http://jobs.rover.com/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/rover_130x130.png)">Rover.com</a></li>
38+
<li><a href="https://getsentry.com/welcome/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/sentry130.png)">Sentry</a></li>
39+
<li><a href="https://getstream.io/try-the-api/?utm_source=drf&utm_medium=banner&utm_campaign=drf" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/stream-130.png)">Stream</a></li>
40+
<li><a href="https://hello.machinalis.co.uk/" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/Machinalis130.png)">Machinalis</a></li>
41+
<li><a href="https://rollbar.com" style="background-image: url(https://fund-rest-framework.s3.amazonaws.com/rollbar.png)">Rollbar</a></li>
42+
</ul>
43+
<div style="clear: both; padding-bottom: 20px;"></div>
44+
45+
*As well as our release sponsor, we'd like to say thanks in particular our premium backers, [Rover](http://jobs.rover.com/), [Sentry](https://getsentry.com/welcome/), [Stream](https://getstream.io/?utm_source=drf&utm_medium=banner&utm_campaign=drf), [Machinalis](https://hello.machinalis.co.uk/), and [Rollbar](https://rollbar.com).*
46+
47+
---
48+
49+
## Customizing API docs & schema generation.
50+
51+
The schema generation introduced in 3.5 and the related API docs generation in 3.6 are both hugely powerful features, however they've been somewhat limited in cases where the view introspection isn't able to correctly identify the schema for a particular view.
52+
53+
In order to try to address this we're now adding the ability for per-view customization of the API schema. The interface that we're adding for this allows either basic manual overrides over which fields should be included on a view, or for more complex programmatic overriding of the schema generation. We believe this release comprehensively addresses some of the existing shortcomings of the schema features.
54+
55+
Let's take a quick look at using the new functionality...
56+
57+
The `APIView` class has a `schema` attribute, that is used to control how the Schema for that particular view is generated. The default behaviour is to use the `AutoSchema` class.
58+
59+
from rest_framework.views import APIView
60+
from rest_framework.schemas import AutoSchema
61+
62+
class CustomView(APIView):
63+
schema = AutoSchema() # Included for demonstration only. This is the default behavior.
64+
65+
We can remove a view from the API schema and docs, like so:
66+
67+
class CustomView(APIView):
68+
schema = None
69+
70+
If we want to mostly use the default behavior, but additionally include some additional fields on a particular view, we can now do so easily...
71+
72+
class CustomView(APIView):
73+
schema = AutoSchema(manual_fields=[
74+
coreapi.Field('search', location='query')
75+
])
76+
77+
To ignore the automatic generation for a particular view, and instead specify the schema explicitly, we use the `ManualSchema` class instead...
78+
79+
class CustomView(APIView):
80+
schema = ManualSchema(fields=[...])
81+
82+
For more advanced behaviors you can subclass `AutoSchema` to provide for customized schema generation, and apply that to particular views.
83+
84+
class CustomView(APIView):
85+
schema = CustomizedSchemaGeneration()
86+
87+
For full details on the new functionality, please see the [Schema Documentation][schema-docs].
88+
89+
---
90+
91+
## Django 2.0 support
92+
93+
REST framework 3.7 supports Django versions 1.10, 1.11, and 2.0 alpha.
94+
95+
---
96+
97+
## Minor fixes and improvements
98+
99+
There are a large number of minor fixes and improvements in this release. See the [release notes](release-notes.md) page for a complete listing.
100+
101+
The number of [open tickets against the project](https://github.com/encode/django-rest-framework/issues) currently at its lowest number in quite some time, and we're continuing to focus on reducing these to a manageable amount.
102+
103+
---
104+
105+
## Deprecations
106+
107+
### `exclude_from_schema`
108+
109+
Both `APIView.exclude_from_schema` and the `exclude_from_schema` argument to the `@api_view` decorator and now `PendingDeprecation`. They will be moved to deprecated in the 3.8 release, and removed entirely in 3.9.
110+
111+
For `APIView` you should instead set a `schema = None` attribute on the view class.
112+
113+
For function based views the `@schema` decorator can be used to exclude the view from the schema, by using `@schema(None)`.
114+
115+
### `DjangoFilterBackend`
116+
117+
The `DjangoFilterBackend` was moved to pending deprecation in 3.5, and deprecated in 3.6. It has now been removed from the core framework.
118+
119+
The functionality remains fully available, but is instead provided in the `django-filter` package.
120+
121+
---
122+
123+
## What's next
124+
125+
We're still planning to work on improving real-time support for REST framework by providing documentation on integrating with Django channels, as well adding support for more easily adding WebSocket support to existing HTTP endpoints.
126+
127+
This will likely be timed so that any REST framework development here ties in with similar work on [API Star][api-star].
128+
129+
[funding]: funding.md
130+
[schema-docs]: ../api-guide/schemas.md
131+
[api-star]: https://github.com/encode/apistar

Diff for: docs/topics/release-notes.md

+97-4
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,69 @@ You can determine your currently installed version using `pip freeze`:
3838

3939
---
4040

41-
## 3.6.x series
41+
## 3.7.x series
42+
43+
### 3.7.0
4244

43-
### 3.6.5
45+
**Date**: [6th October 2017][3.7.0-milestone]
4446

4547
* Fix `DjangoModelPermissions` to ensure user authentication before calling the view's `get_queryset()` method. As a side effect, this changes the order of the HTTP method permissions and authentication checks, and 405 responses will only be returned when authenticated. If you want to replicate the old behavior, see the PR for details. [#5376][gh5376]
4648
* Deprecated `exclude_from_schema` on `APIView` and `api_view` decorator. Set `schema = None` or `@schema(None)` as appropriate. [#5422][gh5422]
47-
* Timezone-aware `DateTimeField`s now respect active or default `timezone` during serialization, instead of always using UTC.
49+
* Timezone-aware `DateTimeField`s now respect active or default `timezone` during serialization, instead of always using UTC. [#5435][gh5435]
4850

4951
Resolves inconsistency whereby instances were serialised with supplied datetime for `create` but UTC for `retrieve`. [#3732][gh3732]
5052

5153
**Possible backwards compatibility break** if you were relying on datetime strings being UTC. Have client interpret datetimes or [set default or active timezone (docs)][djangodocs-set-timezone] to UTC if needed.
5254

55+
* Removed DjangoFilterBackend inline with deprecation policy. Use `django_filters.rest_framework.FilterSet` and/or `django_filters.rest_framework.DjangoFilterBackend` instead. [#5273][gh5273]
56+
* Don't strip microseconds from `time` when encoding. Makes consistent with `datetime`.
57+
**BC Change**: Previously only milliseconds were encoded. [#5440][gh5440]
58+
* Added `STRICT_JSON` setting (default `True`) to raise exception for the extended float values (`nan`, `inf`, `-inf`) accepted by Python's `json` module.
59+
**BC Change**: Previously these values would converted to corresponding strings. Set `STRICT_JSON` to `False` to restore the previous behaviour. [#5265][gh5265]
60+
* Add support for `page_size` parameter in CursorPaginator class [#5250][gh5250]
61+
* Make `DEFAULT_PAGINATION_CLASS` `None` by default.
62+
**BC Change**: If your were **just** setting `PAGE_SIZE` to enable pagination you will need to add `DEFAULT_PAGINATION_CLASS`.
63+
The previous default was `rest_framework.pagination.PageNumberPagination`. There is a system check warning to catch this case. You may silence that if you are setting pagination class on a per-view basis. [#5170][gh5170]
64+
* Catch `APIException` from `get_serializer_fields` in schema generation. [#5443][gh5443]
65+
* Allow custom authentication and permission classes when using `include_docs_urls` [#5448][gh5448]
66+
* Defer translated string evaluation on validators. [#5452][gh5452]
67+
* Added default value for 'detail' param into 'ValidationError' exception [#5342][gh5342]
68+
* Adjust schema get_filter_fields rules to match framework [#5454][gh5454]
69+
* Updated test matrix to add Django 2.0 and drop Django 1.8 & 1.9
70+
**BC Change**: This removes Django 1.8 and Django 1.9 from Django REST Framework supported versions. [#5457][gh5457]
71+
* Fixed a deprecation warning in serializers.ModelField [#5058][gh5058]
72+
* Added a more explicit error message when `get_queryset` returned `None` [#5348][gh5348]
73+
* Fix docs for Response `data` description [#5361][gh5361]
74+
* Fix __pychache__/.pyc excludes when packaging [#5373][gh5373]
75+
* Fix default value handling for dotted sources [#5375][gh5375]
76+
* Ensure content_type is set when passing empty body to RequestFactory [#5351][gh5351]
77+
* Fix ErrorDetail Documentation [#5380][gh5380]
78+
* Allow optional content in the generic content form [#5372][gh5372]
79+
* Updated supported values for the NullBooleanField [#5387][gh5387]
80+
* Fix ModelSerializer custom named fields with source on model [#5388][gh5388]
81+
* Fixed the MultipleFieldLookupMixin documentation example to properly check for object level permission [#5398][gh5398]
82+
* Update get_object() example in permissions.md [#5401][gh5401]
83+
* Fix authtoken managment command [#5415][gh5415]
84+
* Fix schema generation markdown [#5421][gh5421]
85+
* Allow `ChoiceField.choices` to be set dynamically [#5426][gh5426]
86+
* Add the project layout to the quickstart [#5434][gh5434]
87+
* Reuse 'apply_markdown' function in 'render_markdown' templatetag [#5469][gh5469]
88+
* Added links to `drf-openapi` package in docs [#5470][gh5470]
89+
* Added docstrings code highlighting with pygments [#5462][gh5462]
90+
* Fixed documentation rendering for views named `data` [#5472][gh5472]
91+
* Docs: Clarified 'to_internal_value()' validation behavior [#5466][gh5466]
92+
* Fix missing six.text_type() call on APIException.__str__ [#5476][gh5476]
93+
* Document documentation.py [#5478][gh5478]
94+
* Fix naming collisions in Schema Generation [#5464][gh5464]
95+
* Call Django's authenticate function with the request object [#5295][gh5295]
96+
* Update coreapi JS to 0.1.1 [#5479][gh5479]
97+
* Have `is_list_view` recognise RetrieveModel… views [#5480][gh5480]
98+
* Remove Django 1.8 & 1.9 compatibility code [#5481][gh5481]
99+
* Remove deprecated schema code from DefaultRouter [#5482][gh5482]
100+
101+
102+
## 3.6.x series
103+
53104
### 3.6.4
54105

55106
**Date**: [21st August 2017][3.6.4-milestone]
@@ -756,6 +807,7 @@ For older release notes, [please see the version 2.x documentation][old-release-
756807
[3.6.2-milestone]: https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.6.2+Release%22
757808
[3.6.3-milestone]: https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.6.3+Release%22
758809
[3.6.4-milestone]: https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.6.4+Release%22
810+
[3.7.0-milestone]: https://github.com/encode/django-rest-framework/issues?q=milestone%3A%223.7.0+Release%22
759811

760812
<!-- 3.0.1 -->
761813
[gh2013]: https://github.com/encode/django-rest-framework/issues/2013
@@ -1427,9 +1479,50 @@ For older release notes, [please see the version 2.x documentation][old-release-
14271479
[gh5147]: https://github.com/encode/django-rest-framework/issues/5147
14281480
[gh5131]: https://github.com/encode/django-rest-framework/issues/5131
14291481

1430-
<!-- 3.6.5 -->
1482+
<!-- 3.7.0 -->
1483+
[gh5481]: https://github.com/encode/django-rest-framework/issues/5481
1484+
[gh5480]: https://github.com/encode/django-rest-framework/issues/5480
1485+
[gh5479]: https://github.com/encode/django-rest-framework/issues/5479
1486+
[gh5295]: https://github.com/encode/django-rest-framework/issues/5295
1487+
[gh5464]: https://github.com/encode/django-rest-framework/issues/5464
1488+
[gh5478]: https://github.com/encode/django-rest-framework/issues/5478
1489+
[gh5476]: https://github.com/encode/django-rest-framework/issues/5476
1490+
[gh5466]: https://github.com/encode/django-rest-framework/issues/5466
1491+
[gh5472]: https://github.com/encode/django-rest-framework/issues/5472
1492+
[gh5462]: https://github.com/encode/django-rest-framework/issues/5462
1493+
[gh5470]: https://github.com/encode/django-rest-framework/issues/5470
1494+
[gh5469]: https://github.com/encode/django-rest-framework/issues/5469
1495+
[gh5435]: https://github.com/encode/django-rest-framework/issues/5435
1496+
[gh5434]: https://github.com/encode/django-rest-framework/issues/5434
1497+
[gh5426]: https://github.com/encode/django-rest-framework/issues/5426
1498+
[gh5421]: https://github.com/encode/django-rest-framework/issues/5421
1499+
[gh5415]: https://github.com/encode/django-rest-framework/issues/5415
1500+
[gh5401]: https://github.com/encode/django-rest-framework/issues/5401
1501+
[gh5398]: https://github.com/encode/django-rest-framework/issues/5398
1502+
[gh5388]: https://github.com/encode/django-rest-framework/issues/5388
1503+
[gh5387]: https://github.com/encode/django-rest-framework/issues/5387
1504+
[gh5372]: https://github.com/encode/django-rest-framework/issues/5372
1505+
[gh5380]: https://github.com/encode/django-rest-framework/issues/5380
1506+
[gh5351]: https://github.com/encode/django-rest-framework/issues/5351
1507+
[gh5375]: https://github.com/encode/django-rest-framework/issues/5375
1508+
[gh5373]: https://github.com/encode/django-rest-framework/issues/5373
1509+
[gh5361]: https://github.com/encode/django-rest-framework/issues/5361
1510+
[gh5348]: https://github.com/encode/django-rest-framework/issues/5348
1511+
[gh5058]: https://github.com/encode/django-rest-framework/issues/5058
1512+
[gh5457]: https://github.com/encode/django-rest-framework/issues/5457
14311513
[gh5376]: https://github.com/encode/django-rest-framework/issues/5376
14321514
[gh5422]: https://github.com/encode/django-rest-framework/issues/5422
14331515
[gh5408]: https://github.com/encode/django-rest-framework/issues/5408
14341516
[gh3732]: https://github.com/encode/django-rest-framework/issues/3732
14351517
[djangodocs-set-timezone]: https://docs.djangoproject.com/en/1.11/topics/i18n/timezones/#default-time-zone-and-current-time-zone
1518+
[gh5273]: https://github.com/encode/django-rest-framework/issues/5273
1519+
[gh5440]: https://github.com/encode/django-rest-framework/issues/5440
1520+
[gh5265]: https://github.com/encode/django-rest-framework/issues/5265
1521+
[gh5250]: https://github.com/encode/django-rest-framework/issues/5250
1522+
[gh5170]: https://github.com/encode/django-rest-framework/issues/5170
1523+
[gh5443]: https://github.com/encode/django-rest-framework/issues/5443
1524+
[gh5448]: https://github.com/encode/django-rest-framework/issues/5448
1525+
[gh5452]: https://github.com/encode/django-rest-framework/issues/5452
1526+
[gh5342]: https://github.com/encode/django-rest-framework/issues/5342
1527+
[gh5454]: https://github.com/encode/django-rest-framework/issues/5454
1528+
[gh5482]: https://github.com/encode/django-rest-framework/issues/5482

Diff for: mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ pages:
7070
- '3.4 Announcement': 'topics/3.4-announcement.md'
7171
- '3.5 Announcement': 'topics/3.5-announcement.md'
7272
- '3.6 Announcement': 'topics/3.6-announcement.md'
73+
- '3.7 Announcement': 'topics/3.7-announcement.md'
7374
- 'Kickstarter Announcement': 'topics/kickstarter-announcement.md'
7475
- 'Mozilla Grant': 'topics/mozilla-grant.md'
7576
- 'Funding': 'topics/funding.md'

Diff for: rest_framework/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
__title__ = 'Django REST framework'
11-
__version__ = '3.6.4'
11+
__version__ = '3.7.0'
1212
__author__ = 'Tom Christie'
1313
__license__ = 'BSD 2-Clause'
1414
__copyright__ = 'Copyright 2011-2017 Tom Christie'

Diff for: rest_framework/locale/en/LC_MESSAGES/django.mo

0 Bytes
Binary file not shown.

Diff for: rest_framework/locale/en/LC_MESSAGES/django.po

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Django REST framework\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2016-07-12 16:13+0100\n"
11-
"PO-Revision-Date: 2016-07-12 15:14+0000\n"
11+
"PO-Revision-Date: 2017-09-21 21:11+0000\n"
1212
"Last-Translator: Thomas Christie <[email protected]>\n"
1313
"Language-Team: English (http://www.transifex.com/django-rest-framework-1/django-rest-framework/language/en/)\n"
1414
"MIME-Version: 1.0\n"

Diff for: rest_framework/locale/ko_KR/LC_MESSAGES/django.mo

95 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)