diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-09 09:52:26 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-01-17 11:49:15 +0100 |
| commit | 2fad1632571af551d6065d7eced93ffe93a8a945 (patch) | |
| tree | b926abed87ff568f36f42c18758a6cb56711f2a0 /django/utils/timezone.py | |
| parent | e6f82438d4e3750e8d299bfd79dac98eebe9f1e0 (diff) | |
Refs #32365 -- Removed is_dst argument for various methods and functions.
Per deprecation timeline.
Diffstat (limited to 'django/utils/timezone.py')
| -rw-r--r-- | django/utils/timezone.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/django/utils/timezone.py b/django/utils/timezone.py index 73813fa20e..eff91667ec 100644 --- a/django/utils/timezone.py +++ b/django/utils/timezone.py @@ -37,9 +37,6 @@ __all__ = [ # noqa for utc RemovedInDjango50Warning. "make_naive", ] -# RemovedInDjango50Warning: sentinel for deprecation of is_dst parameters. -NOT_PASSED = object() - def __getattr__(name): if name != "utc": @@ -259,17 +256,8 @@ def is_naive(value): return value.utcoffset() is None -def make_aware(value, timezone=None, is_dst=NOT_PASSED): +def make_aware(value, timezone=None): """Make a naive datetime.datetime in a given time zone aware.""" - if is_dst is NOT_PASSED: - is_dst = None - else: - warnings.warn( - "The is_dst argument to make_aware(), used by the Trunc() " - "database functions and QuerySet.datetimes(), is deprecated as it " - "has no effect with zoneinfo time zones.", - RemovedInDjango50Warning, - ) if timezone is None: timezone = get_current_timezone() # Check that we won't overwrite the timezone of an aware datetime. |
