5
5
from django .db import models
6
6
from django .utils .encoding import force_str
7
7
8
- from rest_framework import RemovedInDRF314Warning , exceptions , serializers
8
+ from rest_framework import RemovedInDRF315Warning , exceptions , serializers
9
9
from rest_framework .compat import coreapi , coreschema , uritemplate
10
10
from rest_framework .settings import api_settings
11
11
@@ -119,7 +119,7 @@ class SchemaGenerator(BaseSchemaGenerator):
119
119
def __init__ (self , title = None , url = None , description = None , patterns = None , urlconf = None , version = None ):
120
120
assert coreapi , '`coreapi` must be installed for schema support.'
121
121
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 )
123
123
assert coreschema , '`coreschema` must be installed for schema support.'
124
124
125
125
super (SchemaGenerator , self ).__init__ (title , url , description , patterns , urlconf )
@@ -350,7 +350,7 @@ def __init__(self, manual_fields=None):
350
350
"""
351
351
super (AutoSchema , self ).__init__ ()
352
352
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 )
354
354
if manual_fields is None :
355
355
manual_fields = []
356
356
self ._manual_fields = manual_fields
@@ -593,7 +593,7 @@ def __init__(self, fields, description='', encoding=None):
593
593
"""
594
594
super (ManualSchema , self ).__init__ ()
595
595
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 )
597
597
assert all (isinstance (f , coreapi .Field ) for f in fields ), "`fields` must be a list of coreapi.Field instances"
598
598
self ._fields = fields
599
599
self ._description = description
@@ -616,5 +616,5 @@ def get_link(self, path, method, base_url):
616
616
def is_enabled ():
617
617
"""Is CoreAPI Mode enabled?"""
618
618
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 )
620
620
return issubclass (api_settings .DEFAULT_SCHEMA_CLASS , AutoSchema )
0 commit comments