From f5477a75828ce65ff16f21362a9f100c2dab482a Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Mon, 5 Feb 2018 10:52:07 +0100 Subject: [PATCH] Another newsfragment Fixes #300 --- changelog.d/300.change.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 changelog.d/300.change.rst diff --git a/changelog.d/300.change.rst b/changelog.d/300.change.rst new file mode 100644 index 000000000..6a090ac20 --- /dev/null +++ b/changelog.d/300.change.rst @@ -0,0 +1,3 @@ +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). + +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.