From 810edfd7428e12bd640573112c6c1a024ac33da2 Mon Sep 17 00:00:00 2001 From: Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:17:09 +0100 Subject: [PATCH] Removed versionadded/changed annotations for 5.1. This also removes remaining versionadded/changed annotations for older versions. --- .../contributing/writing-code/unit-tests.txt | 5 -- docs/ref/contrib/admin/index.txt | 15 ---- docs/ref/contrib/contenttypes.txt | 4 - docs/ref/contrib/gis/functions.txt | 12 --- docs/ref/contrib/gis/gdal.txt | 17 ---- docs/ref/contrib/gis/geoquerysets.txt | 4 - docs/ref/contrib/gis/measure.txt | 4 - docs/ref/contrib/postgres/indexes.txt | 4 - docs/ref/databases.txt | 6 -- docs/ref/files/storage.txt | 2 - docs/ref/forms/fields.txt | 8 -- docs/ref/logging.txt | 2 - docs/ref/middleware.txt | 4 - docs/ref/migration-operations.txt | 2 - docs/ref/models/expressions.txt | 19 ---- docs/ref/models/instances.txt | 4 - docs/ref/models/querysets.txt | 4 - docs/ref/templates/builtins.txt | 2 - docs/ref/utils.txt | 5 -- docs/ref/validators.txt | 4 - docs/topics/auth/default.txt | 22 ----- docs/topics/checks.txt | 4 - docs/topics/http/sessions.txt | 87 ------------------- docs/topics/testing/advanced.txt | 8 -- docs/topics/testing/tools.txt | 59 ------------- 25 files changed, 307 deletions(-) diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 76f4a9e754..446d896abe 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -298,11 +298,6 @@ screen, one for a mobile screen, one for right-to-left languages on desktop, one for the dark mode on desktop, and one for high contrast mode on desktop when using chrome. -.. versionchanged:: 5.1 - - The ``--screenshots`` option and ``@screenshot_cases`` decorator were - added. - .. _running-unit-tests-dependencies: Running all the tests diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 1b02b7d403..311b21ec6e 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -432,11 +432,6 @@ subclass:: collapsed, using an expandable widget with a toggle for switching their visibility. - .. versionchanged:: 5.1 - - ``fieldsets`` using the ``collapse`` class now use ``
`` - and ```` elements, provided they define a ``name``. - * ``description`` A string of optional extra text to be displayed at the top of each fieldset, under the heading of the fieldset. @@ -639,11 +634,6 @@ subclass:: class PersonAdmin(admin.ModelAdmin): list_display = ["name", "decade_born_in"] - .. versionchanged:: 5.1 - - Support for using ``__`` lookups was added, when targeting related - fields. - A few special cases to note about ``list_display``: * If the field is a ``ForeignKey``, Django will display the @@ -2337,11 +2327,6 @@ The ``InlineModelAdmin`` class adds or customizes: configured in :attr:`~ModelAdmin.fieldsets`, inlines with a ``collapse`` class will be initially collapsed using an expandable widget. - .. versionchanged:: 5.1 - - ``fieldsets`` using the ``collapse`` class now use ``
`` and - ```` elements, provided they define a ``name``. - .. attribute:: InlineModelAdmin.extra This controls the number of extra forms the formset will display in diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt index 18eaff43b2..d8f4b24753 100644 --- a/docs/ref/contrib/contenttypes.txt +++ b/docs/ref/contrib/contenttypes.txt @@ -115,10 +115,6 @@ model it represents, or to retrieve objects from that model: on that model, returning the corresponding object. The ``using`` argument can be used to specify a different database than the default one. - .. versionchanged:: 5.1 - - The ``using`` argument was added. - .. method:: ContentType.model_class() Returns the model class represented by this diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index ff62c17580..055c5217f7 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -238,10 +238,6 @@ polygon that can fully contain the geometry. The ``num_seg`` parameter is used only on PostGIS. -.. versionchanged:: 5.1 - - SpatiaLite 5.1+ support was added. - ``Centroid`` ============ @@ -367,10 +363,6 @@ Creates geometry from `Well-known binary (WKB)`_ representation. The optional ``srid`` argument allows to specify the SRID of the resulting geometry. ``srid`` is ignored on Oracle. -.. versionchanged:: 5.1 - - The ``srid`` argument was added. - ``FromWKT`` =========== @@ -384,10 +376,6 @@ Creates geometry from `Well-known text (WKT)`_ representation. The optional ``srid`` argument allows to specify the SRID of the resulting geometry. ``srid`` is ignored on Oracle. -.. versionchanged:: 5.1 - - The ``srid`` argument was added. - ``GeoHash`` =========== diff --git a/docs/ref/contrib/gis/gdal.txt b/docs/ref/contrib/gis/gdal.txt index 726cd83756..1ec04d342f 100644 --- a/docs/ref/contrib/gis/gdal.txt +++ b/docs/ref/contrib/gis/gdal.txt @@ -562,14 +562,10 @@ coordinate transformation: .. attribute:: is_3d - .. versionadded:: 5.1 - A boolean indicating if this geometry has Z coordinates. .. method:: set_3d(value) - .. versionadded:: 5.1 - A method that adds or removes the Z coordinate dimension. .. code-block:: pycon @@ -583,14 +579,10 @@ coordinate transformation: .. attribute:: is_measured - .. versionadded:: 5.1 - A boolean indicating if this geometry has M coordinates. .. method:: set_measured(value) - .. versionadded:: 5.1 - A method to add or remove the M coordinate dimension. .. code-block:: pycon @@ -863,11 +855,6 @@ coordinate transformation: Returns a :class:`Point` representing the centroid of this geometry. - .. versionchanged:: 5.1 - - ``centroid`` was promoted from a :class:`.Polygon` only attribute to - being available on all geometry types. - .. attribute:: tuple Returns the coordinates of a point geometry as a tuple, the @@ -916,8 +903,6 @@ coordinate transformation: .. attribute:: m - .. versionadded:: 5.1 - Returns the M coordinate of this point, or ``None`` if the Point does not have an M coordinate: @@ -958,8 +943,6 @@ coordinate transformation: .. attribute:: m - .. versionadded:: 5.1 - Returns a list of M coordinates in this line or ``None`` if the line does not have M coordinates: diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index 19411b7304..cf50af2c9f 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -894,10 +894,6 @@ aggregate, except it can be several orders of magnitude faster than performing a union because it rolls up geometries into a collection or multi object, not caring about dissolving boundaries. -.. versionchanged:: 5.1 - - MySQL 8.0.24+ support was added. - .. versionchanged:: 5.2 MariaDB 11.7+ support was added. diff --git a/docs/ref/contrib/gis/measure.txt b/docs/ref/contrib/gis/measure.txt index cee4211220..1d88ba129d 100644 --- a/docs/ref/contrib/gis/measure.txt +++ b/docs/ref/contrib/gis/measure.txt @@ -125,10 +125,6 @@ Unit Attribute Full name or alias(es) ``ha`` Hectare ================================= ======================================== -.. versionchanged:: 5.1 - - Support for the ``ha`` unit was added. - Measurement API =============== diff --git a/docs/ref/contrib/postgres/indexes.txt b/docs/ref/contrib/postgres/indexes.txt index 107d9c278d..f001fd0063 100644 --- a/docs/ref/contrib/postgres/indexes.txt +++ b/docs/ref/contrib/postgres/indexes.txt @@ -57,10 +57,6 @@ available from the ``django.contrib.postgres.indexes`` module. whether deduplication is enabled. PostgreSQL enables deduplication by default. - .. versionchanged:: 5.1 - - The ``deduplicate_items`` parameter was added. - .. _fillfactor: https://www.postgresql.org/docs/current/sql-createindex.html#SQL-CREATEINDEX-STORAGE-PARAMETERS .. _deduplicate_items: https://www.postgresql.org/docs/current/btree-implementation.html#BTREE-DEDUPLICATION diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index d19c78b9ec..b3c429d8a2 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -250,8 +250,6 @@ database configuration in :setting:`DATABASES`:: Connection pool --------------- -.. versionadded:: 5.1 - To use a connection pool with `psycopg`_, you can either set ``"pool"`` in the :setting:`OPTIONS` part of your database configuration in :setting:`DATABASES` to be a dict to be passed to :class:`~psycopg:psycopg_pool.ConnectionPool`, or @@ -898,8 +896,6 @@ If you're getting this error, you can solve it by: Transactions behavior ~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.1 - SQLite supports three transaction modes: ``DEFERRED``, ``IMMEDIATE``, and ``EXCLUSIVE``. @@ -969,8 +965,6 @@ To enable the JSON1 extension you can follow the instruction on Setting pragma options ---------------------- -.. versionadded:: 5.1 - `Pragma options`_ can be set upon connection by using the ``init_command`` in the :setting:`OPTIONS` part of your database configuration in :setting:`DATABASES`. The example below shows how to enable extra durability of diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt index 52c8f90427..228025fe3a 100644 --- a/docs/ref/files/storage.txt +++ b/docs/ref/files/storage.txt @@ -80,8 +80,6 @@ The ``FileSystemStorage`` class .. attribute:: allow_overwrite - .. versionadded:: 5.1 - Flag to control allowing saving a new file over an existing one. Defaults to ``False``. diff --git a/docs/ref/forms/fields.txt b/docs/ref/forms/fields.txt index 7ae5c121eb..91faea12f7 100644 --- a/docs/ref/forms/fields.txt +++ b/docs/ref/forms/fields.txt @@ -320,10 +320,6 @@ inside ``aria-describedby``: >>> print(f["username"]) -.. versionchanged:: 5.1 - - ``aria-describedby`` support was added for ``
``. - ``error_messages`` ------------------ @@ -799,10 +795,6 @@ For each field, we describe the default widget used if you don't specify Defaults to 39, and behaves the same way as it does for :class:`CharField`. - .. versionchanged:: 4.2.18 - - The default value for ``max_length`` was set to 39 characters. - ``ImageField`` -------------- diff --git a/docs/ref/logging.txt b/docs/ref/logging.txt index 24ab5d97f3..a045d4d7d7 100644 --- a/docs/ref/logging.txt +++ b/docs/ref/logging.txt @@ -214,8 +214,6 @@ messages during filesystem inspection and event subscription processes. ``django.contrib.auth`` ~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 4.2.16 - Log messages related to :doc:`contrib/auth`, particularly ``ERROR`` messages are generated when a :class:`~django.contrib.auth.forms.PasswordResetForm` is successfully submitted but the password reset email cannot be delivered due to diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt index b5534ce8f6..e09df637f1 100644 --- a/docs/ref/middleware.txt +++ b/docs/ref/middleware.txt @@ -523,8 +523,6 @@ every incoming ``HttpRequest`` object. See :ref:`Authentication in web requests ``None``), or :attr:`redirect_field_name`. If ``None`` is returned, a query parameter won't be added. -.. versionadded:: 5.1 - Redirects all unauthenticated requests to a login page, except for views excluded with :func:`~.django.contrib.auth.decorators.login_not_required`. The login page defaults to :setting:`settings.LOGIN_URL `, but can be @@ -682,8 +680,6 @@ Here are some hints about the ordering of various Django middleware classes: #. :class:`~django.contrib.auth.middleware.LoginRequiredMiddleware` - .. versionadded:: 5.1 - After ``AuthenticationMiddleware``: uses user object. #. :class:`~django.contrib.messages.middleware.MessageMiddleware` diff --git a/docs/ref/migration-operations.txt b/docs/ref/migration-operations.txt index b969b3dbfd..f4d4ae96dd 100644 --- a/docs/ref/migration-operations.txt +++ b/docs/ref/migration-operations.txt @@ -498,8 +498,6 @@ For an example using ``SeparateDatabaseAndState``, see Operation category ================== -.. versionadded:: 5.1 - .. currentmodule:: django.db.migrations.operations.base .. class:: OperationCategory diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index 5d5504dbe7..6a6356b3bb 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -188,8 +188,6 @@ the field value of each one, and saving each one back to the database:: Slicing ``F()`` expressions ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.1 - For string-based fields, text-based fields, and :class:`~django.contrib.postgres.fields.ArrayField`, you can use Python's array-slicing syntax. The indices are 0-based and the ``step`` argument to @@ -920,20 +918,12 @@ ordinary sequence of rows. the standard start and end points, such as ``CURRENT ROW`` and ``UNBOUNDED FOLLOWING``. - .. versionchanged:: 5.1 - - The ``exclusion`` argument was added. - .. class:: RowRange(start=None, end=None, exclusion=None) .. attribute:: frame_type This attribute is set to ``'ROWS'``. - .. versionchanged:: 5.1 - - The ``exclusion`` argument was added. - Both classes return SQL with the template: .. code-block:: sql @@ -942,8 +932,6 @@ Both classes return SQL with the template: .. class:: WindowFrameExclusion - .. versionadded:: 5.1 - .. attribute:: CURRENT_ROW .. attribute:: GROUP @@ -1024,11 +1012,6 @@ released between twelve months before and twelve months after each movie: ... ), ... ) -.. versionchanged:: 5.1 - - Support for positive integer ``start`` and negative integer ``end`` was - added for ``RowRange``. - .. currentmodule:: django.db.models Technical Information @@ -1059,8 +1042,6 @@ calling the appropriate methods on the wrapped expression. .. attribute:: constraint_validation_compatible - .. versionadded:: 5.1 - Tells Django that this expression can be used during a constraint validation. Expressions with ``constraint_validation_compatible`` set to ``False`` must have only one source expression. Defaults to diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 7482b98a66..c4bf8aae5f 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -214,10 +214,6 @@ values:: obj.refresh_from_db(from_queryset=MyModel.objects.select_for_update()) -.. versionchanged:: 5.1 - - The ``from_queryset`` argument was added. - .. method:: Model.get_deferred_fields() A helper method that returns a set containing the attribute names of all those diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index ec27936cdb..8bf83838c0 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3106,10 +3106,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:: 5.1 - - Support for the ``generic_plan`` option on PostgreSQL 16+ was added. - .. versionchanged:: 5.2 Support for the ``memory`` and ``serialize`` options on PostgreSQL 17+ was diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 8673727861..f35935c160 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -957,8 +957,6 @@ output (as a string) inside a variable. This is useful if you want to use ``querystring`` ---------------- -.. versionadded:: 5.1 - Outputs a URL-encoded formatted query string based on the provided parameters. This tag requires a :class:`~django.http.QueryDict` instance, which defaults to diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 438a38cea0..72e7eb31c8 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -1179,11 +1179,6 @@ For a complete discussion on the usage of the following see the Raises :exc:`LookupError` if nothing is found. - .. versionchanged:: 4.2.15 - - In older versions, ``lang_code`` values over 500 characters were - processed without raising a :exc:`LookupError`. - .. function:: to_locale(language) Turns a language name (en-us) into a locale name (en_US). diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt index 846a3c7157..3493363420 100644 --- a/docs/ref/validators.txt +++ b/docs/ref/validators.txt @@ -162,8 +162,6 @@ to, or in lieu of custom ``field.clean()`` methods. ``DomainNameValidator`` ----------------------- -.. versionadded:: 5.1 - .. class:: DomainNameValidator(accept_idna=True, message=None, code=None) A :class:`RegexValidator` subclass that ensures a value looks like a domain @@ -223,8 +221,6 @@ to, or in lieu of custom ``field.clean()`` methods. ``validate_domain_name`` ------------------------ -.. versionadded:: 5.1 - .. data:: validate_domain_name A :class:`DomainNameValidator` instance without any customizations. diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index a22cebbf15..06d7c2fc26 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -601,10 +601,6 @@ The ``login_required`` decorator :func:`django.contrib.admin.views.decorators.staff_member_required` decorator a useful alternative to ``login_required()``. -.. versionchanged:: 5.1 - - Support for wrapping asynchronous view functions was added. - .. currentmodule:: django.contrib.auth.mixins The ``LoginRequiredMixin`` mixin @@ -647,8 +643,6 @@ inheritance list. The ``login_not_required`` decorator ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 5.1 - When :class:`~django.contrib.auth.middleware.LoginRequiredMiddleware` is installed, all views require authentication by default. Some views, such as the login view, may need to disable this behavior. @@ -719,11 +713,6 @@ email in the desired domain and if not, redirects to the login page:: @user_passes_test(email_check, login_url="/login/") def my_view(request): ... - .. versionchanged:: 5.1 - - Support for wrapping asynchronous view functions and using asynchronous - test callables was added. - .. currentmodule:: django.contrib.auth.mixins .. class:: UserPassesTestMixin @@ -828,10 +817,6 @@ The ``permission_required`` decorator ``redirect_authenticated_user=True`` and the logged-in user doesn't have all of the required permissions. -.. versionchanged:: 5.1 - - Support for wrapping asynchronous view functions was added. - .. currentmodule:: django.contrib.auth.mixins The ``PermissionRequiredMixin`` mixin @@ -1640,15 +1625,8 @@ provides several built-in forms located in :mod:`django.contrib.auth.forms`: Takes the ``user`` as the first positional argument. - .. versionchanged:: 5.1 - - Option to disable (or reenable) password-based authentication was - added. - .. class:: AdminUserCreationForm - .. versionadded:: 5.1.1 - A form used in the admin interface to create a new user. Inherits from :class:`UserCreationForm`. diff --git a/docs/topics/checks.txt b/docs/topics/checks.txt index 94ba66f0db..b0e8c2987f 100644 --- a/docs/topics/checks.txt +++ b/docs/topics/checks.txt @@ -195,10 +195,6 @@ the only difference is that the check is a classmethod, not an instance method:: # ... your own checks ... return errors -.. versionchanged:: 5.1 - - In older versions, template engines didn't implement a ``check()`` method. - Writing tests ------------- diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index e670292ca8..03559da3ed 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -81,10 +81,6 @@ writing to the cache fails, the exception is handled and logged via the :ref:`sessions logger `, to avoid failing an otherwise successful write operation. -.. versionchanged:: 5.1 - - Handling and logging of exceptions when writing to the cache was added. - Session reads use the cache, or the database if the data has been evicted from the cache. To use this backend, set :setting:`SESSION_ENGINE` to ``"django.contrib.sessions.backends.cached_db"``, and follow the configuration @@ -202,14 +198,8 @@ You can edit it multiple times. Example: ``fav_color = request.session.get('fav_color', 'red')`` - .. versionchanged:: 5.1 - - ``aget()`` function was added. - .. method:: aset(key, value) - .. versionadded:: 5.1 - Example: ``await request.session.aset('fav_color', 'red')`` .. method:: update(dict) @@ -219,10 +209,6 @@ You can edit it multiple times. Example: ``request.session.update({'fav_color': 'red'})`` - .. versionchanged:: 5.1 - - ``aupdate()`` function was added. - .. method:: pop(key, default=__not_given) .. method:: apop(key, default=__not_given) @@ -230,55 +216,31 @@ You can edit it multiple times. Example: ``fav_color = request.session.pop('fav_color', 'blue')`` - .. versionchanged:: 5.1 - - ``apop()`` function was added. - .. method:: keys() .. method:: akeys() *Asynchronous version*: ``akeys()`` - .. versionchanged:: 5.1 - - ``akeys()`` function was added. - .. method:: values() .. method:: avalues() *Asynchronous version*: ``avalues()`` - .. versionchanged:: 5.1 - - ``avalues()`` function was added. - .. method:: has_key(key) .. method:: ahas_key(key) *Asynchronous version*: ``ahas_key()`` - .. versionchanged:: 5.1 - - ``ahas_key()`` function was added. - .. method:: items() .. method:: aitems() *Asynchronous version*: ``aitems()`` - .. versionchanged:: 5.1 - - ``aitems()`` function was added. - .. method:: setdefault() .. method:: asetdefault() *Asynchronous version*: ``asetdefault()`` - .. versionchanged:: 5.1 - - ``asetdefault()`` function was added. - .. method:: clear() It also has these methods: @@ -293,10 +255,6 @@ You can edit it multiple times. can't be accessed again from the user's browser (for example, the :func:`django.contrib.auth.logout()` function calls it). - .. versionchanged:: 5.1 - - ``aflush()`` function was added. - .. method:: set_test_cookie() .. method:: aset_test_cookie() @@ -307,10 +265,6 @@ You can edit it multiple times. until the user's next page request. See `Setting test cookies`_ below for more information. - .. versionchanged:: 5.1 - - ``aset_test_cookie()`` function was added. - .. method:: test_cookie_worked() .. method:: atest_cookie_worked() @@ -322,10 +276,6 @@ You can edit it multiple times. previous, separate page request. See `Setting test cookies`_ below for more information. - .. versionchanged:: 5.1 - - ``atest_cookie_worked()`` function was added. - .. method:: delete_test_cookie() .. method:: adelete_test_cookie() @@ -333,10 +283,6 @@ You can edit it multiple times. Deletes the test cookie. Use this to clean up after yourself. - .. versionchanged:: 5.1 - - ``adelete_test_cookie()`` function was added. - .. method:: get_session_cookie_age() Returns the value of the setting :setting:`SESSION_COOKIE_AGE`. This can @@ -368,10 +314,6 @@ You can edit it multiple times. purposes. Session expiration is computed from the last time the session was *modified*. - .. versionchanged:: 5.1 - - ``aset_expiry()`` function was added. - .. method:: get_expiry_age() .. method:: aget_expiry_age() @@ -404,10 +346,6 @@ You can edit it multiple times. expires_at = modification + timedelta(seconds=settings.SESSION_COOKIE_AGE) - .. versionchanged:: 5.1 - - ``aget_expiry_age()`` function was added. - .. method:: get_expiry_date() .. method:: aget_expiry_date() @@ -420,10 +358,6 @@ You can edit it multiple times. This function accepts the same keyword arguments as :meth:`get_expiry_age`, and similar notes on usage apply. - .. versionchanged:: 5.1 - - ``aget_expiry_date()`` function was added. - .. method:: get_expire_at_browser_close() .. method:: aget_expire_at_browser_close() @@ -432,10 +366,6 @@ You can edit it multiple times. Returns either ``True`` or ``False``, depending on whether the user's session cookie will expire when the user's web browser is closed. - .. versionchanged:: 5.1 - - ``aget_expire_at_browser_close()`` function was added. - .. method:: clear_expired() .. method:: aclear_expired() @@ -444,10 +374,6 @@ You can edit it multiple times. Removes expired sessions from the session store. This class method is called by :djadmin:`clearsessions`. - .. versionchanged:: 5.1 - - ``aclear_expired()`` function was added. - .. method:: cycle_key() .. method:: acycle_key() @@ -457,10 +383,6 @@ You can edit it multiple times. :func:`django.contrib.auth.login()` calls this method to mitigate against session fixation. - .. versionchanged:: 5.1 - - ``acycle_key()`` function was added. - .. _session_serialization: Session serialization @@ -616,10 +538,6 @@ Here's a typical usage example:: request.session.set_test_cookie() return render(request, "foo/login_form.html") -.. versionchanged:: 5.1 - - Support for setting test cookies in asynchronous view functions was added. - Using sessions out of views =========================== @@ -868,11 +786,6 @@ You can extend the session engines, but doing so with database-backed session engines generally requires some extra effort (see the next section for details). -.. versionchanged:: 5.1 - - ``aexists()``, ``acreate()``, ``asave()``, ``adelete()``, ``aload()``, and - ``aclear_expired()`` methods were added. - .. _extending-database-backed-session-engines: Extending database-backed session engines diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 6b03f0f82b..1b0c172ef9 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -32,10 +32,6 @@ restricted subset of the test client API: attributes must be supplied by the test itself if required for the view to function properly. -.. versionchanged:: 5.1 - - The ``query_params`` parameter was added. - Example ------- @@ -89,10 +85,6 @@ difference being that it returns ``ASGIRequest`` instances rather than Arbitrary keyword arguments in ``defaults`` are added directly into the ASGI scope. -.. versionchanged:: 5.1 - - The ``query_params`` parameter was added. - Testing class-based views ========================= diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index dba2a9cce8..a03ad7da78 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -158,10 +158,6 @@ Use the ``django.test.Client`` class to make requests. The ``json_encoder`` argument allows setting a custom JSON encoder for the JSON serialization that's described in :meth:`post`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - Once you have a ``Client`` instance, you can call any of the following methods: @@ -241,10 +237,6 @@ Use the ``django.test.Client`` class to make requests. If you set ``secure`` to ``True`` the client will emulate an HTTPS request. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.post(path, data=None, content_type=MULTIPART_CONTENT, follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a POST request on the provided ``path`` and returns a @@ -360,10 +352,6 @@ Use the ``django.test.Client`` class to make requests. If you set ``secure`` to ``True`` the client will emulate an HTTPS request. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.head(path, data=None, follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a HEAD request on the provided ``path`` and returns a @@ -371,10 +359,6 @@ Use the ``django.test.Client`` class to make requests. including the ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters, except it does not return a message body. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.options(path, data='', content_type='application/octet-stream', follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes an OPTIONS request on the provided ``path`` and returns a @@ -386,10 +370,6 @@ Use the ``django.test.Client`` class to make requests. The ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters act the same as for :meth:`Client.get`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.put(path, data='', content_type='application/octet-stream', follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a PUT request on the provided ``path`` and returns a @@ -401,10 +381,6 @@ Use the ``django.test.Client`` class to make requests. The ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters act the same as for :meth:`Client.get`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.patch(path, data='', content_type='application/octet-stream', follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a PATCH request on the provided ``path`` and returns a @@ -413,10 +389,6 @@ Use the ``django.test.Client`` class to make requests. The ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters act the same as for :meth:`Client.get`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.delete(path, data='', content_type='application/octet-stream', follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a DELETE request on the provided ``path`` and returns a @@ -428,10 +400,6 @@ Use the ``django.test.Client`` class to make requests. The ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters act the same as for :meth:`Client.get`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.trace(path, follow=False, secure=False, *, headers=None, query_params=None, **extra) Makes a TRACE request on the provided ``path`` and returns a @@ -444,10 +412,6 @@ Use the ``django.test.Client`` class to make requests. The ``follow``, ``secure``, ``headers``, ``query_params``, and ``extra`` parameters act the same as for :meth:`Client.get`. - .. versionchanged:: 5.1 - - The ``query_params`` argument was added. - .. method:: Client.login(**credentials) .. method:: Client.alogin(**credentials) @@ -1548,11 +1512,6 @@ LOCALE_PATHS, LANGUAGE_CODE Default translation and loaded translations STATIC_ROOT, STATIC_URL, STORAGES Storages configuration ================================= ======================== -.. versionchanged:: 5.1 - - Resetting the default renderer when the ``FORM_RENDERER`` setting is - changed was added. - Isolating apps -------------- @@ -1740,10 +1699,6 @@ your test suite. attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. - .. versionchanged:: 5.1 - - In older versions, error messages didn't contain the response content. - .. method:: SimpleTestCase.assertNotContains(response, text, status_code=200, msg_prefix='', html=False) Asserts that a :class:`response ` produced the @@ -1756,10 +1711,6 @@ your test suite. attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. - .. versionchanged:: 5.1 - - In older versions, error messages didn't contain the response content. - .. method:: SimpleTestCase.assertTemplateUsed(response, template_name, msg_prefix='', count=None) Asserts that the template with the given name was used in rendering the @@ -1896,14 +1847,8 @@ your test suite. Whitespace in most cases is ignored, and attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. - .. versionchanged:: 5.1 - - In older versions, error messages didn't contain the ``haystack``. - .. method:: SimpleTestCase.assertNotInHTML(needle, haystack, msg_prefix="") - .. versionadded:: 5.1 - Asserts that the HTML fragment ``needle`` is *not* contained in the ``haystack``. @@ -2058,10 +2003,6 @@ test client, with the following exceptions: >>> c = AsyncClient() >>> c.get("/customers/details/", {"name": "fred", "age": 7}, ACCEPT="application/json") -.. versionchanged:: 5.1 - - The ``query_params`` argument was added. - Using ``AsyncClient`` any method that makes a request must be awaited:: async def test_my_thing(self):