From 29e4ccb1a2d5aab21fbd7effcd48d33dc73f9b1e Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Fri, 7 May 2021 18:20:14 +0100 Subject: Fixed #32738 -- Deprecated django.utils.datetime_safe module. --- django/utils/datetime_safe.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'django/utils') diff --git a/django/utils/datetime_safe.py b/django/utils/datetime_safe.py index c732f29ef1..e06887b706 100644 --- a/django/utils/datetime_safe.py +++ b/django/utils/datetime_safe.py @@ -8,10 +8,18 @@ # '0010/08/02 was a Monday' import time +import warnings from datetime import date as real_date, datetime as real_datetime +from django.utils.deprecation import RemovedInDjango50Warning from django.utils.regex_helper import _lazy_re_compile +warnings.warn( + 'The django.utils.datetime_safe module is deprecated.', + category=RemovedInDjango50Warning, + stacklevel=2, +) + class date(real_date): def strftime(self, fmt): -- cgit v1.3