diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2021-05-07 18:20:14 +0100 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-05-12 14:42:17 +0200 |
| commit | 29e4ccb1a2d5aab21fbd7effcd48d33dc73f9b1e (patch) | |
| tree | b0f37a5325bc5793bd1adc989b62b2ad86a6ecb7 /django | |
| parent | 46346f8ea08020d503b25472a26b949a5ce980a6 (diff) | |
Fixed #32738 -- Deprecated django.utils.datetime_safe module.
Diffstat (limited to 'django')
| -rw-r--r-- | django/utils/datetime_safe.py | 8 |
1 files changed, 8 insertions, 0 deletions
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): |
