diff --git a/rest_framework/filters.py b/rest_framework/filters.py index 709225364..3586de22a 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -3,7 +3,6 @@ Provides generic filtering backends that can be used to filter the results returned by list views. """ import operator -import warnings from functools import reduce from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured @@ -14,8 +13,6 @@ from django.utils.encoding import force_str from django.utils.text import smart_split, unescape_string_literal from django.utils.translation import gettext_lazy as _ -from rest_framework import RemovedInDRF317Warning -from rest_framework.compat import coreapi, coreschema from rest_framework.fields import CharField from rest_framework.settings import api_settings @@ -256,9 +253,9 @@ class OrderingFilter(BaseFilterBackend): (field.source.replace('.', '__') or field_name, field.label) for field_name, field in serializer_class(context=context).fields.items() if ( - not getattr(field, 'write_only', False) and - not field.source == '*' and - field.source not in model_property_names + not getattr(field, 'write_only', False) and + not field.source == '*' and + field.source not in model_property_names ) ] diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index fbd47f9f4..164d7c2f8 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -4,7 +4,6 @@ be used for paginated responses. """ import contextlib -import warnings from base64 import b64decode, b64encode from collections import namedtuple from urllib import parse @@ -15,8 +14,6 @@ from django.template import loader from django.utils.encoding import force_str from django.utils.translation import gettext_lazy as _ -from rest_framework import RemovedInDRF317Warning -from rest_framework.compat import coreapi, coreschema from rest_framework.exceptions import NotFound from rest_framework.response import Response from rest_framework.settings import api_settings diff --git a/rest_framework/schemas/coreapi.py b/rest_framework/schemas/coreapi.py index 648008b7a..2733e4fdd 100644 --- a/rest_framework/schemas/coreapi.py +++ b/rest_framework/schemas/coreapi.py @@ -1,17 +1,10 @@ -import warnings from collections import Counter -from urllib import parse from django.db import models from django.utils.encoding import force_str -from rest_framework import RemovedInDRF317Warning, exceptions, serializers -from rest_framework.compat import coreapi, coreschema, uritemplate -from rest_framework.settings import api_settings - -from .generators import BaseSchemaGenerator -from .inspectors import ViewInspector -from .utils import get_pk_description, is_list_view +from rest_framework import serializers +from rest_framework.compat import coreschema def common_path(paths): @@ -186,6 +179,3 @@ def field_to_schema(field): ) return coreschema.String(title=title, description=description) - - -å