mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 02:24:03 +03:00
Drop deprecated AutoSchema._get_reference method
As well the unused RemovedInDRF316Warning
This commit is contained in:
parent
61e33761eb
commit
10ea334096
|
@ -23,9 +23,5 @@ HTTP_HEADER_ENCODING = 'iso-8859-1'
|
|||
ISO_8601 = 'iso-8601'
|
||||
|
||||
|
||||
class RemovedInDRF316Warning(DeprecationWarning):
|
||||
pass
|
||||
|
||||
|
||||
class RemovedInDRF317Warning(PendingDeprecationWarning):
|
||||
pass
|
||||
|
|
|
@ -11,9 +11,7 @@ from django.core.validators import (
|
|||
from django.db import models
|
||||
from django.utils.encoding import force_str
|
||||
|
||||
from rest_framework import (
|
||||
RemovedInDRF316Warning, exceptions, renderers, serializers
|
||||
)
|
||||
from rest_framework import exceptions, renderers, serializers
|
||||
from rest_framework.compat import inflection, uritemplate
|
||||
from rest_framework.fields import _UnvalidatedField, empty
|
||||
from rest_framework.settings import api_settings
|
||||
|
@ -721,11 +719,3 @@ class AutoSchema(ViewInspector):
|
|||
path = path[1:]
|
||||
|
||||
return [path.split('/')[0].replace('_', '-')]
|
||||
|
||||
def _get_reference(self, serializer):
|
||||
warnings.warn(
|
||||
"Method `_get_reference()` has been renamed to `get_reference()`. "
|
||||
"The old name will be removed in DRF v3.16.",
|
||||
RemovedInDRF316Warning, stacklevel=2
|
||||
)
|
||||
return self.get_reference(serializer)
|
||||
|
|
Loading…
Reference in New Issue
Block a user