Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled biweekly dependency update for week 49 #142

Closed
wants to merge 7 commits into from

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Dec 6, 2021

Update tox from 3.23.0 to 3.24.4.

Changelog

3.24.4

--------------------

Bugfixes
^^^^^^^^

- Fixed handling of ``-e ALL`` in parallel mode by ignoring the ``ALL`` in subprocesses -- by :user:`guahki`.
`2167 <https://github.com/tox-dev/tox/issues/2167>`_
- Prevent tox from using a truncated interpreter when using
``TOX_LIMITED_SHEBANG`` -- by :user:`jdknight`.
`2208 <https://github.com/tox-dev/tox/issues/2208>`_


Documentation
^^^^^^^^^^^^^

- Enabled the use of the favicon in the Sphinx docs first
introduced in :pull:`764` but not integrated fully
-- :user:`webknjaz`
`2177 <https://github.com/tox-dev/tox/issues/2177>`_

3.24.3

--------------------

Bugfixes
^^^^^^^^

- ``--parallel`` reports now show ASCII OK/FAIL/SKIP lines when full Unicode output is not available - by :user:`brettcs`
`1421 <https://github.com/tox-dev/tox/issues/1421>`_


Miscellaneous
^^^^^^^^^^^^^

- Started enforcing valid references in Sphinx docs -- :user:`webknjaz`
`2168 <https://github.com/tox-dev/tox/issues/2168>`_

3.24.2

--------------------

Bugfixes
^^^^^^^^

- include ``LC_ALL`` to implicit list of passenv variables - by :user:`ssbarnea`
`2162 <https://github.com/tox-dev/tox/issues/2162>`_

3.24.1

--------------------

Bugfixes
^^^^^^^^

- ``get_requires_for_build_sdist`` hook (PEP 517) is assumed to return an empty list if left unimplemented by the backend build system - by :user:`oczkoisse`
`2130 <https://github.com/tox-dev/tox/issues/2130>`_


Documentation
^^^^^^^^^^^^^

- The documentation of ``install_command`` now also mentions that you can provide arbitrary commands - by :user:`jugmac00`
`2081 <https://github.com/tox-dev/tox/issues/2081>`_

3.24.0

--------------------

Bugfixes
^^^^^^^^

- ``--devenv`` no longer modifies the directory in which the ``.tox`` environment is provisioned - by :user:`isaac-ped`
`2065 <https://github.com/tox-dev/tox/issues/2065>`_
- Fix show config when the package names are not in canonical form - by :user:`gaborbernat`.
`2103 <https://github.com/tox-dev/tox/issues/2103>`_


Documentation
^^^^^^^^^^^^^

- Extended environment variables section - by :user:`majiang`
`2036 <https://github.com/tox-dev/tox/issues/2036>`_


Miscellaneous
^^^^^^^^^^^^^

- ``tox`` no longer shows deprecation warnings for ``distutils.sysconfig`` on
Python 3.10 - by :user:`9999years`
`2100 <https://github.com/tox-dev/tox/issues/2100>`_

3.23.1

--------------------

Bugfixes
^^^^^^^^

- Distinguish between normal Windows Python and MSYS2 Python when looking for
virtualenv executable path.  Adds os.sep to :class:`~tox.interpreters.InterpreterInfo`
- by :user:`jschwartzentruber`
`1982 <https://github.com/tox-dev/tox/issues/1982>`_
- Fix a ``tox-conda`` isolation build bug - by :user:`AntoineD`.
`2056 <https://github.com/tox-dev/tox/issues/2056>`_


Documentation
^^^^^^^^^^^^^

- Update examples in the documentation to use ``setenv`` in the ``[testenv]`` sections, not wrongly in the ``[tox]`` main section.
- by :user:`AndreyNautilus`
`1999 <https://github.com/tox-dev/tox/issues/1999>`_


Miscellaneous
^^^^^^^^^^^^^

- Enable building tox with ``setuptools_scm`` 6+ by :user:`hroncok`
`1984 <https://github.com/tox-dev/tox/issues/1984>`_
Links

Update pytest from 6.2.3 to 6.2.5.

Changelog

6.2.5

=========================


Trivial/Internal Changes
------------------------

- `8494 <https://github.com/pytest-dev/pytest/issues/8494>`_: Python 3.10 is now supported.


- `9040 <https://github.com/pytest-dev/pytest/issues/9040>`_: Enable compatibility with ``pluggy 1.0`` or later.

6.2.4

=========================

Bug Fixes
---------

- `8539 <https://github.com/pytest-dev/pytest/issues/8539>`_: Fixed assertion rewriting on Python 3.10.
Links

Update pytest-cov from 2.11.1 to 3.0.0.

Changelog

3.0.0

-------------------

**Note that this release drops support for Python 2.7 and Python 3.5.**

* Added support for Python 3.10 and updated various test dependencies.
Contributed by Hugo van Kemenade in
`500 <https://github.com/pytest-dev/pytest-cov/pull/500>`_.
* Switched from Travis CI to GitHub Actions. Contributed by Hugo van Kemenade in
`494 <https://github.com/pytest-dev/pytest-cov/pull/494>`_ and
`495 <https://github.com/pytest-dev/pytest-cov/pull/495>`_.
* Add a ``--cov-reset`` CLI option.
Contributed by Danilo Šegan in
`459 <https://github.com/pytest-dev/pytest-cov/pull/459>`_.
* Improved validation of ``--cov-fail-under`` CLI option.
Contributed by ... Ronny Pfannschmidt's desire for skark in
`480 <https://github.com/pytest-dev/pytest-cov/pull/480>`_.
* Dropped Python 2.7 support.
Contributed by Thomas Grainger in
`488 <https://github.com/pytest-dev/pytest-cov/pull/488>`_.
* Updated trove classifiers. Contributed by Michał Bielawski in
`481 <https://github.com/pytest-dev/pytest-cov/pull/481>`_.

2.13.0

-------------------

* Changed the `toml` requirement to be always be directly required (instead of being required through a coverage extra).
This fixes issues with pip-compile (`pip-tools1300 <https://github.com/jazzband/pip-tools/issues/1300>`_).
Contributed by Sorin Sbarnea in `472 <https://github.com/pytest-dev/pytest-cov/pull/472>`_.
* Documented ``show_contexts``.
Contributed by Brian Rutledge in `473 <https://github.com/pytest-dev/pytest-cov/pull/473>`_.

2.12.1

-------------------

* Changed the `toml` requirement to be always be directly required (instead of being required through a coverage extra).
This fixes issues with pip-compile (`pip-tools1300 <https://github.com/jazzband/pip-tools/issues/1300>`_).
Contributed by Sorin Sbarnea in `472 <https://github.com/pytest-dev/pytest-cov/pull/472>`_.
* Documented ``show_contexts``.
Contributed by Brian Rutledge in `473 <https://github.com/pytest-dev/pytest-cov/pull/473>`_.

2.12.0

-------------------

* Added coverage's `toml` extra to install requirements in setup.py.
Contributed by Christian Riedel in `410 <https://github.com/pytest-dev/pytest-cov/pull/410>`_.
* Fixed ``pytest_cov.__version__`` to have the right value (string with version instead of a string
including ``__version__ =``).
* Fixed license classifier in ``setup.py``.
Contributed by Chris Sreesangkom in `467 <https://github.com/pytest-dev/pytest-cov/pull/467>`_.
* Fixed *commits since* badge.
Contributed by Terence Honles in `470 <https://github.com/pytest-dev/pytest-cov/pull/470>`_.
Links

Update pytest-django from 4.1.0 to 4.5.1.

Changelog

4.5.1

-------------------

Bugfixes
^^^^^^^^

* Fix regression in v4.5.0 - database tests inside (non-unittest) classes were
not ordered correctly to run before non-database tests, same for transactional
tests before non-transactional tests.

4.5.0

-------------------

Improvements
^^^^^^^^^^^^

* Add support for :ref:`rollback emulation/serialized rollback
<test-case-serialized-rollback>`. The :func:`pytest.mark.django_db` marker
has a new ``serialized_rollback`` option, and a
:fixture:`django_db_serialized_rollback` fixture is added.

* Official Python 3.10 support.

* Official Django 4.0 support (tested against 4.0rc1 at the time of release).

* Drop official Django 3.0 support. Django 2.2 is still supported, and 3.0
will likely keep working until 2.2 is dropped, but it's not tested.

* Added pyproject.toml file.

* Skip Django's `setUpTestData` mechanism in pytest-django tests. It is not
used for those, and interferes with some planned features. Note that this
does not affect ``setUpTestData`` in unittest tests (test classes which
inherit from Django's `TestCase`).

Bugfixes
^^^^^^^^

* Fix :fixture:`live_server` when using an in-memory SQLite database.

* Fix typing of ``assertTemplateUsed`` and ``assertTemplateNotUsed``.

4.4.0

-------------------

Improvements
^^^^^^^^^^^^

* Add a fixture :fixture:`django_capture_on_commit_callbacks` to capture
:func:`transaction.on_commit() <django.db.transaction.on_commit>` callbacks
in tests.

4.3.0

-------------------

Improvements
^^^^^^^^^^^^

* Add experimental :ref:`multiple databases <multi-db>` (multi db) support.

* Add type annotations. If you previously excluded ``pytest_django`` from
your type-checker, you can remove the exclusion.

* Documentation improvements.

4.2.0

-------------------

Improvements
^^^^^^^^^^^^

* Official Django 3.2 support.

* Documentation improvements.

Bugfixes
^^^^^^^^

* Disable atomic durability check on non-transactional tests (910).
Links

Update sphinx from 3.5.3 to 4.3.1.

Changelog

4.3.1

=====================================

Features added
--------------

* 9864: mathjax: Support chnaging the loading method of MathJax to "defer" via
:confval:`mathjax_options`

Bugs fixed
----------

* 9838: autodoc: AttributeError is raised on building document for functions
decorated by functools.lru_cache
* 9879: autodoc: AttributeError is raised on building document for an object
having invalid __doc__ atribute
* 9844: autodoc: Failed to process a function wrapped with functools.partial if
:confval:`autodoc_preserve_defaults` enabled
* 9872: html: Class namespace collision between autodoc signatures and
docutils-0.17
* 9868: imgmath: Crashed if the dvisvgm command failed to convert equation
* 9864: mathjax: Failed to render equations via MathJax v2.  The loading method
of MathJax is back to "async" method again

4.3.0

=====================================

Dependencies
------------

* Support Python 3.10

Incompatible changes
--------------------

* 9649: ``searchindex.js``: the embedded data has changed format to allow
objects with the same name in different domains.
* 9672: The rendering of Python domain declarations is implemented
with more docutils nodes to allow better CSS styling.
It may break existing styling.
* 9672: the signature of
:py:meth:`domains.py.PyObject.get_signature_prefix` has changed to
return a list of nodes instead of a plain string.
* 9695: ``domains.js.JSObject.display_prefix`` has been changed into a method
``get_display_prefix`` which now returns a list of nodes
instead of a plain string.
* 9695: The rendering of Javascript domain declarations is implemented
with more docutils nodes to allow better CSS styling.
It may break existing styling.
* 9450: mathjax: Load MathJax via "defer" strategy

Deprecated
----------

* ``sphinx.ext.autodoc.AttributeDocumenter._datadescriptor``
* ``sphinx.writers.html.HTMLTranslator._fieldlist_row_index``
* ``sphinx.writers.html.HTMLTranslator._table_row_index``
* ``sphinx.writers.html5.HTML5Translator._fieldlist_row_index``
* ``sphinx.writers.html5.HTML5Translator._table_row_index``

Features added
--------------

* 9639: autodoc: Support asynchronous generator functions
* 9664: autodoc: ``autodoc-process-bases`` supports to inject reST snippet as a
base class
* 9691: C, added new info-field ``retval``
for :rst:dir:`c:function` and :rst:dir:`c:macro`.
* C++, added new info-field ``retval`` for :rst:dir:`cpp:function`.
* 9618: i18n: Add :confval:`gettext_allow_fuzzy_translations` to allow "fuzzy"
messages for translation
* 9672: More CSS classes on Python domain descriptions
* 9695: More CSS classes on Javascript domain descriptions
* 9683: Revert the removal of ``add_stylesheet()`` API.  It will be kept until
the Sphinx-6.0 release
* 2068, add :confval:`intersphinx_disabled_reftypes` for disabling
interphinx resolution of cross-references that do not have an explicit
inventory specification. Specific types of cross-references can be disabled,
e.g., ``std:doc`` or all cross-references in a specific domain,
e.g., ``std:*``.
* 9623: Allow to suppress "toctree contains reference to excluded document"
warnings using :confval:`suppress_warnings`

Bugs fixed
----------

* 9630: autodoc: Failed to build cross references if :confval:`primary_domain`
is not 'py'
* 9644: autodoc: Crashed on getting source info from problematic object
* 9655: autodoc: mocked object having doc comment is warned unexpectedly
* 9651: autodoc: return type field is not generated even if
:confval:`autodoc_typehints_description_target` is set to "documented" when
its info-field-list contains ``:returns:`` field
* 9657: autodoc: The base class for a subclass of mocked object is incorrect
* 9607: autodoc: Incorrect base class detection for the subclasses of the
generic class
* 9755: autodoc: memory addresses are shown for aliases
* 9752: autodoc: Failed to detect type annotation for slots attribute
* 9756: autodoc: Crashed if classmethod does not have __func__ attribute
* 9757: autodoc: :confval:`autodoc_inherit_docstrings` does not effect to
overriden classmethods
* 9781: autodoc: :confval:`autodoc_preserve_defaults` does not support
hexadecimal numeric
* 9630: autosummary: Failed to build summary table if :confval:`primary_domain`
is not 'py'
* 9670: html: Fix download file with special characters
* 9710: html: Wrong styles for even/odd rows in nested tables
* 9763: html: parameter name and its type annotation are not separated in HTML
* 9649: HTML search: when objects have the same name but in different domains,
return all of them as result instead of just one.
* 7634: intersphinx: references on the file in sub directory are broken
* 9737: LaTeX: hlist is rendered as a list containing "aggedright" text
* 9678: linkcheck: file extension was shown twice in warnings
* 9697: py domain: An index entry with parens was registered for ``py:method``
directive with ``:property:`` option
* 9775: py domain: Literal typehint was converted to a cross reference when
:confval:`autodoc_typehints='description'`
* 9708: needs_extension failed to check double-digit version correctly
* 9688: Fix :rst:dir:`code`` does not recognize ``:class:`` option
* 9733: Fix for logging handler flushing warnings in the middle of the docs
build
* 9656: Fix warnings without subtype being incorrectly suppressed
* Intersphinx, for unresolved references with an explicit inventory,
e.g., ``proj:myFunc``, leave the inventory prefix in the unresolved text.

4.2.0

=====================================

Features added
--------------

* 9445: autodoc: Support class properties
* 9479: autodoc: Emit a warning if target is a mocked object
* 9560: autodoc: Allow to refer NewType instances with module name in Python
3.10 or above
* 9447: html theme: Expose the version of Sphinx in the form of tuple as a
template variable ``sphinx_version_tuple``
* 9594: manpage: Suppress the title of man page if description is empty
* 9445: py domain: ``:py:property:`` directive supports ``:classmethod:``
option to describe the class property
* 9524: test: SphinxTestApp can take ``builddir`` as an argument
* 9535: C and C++, support more fundamental types, including GNU extensions.

Bugs fixed
----------

* 9608: apidoc: apidoc does not generate a module definition for implicit
namespace package
* 9504: autodoc: generate incorrect reference to the parent class if the target
class inherites the class having ``_name`` attribute
* 9537, 9589: autodoc: Some objects under ``typing`` module are not displayed
well with the HEAD of 3.10
* 9487: autodoc: typehint for cached_property is not shown
* 9509: autodoc: AttributeError is raised on failed resolving typehints
* 9518: autodoc: autodoc_docstring_signature does not effect to ``__init__()``
and ``__new__()``
* 9522: autodoc: PEP 585 style typehints having arguments (ex. ``list[int]``)
are not displayed well
* 9481: autosummary: some warnings contain non-existing filenames
* 9568: autosummary: summarise overlined sectioned headings correctly
* 9600: autosummary: Type annotations which contain commas in autosummary table
are not removed completely
* 9481: c domain: some warnings contain non-existing filenames
* 9481: cpp domain: some warnings contain non-existing filenames
* 9456: html search: abbreation marks are inserted to the search result if
failed to fetch the content of the page
* 9617: html search: The JS requirement warning is shown if browser is slow
* 9267: html theme: CSS and JS files added by theme were loaded twice
* 9585: py domain: ``:type:`` option for :rst:dir:`py:property` directive does
not create a hyperlink
* 9576: py domain: Literal typehint was converted to a cross reference
* 9535 comment: C++, fix parsing of defaulted function parameters that are
function pointers.
* 9564: smartquotes: don't adjust typography for text with
language-highlighted ``:code:`` role.
* 9512: sphinx-build: crashed with the HEAD of Python 3.10

4.1.2

=====================================

Incompatible changes
--------------------

* 9435: linkcheck: Disable checking automatically generated anchors on
github.com (ex. anchors in reST/Markdown documents)

Bugs fixed
----------

* 9489: autodoc: Custom types using ``typing.NewType`` are not displayed well
with the HEAD of 3.10
* 9490: autodoc: Some objects under ``typing`` module are not displayed well
with the HEAD of 3.10
* 9436, 9471: autodoc: crashed if ``autodoc_class_signature = "separated"``
* 9456: html search: html_copy_source can't control the search summaries
* 9500: LaTeX: Failed to build Japanese document on Windows
* 9435: linkcheck: Failed to check anchors in github.com

4.1.1

=====================================

Dependencies
------------

* 9434: sphinxcontrib-htmlhelp-2.0.0 or above
* 9434: sphinxcontrib-serializinghtml-1.1.5 or above

Bugs fixed
----------

* 9438: html: HTML logo or Favicon specified as file not being found on output

4.1.0

=====================================

Dependencies
------------

* Support jinja2-3.0

Deprecated
----------

* The ``app`` argument of ``sphinx.environment.BuildEnvironment`` becomes
required
* ``sphinx.application.Sphinx.html_theme``
* ``sphinx.ext.autosummary._app``
* ``sphinx.util.docstrings.extract_metadata()``

Features added
--------------

* 8107: autodoc: Add ``class-doc-from`` option to :rst:dir:`autoclass`
directive to control the content of the specific class like
:confval:`autoclass_content`
* 8588: autodoc: :confval:`autodoc_type_aliases` now supports dotted name. It
allows you to define an alias for a class with module name like
``foo.bar.BazClass``
* 9175: autodoc: Special member is not documented in the module
* 9195: autodoc: The arguments of ``typing.Literal`` are wrongly rendered
* 9185: autodoc: :confval:`autodoc_typehints` allows ``'both'`` setting to
allow typehints to be included both in the signature and description
* 4257: autodoc: Add :confval:`autodoc_class_signature` to separate the class
entry and the definition of ``__init__()`` method
* 8061, 9218: autodoc: Support variable comment for alias classes
* 3014: autodoc: Add :event:`autodoc-process-bases` to modify the base classes
of the class definitions
* 9272: autodoc: Render enum values for the default argument value better
* 9384: autodoc: ``autodoc_typehints='none'`` now erases typehints for
variables, attributes and properties
* 3257: autosummary: Support instance attributes for classes
* 9358: html: Add "heading" role to the toctree items
* 9225: html: Add span tag to the return typehint of method/function
* 9129: html search: Show search summaries when html_copy_source = False
* 9307: html search: Prevent corrections and completions in search field
* 9120: html theme: Eliminate prompt characters of code-block from copyable
text
* 9176: i18n: Emit a debug message if message catalog file not found under
:confval:`locale_dirs`
* 9414: LaTeX: Add xeCJKVerbAddon to default fvset config for Chinese documents
* 9016: linkcheck: Support checking anchors on github.com
* 9016: linkcheck: Add a new event :event:`linkcheck-process-uri` to modify
URIs before checking hyperlinks
* 6525: linkcheck: Add :confval:`linkcheck_allowed_redirects` to mark
hyperlinks that are redirected to expected URLs as "working"
* 1874: py domain: Support union types using ``|`` in info-field-list
* 9268: py domain: :confval:`python_use_unqualified_type_names` supports type
field in info-field-list
* 9097: Optimize the parallel build
* 9131: Add :confval:`nitpick_ignore_regex` to ignore nitpicky warnings using
regular expressions
* 9174: Add ``Sphinx.set_html_assets_policy`` to tell extensions to include
HTML assets in all the pages. Extensions can check this via
``Sphinx.registry.html_assets_policy``
* C++, add support for

- ``inline`` variables,
- ``consteval`` functions,
- ``constinit`` variables,
- ``char8_t``,
- ``explicit(<constant expression>)`` specifier,
- digit separators in literals, and
- constraints in placeholder type specifiers, aka. adjective syntax
 (e.g., ``Sortable auto &v``).

* C, add support for digit separators in literals.
* 9166: LaTeX: support containers in LaTeX output


Bugs fixed
----------

* 8872: autodoc: stacked singledispatches are wrongly rendered
* 8597: autodoc: a docsting having metadata only should be treated as
undocumented
* 9185: autodoc: typehints for overloaded functions and methods are inaccurate
* 9250: autodoc: The inherited method not having docstring is wrongly parsed
* 9283: autodoc: autoattribute directive failed to generate document for an
attribute not having any comment
* 9364: autodoc: single element tuple on the default argument value is wrongly
rendered
* 9362: autodoc: AttributeError is raised on processing a subclass of Tuple[()]
* 9404: autodoc: TypeError is raised on processing dict-like object (not a
class) via autoclass directive
* 9317: html: Pushing left key causes visiting the next page at the first page
* 9381: html: URL for html_favicon and html_log does not work
* 9270: html theme : pyramid theme generates incorrect logo links
* 9217: manpage: The name of manpage directory that is generated by
:confval:`man_make_section_directory` is not correct
* 9350: manpage: Fix font isn't reset after keyword at the top of samp role
* 9306: Linkcheck reports broken link when remote server closes the connection
on HEAD request
* 9280: py domain: "exceptions" module is not displayed
* 9418: py domain: a Callable annotation with no parameters
(e.g. ``Callable[[], None])`` will be rendered with a bracket missing
(``Callable[], None]``)
* 9319: quickstart: Make sphinx-quickstart exit when conf.py already exists
* 9387: xml: XML Builder ignores custom visitors
* 9224: ``:param:`` and ``:type:`` fields does not support a type containing
whitespace (ex. ``Dict[str, str]``)
* 8945: when transforming typed fields, call the specified role instead of
making an single xref. For C and C++, use the ``expr`` role for typed fields.

4.0.3

=====================================

Features added
--------------

* C, add C23 keywords ``_Decimal32``, ``_Decimal64``, and ``_Decimal128``.
* 9354: C, add :confval:`c_extra_keywords` to allow user-defined keywords
during parsing.
* Revert the removal of ``sphinx.util:force_decode()`` to become some 3rd party
extensions available again during 5.0

Bugs fixed
----------

* 9330: changeset domain: :rst:dir:`versionchanged` with contents being a list
will cause error during pdf build
* 9313: LaTeX: complex table with merged cells broken since 4.0
* 9305: LaTeX: backslash may cause Improper discretionary list pdf build error
with Japanese engines
* 9354: C, remove special macro names from the keyword list.
See also :confval:`c_extra_keywords`.
* 9322: KeyError is raised on PropagateDescDomain transform

4.0.2

=====================================

Dependencies
------------

* 9216: Support jinja2-3.0

Incompatible changes
--------------------

* 9222: Update Underscore.js to 1.13.1
* 9217: manpage: Stop creating a section directory on build manpage by default
(see :confval:`man_make_section_directory`)

Bugs fixed
----------

* 9210: viewcode: crashed if non importable modules found on parallel build
* 9240: Unknown node error for pending_xref_condition is raised if an extension
that does not support the node installs a missing-reference handler

4.0.1

=====================================

Bugs fixed
----------

* 9189: autodoc: crashed when ValueError is raised on generating signature
from a property of the class
* 9188: autosummary: warning is emitted if list value is set to
autosummary_generate
* 8380: html search: tags for search result are broken
* 9198: i18n: Babel emits errors when running compile_catalog
* 9205: py domain: The :canonical: option causes "more than one target for
cross-reference" warning
* 9201: websupport: UndefinedError is raised: 'css_tag' is undefined

4.0.0

=====================================

Dependencies
------------

4.0.0b3

* 9167: html: Failed to add CSS files to the specific page

4.0.0b2

* C, C++, fix ``KeyError`` when an ``alias`` directive is the first C/C++
directive in a file with another C/C++ directive later.

4.0.0b1

* 8917: autodoc: Raises a warning if function has wrong __globals__ value
* 8415: autodoc: a TypeVar imported from other module is not resolved (in
Python 3.7 or above)
* 8992: autodoc: Failed to resolve types.TracebackType type annotation
* 8905: html: html_add_permalinks=None and html_add_permalinks="" are ignored
* 8380: html search: Paragraphs in search results are not identified as ``<p>``
* 8915: html theme: The translation of sphinx_rtd_theme does not work
* 8342: Emit a warning if a unknown domain is given for directive or role (ex.
``:unknown:doc:``)
* 7241: LaTeX: No wrapping for ``cpp:enumerator``
* 8711: LaTeX: backticks in code-blocks trigger latexpdf build warning (and font
change) with late TeXLive 2019
* 8253: LaTeX: Figures with no size defined get overscaled (compared to images
with size explicitly set in pixels) (fixed for ``'pdflatex'/'lualatex'`` only)
* 8881: LaTeX: The depth of bookmarks panel in PDF is not enough for navigation
* 8874: LaTeX: the fix to two minor Pygments LaTeXFormatter output issues ignore
Pygments style
* 8925: LaTeX: 3.5.0 ``verbatimmaxunderfull`` setting does not work as
expected
* 8980: LaTeX: missing line break in ``\pysigline``
* 8995: LaTeX: legacy ``\pysiglinewithargsret`` does not compute correctly
available  horizontal space and should use a ragged right style
* 9009: LaTeX: "release" value with underscore leads to invalid LaTeX
* 8911: C++: remove the longest matching prefix in
:confval:`cpp_index_common_prefix` instead of the first that matches.
* C, properly reject function declarations when a keyword is used
as parameter name.
* 8933: viewcode: Failed to create back-links on parallel build
* 8960: C and C++, fix rendering of (member) function pointer types in
function parameter lists.
* C++, fix linking of names in array declarators, pointer to member
(function) declarators, and in the argument to ``sizeof...``.
* C, fix linking of names in array declarators.

3.5.5

==============================

3.5.4

=====================================

Dependencies
------------

* 9071: Restrict docutils to 0.16

Bugs fixed
----------

* 9078: autodoc: Async staticmethods and classmethods are considered as non
async coroutine-functions with Python3.10
* 8870, 9001, 9051: html theme: The style are not applied with docutils-0.17

- toctree captions
- The content of ``sidebar`` directive
- figures
Links

Update sphinx-rtd-theme from 0.5.1 to 1.0.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update Django from 3.1.7 to 3.2.9.

Changelog

3.2.9

==========================

*November 1, 2021*

Django 3.2.9 fixes a bug in 3.2.8 and adds compatibility with Python 3.10.

Bugfixes
========

* Fixed a bug in Django 3.2 that caused a migration crash on SQLite when
altering a field with a functional index (:ticket:`33194`).


==========================

3.2.8

==========================

*October 5, 2021*

Django 3.2.8 fixes two bugs in 3.2.7.

Bugfixes
========

* Fixed a bug in Django 3.2 that caused incorrect links on read-only fields in
the admin (:ticket:`33077`).

* Fixed a regression in Django 3.2 that caused incorrect selection of items
across all pages when actions were placed both on the top and bottom of the
admin change-list view (:ticket:`33083`).


==========================

3.2.7

==========================

*September 1, 2021*

Django 3.2.7 fixes a bug in 3.2.6.

Bugfixes
========

* Fixed a regression in Django 3.2 that caused the incorrect offset extraction
from fixed offset timezones (:ticket:`32992`).


==========================

3.2.6

==========================

*August 2, 2021*

Django 3.2.6 fixes several bugs in 3.2.5.

Bugfixes
========

* Fixed a regression in Django 3.2 that caused a crash validating ``"NaN"``
input with a ``forms.DecimalField`` when additional constraints, e.g.
``max_value``, were specified (:ticket:`32949`).

* Fixed a bug in Django 3.2 where a system check would crash on a model with a
reverse many-to-many relation inherited from a parent class
(:ticket:`32947`).


==========================

3.2.5

==========================

*July 1, 2021*

Django 3.2.5 fixes a security issue with severity "high" and several bugs in
3.2.4. Also, the latest string translations from Transifex are incorporated.

CVE-2021-35042: Potential SQL injection via unsanitized ``QuerySet.order_by()`` input
=====================================================================================

Unsanitized user input passed to ``QuerySet.order_by()`` could bypass intended
column reference validation in path marked for deprecation resulting in a
potential SQL injection even if a deprecation warning is emitted.

As a mitigation the strict column reference validation was restored for the
duration of the deprecation period. This regression appeared in 3.1 as a side
effect of fixing :ticket:`31426`.

The issue is not present in the main branch as the deprecated path has been
removed.

Bugfixes
========

* Fixed a regression in Django 3.2 that caused a crash of
``QuerySet.values_list(…, named=True)`` after ``prefetch_related()``
(:ticket:`32812`).

* Fixed a bug in Django 3.2 that caused a migration crash on MySQL 8.0.13+ when
altering ``BinaryField``, ``JSONField``, or ``TextField`` to non-nullable
(:ticket:`32503`).

* Fixed a regression in Django 3.2 that caused a migration crash on MySQL
8.0.13+ when adding nullable ``BinaryField``, ``JSONField``, or ``TextField``
with a default value (:ticket:`32832`).

* Fixed a bug in Django 3.2 where a system check would crash on a model with an
invalid ``app_label`` (:ticket:`32863`).


==========================

3.2.4

==========================

*June 2, 2021*

Django 3.2.4 fixes two security issues and several bugs in 3.2.3.

CVE-2021-33203: Potential directory traversal via ``admindocs``
===============================================================

Staff members could use the :mod:`~django.contrib.admindocs`
``TemplateDetailView`` view to check the existence of arbitrary files.
Additionally, if (and only if) the default admindocs templates have been
customized by the developers to also expose the file contents, then not only
the existence but also the file contents would have been exposed.

As a mitigation, path sanitation is now applied and only files within the
template root directories can be loaded.

CVE-2021-33571: Possible indeterminate SSRF, RFI, and LFI attacks since validators accepted leading zeros in IPv4 addresses
===========================================================================================================================

:class:`~django.core.validators.URLValidator`,
:func:`~django.core.validators.validate_ipv4_address`, and
:func:`~django.core.validators.validate_ipv46_address` didn't prohibit leading
zeros in octal literals. If you used such values you could suffer from
indeterminate SSRF, RFI, and LFI attacks.

:func:`~django.core.validators.validate_ipv4_address` and
:func:`~django.core.validators.validate_ipv46_address` validators were not
affected on Python 3.9.5+.

Bugfixes
========

* Fixed a bug in Django 3.2 where a final catch-all view in the admin didn't
respect the server-provided value of ``SCRIPT_NAME`` when redirecting
unauthenticated users to the login page (:ticket:`32754`).

* Fixed a bug in Django 3.2 where a system check would crash on an abstract
model (:ticket:`32733`).

* Prevented unnecessary initialization of unused caches following a regression
in Django 3.2 (:ticket:`32747`).

* Fixed a crash in Django 3.2 that could occur when running ``mod_wsgi`` with
the recommended settings while the Windows ``colorama`` library was installed
(:ticket:`32740`).

* Fixed a bug in Django 3.2 that would trigger the auto-reloader for template
changes when directory paths were specified with strings (:ticket:`32744`).

* Fixed a regression in Django 3.2 that caused a crash of auto-reloader with
``AttributeError``, e.g. inside a ``Conda`` environment (:ticket:`32783`).

* Fixed a regression in Django 3.2 that caused a loss of precision for
operations with ``DecimalField`` on MySQL (:ticket:`32793`).


==========================

3.2.3

==========================

*May 13, 2021*

Django 3.2.3 fixes several bugs in 3.2.2.

Bugfixes
========

* Prepared for ``mysqlclient`` > 2.0.3 support (:ticket:`32732`).

* Fixed a regression in Django 3.2 that caused the incorrect filtering of
querysets combined with the ``|`` operator (:ticket:`32717`).

* Fixed a regression in Django 3.2.1 where saving ``FileField`` would raise a
``SuspiciousFileOperation`` even when a custom
:attr:`~django.db.models.FileField.upload_to` returns a valid file path
(:ticket:`32718`).


==========================

3.2.2

==========================

*May 6, 2021*

Django 3.2.2 fixes a security issue and a bug in 3.2.1.

CVE-2021-32052: Header injection possibility since ``URLValidator`` accepted newlines in input on Python 3.9.5+
===============================================================================================================

On Python 3.9.5+, :class:`~django.core.validators.URLValidator` didn't prohibit
newlines and tabs. If you used values with newlines in HTTP response, you could
suffer from header injection attacks. Django itself wasn't vulnerable because
:class:`~django.http.HttpResponse` prohibits newlines in HTTP headers.

Moreover, the ``URLField`` form field which uses ``URLValidator`` silently
removes newlines and tabs on Python 3.9.5+, so the possibility of newlines
entering your data only existed if you are using this validator outside of the
form fields.

This issue was introduced by the :bpo:`43882` fix.

Bugfixes
========

* Prevented, following a regression in Django 3.2.1, :djadmin:`makemigrations`
from generating infinite migrations for a model with ``Meta.ordering``
contained ``OrderBy`` expressions (:ticket:`32714`).


==========================

3.2.1

==========================

*May 4, 2021*

Django 3.2.1 fixes a security issue and several bugs in 3.2.

CVE-2021-31542: Potential directory-traversal via uploaded files
================================================================

``MultiPartParser``, ``UploadedFile``, and ``FieldFile`` allowed
directory-traversal via uploaded files with suitably crafted file names.

In order to mitigate this risk, stricter basename and path sanitation is now
applied.

Bugfixes
========

* Corrected detection of GDAL 3.2 on Windows (:ticket:`32544`).

* Fixed a bug in Django 3.2 where subclasses of ``BigAutoField`` and
``SmallAutoField`` were not allowed for the :setting:`DEFAULT_AUTO_FIELD`
setting (:ticket:`32620`).

* Fixed a regression in Django 3.2 that caused a crash of
``QuerySet.values()/values_list()`` after ``QuerySet.union()``,
``intersection()``, and ``difference()`` when it was ordered by an
unannotated field (:ticket:`32627`).

* Restored, following a regression in Django 3.2, displaying an exception
message on the technical 404 debug page (:ticket:`32637`).

* Fixed a bug in Django 3.2 where a system check would crash on a reverse
one-to-one relationships in ``CheckConstraint.check`` or
``UniqueConstraint.condition`` (:ticket:`32635`).

* Fixed a regression in Django 3.2 that caused a crash of
:attr:`.ModelAdmin.search_fields` when searching against phrases with
unbalanced quotes (:ticket:`32649`).

* Fixed a bug in Django 3.2 where variable lookup errors were logged rendering
the sitemap template if alternates were not defined (:ticket:`32648`).

* Fixed a regression in Django 3.2 that caused a crash when combining ``Q()``
objects which contains boolean expressions (:ticket:`32548`).

* Fixed a regression in Django 3.2 that caused a crash of ``QuerySet.update()``
on a queryset ordered by inherited or joined fields on MySQL and MariaDB
(:ticket:`32645`).

* Fixed a regression in Django 3.2 that caused a crash when decoding a cookie
value, used by ``django.contrib.messages.storage.cookie.CookieStorage``, in
the pre-Django 3.2 format (:ticket:`32643`).

* Fixed a regression in Django 3.2 that stopped the shift-key modifier
selecting multiple rows in the admin changelist (:ticket:`32647`).

* Fixed a bug in Django 3.2 where a system check would crash on the
:setting:`STATICFILES_DIRS` setting with a list of 2-tuples of
``(prefix, path)`` (:ticket:`32665`).

* Fixed a long standing bug involving queryset bitwise combination when used
with subqueries that began manifesting in Django 3.2, due to a separate fix
using ``Exists`` to ``exclude()`` multi-valued relationships
(:ticket:`32650`).

* Fixed a bug in Django 3.2 where variable lookup errors were logged when
rendering some admin templates (:ticket:`32681`).

* Fixed a bug in Django 3.2 where an admin changelist would crash when deleting
objects filtered against multi-valued relationships (:ticket:`32682`). The
admin changelist now uses ``Exists()`` instead ``QuerySet.distinct()``
because calling ``delete()`` after ``distinct()`` is not allowed in Django
3.2 to address a data loss possibility.

* Fixed a regression in Django 3.2 where the calling process environment would
not be passed to the ``dbshell`` command on PostgreSQL (:ticket:`32687`).

* Fixed a performance regression in Django 3.2 when building complex filters
with subqueries (:ticket:`32632`). As a side-effect the private API to check
``django.db.sql.query.Query`` equality is removed.


========================

3.2

========================

*April 6, 2021*

Welcome to Django 3.2!

These release notes cover the :ref:`new features <whats-new-3.2>`, as well as
some :ref:`backwards incompatible changes <backwards-incompatible-3.2>` you'll
want to be aware of when upgrading from Django 3.1 or earlier. We've
:ref:`begun the deprecation process for some features
<deprecated-features-3.2>`.

See the :doc:`/howto/upgrade-version` guide if you're updating an existing
project.

Django 3.2 is designated as a :term:`long-term support release
<Long-term support release>`. It will receive security updates for at least
three years after its release. Support for the previous LTS, Django 2.2, will
end in April 2022.

Python compatibility
====================

Django 3.2 supports Python 3.6, 3.7, 3.8, 3.9, and 3.10 (as of 3.2.9). We
**highly recommend** and only officially support the latest release of each
series.

.. _whats-new-3.2:

What's new in Django 3.2
========================

Automatic :class:`~django.apps.AppConfig` discovery
---------------------------------------------------

Most pluggable applications define an :class:`~django.apps.AppConfig` subclass
in an ``apps.py`` submodule. Many define a ``default_app_config`` variable
pointing to this class in their ``__init__.py``.

When the ``apps.py`` submodule exists and defines a single
:class:`~django.apps.AppConfig` subclass, Django now uses that configuration
automatically, so you can remove ``default_app_config``.

``default_app_config`` made it possible to declare only the application's path
in :setting:`INSTALLED_APPS` (e.g. ``'django.contrib.admin'``) rather than the
app config's path (e.g. ``'django.contrib.admin.apps.AdminConfig'``). It was
introduced for backwards-compatibility with the former style, with the intent
to switch the ecosystem to the latter, but the switch didn't happen.

With automatic ``AppConfig`` discovery, ``default_app_config`` is no longer
needed. As a consequence, it's deprecated.

See :ref:`configuring-applications-ref` for full details.

Customizing type of auto-created primary keys
---------------------------------------------

When defining a model, if no field in a model is defined with
:attr:`primary_key=True <django.db.models.Field.primary_key>` an implicit
primary key is added. The type of this implicit primary key can now be
controlled via the :setting:`DEFAULT_AUTO_FIELD` setting and
:attr:`AppConfig.default_auto_field <django.apps.AppConfig.default_auto_field>`
attribute. No more needing to override primary keys in all models.

Maintaining the historical behavior, the default value for
:setting:`DEFAULT_AUTO_FIELD` is :class:`~django.db.models.AutoField`. Starting
with 3.2 new projects are generated with :setting:`DEFAULT_AUTO_FIELD` set to
:class:`~django.db.models.BigAutoField`. Also, new apps are generated with
:attr:`AppConfig.default_auto_field <django.apps.AppConfig.default_auto_field>`
set to :class:`~django.db.models.BigAutoField`. In a future Django release the
default value of :setting:`DEFAULT_AUTO_FIELD` will be changed to
:class:`~django.db.models.BigAutoField`.

To avoid unwanted migrations in the future, either explicitly set
:setting:`DEFAULT_AUTO_FIELD` to :class:`~django.db.models.AutoField`::

 DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

or configure it on a per-app basis::

 from django.apps import AppConfig

 class MyAppConfig(AppConfig):
     default_auto_field = 'django.db.models.AutoField'
     name = 'my_app'

or on a per-model basis::

 from django.db import models

 class MyModel(models.Model):
     id = models.AutoField(primary_key=True)

In anticipation of the changing default, a system check will provide a warning
if you do not have an explicit setting for :setting:`DEFAULT_AUTO_FIELD`.

When changing the value of :setting:`DEFAULT_AUTO_FIELD`, migrations for the
primary key of existing auto-created through tables cannot be generated
currently. See the :setting:`DEFAULT_AUTO_FIELD` docs for details on migrating
such tables.

.. _new_functional_indexes:

Functional indexes
------------------

The new :attr:`*expressions <django.db.models.Index.expressions>` positional
argument of :class:`Index() <django.db.models.Index>` enables creating
functional indexes on expressions and database functions. For example::

 from django.db import models
 from django.db.models import F, Index, Value
 from django.db.models.functions import Lower, Upper


 class MyModel(models.Model):
     first_name = models.CharField(max_length=255)
     last_name = models.CharField(max_length=255)
     height = models.IntegerField()
     weight = models.IntegerField()

     class Meta:
         indexes = [
             Index(
                 Lower('first_name'),
                 Upper('last_name').desc(),
                 name='first_last_name_idx',
             ),
             Index(
                 F('height') / (F('weight') + Value(5)),
                 name='calc_idx',
             ),
         ]

Functional indexes are added to models using the
:attr:`Meta.indexes <django.db.models.Options.indexes>` option.

``pymemcache`` support
----------------------

The new ``django.core.cache.backends.memcached.PyMemcacheCache`` cache backend
allows using the pymemcache_ library for memcached. ``pymemcache`` 3.4.0 or
higher is required. For more details, see the :doc:`documentation on caching in
Django </topics/cache>`.

.. _pymemcache: https://pypi.org/project/pymemcache/

New decorators for the admin site
---------------------------------

The new :func:`~django.contrib.admin.display` decorator allows for easily
adding options to custom display functions that can be used with
:attr:`~django.contrib.admin.ModelAdmin.list_display` or
:attr:`~django.contrib.admin.ModelAdmin.readonly_fields`.

Likewise, the new :func:`~django.contrib.admin.action` decorator allows for
easily adding options to action functions that can be used with
:attr:`~django.contrib.admin.ModelAdmin.actions`.

Using the ``display`` decorator has the advantage that it is now
possible to use the ``property`` decorator when needing to specify attributes
on the custom method. Prior to this it was necessary to use the ``property()``
function instead after assigning the required attributes to the method.

Using decorators has the advantage that these options are more discoverable as
they can be suggested by completion utilities in code editors. They are merely
a convenience and still set the same attributes on the functions under the
hood.

Minor features
--------------

:mod:`django.contrib.admin`
~~~~~~~~~~~~~~~~~~~~~~~~~~~

* :attr:`.ModelAdmin.search_fields` now allows searching against quoted phrases
with spaces.

* Read-only related fields are now rendered as navigable links if target models
are registered in the admin.

* The admin now supports theming, and includes a dark theme that is enabled
according to browser settings. See :ref:`admin-theming` for more details.

* :attr:`.ModelAdmin.autocomplete_fields` now respects
:attr:`ForeignKey.to_field <django.db.models.ForeignKey.to_field>` and
:attr:`ForeignKey.limit_choices_to
<django.db.models.ForeignKey.limit_choices_to>` when searching a related
model.

* The admin now installs a final catch-all view that redirects unauthenticated
users to the login page, regardless of whether the URL is otherwise valid.
This protects against a potential model enumeration privacy issue.

Although not recommended, you may set the new
:attr:`.AdminSite.final_catch_all_view` to ``False`` to disable the
catch-all view.

:mod:`django.contrib.auth`
~~~~~~~~~~~~~~~~~~~~~~~~~~

* The default iteration count for the PBKDF2 password hasher is increased from
216,000 to 260,000.

* The default variant for the Argon2 password hasher is changed to Argon2id.
``memory_cost`` and ``parallelism`` are increased to 102,400 and 8
respectively to match the ``argon2-cffi`` defaults.

Increasing the ``memory_cost`` pushes the required memory from 512 KB to 100
MB. This is still rather conservative but can lead to problems in memory
constrained environments. If this is the case, the existing hasher can be
subclassed to override the defaults.

* The default salt entropy for the Argon2, MD5, PBKDF2, SHA-1 password hashers
is increased from 71 to 128 bits.

:mod:`django.contrib.contenttypes`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* The new ``absolute_max`` argument for
:func:`~django.contrib.contenttypes.forms.generic_inlineformset_factory`
allows customizing the maximum number of forms that can be instantiated when
supplying ``POST`` data. See :ref:`formsets-absolute-max` for more details.

* The new ``can_delete_extra`` argument for
:func:`~django.contrib.contenttypes.forms.generic_inlineformset_factory`
allows removal of the option to delete extra forms. See
:attr:`~.BaseFormSet.can_delete_extra` for more information.

:mod:`django.contrib.gis`
~~~~~~~~~~~~~~~~~~~~~~~~~

* The :meth:`.GDALRaster.transform` method now supports
:class:`~django.contrib.gis.gdal.SpatialReference`.

* The :class:`~django.contrib.gis.gdal.DataSource` class now supports
:class:`pathlib.Path`.

* The :class:`~django.contrib.gis.utils.LayerMapping` class now supports
:class:`pathlib.Path`.

:mod:`django.contrib.postgres`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* The new :attr:`.ExclusionConstraint.include` attribute allows creating
covering exclusion constraints on PostgreSQL 12+.

* The new :attr:`.ExclusionConstraint.opclasses` attribute allows setting
PostgreSQL operator classes.

* The new :attr:`.JSONBAgg.ordering` attribute determines the ordering of the
aggregated elements.

* The new :attr:`.JSONBAgg.distinct` attribute determines if aggregated values
will be distinct.

* The :class:`~django.contrib.postgres.operations.CreateExtension` operation
now checks that the extension already exists in the database and skips the
migration if so.

* The new :class:`~django.contrib.postgres.operations.CreateCollation` and
:class:`~django.contrib.postgres.operations.RemoveCollation` operations
allow creating and dropping collations on PostgreSQL. See
:ref:`manage-postgresql-collations` for more details.

* Lookups for :class:`~django.contrib.postgres.fields.ArrayField` now allow
(non-nested) arrays containing expressions as right-hand sides.

* The new :class:`OpClass() <django.contrib.postgres.indexes.OpClass>`
expression allows creating functional indexes on expressions with a custom
operator class. See :ref:`new_functional_indexes` for more details.

:mod:`django.contrib.sitemaps`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* The new :class:`~django.contrib.sitemaps.Sitemap` attributes
:attr:`~django.contrib.sitemaps.Sitemap.alternates`,
:attr:`~django.contrib.sitemaps.Sitemap.languages` and
:attr:`~django.contrib.sitemaps.Sitemap.x_default` allow
generating sitemap *alternates* to localized versions of your pages.

:mod:`django.contrib.syndication`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* The new ``item_comments`` hook allows specifying a comments URL per feed
item.

Database backends
~~~~~~~~~~~~~~~~~

* Third-party database backends can now skip or mark as expected failures
tests in Django's test suite using the new
``DatabaseFeatures.django_test_skips`` and
``django_test_expected_failures`` attributes.

Decorators
~~~~~~~~~~

* The new :func:`~django.views.decorators.common.no_append_slash` decorator
allows individual views to be excluded from :setting:`APPEND_SLASH` URL
normalization.

Error Reporting
~~~~~~~~~~~~~~~

* Custom :class:`~django.views.debug.ExceptionReporter` subclasses can now
define the :attr:`~django.views.debug.ExceptionReporter.html_template_path`
and :attr:`~django.views.debug.ExceptionReporter.text_template_path`
properties to override the templates used to render exception reports.

File Uploads
~~~~~~~~~~~~

* The new :meth:`FileUploadHandler.upload_interrupted()
<django.core.files.uploadhandler.FileUploadHandler.upload_interrupted>`
callback allows handling interrupted uploads.

Forms
~~~~~

* The new ``absolute_max`` argument for :func:`.formset_factory`,
:func:`.inlineformset_factory`, and :func:`.modelformset_factory` allows
customizing the maximum number of forms that can be instantiated when
supplying ``POST`` data. See :ref:`formsets-absolute-max` for more details.

* The new ``can_delete_extra`` argument for :func:`.formset_factory`,
:func:`.inlineformset_factory`, and :func:`.modelformset_factory` allows
removal of the option to delete extra forms. See
:attr:`~.BaseFormSet.can_delete_extra` for more information.

* :class:`~django.forms.formsets.BaseFormSet` now reports a user facing error,
rather than raising an exception, when the management form is missing or has
been tampered with. To customize this error message, pass the
``error_messages`` argument with the key ``'missing_management_form'`` when
instantiating the formset.

Generic Views
~~~~~~~~~~~~~

* The ``week_format`` attributes of
:class:`~django.views.generic.dates.WeekMixin` and
:class:`~django.views.generic.dates.WeekArchiveView` now support the
``'%V'`` ISO 8601 week format.

Management Commands
~~~~~~~~~~~~~~~~~~~

* :djadmin:`loaddata` now supports fixtures stored in XZ archives (``.xz``) and
LZMA archives (``.lzma``).

* :djadmin:`dumpdata` now can compress data in the ``bz2``, ``gz``, ``lzma``,
or ``xz`` formats.

* :djadmin:`makemigrations` can now be called without an active database
connection. In that case, check for a consistent migration history is
skipped.

* :attr:`.BaseCommand.requires_system_checks` now supports specifying a list of
tags. System checks registered in the chosen tags will be checked for errors
prior to executing the command. In previous versions, either all or none
of the system checks were performed.

* Support for colored terminal output on Windows is updated. Various modern
terminal environments are automatically detected, and the options for
enabling support in other cases are improved. See :ref:`syntax-coloring` for
more details.

Migrations
~~~~~~~~~~

* The new ``Operation.migration_name_fragment`` property allows providing a
filename fragment that will be used to name a migration containing only that
operation.

* Migrations now support serialization of pure and concrete path objects from
:mod:`pathlib`, and :class:`os.PathLike` instances.

Models
~~~~~~

* The new ``no_key`` parameter for :meth:`.QuerySet.select_for_update()`,
supported on PostgreSQL, allows acquiring weaker locks that don't block the
creation of rows that reference locked rows through a foreign key.

* :class:`When() <django.db.models.expressions.When>` expression now allows
using the ``condition`` argument with ``lookups``.

* The new :attr:`.Index.include` and :attr:`.UniqueConstraint.include`
attributes allow creating covering indexes and covering unique constraints on
PostgreSQL 11+.

* The new :attr:`.UniqueConstraint.opclasses` attribute allows setting
PostgreSQL operator classes.

* The :meth:`.QuerySet.update` method now respects the ``order_by()`` clause on
MySQL and MariaDB.

* :class:`FilteredRelation() <django.db.models.FilteredRelation>` now supports
nested relations.

* The ``of`` argument of :meth:`.QuerySet.select_for_update()` is now allowed
on MySQL 8.0.1+.

* :class:`Value() <django.db.models.Value>` expression now
automatically resolves its ``output_field`` to the appropriate
:class:`Field <django.db.models.Field>` subclass based on the type of
its provided ``value`` for :py:class:`bool`, :py:class:`bytes`,
:py:class:`float`, :py:class:`int`, :py:class:`str`,
:py:class:`datetime.date`, :py:class:`datetime.datetime`,
:py:class:`datetime.time`, :py:class:`datetime.timedelta`,
:py:class:`decimal.Decimal`, and :py:class:`uuid.UUID` instances. As a
consequence, resolving an ``output_field`` for database functions and
combined expressions may now crash with mixed types when using ``Value()``.
You will need to explicitly set the ``output_field`` in such cases.

* The new :meth:`.QuerySet.alias` method allows creating reusable aliases for
expressions that don't need to be selected but are used for filtering,
ordering, or as a part of complex expressions.

* The new :class:`~django.db.models.functions.Collate` function allows
filtering and ordering by specified database collations.

* The ``field_name`` argument of :meth:`.QuerySet.in_bulk()` now accepts
distinct fields if there's only one field specified in
:meth:`.QuerySet.distinct`.

* The new ``tzinfo`` parameter of the
:class:`~django.db.models.functions.TruncDate` and
:class:`~django.db.models.functions.TruncTime` database functions allows
truncating datetimes in a specific timezone.

* The new ``db_collation`` argument for
:attr:`CharField <django.db.models.CharField.db_collation>` and
:attr:`TextField <django.db.models.TextField.db_collation>` allows setting a
database collation for the field.

* Added the :class:`~django.db.models.functions.Random` database function.

* :ref:`aggregation-functions`, :class:`F() <django.db.models.F>`,
:class:`OuterRef() <django.db.models.OuterRef>`, and other expressions now
allow using transforms. See :ref:`using-transforms-in-expressions` for
details.

* The new ``durable`` argument for :func:`~django.db.transaction.atomic`
guarantees that changes made in the atomic block will be committed if the
block exits without errors. A nested atomic block marked as durable will
raise a ``RuntimeError``.

* Added the :class:`~django.db.models.functions.JSONObject` database function.

Pagination
~~~~~~~~~~

* The new :meth:`django.core.paginator.Paginator.get_elided_page_range` method
allows generating a page range with some of the values elided. If there are a
large number of pages, this can be helpful for generating a reasonable number
of page links in a template.

Requests and Responses
~~~~~~~~~~~~~~~~~~~~~~

* Response headers are now stored in :attr:`.HttpResponse.headers`. This can be
used instead of the original dict-like interface of ``HttpResponse`` objects.
Both interfaces will continue to be supported. See
:ref:`setting-header-fields` for details.

* The new ``headers`` parameter of :class:`~django.http.HttpResponse`,
:class:`~django.template.response.SimpleTemplateResponse`, and
:class:`~django.template.response.TemplateResponse` allows setting response
:attr:`~django.http.HttpResponse.headers` on instantiation.

Security
~~~~~~~~

* The :setting:`SECRET_KEY` setting is now checked for a valid value upon first
access, rather than when settings are first loaded. This enables running
management commands that do not rely on the ``SECRET_KEY`` without needing to
provide a value. As a consequence of this, calling
:func:`~django.conf.settings.configure` without providing a valid
``SECRET_KEY``, and then going on to access ``settings.SECRET_KEY`` will now
raise an :exc:`~django.core.exceptions.ImproperlyConfigured` exception.

* The new ``Signer.sign_object()`` and ``Signer.unsign_object()`` methods allow
signing complex data structures. See :ref:`signing-complex-data` for more
details.

Also, :func:`signing.dumps() <django.core.signing.dumps>` and
:func:`~django.core.signing.loads` become shortcuts for
:meth:`.TimestampSigner.sign_object` and
:meth:`~.TimestampSigner.unsign_object`.

Serialization
~~~~~~~~~~~~~

* The new :ref:`JSONL <serialization-formats-jsonl>` serializer allows using
the JSON Lines format with :djadmin:`dumpdata` and :djadmin:`loaddata`. This
can be useful for populating large databases because data is loaded line by
line into memory, rather than being loaded all at once.

Signals
~~~~~~~

* :meth:`Signal.send_robust() <django.dispatch.Signal.send_robust>` now logs
exceptions.

Templates
~~~~~~~~~

* :tfilter:`floatformat` template filter now allows using the ``g`` suffix to
force grouping by the :setting:`THOUSAND_SEPARATOR` for the active locale.

* Templates cached with :ref:`Cached template loaders<template-loaders>` are
now correctly reloaded in development.

Tests
~~~~~

* Objects assigned to class attributes in :meth:`.TestCase.setUpTestData` are
now isolated for each test method. Such objects are now required to support
creating deep copies with :py:func:`copy.deepcopy`. Assigning objects which
don't support ``deepcopy()`` is deprecated and will be removed in Django 4.1.

* :class:`~django.test.runner.DiscoverRunner` now enables
:py:mod:`faulthandler` by default. This can be disabled by using the
:option:`test --no-faulthandler` option.

* :class:`~django.test.runner.DiscoverRunner` and the
:djadmin:`test` management command can now track timings, including database
setup and total run time. This can be enabled by using the :option:`test
--timing` option.

* :class:`~django.test.Client` now preserves the request query string when
following 307 and 308 redirects.

* The new :meth:`.TestCase.captureOnCommitCallbacks` method captures callback
functions passed to :func:`transaction.on_commit()
<django.db.transaction.on_commit>` in a list. This allows you to test such
callbacks without using the slower :class:`.TransactionTestCase`.

* :meth:`.TransactionTestCase.assertQuerysetEqual` now supports direct
comparison against another queryset rather than being restricted to
comparison against a list of string representations of objects when using the
default value for the ``transform`` argument.

Utilities
~~~~~~~~~

* The new ``depth`` parameter of ``django.utils.timesince.timesince()`` and
``django.utils.timesince.timeuntil()`` functions allows specifying the number
of adjacent time units to return.

Validators
~~~~~~~~~~

* Built-in validators now include the provided value in the ``params`` argument
of a raised :exc:`~django.core.exceptions.ValidationError`. This allows
custom error messages to use the ``%(value)s`` placeholder.

* The :class:`.ValidationError` equality operator now ignores ``messages`` and
``params`` ordering.

.. _backwards-incompatible-3.2:

Backwards incompatible changes in 3.2
=====================================

Database backend API
--------------------

This section describes changes that may be needed in third-party database
backends.

* The new ``DatabaseFeatures.introspected_field_types`` property replaces these
features:

* ``can_introspect_autofield``
* ``can_introspect_big_integer_field``
* ``can_introspect_binary_field``
* ``can_introspect_decimal_field``
* ``can_introspect_duration_field``
* ``can_introspect_ip_address_field``
* ``can_introspect_positive_integer_field``
* ``can_introspect_small_integer_field``
* ``can_introspect_time_field``
* ``introspected_big_auto_field_type``
* ``introspected_small_auto_field_type``
* ``introspected_boolean_field_type``

* To enable support for covering indexes (:attr:`.Index.include`) and covering
unique constraints (:attr:`.UniqueCon

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #144

@pyup-bot pyup-bot closed this Dec 20, 2021
@pawamoy pawamoy deleted the pyup-scheduled-update-2021-12-06 branch December 20, 2021 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants