2019-09-05 12:46:01 +00:00
|
|
|
============================================
|
|
|
|
Django 3.1 release notes - UNDER DEVELOPMENT
|
|
|
|
============================================
|
|
|
|
|
|
|
|
*Expected August 2020*
|
|
|
|
|
|
|
|
Welcome to Django 3.1!
|
|
|
|
|
|
|
|
These release notes cover the :ref:`new features <whats-new-3.1>`, as well as
|
|
|
|
some :ref:`backwards incompatible changes <backwards-incompatible-3.1>` you'll
|
|
|
|
want to be aware of when upgrading from Django 3.0 or earlier. We've
|
|
|
|
:ref:`dropped some features<removed-features-3.1>` that have reached the end of
|
|
|
|
their deprecation cycle, and we've :ref:`begun the deprecation process for
|
|
|
|
some features <deprecated-features-3.1>`.
|
|
|
|
|
|
|
|
See the :doc:`/howto/upgrade-version` guide if you're updating an existing
|
|
|
|
project.
|
|
|
|
|
|
|
|
Python compatibility
|
|
|
|
====================
|
|
|
|
|
|
|
|
Django 3.1 supports Python 3.6, 3.7, and 3.8. We **highly recommend** and only
|
|
|
|
officially support the latest release of each series.
|
|
|
|
|
|
|
|
.. _whats-new-3.1:
|
|
|
|
|
|
|
|
What's new in Django 3.1
|
|
|
|
========================
|
|
|
|
|
|
|
|
Minor features
|
|
|
|
--------------
|
|
|
|
|
|
|
|
:mod:`django.contrib.admin`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.admindocs`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.auth`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2019-09-12 09:46:37 +00:00
|
|
|
* The default iteration count for the PBKDF2 password hasher is increased from
|
|
|
|
180,000 to 216,000.
|
2019-09-05 12:46:01 +00:00
|
|
|
|
2019-08-23 15:14:07 +00:00
|
|
|
* Added the :setting:`PASSWORD_RESET_TIMEOUT` setting to define the minimum
|
|
|
|
number of seconds a password reset link is valid for. This is encouraged
|
|
|
|
instead of deprecated ``PASSWORD_RESET_TIMEOUT_DAYS``, which will be removed
|
|
|
|
in Django 4.0.
|
|
|
|
|
2019-09-05 12:46:01 +00:00
|
|
|
:mod:`django.contrib.contenttypes`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.gis`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.messages`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.postgres`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.redirects`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.sessions`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.sitemaps`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.sites`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.staticfiles`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
:mod:`django.contrib.syndication`
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Cache
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
CSRF
|
|
|
|
~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Email
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
File Storage
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
File Uploads
|
|
|
|
~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
|
|
|
|
Forms
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Generic Views
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Internationalization
|
|
|
|
~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Logging
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Management Commands
|
|
|
|
~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Migrations
|
|
|
|
~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Models
|
|
|
|
~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Requests and Responses
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Serialization
|
|
|
|
~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Signals
|
|
|
|
~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Templates
|
|
|
|
~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Tests
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
URLs
|
|
|
|
~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Validators
|
|
|
|
~~~~~~~~~~
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
.. _backwards-incompatible-3.1:
|
|
|
|
|
|
|
|
Backwards incompatible changes in 3.1
|
|
|
|
=====================================
|
|
|
|
|
|
|
|
Database backend API
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
This section describes changes that may be needed in third-party database
|
|
|
|
backends.
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
|
|
|
Miscellaneous
|
|
|
|
-------------
|
|
|
|
|
2019-09-11 21:12:35 +00:00
|
|
|
* The cache keys used by :ttag:`cache` and generated by
|
|
|
|
:func:`~django.core.cache.utils.make_template_fragment_key` are different
|
|
|
|
from the keys generated by older versions of Django. After upgrading to
|
|
|
|
Django 3.1, the first request to any previously cached template fragment will
|
|
|
|
be a cache miss.
|
2019-09-05 12:46:01 +00:00
|
|
|
|
|
|
|
.. _deprecated-features-3.1:
|
|
|
|
|
|
|
|
Features deprecated in 3.1
|
|
|
|
==========================
|
|
|
|
|
|
|
|
Miscellaneous
|
|
|
|
-------------
|
|
|
|
|
2019-08-23 15:14:07 +00:00
|
|
|
* ``PASSWORD_RESET_TIMEOUT_DAYS`` setting is deprecated in favor of
|
|
|
|
:setting:`PASSWORD_RESET_TIMEOUT`.
|
2019-09-05 12:46:01 +00:00
|
|
|
|
|
|
|
.. _removed-features-3.1:
|
|
|
|
|
|
|
|
Features removed in 3.1
|
|
|
|
=======================
|
|
|
|
|
|
|
|
These features have reached the end of their deprecation cycle and are removed
|
|
|
|
in Django 3.1.
|
|
|
|
|
|
|
|
See :ref:`deprecated-features-2.2` for details on these changes, including how
|
|
|
|
to remove usage of these features.
|
|
|
|
|
2019-09-06 05:59:06 +00:00
|
|
|
* ``django.utils.timezone.FixedOffset`` is removed.
|
|
|
|
|
2019-09-06 06:07:20 +00:00
|
|
|
* ``django.core.paginator.QuerySetPaginator`` is removed.
|
|
|
|
|
2019-09-07 17:28:19 +00:00
|
|
|
* A model's ``Meta.ordering`` doesn't affect ``GROUP BY`` queries.
|
|
|
|
|
2019-09-05 14:10:21 +00:00
|
|
|
* ``django.contrib.postgres.fields.FloatRangeField`` and
|
|
|
|
``django.contrib.postgres.forms.FloatRangeField`` are removed.
|
2019-09-05 14:25:30 +00:00
|
|
|
|
|
|
|
* The ``FILE_CHARSET`` setting is removed.
|
2019-09-06 11:40:59 +00:00
|
|
|
|
|
|
|
* ``django.contrib.staticfiles.storage.CachedStaticFilesStorage`` is removed.
|
2019-09-07 09:57:46 +00:00
|
|
|
|
2019-09-07 13:58:49 +00:00
|
|
|
* The ``RemoteUserBackend.configure_user()`` method requires ``request`` as the
|
|
|
|
first positional argument.
|
|
|
|
|
2019-09-07 09:57:46 +00:00
|
|
|
* Support for ``SimpleTestCase.allow_database_queries`` and
|
|
|
|
``TransactionTestCase.multi_db`` is removed.
|