mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 02:24:03 +03:00
Update deprecation hints
This commit is contained in:
parent
d38aab39e4
commit
d58b8da591
|
@ -23,7 +23,7 @@ HTTP_HEADER_ENCODING = 'iso-8859-1'
|
|||
ISO_8601 = 'iso-8601'
|
||||
|
||||
|
||||
class RemovedInDRF315Warning(DeprecationWarning):
|
||||
class RemovedInDRF316Warning(DeprecationWarning):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ from django.db import models
|
|||
from django.utils.encoding import force_str
|
||||
|
||||
from rest_framework import (
|
||||
RemovedInDRF315Warning, exceptions, renderers, serializers
|
||||
RemovedInDRF316Warning, exceptions, renderers, serializers
|
||||
)
|
||||
from rest_framework.compat import inflection, uritemplate
|
||||
from rest_framework.fields import _UnvalidatedField, empty
|
||||
|
@ -725,7 +725,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.15.",
|
||||
RemovedInDRF315Warning, stacklevel=2
|
||||
"The old name will be removed in DRF v3.16.",
|
||||
RemovedInDRF316Warning, stacklevel=2
|
||||
)
|
||||
return self.get_reference(serializer)
|
||||
|
|
|
@ -1633,7 +1633,7 @@ class TestCustomTimezoneForDateTimeField(TestCase):
|
|||
assert rendered_date == rendered_date_in_timezone
|
||||
|
||||
|
||||
@pytest.mark.skipif(pytz is None, reason="As Django 4.0 has deprecated pytz, this test should eventually be able to get removed.")
|
||||
@pytest.mark.skipif(pytz is None, reason="Django 5.0 has removed pytz; this test should eventually be able to get removed.")
|
||||
class TestPytzNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues):
|
||||
"""
|
||||
Invalid values for `DateTimeField` with datetime in DST shift (non-existing or ambiguous) and timezone with DST.
|
||||
|
|
Loading…
Reference in New Issue
Block a user