D-PLACE / dplace-legacy

D-PLACE: Database of Places, Language, Culture and Environment (OLD)
https://d-place.org/
MIT License
21 stars 4 forks source link

Update djangorestframework to 3.8.1 #595

Closed pyup-bot closed 6 years ago

pyup-bot commented 6 years ago

This PR updates djangorestframework from 3.6.4 to 3.8.1.

Changelog ### 3.8.1 ``` **Date**: [4th April 2018][3.8.1-milestone] * Use old `url_name` behavior in route decorators [5915][gh5915] For `list_route` and `detail_route` maintain the old behavior of `url_name`, basing it on the `url_path` instead of the function name. ``` ### 3.8.0 ``` **Date**: [3rd April 2018][3.8.0-milestone] * **Breaking Change**: Alter `read_only` plus `default` behaviour. [5886][gh5886] `read_only` fields will now **always** be excluded from writable fields. Previously `read_only` fields with a `default` value would use the `default` for create and update operations. In order to maintain the old behaviour you may need to pass the value of `read_only` fields when calling `save()` in the view: def perform_create(self, serializer): serializer.save(owner=self.request.user) Alternatively you may override `save()` or `create()` or `update()` on the serialiser as appropriate. * Correct allow_null behaviour when required=False [5888][gh5888] Without an explicit `default`, `allow_null` implies a default of `null` for outgoing serialisation. Previously such fields were being skipped when read-only or otherwise not required. **Possible backwards compatibility break** if you were relying on such fields being excluded from the outgoing representation. In order to restore the old behaviour you can override `data` to exclude the field when `None`. For example: property def data(self): """ Drop `maybe_none` field if None. """ data = super().data if 'maybe_none' in data and data['maybe_none'] is None: del data['maybe_none'] return data * Refactor dynamic route generation and improve viewset action introspectibility. [5705][gh5705] `ViewSet`s have been provided with new attributes and methods that allow it to introspect its set of actions and the details of the current action. * Merged `list_route` and `detail_route` into a single `action` decorator. * Get all extra actions on a `ViewSet` with `.get_extra_actions()`. * Extra actions now set the `url_name` and `url_path` on the decorated method. * `url_name` is now based on the function name, instead of the `url_path`, as the path is not always suitable (e.g., capturing arguments in the path). * Enable action url reversing through `.reverse_action()` method (added in 3.7.4) * Example reverse call: `self.reverse_action(self.custom_action.url_name)` * Add `detail` initkwarg to indicate if the current action is operating on a collection or a single instance. Additional changes: * Deprecated `list_route` & `detail_route` in favor of `action` decorator with `detail` boolean. * Deprecated dynamic list/detail route variants in favor of `DynamicRoute` with `detail` boolean. * Refactored the router's dynamic route generation. * `list_route` and `detail_route` maintain the old behavior of `url_name`, basing it on the `url_path` instead of the function name. * Fix formatting of the 3.7.4 release note [5704][gh5704] * Docs: Update DRF Writable Nested Serializers references [5711][gh5711] * Docs: Fixed typo in auth URLs example. [5713][gh5713] * Improve composite field child errors [5655][gh5655] * Disable HTML inputs for dict/list fields [5702][gh5702] * Fix typo in HostNameVersioning doc [5709][gh5709] * Use rsplit to get module and classname for imports [5712][gh5712] * Formalize URLPatternsTestCase [5703][gh5703] * Add exception translation test [5700][gh5700] * Test staticfiles [5701][gh5701] * Add drf-yasg to documentation and schema 3rd party packages [5720][gh5720] * Remove unused `compat._resolve_model()` [5733][gh5733] * Drop compat workaround for unsupported Python 3.2 [5734][gh5734] * Prefer `iter(dict)` over `iter(dict.keys())` [5736][gh5736] * Pass `python_requires` argument to setuptools [5739][gh5739] * Remove unused links from docs [5735][gh5735] * Prefer https protocol for links in docs when available [5729][gh5729] * Add HStoreField, postgres fields tests [5654][gh5654] * Always fully qualify ValidationError in docs [5751][gh5751] * Remove unreachable code from ManualSchema [5766][gh5766] * Allowed customising API documentation code samples [5752][gh5752] * Updated docs to use `pip show` [5757][gh5757] * Load 'static' instead of 'staticfiles' in templates [5773][gh5773] * Fixed a typo in `fields` docs [5783][gh5783] * Refer to "NamespaceVersioning" instead of "NamespacedVersioning" in the documentation [5754][gh5754] * ErrorDetail: add `__eq__`/`__ne__` and `__repr__` [5787][gh5787] * Replace `background-attachment: fixed` in docs [5777][gh5777] * Make 404 & 403 responses consistent with `exceptions.APIException` output [5763][gh5763] * Small fix to API documentation: schemas [5796][gh5796] * Fix schema generation for PrimaryKeyRelatedField [5764][gh5764] * Represent serializer DictField as an Object in schema [5765][gh5765] * Added docs example reimplementing ObtainAuthToken [5802][gh5802] * Add schema to the ObtainAuthToken view [5676][gh5676] * Fix request formdata handling [5800][gh5800] * Fix authtoken views imports [5818][gh5818] * Update pytest, isort [5815][gh5815] [5817][gh5817] [5894][gh5894] * Fixed active timezone handling for non ISO8601 datetimes. [5833][gh5833] * Made TemplateHTMLRenderer render IntegerField inputs when value is `0`. [5834][gh5834] * Corrected endpoint in tutorial instructions [5835][gh5835] * Add Django Rest Framework Role Filters to Third party packages [5809][gh5809] * Use single copy of static assets. Update jQuery [5823][gh5823] * Changes ternary conditionals to be PEP308 compliant [5827][gh5827] * Added links to 'A Todo List API with React' and 'Blog API' tutorials [5837][gh5837] * Fix comment typo in ModelSerializer [5844][gh5844] * Add admin to installed apps to avoid test failures. [5870][gh5870] * Fixed schema for UUIDField in SimpleMetadata. [5872][gh5872] * Corrected docs on router include with namespaces. [5843][gh5843] * Test using model objects for dotted source default [5880][gh5880] * Allow traversing nullable related fields [5849][gh5849] * Added: Tutorial: Django REST with React (Django 2.0) [5891][gh5891] * Add `LimitOffsetPagination.get_count` to allow method override [5846][gh5846] * Don't show hidden fields in metadata [5854][gh5854] * Enable OrderingFilter to handle an empty tuple (or list) for the 'ordering' field. [5899][gh5899] * Added generic 500 and 400 JSON error handlers. [5904][gh5904] 3.7.x series ``` ### 3.7.7 ``` **Date**: [21st December 2017][3.7.7-milestone] * Fix typo to include *.mo locale files to packaging. [5697][gh5697], [5695][gh5695] ``` ### 3.7.6 ``` **Date**: [21st December 2017][3.7.6-milestone] * Add missing *.ico icon files to packaging. ``` ### 3.7.5 ``` **Date**: [21st December 2017][3.7.5-milestone] * Add missing *.woff2 font files to packaging. [5692][gh5692] * Add missing *.mo locale files to packaging. [5695][gh5695], [5696][gh5696] ``` ### 3.7.4 ``` **Date**: [20th December 2017][3.7.4-milestone] * Schema: Extract method for `manual_fields` processing [5633][gh5633] Allows for easier customisation of `manual_fields` processing, for example to provide per-method manual fields. `AutoSchema` adds `get_manual_fields`, as the intended override point, and a utility method `update_fields`, to handle by-name field replacement from a list, which, in general, you are not expected to override. Note: `AutoSchema.__init__` now ensures `manual_fields` is a list. Previously may have been stored internally as `None`. * Remove ulrparse compatability shim; use six instead [5579][gh5579] * Drop compat wrapper for `TimeDelta.total_seconds()` [5577][gh5577] * Clean up all whitespace throughout project [5578][gh5578] * Compat cleanup [5581][gh5581] * Add pygments CSS block in browsable API views [5584][gh5584] [5587][gh5587] * Remove `set_rollback()` from compat [5591][gh5591] * Fix request body/POST access [5590][gh5590] * Rename test to reference correct issue [5610][gh5610] * Documentation Fixes [5611][gh5611] [5612][gh5612] * Remove references to unsupported Django versions in docs and code [5602][gh5602] * Test Serializer exclude for declared fields [5599][gh5599] * Fixed schema generation for filter backends [5613][gh5613] * Minor cleanup for ModelSerializer tests [5598][gh5598] * Reimplement request attribute access w/ `__getattr__` [5617][gh5617] * Fixed SchemaJSRenderer renders invalid Javascript [5607][gh5607] * Make Django 2.0 support official/explicit [5619][gh5619] * Perform type check on passed request argument [5618][gh5618] * Fix AttributeError hiding on request authenticators [5600][gh5600] * Update test requirements [5626][gh5626] * Docs: `Serializer._declared_fields` enable modifying fields on a serializer [5629][gh5629] * Fix packaging [5624][gh5624] * Fix readme rendering for PyPI, add readme build to CI [5625][gh5625] * Update tutorial [5622][gh5622] * Non-required fields with `allow_null=True` should not imply a default value [5639][gh5639] * Docs: Add `allow_null` serialization output note [5641][gh5641] * Update to use the Django 2.0 release in tox.ini [5645][gh5645] * Fix `Serializer.data` for Browsable API rendering when provided invalid `data` [5646][gh5646] * Docs: Note AutoSchema limitations on bare APIView [5649][gh5649] * Add `.basename` and `.reverse_action()` to ViewSet [5648][gh5648] * Docs: Fix typos in serializers documentation [5652][gh5652] * Fix `override_settings` compat [5668][gh5668] * Add DEFAULT_SCHEMA_CLASS setting [5658][gh5658] * Add docs note re generated BooleanField being `required=False` [5665][gh5665] * Add 'dist' build [5656][gh5656] * Fix typo in docstring [5678][gh5678] * Docs: Add `UNAUTHENTICATED_USER = None` note [5679][gh5679] * Update OPTIONS example from “Documenting Your API” [5680][gh5680] * Docs: Add note on object permissions for FBVs [5681][gh5681] * Docs: Add example to `to_representation` docs [5682][gh5682] * Add link to Classy DRF in docs [5683][gh5683] * Document ViewSet.action [5685][gh5685] * Fix schema docs typo [5687][gh5687] * Fix URL pattern parsing in schema generation [5689][gh5689] * Add example using `source=‘*’` to custom field docs. [5688][gh5688] * Fix format_suffix_patterns behavior with Django 2 path() routes [5691][gh5691] ``` ### 3.7.3 ``` **Date**: [6th November 2017][3.7.3-milestone] * Fix `AppRegistryNotReady` error from contrib.auth view imports [5567][gh5567] ``` ### 3.7.2 ``` **Date**: [6th November 2017][3.7.2-milestone] * Fixed Django 2.1 compatibility due to removal of django.contrib.auth.login()/logout() views. [5510][gh5510] * Add missing import for TextLexer. [5512][gh5512] * Adding examples and documentation for caching [5514][gh5514] * Include date and date-time format for schema generation [5511][gh5511] * Use triple backticks for markdown code blocks [5513][gh5513] * Interactive docs - make bottom sidebar items sticky [5516][gh5516] * Clarify pagination system check [5524][gh5524] * Stop JSONBoundField mangling invalid JSON [5527][gh5527] * Have JSONField render as textarea in Browsable API [5530][gh5530] * Schema: Exclude OPTIONS/HEAD for ViewSet actions [5532][gh5532] * Fix ordering for dotted sources [5533][gh5533] * Fix: Fields with `allow_null=True` should imply a default serialization value [5518][gh5518] * Ensure Location header is strictly a 'str', not subclass. [5544][gh5544] * Add import to example in api-guide/parsers [5547][gh5547] * Catch OverflowError for "out of range" datetimes [5546][gh5546] * Add djangorestframework-rapidjson to third party packages [5549][gh5549] * Increase test coverage for `drf_create_token` command [5550][gh5550] * Add trove classifier for Python 3.6 support. [5555][gh5555] * Add pip cache support to the Travis CI configuration [5556][gh5556] * Rename [`wheel`] section to [`bdist_wheel`] as the former is legacy [5557][gh5557] * Fix invalid escape sequence deprecation warnings [5560][gh5560] * Add interactive docs error template [5548][gh5548] * Add rounding parameter to DecimalField [5562][gh5562] * Fix all BytesWarning caught during tests [5561][gh5561] * Use dict and set literals instead of calls to dict() and set() [5559][gh5559] * Change ImageField validation pattern, use validators from DjangoImageField [5539][gh5539] * Fix processing unicode symbols in query_string by Python 2 [5552][gh5552] ``` ### 3.7.1 ``` **Date**: [16th October 2017][3.7.1-milestone] * Fix Interactive documentation always uses false for boolean fields in requests [5492][gh5492] * Improve compatibility with Django 2.0 alpha. [5500][gh5500] [5503][gh5503] * Improved handling of schema naming collisions [5486][gh5486] * Added additional docs and tests around providing a default value for dotted `source` fields [5489][gh5489] ``` ### 3.7.0 ``` **Date**: [6th October 2017][3.7.0-milestone] * 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] * Deprecated `exclude_from_schema` on `APIView` and `api_view` decorator. Set `schema = None` or `schema(None)` as appropriate. [5422][gh5422] * Timezone-aware `DateTimeField`s now respect active or default `timezone` during serialization, instead of always using UTC. [5435][gh5435] Resolves inconsistency whereby instances were serialised with supplied datetime for `create` but UTC for `retrieve`. [3732][gh3732] **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. * Removed DjangoFilterBackend inline with deprecation policy. Use `django_filters.rest_framework.FilterSet` and/or `django_filters.rest_framework.DjangoFilterBackend` instead. [5273][gh5273] * Don't strip microseconds from `time` when encoding. Makes consistent with `datetime`. **BC Change**: Previously only milliseconds were encoded. [5440][gh5440] * Added `STRICT_JSON` setting (default `True`) to raise exception for the extended float values (`nan`, `inf`, `-inf`) accepted by Python's `json` module. **BC Change**: Previously these values would converted to corresponding strings. Set `STRICT_JSON` to `False` to restore the previous behaviour. [5265][gh5265] * Add support for `page_size` parameter in CursorPaginator class [5250][gh5250] * Make `DEFAULT_PAGINATION_CLASS` `None` by default. **BC Change**: If your were **just** setting `PAGE_SIZE` to enable pagination you will need to add `DEFAULT_PAGINATION_CLASS`. 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] * Catch `APIException` from `get_serializer_fields` in schema generation. [5443][gh5443] * Allow custom authentication and permission classes when using `include_docs_urls` [5448][gh5448] * Defer translated string evaluation on validators. [5452][gh5452] * Added default value for 'detail' param into 'ValidationError' exception [5342][gh5342] * Adjust schema get_filter_fields rules to match framework [5454][gh5454] * Updated test matrix to add Django 2.0 and drop Django 1.8 & 1.9 **BC Change**: This removes Django 1.8 and Django 1.9 from Django REST Framework supported versions. [5457][gh5457] * Fixed a deprecation warning in serializers.ModelField [5058][gh5058] * Added a more explicit error message when `get_queryset` returned `None` [5348][gh5348] * Fix docs for Response `data` description [5361][gh5361] * Fix __pycache__/.pyc excludes when packaging [5373][gh5373] * Fix default value handling for dotted sources [5375][gh5375] * Ensure content_type is set when passing empty body to RequestFactory [5351][gh5351] * Fix ErrorDetail Documentation [5380][gh5380] * Allow optional content in the generic content form [5372][gh5372] * Updated supported values for the NullBooleanField [5387][gh5387] * Fix ModelSerializer custom named fields with source on model [5388][gh5388] * Fixed the MultipleFieldLookupMixin documentation example to properly check for object level permission [5398][gh5398] * Update get_object() example in permissions.md [5401][gh5401] * Fix authtoken management command [5415][gh5415] * Fix schema generation markdown [5421][gh5421] * Allow `ChoiceField.choices` to be set dynamically [5426][gh5426] * Add the project layout to the quickstart [5434][gh5434] * Reuse 'apply_markdown' function in 'render_markdown' templatetag [5469][gh5469] * Added links to `drf-openapi` package in docs [5470][gh5470] * Added docstrings code highlighting with pygments [5462][gh5462] * Fixed documentation rendering for views named `data` [5472][gh5472] * Docs: Clarified 'to_internal_value()' validation behavior [5466][gh5466] * Fix missing six.text_type() call on APIException.__str__ [5476][gh5476] * Document documentation.py [5478][gh5478] * Fix naming collisions in Schema Generation [5464][gh5464] * Call Django's authenticate function with the request object [5295][gh5295] * Update coreapi JS to 0.1.1 [5479][gh5479] * Have `is_list_view` recognise RetrieveModel… views [5480][gh5480] * Remove Django 1.8 & 1.9 compatibility code [5481][gh5481] * Remove deprecated schema code from DefaultRouter [5482][gh5482] * Refactor schema generation to allow per-view customisation. **BC Change**: `SchemaGenerator.get_serializer_fields` has been refactored as `AutoSchema.get_serializer_fields` and drops the `view` argument [5354][gh5354] 3.6.x series ```
Links - PyPI: https://pypi.org/project/djangorestframework - Changelog: https://pyup.io/changelogs/djangorestframework/ - Homepage: http://www.django-rest-framework.org
pyup-bot commented 6 years ago

Closing this in favor of #596