summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/database-functions.txt44
-rw-r--r--docs/ref/models/querysets.txt10
-rw-r--r--docs/ref/utils.txt27
3 files changed, 14 insertions, 67 deletions
diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt
index 71c98fd73e..78239be2f5 100644
--- a/docs/ref/models/database-functions.txt
+++ b/docs/ref/models/database-functions.txt
@@ -503,7 +503,7 @@ Usage example::
``Trunc``
---------
-.. class:: Trunc(expression, kind, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: Trunc(expression, kind, output_field=None, tzinfo=None, **extra)
Truncates a date up to a significant component.
@@ -521,14 +521,6 @@ value. If ``output_field`` is omitted, it will default to the ``output_field``
of ``expression``. A ``tzinfo`` subclass, usually provided by :mod:`zoneinfo`,
can be passed to truncate a value in a specific timezone.
-.. deprecated:: 4.0
-
- The ``is_dst`` parameter indicates whether or not ``pytz`` should interpret
- nonexistent and ambiguous datetimes in daylight saving time. By default
- (when ``is_dst=None``), ``pytz`` raises an exception for such datetimes.
-
- The ``is_dst`` parameter is deprecated and will be removed in Django 5.0.
-
Given the datetime ``2015-06-15 14:30:50.000321+00:00``, the built-in ``kind``\s
return:
@@ -594,28 +586,24 @@ Usage example::
``DateField`` truncation
~~~~~~~~~~~~~~~~~~~~~~~~
-.. class:: TruncYear(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncYear(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'year'
-.. class:: TruncMonth(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncMonth(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'month'
-.. class:: TruncWeek(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncWeek(expression, output_field=None, tzinfo=None, **extra)
Truncates to midnight on the Monday of the week.
.. attribute:: kind = 'week'
-.. class:: TruncQuarter(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncQuarter(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'quarter'
-.. deprecated:: 4.0
-
- The ``is_dst`` parameter is deprecated and will be removed in Django 5.0.
-
These are logically equivalent to ``Trunc('date_field', kind)``. They truncate
all parts of the date up to ``kind`` which allows grouping or filtering dates
with less precision. ``expression`` can have an ``output_field`` of either
@@ -675,26 +663,22 @@ truncate function. It's also registered as a transform on ``DateTimeField`` as
truncate function. It's also registered as a transform on ``DateTimeField`` as
``__time``.
-.. class:: TruncDay(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncDay(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'day'
-.. class:: TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'hour'
-.. class:: TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncMinute(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'minute'
-.. class:: TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncSecond(expression, output_field=None, tzinfo=None, **extra)
.. attribute:: kind = 'second'
-.. deprecated:: 4.0
-
- The ``is_dst`` parameter is deprecated and will be removed in Django 5.0.
-
These are logically equivalent to ``Trunc('datetime_field', kind)``. They
truncate all parts of the date up to ``kind`` and allow grouping or filtering
datetimes with less precision. ``expression`` must have an ``output_field`` of
@@ -728,25 +712,21 @@ Usage example::
``TimeField`` truncation
~~~~~~~~~~~~~~~~~~~~~~~~
-.. class:: TruncHour(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncHour(expression, output_field=None, tzinfo=None, **extra)
:noindex:
.. attribute:: kind = 'hour'
-.. class:: TruncMinute(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncMinute(expression, output_field=None, tzinfo=None, **extra)
:noindex:
.. attribute:: kind = 'minute'
-.. class:: TruncSecond(expression, output_field=None, tzinfo=None, is_dst=None, **extra)
+.. class:: TruncSecond(expression, output_field=None, tzinfo=None, **extra)
:noindex:
.. attribute:: kind = 'second'
-.. deprecated:: 4.0
-
- The ``is_dst`` parameter is deprecated and will be removed in Django 5.0.
-
These are logically equivalent to ``Trunc('time_field', kind)``. They truncate
all parts of the time up to ``kind`` which allows grouping or filtering times
with less precision. ``expression`` can have an ``output_field`` of either
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt
index e3ce38066e..4a1836ba14 100644
--- a/docs/ref/models/querysets.txt
+++ b/docs/ref/models/querysets.txt
@@ -837,7 +837,7 @@ Examples::
``datetimes()``
~~~~~~~~~~~~~~~
-.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None, is_dst=None)
+.. method:: datetimes(field_name, kind, order='ASC', tzinfo=None)
Returns a ``QuerySet`` that evaluates to a list of :class:`datetime.datetime`
objects representing all available dates of a particular kind within the
@@ -859,14 +859,6 @@ object. If it's ``None``, Django uses the :ref:`current time zone
<default-current-time-zone>`. It has no effect when :setting:`USE_TZ` is
``False``.
-``is_dst`` indicates whether or not ``pytz`` should interpret nonexistent and
-ambiguous datetimes in daylight saving time. By default (when ``is_dst=None``),
-``pytz`` raises an exception for such datetimes.
-
-.. deprecated:: 4.0
-
- The ``is_dst`` parameter is deprecated and will be removed in Django 5.0.
-
.. _database-time-zone-definitions:
.. note::
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index de7f0d1259..2a8a8357fb 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -972,38 +972,13 @@ appropriate entities.
Returns ``True`` if ``value`` is naive, ``False`` if it is aware. This
function assumes that ``value`` is a :class:`~datetime.datetime`.
-.. function:: make_aware(value, timezone=None, is_dst=None)
+.. function:: make_aware(value, timezone=None)
Returns an aware :class:`~datetime.datetime` that represents the same
point in time as ``value`` in ``timezone``, ``value`` being a naive
:class:`~datetime.datetime`. If ``timezone`` is set to ``None``, it
defaults to the :ref:`current time zone <default-current-time-zone>`.
- .. deprecated:: 4.0
-
- When using ``pytz``, the ``pytz.AmbiguousTimeError`` exception is
- raised if you try to make ``value`` aware during a DST transition where
- the same time occurs twice (when reverting from DST). Setting
- ``is_dst`` to ``True`` or ``False`` will avoid the exception by
- choosing if the time is pre-transition or post-transition respectively.
-
- When using ``pytz``, the ``pytz.NonExistentTimeError`` exception is
- raised if you try to make ``value`` aware during a DST transition such
- that the time never occurred. For example, if the 2:00 hour is skipped
- during a DST transition, trying to make 2:30 aware in that time zone
- will raise an exception. To avoid that you can use ``is_dst`` to
- specify how ``make_aware()`` should interpret such a nonexistent time.
- If ``is_dst=True`` then the above time would be interpreted as 2:30 DST
- time (equivalent to 1:30 local time). Conversely, if ``is_dst=False``
- the time would be interpreted as 2:30 standard time (equivalent to 3:30
- local time).
-
- The ``is_dst`` parameter has no effect when using non-``pytz`` timezone
- implementations.
-
- The ``is_dst`` parameter is deprecated and will be removed in Django
- 5.0.
-
.. function:: make_naive(value, timezone=None)
Returns a naive :class:`~datetime.datetime` that represents in