diff --git a/rest_framework/__init__.py b/rest_framework/__init__.py index 4bd5bdbdab..bc16b221b2 100644 --- a/rest_framework/__init__.py +++ b/rest_framework/__init__.py @@ -23,7 +23,7 @@ ISO_8601 = 'iso-8601' -class RemovedInDRF315Warning(DeprecationWarning): +class RemovedInDRF316Warning(DeprecationWarning): pass diff --git a/rest_framework/schemas/openapi.py b/rest_framework/schemas/openapi.py index 38031e646d..f35106fe5a 100644 --- a/rest_framework/schemas/openapi.py +++ b/rest_framework/schemas/openapi.py @@ -12,7 +12,7 @@ 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 @@ def get_tags(self, path, method): 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) diff --git a/tests/test_fields.py b/tests/test_fields.py index 9ac84dd210..4306817634 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -1633,7 +1633,7 @@ def test_should_render_date_time_in_default_timezone(self): 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.