55from django .db import models
66from django .utils .encoding import force_str
77
8- from rest_framework import RemovedInDRF314Warning , exceptions , serializers
8+ from rest_framework import RemovedInDRF315Warning , exceptions , serializers
99from rest_framework .compat import coreapi , coreschema , uritemplate
1010from rest_framework .settings import api_settings
1111
@@ -119,7 +119,7 @@ class SchemaGenerator(BaseSchemaGenerator):
119119 def __init__ (self , title = None , url = None , description = None , patterns = None , urlconf = None , version = None ):
120120 assert coreapi , '`coreapi` must be installed for schema support.'
121121 if coreapi is not None :
122- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.14 ' , RemovedInDRF314Warning )
122+ warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.15 ' , RemovedInDRF315Warning )
123123 assert coreschema , '`coreschema` must be installed for schema support.'
124124
125125 super (SchemaGenerator , self ).__init__ (title , url , description , patterns , urlconf )
@@ -350,7 +350,7 @@ def __init__(self, manual_fields=None):
350350 """
351351 super (AutoSchema , self ).__init__ ()
352352 if coreapi is not None :
353- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.14 ' , RemovedInDRF314Warning )
353+ warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.15 ' , RemovedInDRF315Warning )
354354 if manual_fields is None :
355355 manual_fields = []
356356 self ._manual_fields = manual_fields
@@ -593,7 +593,7 @@ def __init__(self, fields, description='', encoding=None):
593593 """
594594 super (ManualSchema , self ).__init__ ()
595595 if coreapi is not None :
596- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.14 ' , RemovedInDRF314Warning )
596+ warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.15 ' , RemovedInDRF315Warning )
597597 assert all (isinstance (f , coreapi .Field ) for f in fields ), "`fields` must be a list of coreapi.Field instances"
598598 self ._fields = fields
599599 self ._description = description
@@ -616,5 +616,5 @@ def get_link(self, path, method, base_url):
616616def is_enabled ():
617617 """Is CoreAPI Mode enabled?"""
618618 if coreapi is not None :
619- warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.14 ' , RemovedInDRF314Warning )
619+ warnings .warn ('CoreAPI compatibility is deprecated and will be removed in DRF 3.15 ' , RemovedInDRF315Warning )
620620 return issubclass (api_settings .DEFAULT_SCHEMA_CLASS , AutoSchema )
0 commit comments