Skip to content

Commit 9c3e07b

Browse files
committed
Prepare 18.1.0
1 parent 5b5a9c4 commit 9c3e07b

File tree

2 files changed

+59
-7
lines changed

2 files changed

+59
-7
lines changed

CHANGELOG.rst

Lines changed: 58 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,69 @@ Changelog
44
Versions follow `CalVer <http://calver.org>`_ with a strict backwards compatibility policy.
55
The third digit is only for regressions.
66

7-
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.
7+
.. towncrier release notes start
8+
9+
18.1.0 (2018-05-03)
10+
-------------------
811

9-
..
10-
Do *NOT* add changelog entries here!
12+
Changes
13+
^^^^^^^
1114

12-
This changelog is managed by towncrier and is compiled at release time.
15+
- ``x=X(); x.cycle = x; repr(x)`` will no longer raise a ``RecursionError``, and will instead show as ``X(x=...)``.
1316

14-
See http://www.attrs.org/en/latest/contributing.html#changelog for details.
17+
`#95 <https://github.com/python-attrs/attrs/issues/95>`_
18+
- ``attr.ib(factory=f)`` is now syntactic sugar for the common case of ``attr.ib(default=attr.Factory(f))``.
1519

20+
`#178 <https://github.com/python-attrs/attrs/issues/178>`_,
21+
`#356 <https://github.com/python-attrs/attrs/issues/356>`_
22+
- Added ``attr.field_dict()`` to return an ordered dictionary of ``attrs`` attributes for a class, whose keys are the attribute names.
23+
24+
`#290 <https://github.com/python-attrs/attrs/issues/290>`_,
25+
`#349 <https://github.com/python-attrs/attrs/issues/349>`_
26+
- The order of attributes that are passed into ``attr.make_class()`` or the ``these`` argument of ``@attr.s()`` is now retained if the dictionary is ordered (i.e. ``dict`` on Python 3.6 and later, ``collections.OrderedDict`` otherwise).
27+
28+
Before, the order was always determined by the order in which the attributes have been defined which may not be desirable when creating classes programatically.
29+
30+
`#300 <https://github.com/python-attrs/attrs/issues/300>`_,
31+
`#339 <https://github.com/python-attrs/attrs/issues/339>`_,
32+
`#343 <https://github.com/python-attrs/attrs/issues/343>`_
33+
- In slotted classes, ``__getstate__`` and ``__setstate__`` now ignore the ``__weakref__`` attribute.
34+
35+
`#311 <https://github.com/python-attrs/attrs/issues/311>`_,
36+
`#326 <https://github.com/python-attrs/attrs/issues/326>`_
37+
- Setting the cell type is now completely best effort.
38+
This fixes ``attrs`` on Jython.
39+
40+
We cannot make any guarantees regarding Jython though, because our test suite cannot run due to dependency incompatabilities.
41+
42+
`#321 <https://github.com/python-attrs/attrs/issues/321>`_,
43+
`#334 <https://github.com/python-attrs/attrs/issues/334>`_
44+
- If ``attr.s`` is passed a *these* argument, it will not attempt to remove attributes with the same name from the class body anymore.
45+
46+
`#322 <https://github.com/python-attrs/attrs/issues/322>`_,
47+
`#323 <https://github.com/python-attrs/attrs/issues/323>`_
48+
- The hash of ``attr.NOTHING`` is now vegan and faster on 32bit Python builds.
49+
50+
`#331 <https://github.com/python-attrs/attrs/issues/331>`_,
51+
`#332 <https://github.com/python-attrs/attrs/issues/332>`_
52+
- The overhead of instantiating frozen dict classes is virtually eliminated.
53+
`#336 <https://github.com/python-attrs/attrs/issues/336>`_
54+
- Generated ``__init__`` methods now have an ``__annotations__`` attribute derived from the types of the fields.
55+
56+
`#363 <https://github.com/python-attrs/attrs/issues/363>`_
57+
- We have restructured the documentation a bit to account for ``attrs``' growth in scope.
58+
Instead of putting everything into the `examples <http://www.attrs.org/en/stable/examples.html>`_ page, we have started to extract narrative chapters.
59+
60+
So far, we've added chapters on `initialization <http://www.attrs.org/en/stable/init.html>`_ and `hashing <http://www.attrs.org/en/stable/hashing.html>`_.
61+
62+
Expect more to come!
63+
64+
`#369 <https://github.com/python-attrs/attrs/issues/369>`_,
65+
`#370 <https://github.com/python-attrs/attrs/issues/370>`_
66+
67+
68+
----
1669

17-
.. towncrier release notes start
1870

1971
17.4.0 (2017-12-30)
2072
-------------------

src/attr/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
)
1212

1313

14-
__version__ = "18.1.0.dev0"
14+
__version__ = "18.1.0"
1515

1616
__title__ = "attrs"
1717
__description__ = "Classes Without Boilerplate"

0 commit comments

Comments
 (0)