diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py index d812e657c..568e08074 100644 --- a/rest_framework/__init__.py +++ b/rest_framework/__init__.py @@ -35,3 +35,7 @@ class RemovedInDRF313Warning(DeprecationWarning): class RemovedInDRF314Warning(PendingDeprecationWarning): pass + + +class RemovedInDRF315Warning(PendingDeprecationWarning): + pass diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 122846376..c0b51e406 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -13,7 +13,8 @@ from django.db import models from django.utils.encoding import force_str from rest_framework import ( - RemovedInDRF314Warning, exceptions, renderers, serializers + RemovedInDRF314Warning, RemovedInDRF315Warning, exceptions, renderers, + serializers ) from rest_framework.compat import uritemplate from rest_framework.fields import _UnvalidatedField, empty @@ -812,7 +813,7 @@ class AutoSchema(ViewInspector): 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.14.", - RemovedInDRF314Warning, stacklevel=2 + "The old name will be removed in DRF v3.15.", + RemovedInDRF315Warning, stacklevel=2 ) return self.get_reference(serializer)