Removed versionadded/changed annotations for 3.1.

This commit is contained in:
Mariusz Felisiak 2021-01-05 11:20:50 +01:00
parent 8774b1144c
commit b7dd89ed53
45 changed files with 0 additions and 392 deletions

View file

@ -93,15 +93,6 @@ Django's system checks are organized using the following tags:
Some checks may be registered with multiple tags.
.. versionchanged:: 3.1
The ``async_support`` tag was added.
.. versionchanged:: 3.1
The ``database`` checks are now run only for database aliases specified
using the :option:`check --database` option.
.. versionchanged:: 3.2
The ``sites`` tag was added.
@ -112,8 +103,6 @@ Core system checks
Asynchronous support
--------------------
.. versionadded:: 3.1
The following checks verify your setup for :doc:`/topics/async`:
* **async.E001**: You should not set the :envvar:`DJANGO_ALLOW_ASYNC_UNSAFE`

View file

@ -40,12 +40,6 @@ If you're not using the default project template, here are the requirements:
the ``'context_processors'`` option of :setting:`OPTIONS
<TEMPLATES-OPTIONS>`.
.. versionchanged:: 3.1
``django.template.context_processors.request`` was added as a
requirement in the ``'context_processors'`` option to support the new
:attr:`.AdminSite.enable_nav_sidebar`.
#. If you've customized the :setting:`MIDDLEWARE` setting,
:class:`django.contrib.auth.middleware.AuthenticationMiddleware` and
:class:`django.contrib.messages.middleware.MessageMiddleware` must be
@ -1042,10 +1036,6 @@ subclass::
The :class:`~django.contrib.contenttypes.fields.GenericForeignKey`
field is not supported.
.. versionadded:: 3.1
The ``EmptyFieldListFilter`` class was added.
List filter's typically appear only if the filter has more than one choice.
A filter's ``has_output()`` method controls whether or not it appears.
@ -2230,10 +2220,6 @@ To avoid conflicts with user-supplied scripts or libraries, Django's jQuery
in your own admin JavaScript without including a second copy, you can use the
``django.jQuery`` object on changelist and add/edit views.
.. versionchanged:: 3.1
jQuery was upgraded from 3.4.1 to 3.5.1.
The :class:`ModelAdmin` class requires jQuery by default, so there is no need
to add jQuery to your ``ModelAdmin``s list of media resources unless you have
a specific need. For example, if you require the jQuery library to be in the
@ -2953,8 +2939,6 @@ Templates can override or extend base admin templates as described in
.. attribute:: AdminSite.enable_nav_sidebar
.. versionadded:: 3.1
A boolean value that determines whether to show the navigation sidebar
on larger screens. By default, it is set to ``True``.

View file

@ -40,10 +40,6 @@ Fields
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150
characters or fewer.
.. versionchanged:: 3.1
The ``max_length`` increased from 30 to 150 characters.
.. attribute:: last_name
Optional (:attr:`blank=True <django.db.models.Field.blank>`). 150

View file

@ -83,10 +83,6 @@ Keyword Argument Description
Oracle.
===================== =====================================================
.. versionchanged:: 3.1
Oracle support was added.
``AsGML``
=========
@ -144,10 +140,6 @@ Keyword Argument Description
__ https://developers.google.com/kml/documentation/
.. versionchanged:: 3.1
The undocumented ``version`` parameter was removed.
``AsSVG``
=========
@ -177,8 +169,6 @@ __ https://www.w3.org/Graphics/SVG/
.. class:: AsWKB(expression, **extra)
.. versionadded:: 3.1
*Availability*: MariaDB, `MySQL
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-asbinary>`__,
Oracle, `PostGIS <https://postgis.net/docs/ST_AsBinary.html>`__, SpatiaLite
@ -198,8 +188,6 @@ __ https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well
.. class:: AsWKT(expression, **extra)
.. versionadded:: 3.1
*Availability*: MariaDB, `MySQL
<https://dev.mysql.com/doc/refman/en/gis-format-conversion-functions.html#function_st-astext>`__,
Oracle, `PostGIS <https://postgis.net/docs/ST_AsText.html>`__, SpatiaLite

View file

@ -439,10 +439,6 @@ PostGIS SQL equivalent:
SELECT ... WHERE ST_Relate(poly, ST_Polygon(rast, 1), 'T*T***FF*')
SELECT ... WHERE ST_Relate(ST_Polygon(rast, 2), ST_Polygon(rast, 1), 'T*T***FF*')
.. versionchanged:: 3.1
MariaDB support was added.
Oracle
~~~~~~

View file

@ -729,8 +729,6 @@ Other Properties & Methods
.. attribute:: is_counterclockwise
.. versionadded:: 3.1
Returns whether this ``LinearRing`` is counterclockwise.
``Polygon``

View file

@ -78,10 +78,6 @@ e.g. with the ``'de'`` language:
* ``1200000000`` becomes ``'1,2 Milliarden'``.
* ``-1200000000`` becomes ``'-1,2 Milliarden'``.
.. versionchanged:: 3.1
Support for negative integers was added.
.. templatefilter:: naturalday
``naturalday``

View file

@ -79,8 +79,6 @@ These conditions have the same database restrictions as
.. attribute:: ExclusionConstraint.deferrable
.. versionadded:: 3.1
Set this parameter to create a deferrable exclusion constraint. Accepted values
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::

View file

@ -686,14 +686,6 @@ The ``contained_by`` lookup is also available on the non-range field types:
... )
<QuerySet [<Event: Soft play>]>
.. versionchanged:: 3.1
Support for :class:`~django.db.models.SmallAutoField`,
:class:`~django.db.models.AutoField`,
:class:`~django.db.models.BigAutoField`,
:class:`~django.db.models.SmallIntegerField`, and
:class:`~django.db.models.DecimalField` was added.
.. fieldlookup:: rangefield.overlap
``overlap``
@ -813,8 +805,6 @@ Returned objects are empty ranges. Can be chained to valid lookups for a
``lower_inc``
^^^^^^^^^^^^^
.. versionadded:: 3.1
Returns objects that have inclusive or exclusive lower bounds, depending on the
boolean value passed. Can be chained to valid lookups for a
:class:`~django.db.models.BooleanField`.
@ -827,8 +817,6 @@ boolean value passed. Can be chained to valid lookups for a
``lower_inf``
^^^^^^^^^^^^^
.. versionadded:: 3.1
Returns objects that have unbounded (infinite) or bounded lower bound,
depending on the boolean value passed. Can be chained to valid lookups for a
:class:`~django.db.models.BooleanField`.
@ -841,8 +829,6 @@ depending on the boolean value passed. Can be chained to valid lookups for a
``upper_inc``
^^^^^^^^^^^^^
.. versionadded:: 3.1
Returns objects that have inclusive or exclusive upper bounds, depending on the
boolean value passed. Can be chained to valid lookups for a
:class:`~django.db.models.BooleanField`.
@ -855,8 +841,6 @@ boolean value passed. Can be chained to valid lookups for a
``upper_inf``
^^^^^^^^^^^^^
.. versionadded:: 3.1
Returns objects that have unbounded (infinite) or bounded upper bound,
depending on the boolean value passed. Can be chained to valid lookups for a
:class:`~django.db.models.BooleanField`.

View file

@ -12,8 +12,6 @@ available from the ``django.contrib.postgres.indexes`` module.
.. class:: BloomIndex(*expressions, length=None, columns=(), **options)
.. versionadded:: 3.1
Creates a bloom_ index.
To use this index access you need to activate the bloom_ extension on

View file

@ -61,8 +61,6 @@ them. In that case, connect to your Django database and run the query
.. class:: BloomExtension()
.. versionadded:: 3.1
Installs the ``bloom`` extension.
``BtreeGinExtension``

View file

@ -35,10 +35,6 @@ query and the vector.
To use the ``search`` lookup, ``'django.contrib.postgres'`` must be in your
:setting:`INSTALLED_APPS`.
.. versionchanged:: 3.1
Support for query expressions was added.
``SearchVector``
================
@ -110,11 +106,6 @@ Examples:
See :ref:`postgresql-fts-search-configuration` for an explanation of the
``config`` parameter.
.. versionchanged:: 3.1
Support for ``'websearch'`` search type and query expressions in
``SearchQuery.value`` were added.
``SearchRank``
==============
@ -159,15 +150,9 @@ normalization options`_.
.. _different rank normalization options: https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-RANKING
.. versionadded:: 3.1
The ``normalization`` and ``cover_density`` parameters were added.
``SearchHeadline``
==================
.. versionadded:: 3.1
.. class:: SearchHeadline(expression, query, config=None, start_sel=None, stop_sel=None, max_words=None, min_words=None, short_word=None, highlight_all=None, max_fragments=None, fragment_delimiter=None)
Accepts a single text field or an expression, a query, a config, and a set of

View file

@ -106,8 +106,6 @@ For example, to perform only models and compatibility checks, run::
.. django-admin-option:: --database DATABASE
.. versionadded:: 3.1
Specifies the database to run checks requiring database access::
django-admin check --database default --database other
@ -226,8 +224,6 @@ Specifies the database onto which to open a shell. Defaults to ``default``.
.. django-admin-option:: -- ARGUMENTS
.. versionadded:: 3.1
Any arguments following a ``--`` divider will be passed on to the underlying
command-line client. For example, with PostgreSQL you can use the ``psql``
command's ``-c`` flag to execute a raw SQL query directly:
@ -914,8 +910,6 @@ content types.
.. django-admin-option:: --check
.. versionadded:: 3.1
Makes ``migrate`` exit with a non-zero status when unapplied migrations are
detected.
@ -1519,8 +1513,6 @@ installed, ``ipdb`` is used instead.
.. django-admin-option:: --buffer, -b
.. versionadded:: 3.1
Discards output (``stdout`` and ``stderr``) for passing tests, in the same way
as :option:`unittest's --buffer option<unittest.-b>`.
@ -1709,8 +1701,6 @@ Specifies the database to use. Defaults to ``default``.
.. django-admin-option:: --include-stale-apps
.. versionadded:: 3.1
Deletes stale content types including ones from previously installed apps that
have been removed from :setting:`INSTALLED_APPS`. Defaults to ``False``.

View file

@ -69,11 +69,6 @@ The ``FileSystemStorage`` class
time of the last metadata change, and on others (like Windows), it's
the creation time of the file.
.. versionchanged:: 3.1
Support for :class:`pathlib.Path` was added to the
``FileSystemStorage.save()`` method.
The ``Storage`` class
=====================

View file

@ -974,8 +974,6 @@ Attributes of ``BoundField``
.. attribute:: BoundField.widget_type
.. versionadded:: 3.1
Returns the lowercased class name of the wrapped field's widget, with any
trailing ``input`` or ``widget`` removed. This may be used when building
forms where the layout is dependent upon the widget type. For example::

View file

@ -514,14 +514,6 @@ For each field, we describe the default widget used if you don't specify
``DATE_INPUT_FORMATS`` keys if localization is enabled. See also
:doc:`format localization </topics/i18n/formatting>`.
.. versionchanged:: 3.1
Support for ISO 8601 date string parsing (including optional timezone)
was added.
The fallback on ``DATE_INPUT_FORMATS`` in the default ``input_formats``
was added.
``DecimalField``
----------------
@ -782,8 +774,6 @@ For each field, we describe the default widget used if you don't specify
.. class:: JSONField(encoder=None, decoder=None, **kwargs)
.. versionadded:: 3.1
A field which accepts JSON encoded data for a
:class:`~django.db.models.JSONField`.
@ -1450,21 +1440,11 @@ customize the yielded 2-tuple choices.
:attr:`ChoiceField.choices`. The first ``value`` element is a
:class:`ModelChoiceIteratorValue` instance.
.. versionchanged:: 3.1
In older versions, the first ``value`` element in the choice tuple
is the ``field`` value itself, rather than a
``ModelChoiceIteratorValue`` instance. In most cases this proxies
transparently but, if you need the ``field`` value itself, use the
:attr:`ModelChoiceIteratorValue.value` attribute instead.
``ModelChoiceIteratorValue``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. class:: ModelChoiceIteratorValue(value, instance)
.. versionadded:: 3.1
Two arguments are required:
.. attribute:: value

View file

@ -336,11 +336,6 @@ foundation for custom widgets.
a hidden ``textarea`` element may want to always return ``False`` to
avoid browser validation on the hidden field.
.. versionchanged:: 3.1
In older versions, ``True`` was returned for
:class:`~django.forms.FileInput` when ``initial`` was set.
``MultiWidget``
---------------
@ -372,10 +367,6 @@ foundation for custom widgets.
>>> widget.render('name', ['john', 'paul'])
'<input type="text" name="name" value="john"><input type="text" name="name_last" value="paul">'
.. versionchanged::3.1
Support for using a dictionary was added.
And one required method:
.. method:: decompress(value)

View file

@ -58,10 +58,6 @@ specifies the check you want the constraint to enforce.
For example, ``CheckConstraint(check=Q(age__gte=18), name='age_gte_18')``
ensures the age field is never less than 18.
.. versionchanged:: 3.1
Support for boolean :class:`~django.db.models.Expression` was added.
``name``
--------
@ -119,8 +115,6 @@ These conditions have the same database restrictions as
.. attribute:: UniqueConstraint.deferrable
.. versionadded:: 3.1
Set this parameter to create a deferrable unique constraint. Accepted values
are ``Deferrable.DEFERRED`` or ``Deferrable.IMMEDIATE``. For example::

View file

@ -336,8 +336,6 @@ Usage example::
.. class:: ExtractIsoWeekDay(expression, tzinfo=None, **extra)
.. versionadded:: 3.1
Returns the ISO-8601 week day with day 1 being Monday and day 7 being
Sunday.

View file

@ -842,10 +842,6 @@ Has two optional arguments:
handles the storage and retrieval of your files. See :doc:`/topics/files`
for details on how to provide this object.
.. versionchanged:: 3.1
The ability to provide a callable was added.
The default form widget for this field is a
:class:`~django.forms.ClearableFileInput`.
@ -1198,8 +1194,6 @@ values are stored as null.
.. class:: JSONField(encoder=None, decoder=None, **options)
.. versionadded:: 3.1
A field for storing JSON encoded data. In Python the data is represented in its
Python native format: dictionaries, lists, strings, numbers, booleans and
``None``.
@ -1276,8 +1270,6 @@ Like :class:`BooleanField` with ``null=True``.
.. class:: PositiveBigIntegerField(**options)
.. versionadded:: 3.1
Like a :class:`PositiveIntegerField`, but only allows values under a certain
(database-dependent) point. Values from ``0`` to ``9223372036854775807`` are
safe in all databases supported by Django.
@ -1579,8 +1571,6 @@ The possible values for :attr:`~ForeignKey.on_delete` are found in
* .. attribute:: RESTRICT
.. versionadded:: 3.1
Prevent deletion of the referenced object by raising
:exc:`~django.db.models.RestrictedError` (a subclass of
:exc:`django.db.IntegrityError`). Unlike :attr:`PROTECT`, deletion of the

View file

@ -803,11 +803,6 @@ For example::
>>> p.get_shirt_size_display()
'Large'
.. versionchanged:: 3.1
Support for :class:`~django.contrib.postgres.fields.ArrayField` and
:class:`~django.contrib.postgres.fields.RangeField` was added.
.. method:: Model.get_next_by_FOO(**kwargs)
.. method:: Model.get_previous_by_FOO(**kwargs)

View file

@ -834,10 +834,6 @@ object. If it's ``None``, Django uses the :ref:`current time zone
ambiguous datetimes in daylight saving time. By default (when ``is_dst=None``),
``pytz`` raises an exception for such datetimes.
.. versionadded:: 3.1
The ``is_dst`` parameter was added.
.. _database-time-zone-definitions:
.. note::
@ -2216,10 +2212,6 @@ normally supports it).
Returns ``objs`` as cast to a list, in the same order as provided.
.. versionchanged:: 3.1
Support for the fetching primary key attributes on MariaDB 10.5+ was added.
``bulk_update()``
~~~~~~~~~~~~~~~~~
@ -2742,11 +2734,6 @@ adverse effects on your database. For example, the ``ANALYZE`` flag supported
by MariaDB, MySQL 8.0.18+, and PostgreSQL could result in changes to data if
there are triggers or if a function is called, even for a ``SELECT`` query.
.. versionchanged:: 3.1
Support for the ``'TREE'`` format on MySQL 8.0.16+ and ``analyze`` option
on MariaDB and MySQL 8.0.18+ were added.
.. _field-lookups:
``Field`` lookups
@ -3273,8 +3260,6 @@ in the database <database-time-zone-definitions>`.
``iso_week_day``
~~~~~~~~~~~~~~~~
.. versionadded:: 3.1
For date and datetime fields, an exact ISO 8601 day of the week match. Allows
chaining additional field lookups.

View file

@ -75,10 +75,6 @@ Related objects reference
dictionary and they will be evaluated once before creating any
intermediate instance(s).
.. versionchanged:: 3.1
``through_defaults`` values can now be callables.
.. method:: create(through_defaults=None, **kwargs)
Creates a new object, saves it and puts it in the related object set.
@ -114,10 +110,6 @@ Related objects reference
needed. You can use callables as values in the ``through_defaults``
dictionary.
.. versionchanged:: 3.1
``through_defaults`` values can now be callables.
.. method:: remove(*objs, bulk=True)
Removes the specified model objects from the related object set::
@ -208,10 +200,6 @@ Related objects reference
dictionary and they will be evaluated once before creating any
intermediate instance(s).
.. versionchanged:: 3.1
``through_defaults`` values can now be callables.
.. note::
Note that ``add()``, ``create()``, ``remove()``, ``clear()``, and

View file

@ -17,10 +17,6 @@ classes live in :source:`django/core/paginator.py`.
A paginator acts like a sequence of :class:`Page` when using ``len()`` or
iterating it directly.
.. versionchanged:: 3.1
Support for iterating over ``Paginator`` was added.
.. attribute:: Paginator.object_list
Required. A list, tuple, ``QuerySet``, or other sliceable object with a

View file

@ -406,8 +406,6 @@ Methods
.. method:: HttpRequest.accepts(mime_type)
.. versionadded:: 3.1
Returns ``True`` if the request ``Accept`` header matches the ``mime_type``
argument::
@ -911,10 +909,6 @@ Methods
.. _HttpOnly: https://owasp.org/www-community/HttpOnly
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
.. versionchanged:: 3.1
Using ``samesite='None'`` (string) was allowed.
.. warning::
:rfc:`RFC 6265 <6265#section-6.1>` states that user agents should
@ -932,10 +926,6 @@ Methods
you will need to remember to pass it to the corresponding
:meth:`HttpRequest.get_signed_cookie` call.
.. versionchanged:: 3.1
Using ``samesite='None'`` (string) was allowed.
.. method:: HttpResponse.delete_cookie(key, path='/', domain=None, samesite=None)
Deletes the cookie with the given key. Fails silently if the key doesn't
@ -945,10 +935,6 @@ Methods
values you used in ``set_cookie()`` -- otherwise the cookie may not be
deleted.
.. versionchanged:: 2.2.15
The ``samesite`` argument was added.
.. method:: HttpResponse.close()
This method is called at the end of the request directly by the WSGI

View file

@ -99,11 +99,6 @@ This validation only applies via :meth:`~django.http.HttpRequest.get_host()`;
if your code accesses the ``Host`` header directly from ``request.META`` you
are bypassing this security protection.
.. versionchanged:: 3.1
If ``ALLOWED_HOSTS`` is empty and ``DEBUG=True``, subdomains of localhost
were allowed.
.. setting:: APPEND_SLASH
``APPEND_SLASH``
@ -387,10 +382,6 @@ cookie from being sent in cross-site requests.
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
.. versionchanged:: 3.1
Setting ``CSRF_COOKIE_SAMESITE = 'None'`` was allowed.
.. setting:: CSRF_COOKIE_SECURE
``CSRF_COOKIE_SECURE``
@ -688,10 +679,6 @@ When :setting:`USE_TZ` is ``False``, it is an error to set this option.
Consider converting to local time explicitly with ``AT TIME ZONE`` in raw SQL
queries instead of setting the ``TIME_ZONE`` option.
.. versionchanged:: 3.1
Using this option when the database backend supports time zones was allowed.
.. setting:: DATABASE-DISABLE_SERVER_SIDE_CURSORS
``DISABLE_SERVER_SIDE_CURSORS``
@ -786,8 +773,6 @@ on :ref:`controlling the creation order of test databases
``MIGRATE``
^^^^^^^^^^^
.. versionadded:: 3.1
Default: ``True``
When set to ``False``, migrations won't run when creating the test database.
@ -1161,10 +1146,6 @@ precedence and will be applied instead.
See also :setting:`DATE_INPUT_FORMATS` and :setting:`TIME_INPUT_FORMATS`.
.. versionchanged:: 3.1
In older versions, the default is a list containing also date-only formats.
.. setting:: DEBUG
``DEBUG``
@ -1272,8 +1253,6 @@ manually specified. Used when constructing the ``Content-Type`` header.
``DEFAULT_EXCEPTION_REPORTER``
------------------------------
.. versionadded:: 3.1
Default: ``'``:class:`django.views.debug.ExceptionReporter`\ ``'``
Default exception reporter class to be used if none has been assigned to the
@ -1317,8 +1296,6 @@ and :setting:`MANAGERS`; for that, see :setting:`SERVER_EMAIL`.
``DEFAULT_HASHING_ALGORITHM``
-----------------------------
.. versionadded:: 3.1
Default: ``'sha256'``
Default hashing algorithm to use for encoding cookies, password reset tokens in
@ -1385,10 +1362,6 @@ Default: Not defined
The directory used by the :ref:`file email backend <topic-email-file-backend>`
to store output files.
.. versionchanged:: 3.1
Support for :class:`pathlib.Path` was added.
.. setting:: EMAIL_HOST
``EMAIL_HOST``
@ -1910,10 +1883,6 @@ cookie from being sent in cross-site requests.
See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``.
.. versionchanged:: 3.1
Setting ``LANGUAGE_COOKIE_SAMESITE = 'None'`` was allowed.
.. setting:: LANGUAGE_COOKIE_SECURE
``LANGUAGE_COOKIE_SECURE``
@ -2422,10 +2391,6 @@ If configured, the :class:`~django.middleware.security.SecurityMiddleware` sets
the :ref:`referrer-policy` header on all responses that do not already have it
to the value provided.
.. versionchanged:: 3.1
In older versions, the default value is ``None``.
.. setting:: SECURE_SSL_HOST
``SECURE_SSL_HOST``
@ -2986,8 +2951,6 @@ rendered.
``PASSWORD_RESET_TIMEOUT``
--------------------------
.. versionadded:: 3.1
Default: ``259200`` (3 days, in seconds)
The number of seconds a password reset link is valid for.
@ -3267,10 +3230,6 @@ Possible values for the setting are:
Modern browsers provide a more secure default policy for the ``SameSite``
flag and will assume ``Lax`` for cookies without an explicit value set.
.. versionchanged:: 3.1
Setting ``SESSION_COOKIE_SAMESITE = 'None'`` was allowed.
.. _SameSite: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
.. setting:: SESSION_COOKIE_SECURE

View file

@ -729,10 +729,6 @@ available to the included template::
been evaluated and rendered* - not blocks that can be overridden by, for
example, an extending template.
.. versionchanged:: 3.1
Support for iterables of template names was added.
.. templatetag:: load
``load``
@ -1747,11 +1743,6 @@ example, when the active locale is ``en`` (English):
Using ``floatformat`` with no argument is equivalent to using ``floatformat``
with an argument of ``-1``.
.. versionchanged:: 3.1
In older versions, a negative zero ``-0`` was returned for negative numbers
which round to zero.
.. versionchanged:: 3.2
The ``g`` suffix to force grouping by thousand separators was added.

View file

@ -43,11 +43,6 @@ need to distinguish caches by the ``Accept-language`` header.
* All other parameters are added with their value, after applying
``str()`` to it.
.. versionchanged:: 3.1
Support for multiple field names in the ``no-cache`` directive was
added.
.. function:: get_max_age(response)
Returns the max-age from the response Cache-Control header as an integer
@ -131,10 +126,6 @@ The functions defined in this module share the following properties:
UTC offsets aren't supported; if ``value`` describes one, the result is
``None``.
.. versionchanged:: 3.1
Support for comma separators for milliseconds was added.
.. function:: parse_datetime(value)
Parses a string and returns a :class:`datetime.datetime`.
@ -142,10 +133,6 @@ The functions defined in this module share the following properties:
UTC offsets are supported; if ``value`` describes one, the result's
``tzinfo`` attribute is a :class:`datetime.timezone` instance.
.. versionchanged:: 3.1
Support for comma separators for milliseconds was added.
.. function:: parse_duration(value)
Parses a string and returns a :class:`datetime.timedelta`.
@ -155,11 +142,6 @@ The functions defined in this module share the following properties:
``P4DT1H15M20S`` which is equivalent to ``4 1:15:20``) or PostgreSQL's
day-time interval format (e.g. ``3 days 04:05:06``).
.. versionchanged:: 3.1
Support for comma separators for decimal fractions in the ISO 8601
format and for the format ``"DD HH:MM:SS,uuuuuu"`` was added.
``django.utils.decorators``
===========================
@ -204,24 +186,18 @@ The functions defined in this module share the following properties:
.. function:: sync_only_middleware(middleware)
.. versionadded:: 3.1
Marks a middleware as :ref:`synchronous-only <async-middleware>`. (The
default in Django, but this allows you to future-proof if the default ever
changes in a future release.)
.. function:: async_only_middleware(middleware)
.. versionadded:: 3.1
Marks a middleware as :ref:`asynchronous-only <async-middleware>`. Django
will wrap it in an asynchronous event loop when it is called from the WSGI
request path.
.. function:: sync_and_async_middleware(middleware)
.. versionadded:: 3.1
Marks a middleware as :ref:`sync and async compatible <async-middleware>`,
this allows to avoid converting requests. You must implement detection of
the current request type to use this decorator. See :ref:`asynchronous
@ -321,10 +297,6 @@ The functions defined in this module share the following properties:
Returns an ASCII string containing the encoded result.
.. versionchanged:: 3.1
Support for :class:`pathlib.Path` ``path`` was added.
.. function:: escape_uri_path(path)
Escapes the unsafe characters from the path portion of a Uniform Resource
@ -550,8 +522,6 @@ https://web.archive.org/web/20110718035220/http://diveintomark.org/archives/2004
.. class:: classproperty(method=None)
.. versionadded:: 3.1
Similar to :py:func:`@classmethod <classmethod>`, the ``@classproperty``
decorator converts the result of a method with a single ``cls`` argument
into a property that can be accessed directly from the class.