From 77f18d80ce4ad403c2825cc891b67eeac08e89d15a2023a0b733af893dc01d1a Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 22:44:28 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20to=2021.4.0:=20=20=20*=20Fixed=20t?= =?UTF-8?q?he=20test=20suite=20on=20PyPy3.8=20where=20``cloudpickle``=20do?= =?UTF-8?q?es=20not=20work.=20=20=20*=20Fixed=20``coverage=20report``=20fo?= =?UTF-8?q?r=20projects=20that=20use=20``attrs``=20and=20don't=20=20=20=20?= =?UTF-8?q?=20set=20a=20``--source``.=20=20=20*=20When=20using=20``@define?= =?UTF-8?q?``,=20converters=20are=20now=20run=20by=20default=20when=20=20?= =?UTF-8?q?=20=20=20setting=20an=20attribute=20on=20an=20instance=20--=20a?= =?UTF-8?q?dditionally=20to=20validators.=20=20=20*=20``import=20attrs``?= =?UTF-8?q?=20has=20finally=20landed!=20=20=20*=20``attr.asdict(retain=5Fc?= =?UTF-8?q?ollection=5Ftypes=3DFalse)``=20(default)=20=20=20=20=20dumps=20?= =?UTF-8?q?collection-esque=20keys=20as=20tuples.=20=20=20*=20``=5F=5Fmatc?= =?UTF-8?q?h=5Fargs=5F=5F``=20are=20now=20generated=20to=20support=20Pytho?= =?UTF-8?q?n=203.10's=20=20=20*=20If=20the=20class-level=20*on=5Fsetattr*?= =?UTF-8?q?=20is=20set=20to=20``attrs.setters.validate``=20=20=20=20=20(de?= =?UTF-8?q?fault=20in=20``@define``=20and=20``@mutable``)=20but=20no=20fie?= =?UTF-8?q?ld=20defines=20=20=20=20=20a=20validator,=20pretend=20that=20it?= =?UTF-8?q?'s=20not=20set.=20=20=20*=20The=20generated=20``=5F=5Frepr=5F?= =?UTF-8?q?=5F``=20is=20significantly=20faster=20on=20Pythons=20with=20=20?= =?UTF-8?q?=20=20=20f-strings.=20=20=20*=20Attributes=20transformed=20via?= =?UTF-8?q?=20``field=5Ftransformer``=20are=20wrapped=20with=20=20=20=20?= =?UTF-8?q?=20``AttrsClass``=20again.=20=20=20*=20Generated=20source=20cod?= =?UTF-8?q?e=20is=20now=20cached=20more=20efficiently=20for=20identical=20?= =?UTF-8?q?classes.=20=20=20*=20Added=20``attrs.converters.to=5Fbool()``.?= =?UTF-8?q?=20=20=20*=20``attrs.resolve=5Ftypes()``=20now=20resolves=20typ?= =?UTF-8?q?es=20of=20subclasses=20after=20=20=20=20=20the=20parents=20are?= =?UTF-8?q?=20resolved.=20=20=20*=20Added=20new=20validators:=20``lt(val)`?= =?UTF-8?q?`=20(<=20val),=20``le(va)``=20(=E2=89=A4=20val),=20=20=20=20=20?= =?UTF-8?q?``ge(val)``=20(=E2=89=A5=20val),=20``gt(val)``=20(>=20val),=20a?= =?UTF-8?q?nd=20``maxlen(n)``.=20=20=20*=20``attrs``=20classes=20are=20now?= =?UTF-8?q?=20fully=20compatible=20with=20cloudpickle=20=20=20*=20Added=20?= =?UTF-8?q?new=20context=20manager=20``attrs.validators.disabled()``=20and?= =?UTF-8?q?=20=20=20=20=20functions=20``attrs.validators.(set|get)=5Fdisab?= =?UTF-8?q?led()``.=20=20=20=20=20They=20deprecate=20``attrs.(set|get)=5Fr?= =?UTF-8?q?un=5Fvalidators()``.=20=20=20=20=20All=20functions=20are=20inte?= =?UTF-8?q?roperable=20and=20modify=20the=20same=20internal=20state.=20=20?= =?UTF-8?q?=20=20=20They=20are=20not=20=E2=80=93=20and=20never=20were=20?= =?UTF-8?q?=E2=80=93=20thread-safe,=20though.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-attrs?expand=0&rev=35 --- attrs-21.2.0.tar.gz | 3 --- attrs-21.4.0.tar.gz | 3 +++ python-attrs.changes | 33 +++++++++++++++++++++++++++++++++ python-attrs.spec | 5 +++-- 4 files changed, 39 insertions(+), 5 deletions(-) delete mode 100644 attrs-21.2.0.tar.gz create mode 100644 attrs-21.4.0.tar.gz diff --git a/attrs-21.2.0.tar.gz b/attrs-21.2.0.tar.gz deleted file mode 100644 index 061a8d7..0000000 --- a/attrs-21.2.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb -size 184694 diff --git a/attrs-21.4.0.tar.gz b/attrs-21.4.0.tar.gz new file mode 100644 index 0000000..6fe529a --- /dev/null +++ b/attrs-21.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd +size 201839 diff --git a/python-attrs.changes b/python-attrs.changes index 3df3c81..e0adc71 100644 --- a/python-attrs.changes +++ b/python-attrs.changes @@ -1,3 +1,36 @@ +------------------------------------------------------------------- +Tue Jan 4 15:32:36 UTC 2022 - Dirk Müller + +- update to 21.4.0: + * Fixed the test suite on PyPy3.8 where ``cloudpickle`` does not work. + * Fixed ``coverage report`` for projects that use ``attrs`` and don't + set a ``--source``. + * When using ``@define``, converters are now run by default when + setting an attribute on an instance -- additionally to validators. + * ``import attrs`` has finally landed! + * ``attr.asdict(retain_collection_types=False)`` (default) + dumps collection-esque keys as tuples. + * ``__match_args__`` are now generated to support Python 3.10's + * If the class-level *on_setattr* is set to ``attrs.setters.validate`` + (default in ``@define`` and ``@mutable``) but no field defines + a validator, pretend that it's not set. + * The generated ``__repr__`` is significantly faster on Pythons with + f-strings. + * Attributes transformed via ``field_transformer`` are wrapped with + ``AttrsClass`` again. + * Generated source code is now cached more efficiently for identical classes. + * Added ``attrs.converters.to_bool()``. + * ``attrs.resolve_types()`` now resolves types of subclasses after + the parents are resolved. + * Added new validators: ``lt(val)`` (< val), ``le(va)`` (≤ val), + ``ge(val)`` (≥ val), ``gt(val)`` (> val), and ``maxlen(n)``. + * ``attrs`` classes are now fully compatible with cloudpickle + * Added new context manager ``attrs.validators.disabled()`` and + functions ``attrs.validators.(set|get)_disabled()``. + They deprecate ``attrs.(set|get)_run_validators()``. + All functions are interoperable and modify the same internal state. + They are not – and never were – thread-safe, though. + ------------------------------------------------------------------- Thu May 27 16:40:29 UTC 2021 - Dirk Müller diff --git a/python-attrs.spec b/python-attrs.spec index b75dcde..3f8d575 100644 --- a/python-attrs.spec +++ b/python-attrs.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,8 +25,9 @@ %define psuffix %{nil} %bcond_with test %endif +%global skip_python36 1 Name: python-attrs%{psuffix} -Version: 21.2.0 +Version: 21.4.0 Release: 0 Summary: Attributes without boilerplate License: MIT