From 4c5236ef93db714b63eedcc5a162631a6ca1def9 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 4 May 2020 12:29:31 +0200 Subject: [PATCH] Removed versionadded/changed annotations for 3.0. --- docs/howto/custom-file-storage.txt | 2 - docs/ref/clickjacking.txt | 5 --- docs/ref/contrib/admin/index.txt | 6 --- docs/ref/contrib/auth.txt | 12 ------ docs/ref/contrib/gis/db-api.txt | 4 -- docs/ref/contrib/gis/functions.txt | 2 - docs/ref/contrib/gis/geoip2.txt | 8 ---- docs/ref/contrib/gis/geoquerysets.txt | 44 --------------------- docs/ref/contrib/humanize.txt | 5 --- docs/ref/contrib/postgres/constraints.txt | 2 - docs/ref/contrib/postgres/fields.txt | 4 -- docs/ref/contrib/postgres/operations.txt | 2 - docs/ref/contrib/syndication.txt | 5 --- docs/ref/databases.txt | 2 - docs/ref/django-admin.txt | 22 ----------- docs/ref/exceptions.txt | 4 -- docs/ref/files/storage.txt | 2 - docs/ref/middleware.txt | 2 - docs/ref/models/conditional-expressions.txt | 6 --- docs/ref/models/constraints.txt | 8 ---- docs/ref/models/database-functions.txt | 10 ----- docs/ref/models/expressions.txt | 11 ------ docs/ref/models/fields.txt | 21 ---------- docs/ref/models/indexes.txt | 4 -- docs/ref/models/instances.txt | 6 --- docs/ref/models/querysets.txt | 8 ---- docs/ref/request-response.txt | 12 ------ docs/ref/settings.txt | 20 ---------- docs/ref/utils.txt | 17 +------- docs/topics/async.txt | 2 - docs/topics/auth/customizing.txt | 10 ----- docs/topics/auth/default.txt | 4 -- docs/topics/forms/formsets.txt | 4 -- docs/topics/http/decorators.txt | 4 -- docs/topics/http/sessions.txt | 2 - docs/topics/http/urls.txt | 5 --- docs/topics/i18n/translation.txt | 4 -- docs/topics/logging.txt | 4 -- docs/topics/testing/tools.txt | 6 --- 39 files changed, 2 insertions(+), 299 deletions(-) diff --git a/docs/howto/custom-file-storage.txt b/docs/howto/custom-file-storage.txt index 33b8223b60..7fd71ffef0 100644 --- a/docs/howto/custom-file-storage.txt +++ b/docs/howto/custom-file-storage.txt @@ -99,8 +99,6 @@ and underscores from the original filename, removing everything else. .. method:: get_alternative_name(file_root, file_ext) -.. versionadded:: 3.0 - Returns an alternative filename based on the ``file_root`` and ``file_ext`` parameters. By default, an underscore plus a random 7 character alphanumeric string is appended to the filename before the extension. diff --git a/docs/ref/clickjacking.txt b/docs/ref/clickjacking.txt index d7eec87923..9d7c5cb0c3 100644 --- a/docs/ref/clickjacking.txt +++ b/docs/ref/clickjacking.txt @@ -72,11 +72,6 @@ this header instead, set the :setting:`X_FRAME_OPTIONS` setting:: X_FRAME_OPTIONS = 'SAMEORIGIN' -.. versionchanged:: 3.0 - - The default value of the :setting:`X_FRAME_OPTIONS` setting was changed - from ``SAMEORIGIN`` to ``DENY``. - When using the middleware there may be some views where you do **not** want the ``X-Frame-Options`` header set. For those cases, you can use a view decorator that tells the middleware not to set the header:: diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index e5ec730c82..1dd7812c41 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -1649,8 +1649,6 @@ templates used by the :class:`ModelAdmin` views: .. method:: ModelAdmin.get_inlines(request, obj) - .. versionadded:: 3.0 - The ``get_inlines`` method is given the ``HttpRequest`` and the ``obj`` being edited (or ``None`` on an add form) and is expected to return an iterable of inlines. You can override this method to dynamically add @@ -2151,10 +2149,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.0 - - jQuery was upgraded from 3.3.1 to 3.4.1. - .. versionchanged:: 3.1 jQuery was upgraded from 3.4.1 to 3.5.1. diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index 4d50fd123a..de2a2321ba 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -194,8 +194,6 @@ Methods .. method:: get_user_permissions(obj=None) - .. versionadded:: 3.0 - Returns a set of permission strings that the user has directly. If ``obj`` is passed in, only returns the user permissions for this @@ -288,14 +286,8 @@ Manager methods Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and :attr:`~models.User.is_superuser` to ``True``. - .. versionchanged:: 3.0 - - The ``email`` and ``password`` parameters were made optional. - .. method:: with_perm(perm, is_active=True, include_superusers=True, backend=None, obj=None) - .. versionadded:: 3.0 - Returns users that have the given permission ``perm`` either in the ``"."`` format or as a :class:`~django.contrib.auth.models.Permission` instance. Returns an @@ -499,8 +491,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`: .. class:: BaseBackend - .. versionadded:: 3.0 - A base class that provides default implementations for all required methods. By default, it will reject any user and provide no permissions. @@ -603,8 +593,6 @@ The following backends are available in :mod:`django.contrib.auth.backends`: .. method:: with_perm(perm, is_active=True, include_superusers=True, obj=None) - .. versionadded:: 3.0 - Returns all active users who have the permission ``perm`` either in the form of ``"."`` or a :class:`~django.contrib.auth.models.Permission` instance. Returns an diff --git a/docs/ref/contrib/gis/db-api.txt b/docs/ref/contrib/gis/db-api.txt index 03c9c5a724..928d12aa42 100644 --- a/docs/ref/contrib/gis/db-api.txt +++ b/docs/ref/contrib/gis/db-api.txt @@ -28,10 +28,6 @@ not conform to the OGC standard. Django supports spatial functions operating on real geometries available in modern MySQL versions. However, the spatial functions are not as rich as other backends like PostGIS. -.. versionchanged:: 3.0 - - Support for spatial functions operating on real geometries was added. - .. warning:: True spatial indexes (R-trees) are only supported with diff --git a/docs/ref/contrib/gis/functions.txt b/docs/ref/contrib/gis/functions.txt index 6f10fc4ac1..351429b49e 100644 --- a/docs/ref/contrib/gis/functions.txt +++ b/docs/ref/contrib/gis/functions.txt @@ -361,8 +361,6 @@ __ https://en.wikipedia.org/wiki/Geohash .. class:: GeometryDistance(expr1, expr2, **extra) -.. versionadded:: 3.0 - *Availability*: `PostGIS `__ Accepts two geographic fields or expressions and returns the distance between diff --git a/docs/ref/contrib/gis/geoip2.txt b/docs/ref/contrib/gis/geoip2.txt index 83593f0ae1..5d0d31cfd8 100644 --- a/docs/ref/contrib/gis/geoip2.txt +++ b/docs/ref/contrib/gis/geoip2.txt @@ -86,10 +86,6 @@ Keyword Arguments Description the :setting:`GEOIP_CITY` setting. =================== ======================================================= -.. versionchanged:: 3.0 - - Support for :class:`pathlib.Path` ``path`` was added. - Methods ======= @@ -159,10 +155,6 @@ A string or :class:`pathlib.Path` specifying the directory where the GeoIP data files are located. This setting is *required* unless manually specified with ``path`` keyword when initializing the :class:`GeoIP2` object. -.. versionchanged:: 3.0 - - Support for :class:`pathlib.Path` was added. - .. setting:: GEOIP_COUNTRY ``GEOIP_COUNTRY`` diff --git a/docs/ref/contrib/gis/geoquerysets.txt b/docs/ref/contrib/gis/geoquerysets.txt index beda7b538e..dfda2fa3b7 100644 --- a/docs/ref/contrib/gis/geoquerysets.txt +++ b/docs/ref/contrib/gis/geoquerysets.txt @@ -156,11 +156,6 @@ MySQL ``ST_Contains(poly, geom)`` SpatiaLite ``Contains(poly, geom)`` ========== ============================ -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBRContains`` and operates only on bounding - boxes. - .. fieldlookup:: contains_properly ``contains_properly`` @@ -251,10 +246,6 @@ MySQL ``ST_Crosses(poly, geom)`` SpatiaLite ``Crosses(poly, geom)`` ========== ========================== -.. versionchanged:: 3.0 - - MySQL support was added. - .. fieldlookup:: disjoint ``disjoint`` @@ -279,11 +270,6 @@ MySQL ``ST_Disjoint(poly, geom)`` SpatiaLite ``Disjoint(poly, geom)`` ========== ================================================= -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBRDisjoint`` and operates only on bounding - boxes. - .. fieldlookup:: equals ``equals`` @@ -308,11 +294,6 @@ MySQL ``ST_Equals(poly, geom)`` SpatiaLite ``Equals(poly, geom)`` ========== ================================================= -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBREquals`` and operates only on bounding - boxes. - .. fieldlookup:: exact :noindex: .. fieldlookup:: same_as @@ -341,11 +322,6 @@ MySQL ``ST_Equals(poly, geom)`` SpatiaLite ``Equals(poly, geom)`` ========== ================================================= -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBREquals`` and operates only on bounding - boxes. - .. fieldlookup:: intersects ``intersects`` @@ -370,11 +346,6 @@ MySQL ``ST_Intersects(poly, geom)`` SpatiaLite ``Intersects(poly, geom)`` ========== ================================================= -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBRIntersects`` and operates only on - bounding boxes. - .. fieldlookup:: isvalid ``isvalid`` @@ -416,11 +387,6 @@ MySQL ``ST_Overlaps(poly, geom)`` SpatiaLite ``Overlaps(poly, geom)`` ========== ============================ -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBROverlaps`` and operates only on bounding - boxes. - .. fieldlookup:: relate ``relate`` @@ -521,11 +487,6 @@ Oracle ``SDO_TOUCH(poly, geom)`` SpatiaLite ``Touches(poly, geom)`` ========== ========================== -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBRTouches`` and operates only on bounding - boxes. - .. fieldlookup:: within ``within`` @@ -550,11 +511,6 @@ Oracle ``SDO_INSIDE(poly, geom)`` SpatiaLite ``Within(poly, geom)`` ========== ========================== -.. versionchanged:: 3.0 - - In older versions, MySQL uses ``MBRWithin`` and operates only on bounding - boxes. - .. fieldlookup:: left ``left`` diff --git a/docs/ref/contrib/humanize.txt b/docs/ref/contrib/humanize.txt index 8914ef8de7..00718582f5 100644 --- a/docs/ref/contrib/humanize.txt +++ b/docs/ref/contrib/humanize.txt @@ -78,11 +78,6 @@ e.g. with the ``'de'`` language: * ``1200000000`` becomes ``'1,2 Milliarden'``. * ``-1200000000`` becomes ``'-1,2 Milliarden'``. -.. versionchanged:: 3.0 - - All numeric values are now translated as plural, except ``1.0`` which is - translated as a singular phrase. This may be incorrect for some languages. - .. versionchanged:: 3.1 Support for negative integers was added. diff --git a/docs/ref/contrib/postgres/constraints.txt b/docs/ref/contrib/postgres/constraints.txt index 8b82221ebd..f90667c394 100644 --- a/docs/ref/contrib/postgres/constraints.txt +++ b/docs/ref/contrib/postgres/constraints.txt @@ -12,8 +12,6 @@ PostgreSQL supports additional data integrity constraints available from the ``ExclusionConstraint`` ======================= -.. versionadded:: 3.0 - .. class:: ExclusionConstraint(*, name, expressions, index_type=None, condition=None, deferrable=None) Creates an exclusion constraint in the database. Internally, PostgreSQL diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index aeacc72e7c..b5df103206 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -889,8 +889,6 @@ types. Range operators --------------- -.. versionadded:: 3.0 - .. class:: RangeOperators PostgreSQL provides a set of SQL operators that can be used together with the @@ -917,8 +915,6 @@ corresponding lookups. RangeBoundary() expressions --------------------------- -.. versionadded:: 3.0 - .. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False) .. attribute:: inclusive_lower diff --git a/docs/ref/contrib/postgres/operations.txt b/docs/ref/contrib/postgres/operations.txt index 620e5db8b7..b7dc0726e7 100644 --- a/docs/ref/contrib/postgres/operations.txt +++ b/docs/ref/contrib/postgres/operations.txt @@ -111,8 +111,6 @@ run the query ``CREATE EXTENSION IF NOT EXISTS hstore;``. Index concurrent operations =========================== -.. versionadded:: 3.0 - PostgreSQL supports the ``CONCURRENTLY`` option to ``CREATE INDEX`` and ``DROP INDEX`` statements to add and remove indexes without locking out writes. This option is useful for adding or removing an index in a live production diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt index ddafae3c0d..13aa944e8a 100644 --- a/docs/ref/contrib/syndication.txt +++ b/docs/ref/contrib/syndication.txt @@ -310,11 +310,6 @@ appropriate ```` tag (RSS 2.0) or ``xml:lang`` attribute (Atom). By default, this is :func:`django.utils.translation.get_language()`. You can change it by setting the ``language`` class attribute. -.. versionchanged:: 3.0 - - The ``language`` class attribute was added. In older versions, the behavior - is the same as ``language = settings.LANGUAGE_CODE``. - URLs ---- diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt index a16f525d96..ef384f14e9 100644 --- a/docs/ref/databases.txt +++ b/docs/ref/databases.txt @@ -287,8 +287,6 @@ non-durable `_. MariaDB notes ============= -.. versionadded:: 3.0 - Django supports MariaDB 10.2 and higher. To use MariaDB, use the MySQL backend, which is shared between the two. See the diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 35d6c04b30..f48307fe22 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -175,8 +175,6 @@ Example usage:: .. django-admin-option:: --ignore PATTERN, -i PATTERN -.. versionadded:: 3.0 - Ignores directories matching the given :mod:`glob`-style pattern. Use multiple times to ignore more. @@ -1131,10 +1129,6 @@ under them. This is the default output format. -.. versionchanged:: 3.0 - - Output of the applied datetimes at verbosity 2 and above was added. - .. django-admin-option:: --plan, -p Shows the migration plan Django will follow to apply migrations. Like @@ -1276,11 +1270,6 @@ zip files, you can use a URL like:: django-admin startapp --template=https://github.com/githubuser/django-app-template/archive/master.zip myapp -.. versionchanged:: 3.0 - - Support for XZ archives (``.tar.xz``, ``.txz``) and LZMA archives - (``.tar.lzma``, ``.tlz``) was added. - .. django-admin-option:: --extension EXTENSIONS, -e EXTENSIONS Specifies which file extensions in the app template should be rendered with the @@ -1490,8 +1479,6 @@ May be specified multiple times and combined with :option:`test --tag`. .. django-admin-option:: -k TEST_NAME_PATTERNS -.. versionadded:: 3.0 - Runs test methods and classes matching test name patterns, in the same way as :option:`unittest's -k option`. Can be specified multiple times. @@ -1501,8 +1488,6 @@ Runs test methods and classes matching test name patterns, in the same way as .. django-admin-option:: --pdb -.. versionadded:: 3.0 - Spawns a ``pdb`` debugger at each test error or failure. If you have it installed, ``ipdb`` is used instead. @@ -1635,11 +1620,6 @@ fields (listed in are overridden by a command line argument. For example, to provide an ``email`` field, you can use ``DJANGO_SUPERUSER_EMAIL`` environment variable. -.. versionchanged:: 3.0 - - Support for using ``DJANGO_SUPERUSER_PASSWORD`` and - ``DJANGO_SUPERUSER_`` environment variables was added. - .. django-admin-option:: --noinput, --no-input Suppresses all user prompts. If a suppressed prompt cannot be resolved @@ -1825,8 +1805,6 @@ colored output to another command. .. django-admin-option:: --skip-checks -.. versionadded:: 3.0 - Skips running system checks prior to running the command. This option is only available if the :attr:`~django.core.management.BaseCommand.requires_system_checks` command diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt index 6b8d6707e4..ee2c9b7f10 100644 --- a/docs/ref/exceptions.txt +++ b/docs/ref/exceptions.txt @@ -167,8 +167,6 @@ list of errors. .. exception:: RequestAborted - .. versionadded:: 3.0 - The :exc:`RequestAborted` exception is raised when a HTTP body being read in by the handler is cut off midstream and the client connection closes, or when the client does not send data and hits a timeout where the server @@ -184,8 +182,6 @@ list of errors. .. exception:: SynchronousOnlyOperation - .. versionadded:: 3.0 - The :exc:`SynchronousOnlyOperation` exception is raised when code that is only allowed in synchronous Python code is called from an asynchronous context (a thread with a running asynchronous event loop). These parts of diff --git a/docs/ref/files/storage.txt b/docs/ref/files/storage.txt index 542eb2dc7e..03ec71a2ad 100644 --- a/docs/ref/files/storage.txt +++ b/docs/ref/files/storage.txt @@ -112,8 +112,6 @@ The ``Storage`` class .. method:: get_alternative_name(file_root, file_ext) - .. versionadded:: 3.0 - Returns an alternative filename based on the ``file_root`` and ``file_ext`` parameters, an underscore plus a random 7 character alphanumeric string is appended to the filename before the extension. diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt index 0e51dec75c..c52bcc5d18 100644 --- a/docs/ref/middleware.txt +++ b/docs/ref/middleware.txt @@ -247,8 +247,6 @@ __ https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Se Referrer Policy ~~~~~~~~~~~~~~~ -.. versionadded:: 3.0 - Browsers use `the Referer header`__ as a way to send information to a site about how users got there. When a user clicks a link, the browser will send the full URL of the linking page as the referrer. While this can be useful for some diff --git a/docs/ref/models/conditional-expressions.txt b/docs/ref/models/conditional-expressions.txt index 69a45d662b..7616b98e0a 100644 --- a/docs/ref/models/conditional-expressions.txt +++ b/docs/ref/models/conditional-expressions.txt @@ -48,10 +48,6 @@ objects that have an ``output_field`` that is a :class:`~django.db.models.BooleanField`. The result is provided using the ``then`` keyword. -.. versionchanged:: 3.0 - - Support for boolean :class:`~django.db.models.Expression` was added. - Some examples:: >>> from django.db.models import F, Q, When @@ -252,8 +248,6 @@ The two SQL statements are functionally equivalent but the more explicit Conditional filter ------------------ -.. versionadded:: 3.0 - When a conditional expression returns a boolean value, it is possible to use it directly in filters. This means that it will not be added to the ``SELECT`` columns, but you can still use it to filter results:: diff --git a/docs/ref/models/constraints.txt b/docs/ref/models/constraints.txt index 00e907a882..ed56536606 100644 --- a/docs/ref/models/constraints.txt +++ b/docs/ref/models/constraints.txt @@ -69,10 +69,6 @@ ensures the age field is never less than 18. The name of the constraint. -.. versionchanged:: 3.0 - - Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added. - ``UniqueConstraint`` ==================== @@ -99,10 +95,6 @@ date. The name of the constraint. -.. versionchanged:: 3.0 - - Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added. - ``condition`` ------------- diff --git a/docs/ref/models/database-functions.txt b/docs/ref/models/database-functions.txt index b702085e77..da67d9e362 100644 --- a/docs/ref/models/database-functions.txt +++ b/docs/ref/models/database-functions.txt @@ -479,10 +479,6 @@ 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. -.. versionadded:: 3.0 - - The ``is_dst`` parameter was added. - Given the datetime ``2015-06-15 14:30:50.000321+00:00``, the built-in ``kind``\s return: @@ -1120,8 +1116,6 @@ It can also be registered as a transform. For example:: .. class:: Sign(expression, **extra) -.. versionadded:: 3.0 - Returns the sign (-1, 0, 1) of a numeric field or expression. Usage example:: @@ -1357,8 +1351,6 @@ spaces. .. class:: MD5(expression, **extra) -.. versionadded:: 3.0 - Accepts a single text field or expression and returns the MD5 hash of the string. @@ -1489,8 +1481,6 @@ spaces. .. class:: SHA384(expression, **extra) .. class:: SHA512(expression, **extra) -.. versionadded:: 3.0 - Accepts a single text field or expression and returns the particular hash of the string. diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index e4a186fcdc..252966bb6c 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -641,13 +641,6 @@ directly filter a queryset:: This will ensure that the subquery will not be added to the ``SELECT`` columns, which may result in a better performance. -.. versionchanged:: 3.0 - - In previous versions of Django, it was necessary to first annotate and then - filter against the annotation. This resulted in the annotated value always - being present in the query result, and often resulted in a query that took - more time to execute. - Using aggregates within a ``Subquery`` expression ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -995,10 +988,6 @@ calling the appropriate methods on the wrapped expression. to a column. The ``alias`` parameter will be ``None`` unless the expression has been annotated and is used for grouping. - .. versionchanged:: 3.0 - - The ``alias`` parameter was added. - .. method:: asc(nulls_first=False, nulls_last=False) Returns the expression ready to be sorted in ascending order. diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index 452736dfa8..a72c9b3862 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -301,10 +301,6 @@ There are some additional caveats to be aware of: __empty__ = _('(Unknown)') -.. versionadded:: 3.0 - - The ``TextChoices``, ``IntegerChoices``, and ``Choices`` classes were added. - ``db_column`` ------------- @@ -816,10 +812,6 @@ Has two optional arguments: class MyModel(models.Model): upload = models.FileField(upload_to=user_directory_path) - .. versionchanged:: 3.0 - - Support for :class:`pathlib.Path` was added. - .. attribute:: FileField.storage A storage object, or a callable which returns a storage object. This @@ -1030,10 +1022,6 @@ directory on the filesystem. Has some special arguments, of which the first is class MyModel(models.Model): file = models.FilePathField(path=images_path) - .. versionchanged:: 3.0 - - ``path`` can now be a callable. - .. attribute:: FilePathField.match Optional. A regular expression, as a string, that :class:`FilePathField` @@ -1315,8 +1303,6 @@ It uses :class:`~django.core.validators.validate_slug` or .. class:: SmallAutoField(**options) -.. versionadded:: 3.0 - Like an :class:`AutoField`, but only allows values under a certain (database-dependent) limit. Values from ``1`` to ``32767`` are safe in all databases supported by Django. @@ -1820,11 +1806,6 @@ that control how the relationship functions. add the descriptor for the reverse relationship, allowing :class:`ManyToManyField` relationships to be non-symmetrical. - .. versionchanged:: 3.0 - - Specifying ``symmetrical=True`` for recursive many-to-many - relationships using an intermediary model was allowed. - .. attribute:: ManyToManyField.through Django will automatically generate a table to manage many-to-many @@ -2078,8 +2059,6 @@ Field API reference .. attribute:: descriptor_class - .. versionadded:: 3.0 - A class implementing the :py:ref:`descriptor protocol ` that is instantiated and assigned to the model instance attribute. The constructor must accept a single argument, the ``Field`` instance. diff --git a/docs/ref/models/indexes.txt b/docs/ref/models/indexes.txt index ae872605a1..c4bcdff0dd 100644 --- a/docs/ref/models/indexes.txt +++ b/docs/ref/models/indexes.txt @@ -61,10 +61,6 @@ than 30 characters and shouldn't start with a number (0-9) or underscore (_). concrete model. For example ``Index(fields=['title'], name='%(app_label)s_%(class)s_title_index')``. -.. versionchanged:: 3.0 - - Interpolation of ``'%(app_label)s'`` and ``'%(class)s'`` was added. - ``db_tablespace`` ----------------- diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt index 06c63eba04..1da38d9663 100644 --- a/docs/ref/models/instances.txt +++ b/docs/ref/models/instances.txt @@ -496,12 +496,6 @@ which returns ``NULL``. In such cases it is possible to revert to the old algorithm by setting the :attr:`~django.db.models.Options.select_on_save` option to ``True``. -.. versionchanged:: 3.0 - - ``Model.save()`` no longer attempts to find a row when saving a new - ``Model`` instance and a default value for the primary key is provided, and - always executes an ``INSERT``. - .. _ref-models-force-insert: Forcing an INSERT or UPDATE diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 784d22ce4b..b96cd67e98 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -3455,10 +3455,6 @@ by the aggregate. This is the SQL equivalent of ``AVG(DISTINCT )``. The default value is ``False``. - .. versionchanged:: 3.0 - - Support for ``distinct=True`` was added. - ``Count`` ~~~~~~~~~ @@ -3534,10 +3530,6 @@ by the aggregate. the SQL equivalent of ``SUM(DISTINCT )``. The default value is ``False``. - .. versionchanged:: 3.0 - - Support for ``distinct=True`` was added. - ``Variance`` ~~~~~~~~~~~~ diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt index a769af581b..ad57038e5a 100644 --- a/docs/ref/request-response.txt +++ b/docs/ref/request-response.txt @@ -202,10 +202,6 @@ All attributes should be considered read-only, unless stated otherwise. {{ request.headers.user_agent }} - .. versionchanged:: 3.0 - - Support for lookups using underscores was added. - .. attribute:: HttpRequest.resolver_match An instance of :class:`~django.urls.ResolverMatch` representing the @@ -684,10 +680,6 @@ or :class:`memoryview`, to the :class:`HttpResponse` constructor:: >>> response = HttpResponse(b'Bytestrings are also accepted.') >>> response = HttpResponse(memoryview(b'Memoryview as well.')) -.. versionchanged:: 3.0 - - Support for :class:`memoryview` was added. - But if you want to add content incrementally, you can use ``response`` as a file-like object:: @@ -812,10 +804,6 @@ Methods given it will be extracted from ``content_type``, and if that is unsuccessful, the :setting:`DEFAULT_CHARSET` setting will be used. - .. versionchanged:: 3.0 - - Support for :class:`memoryview` ``content`` was added. - .. method:: HttpResponse.__setitem__(header, value) Sets the given header name to the given value. Both ``header`` and diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt index 10e7ab8a6e..46df532859 100644 --- a/docs/ref/settings.txt +++ b/docs/ref/settings.txt @@ -1561,10 +1561,6 @@ when using the :djadmin:`collectstatic` management command. See way that modes must be specified. If you try to use ``644``, you'll get totally incorrect behavior. -.. versionchanged:: 3.0 - - In older versions, the default value is ``None``. - .. setting:: FILE_UPLOAD_TEMP_DIR ``FILE_UPLOAD_TEMP_DIR`` @@ -1823,8 +1819,6 @@ deletes the old one. ``LANGUAGE_COOKIE_HTTPONLY`` ---------------------------- -.. versionadded:: 3.0 - Default: ``False`` Whether to use ``HttpOnly`` flag on the language cookie. If this is set to @@ -1872,8 +1866,6 @@ deletes the one. ``LANGUAGE_COOKIE_SAMESITE`` ---------------------------- -.. versionadded:: 3.0 - Default: ``None`` The value of the `SameSite`_ flag on the language cookie. This flag prevents the @@ -1890,8 +1882,6 @@ See :setting:`SESSION_COOKIE_SAMESITE` for details about ``SameSite``. ``LANGUAGE_COOKIE_SECURE`` -------------------------- -.. versionadded:: 3.0 - Default: ``False`` Whether to use a secure cookie for the language cookie. If this is set to @@ -2263,10 +2253,6 @@ If ``True``, the :class:`~django.middleware.security.SecurityMiddleware` sets the :ref:`x-content-type-options` header on all responses that do not already have it. -.. versionchanged:: 3.0 - - In older versions, the default value is ``False``. - .. setting:: SECURE_HSTS_INCLUDE_SUBDOMAINS ``SECURE_HSTS_INCLUDE_SUBDOMAINS`` @@ -2393,8 +2379,6 @@ from URL paths, so patterns shouldn't include them, e.g. ``SECURE_REFERRER_POLICY`` -------------------------- -.. versionadded:: 3.0 - Default: ``'same-origin'`` If configured, the :class:`~django.middleware.security.SecurityMiddleware` sets @@ -2887,10 +2871,6 @@ The default value for the X-Frame-Options header used by :class:`~django.middleware.clickjacking.XFrameOptionsMiddleware`. See the :doc:`clickjacking protection ` documentation. -.. versionchanged:: 3.0 - - In older versions, the default value is ``SAMEORIGIN``. - Auth ==== diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt index 4599331093..dcc354e2e2 100644 --- a/docs/ref/utils.txt +++ b/docs/ref/utils.txt @@ -71,21 +71,13 @@ need to distinguish caches by the ``Accept-language`` header. private`` header to a response to indicate that a page should never be cached. - .. versionchanged:: 3.0 - - ``private`` directive was added. - .. function:: patch_vary_headers(response, newheaders) Adds (or updates) the ``Vary`` header in the given ``HttpResponse`` object. ``newheaders`` is a list of header names that should be in ``Vary``. If headers contains an asterisk, then ``Vary`` header will consist of a single - asterisk ``'*'``. Otherwise, existing headers in ``Vary`` aren't removed. - - .. versionchanged:: 3.0 - - Handling an asterisk ``'*'`` according to :rfc:`7231#section-7.1.4` was - added. + asterisk ``'*'``, according to :rfc:`7231#section-7.1.4`. Otherwise, + existing headers in ``Vary`` aren't removed. .. function:: get_cache_key(request, key_prefix=None, method='GET', cache=None) @@ -643,11 +635,6 @@ escaping HTML. for use in HTML. The input is first coerced to a string and the output has :func:`~django.utils.safestring.mark_safe` applied. - .. versionchanged:: 3.0 - - In older versions, ``'`` is converted to its decimal code ``'`` - instead of the equivalent hex code ``'``. - .. function:: conditional_escape(text) Similar to ``escape()``, except that it doesn't operate on pre-escaped diff --git a/docs/topics/async.txt b/docs/topics/async.txt index 99b7f06113..b3bd285afe 100644 --- a/docs/topics/async.txt +++ b/docs/topics/async.txt @@ -2,8 +2,6 @@ Asynchronous support ==================== -.. versionadded:: 3.0 - .. currentmodule:: asgiref.sync Django has support for writing asynchronous ("async") views, along with an diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index 6b816c42fd..6ab8305468 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -577,14 +577,6 @@ password resets. You must then provide some key implementation details: ``REQUIRED_FIELDS`` has no effect in other parts of Django, like creating a user in the admin. - .. versionadded:: 3.0 - - :attr:`REQUIRED_FIELDS` now supports - :class:`~django.db.models.ManyToManyField`\s without a custom - through model. Since there is no way to pass model instances during - the :djadmin:`createsuperuser` prompt, expect the user to enter IDs - of existing instances of the class to which the model is related. - For example, here is the partial definition for a user model that defines two required fields - a date of birth and height:: @@ -934,8 +926,6 @@ methods and attributes: .. method:: models.PermissionsMixin.get_user_permissions(obj=None) - .. versionadded:: 3.0 - Returns a set of permission strings that the user has directly. If ``obj`` is passed in, only returns the user permissions for this diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index dab12ca592..be45723bde 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -1398,10 +1398,6 @@ implementation details see :ref:`using-the-views`. * ``reset_url_token``: Token parameter displayed as a component of password reset URLs. Defaults to ``'set-password'``. - .. versionchanged:: 3.0 - - The ``reset_url_token`` class attribute was added. - **Template context:** * ``form``: The form (see ``form_class`` above) for setting the new user's diff --git a/docs/topics/forms/formsets.txt b/docs/topics/forms/formsets.txt index 2f3e4403f6..3b5775cabb 100644 --- a/docs/topics/forms/formsets.txt +++ b/docs/topics/forms/formsets.txt @@ -459,8 +459,6 @@ control the widget used with ``ordering_widget`` ^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 3.0 - .. attribute:: BaseFormSet.ordering_widget Default: :class:`~django.forms.NumberInput` @@ -478,8 +476,6 @@ Set ``ordering_widget`` to specify the widget class to be used with ``get_ordering_widget`` ^^^^^^^^^^^^^^^^^^^^^^^ -.. versionadded:: 3.0 - .. method:: BaseFormSet.get_ordering_widget() Override ``get_ordering_widget()`` if you need to provide a widget instance for diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt index e1ec2c6028..fe91d0cc98 100644 --- a/docs/topics/http/decorators.txt +++ b/docs/topics/http/decorators.txt @@ -121,7 +121,3 @@ client-side caching. This decorator adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate, private`` header to a response to indicate that a page should never be cached. - - .. versionchanged:: 3.0 - - ``private`` directive was added. diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt index 9427ac0169..41c2c499e4 100644 --- a/docs/topics/http/sessions.txt +++ b/docs/topics/http/sessions.txt @@ -246,8 +246,6 @@ You can edit it multiple times. .. method:: get_session_cookie_age() - .. versionadded:: 3.0 - Returns the age of session cookies, in seconds. Defaults to :setting:`SESSION_COOKIE_AGE`. diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index ff39635c9c..31671db81d 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -61,11 +61,6 @@ algorithm the system follows to determine which Python code to execute: in the optional ``kwargs`` argument to :func:`django.urls.path` or :func:`django.urls.re_path`. - .. versionchanged:: 3.0 - - In older versions, the keyword arguments with ``None`` values are - made up also for not provided named parts. - #. If no URL pattern matches, or if an exception is raised during any point in this process, Django invokes an appropriate error-handling view. See `Error handling`_ below. diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index 5fdf8f0a4e..7afe47c149 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1854,10 +1854,6 @@ You would typically want to use both: :func:`django.utils.translation.activate() changes the language for this thread, and setting the cookie makes this preference persist in future requests. -.. versionchanged:: 3.0 - - In older versions, you could set the language in the current session. - Using translations outside views and templates ---------------------------------------------- diff --git a/docs/topics/logging.txt b/docs/topics/logging.txt index 2b2c33208a..e8c59150a0 100644 --- a/docs/topics/logging.txt +++ b/docs/topics/logging.txt @@ -693,10 +693,6 @@ Python logging module. } }, - .. versionadded:: 3.0 - - The ``reporter_class`` argument was added. - .. method:: send_mail(subject, message, *args, **kwargs) Sends emails to admin users. To customize this behavior, you can diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index dd9fa5eb1c..b14a173987 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -132,10 +132,6 @@ Use the ``django.test.Client`` class to make requests. exceptions raised during the request should also be raised in the test. Defaults to ``True``. - .. versionadded:: 3.0 - - The ``raise_request_exception`` argument was added. - Once you have a ``Client`` instance, you can call any of the following methods: @@ -481,8 +477,6 @@ Specifically, a ``Response`` object has the following attributes: .. attribute:: exc_info - .. versionadded:: 3.0 - A tuple of three values that provides information about the unhandled exception, if any, that occurred during the view.