Prepare 20.3.0

This commit is contained in:
Hynek Schlawack 2020-11-05 11:00:48 +01:00
parent 3d66e5727b
commit f3762ba07b
9 changed files with 40 additions and 27 deletions

View File

@ -4,17 +4,47 @@ Changelog
Versions follow `CalVer <https://calver.org>`_ with a strict backwards compatibility policy. Versions follow `CalVer <https://calver.org>`_ with a strict backwards compatibility policy.
The third digit is only for regressions. The third digit is only for regressions.
Changes for the upcoming release can be found in the `"changelog.d" directory <https://github.com/python-attrs/attrs/tree/master/changelog.d>`_ in our repository.
..
Do *NOT* add changelog entries here!
This changelog is managed by towncrier and is compiled at release time.
See https://www.attrs.org/en/latest/contributing.html#changelog for details.
.. towncrier release notes start .. towncrier release notes start
20.3.0 (2020-11-05)
-------------------
Backward-incompatible Changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.
This release does **not** change change anything about them and they are already used widely in production though.
If you wish to use them together with mypy, you can simply drop `this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>`_ into your project.
Feel free to provide feedback to them in the linked issue #668.
We will release the ``attrs`` namespace once we have the feeling that the APIs have properly settled.
`#668 <https://github.com/python-attrs/attrs/issues/668>`_
Changes
^^^^^^^
- ``attr.s()`` now has a *field_transformer* hook that is called for all ``Attribute``\ s and returns a (modified or updated) list of ``Attribute`` instances.
``attr.asdict()`` has a *value_serializer* hook that can change the way values are converted.
Both hooks are meant to help with data (de-)serialization workflows.
`#653 <https://github.com/python-attrs/attrs/issues/653>`_
- ``kw_only=True`` now works on Python 2.
`#700 <https://github.com/python-attrs/attrs/issues/700>`_
- ``raise from`` now works on frozen classes on PyPy.
`#703 <https://github.com/python-attrs/attrs/issues/703>`_,
`#712 <https://github.com/python-attrs/attrs/issues/712>`_
- ``attr.asdict()`` and ``attr.astuple()`` now treat ``frozenset``\ s like ``set``\ s with regards to the *retain_collection_types* argument.
`#704 <https://github.com/python-attrs/attrs/issues/704>`_
- The type stubs for ``attr.s()`` and ``attr.make_class()`` are not missing the *collect_by_mro* argument anymore.
`#711 <https://github.com/python-attrs/attrs/issues/711>`_
----
20.2.0 (2020-09-05) 20.2.0 (2020-09-05)
------------------- -------------------

View File

@ -1,3 +0,0 @@
``attr.s()`` now has a *field_transformer* hook that is called for all ``Attribute``\ s and returns a (modified or updated) list of ``Attribute`` instances.
``attr.asdict()`` has a *value_serializer* hook that can change the way values are converted.
Both hooks are meant to help with data (de-)serialization workflows.

View File

@ -1,9 +0,0 @@
``attr.define()``, ``attr.frozen()``, ``attr.mutable()``, and ``attr.field()`` remain **provisional**.
This release does **not** change change anything about them and they are already used widely in production though.
If you wish to use them together with mypy, you can simply drop `this plugin <https://gist.github.com/hynek/1e3844d0c99e479e716169034b5fa963#file-attrs_ng_plugin-py>`_ into your project.
Feel free to provide feedback to them in the linked issue #668.
We will release the ``attrs`` namespace once we have the feeling that the APIs have properly settled.

View File

@ -1 +0,0 @@
``kw_only=True`` now works on Python 2.

View File

@ -1 +0,0 @@
``raise from`` now works on frozen classes on PyPy.

View File

@ -1 +0,0 @@
``attr.asdict()`` and ``attr.astuple()`` now treat ``frozenset``\ s like ``set``\ s with regards to the *retain_collection_types* argument.

View File

@ -1 +0,0 @@
The type stubs for ``attr.s()`` and ``attr.make_class()`` are not missing the *collect_by_mro* argument anymore.

View File

@ -1 +0,0 @@
``raise from`` now works on frozen classes on PyPy.

View File

@ -21,7 +21,7 @@ from ._make import (
from ._version_info import VersionInfo from ._version_info import VersionInfo
__version__ = "20.3.0.dev0" __version__ = "20.3.0"
__version_info__ = VersionInfo._from_version_string(__version__) __version_info__ = VersionInfo._from_version_string(__version__)
__title__ = "attrs" __title__ = "attrs"