pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-attrs py-attrs: updated to 19.2.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c5aedec53580
branches:  trunk
changeset: 340781:c5aedec53580
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Oct 07 20:25:01 2019 +0000

description:
py-attrs: updated to 19.2.0

19.2.0:

Backward-incompatible Changes
- Removed deprecated ``Attribute`` attribute ``convert`` per scheduled removal on 2019/1.
- ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` do not consider subclasses comparable anymore.

  This has been deprecated since 18.2.0 and was raising a ``DeprecationWarning`` for over a year.


Deprecations
- The ``cmp`` argument to ``attr.s()`` and ``attr.ib()`` is now deprecated.

  Please use ``eq`` to add equality methods (``__eq__`` and ``__ne__``) and ``order`` to add ordering methods (``__lt__``, ``__le__``, ``__gt__``, and ``__ge__``) instead ? just like with 
`dataclasses <https://docs.python.org/3/library/dataclasses.html>`_.

  Both are effectively ``True`` by default but it's enough to set ``eq=False`` to disable both at once.
  Passing ``eq=False, order=True`` explicitly will raise a ``ValueError`` though.

  Since this is arguably a deeper backward-compatibility break, it will have an extended deprecation period until 2021-06-01.
  After that day, the ``cmp`` argument will be removed.

  ``attr.Attribute`` also isn't orderable anymore.

Changes
- Updated ``attr.validators.__all__`` to include new validators.
- Slotted classes now use a pure Python mechanism to rewrite the ``__class__`` cell when rebuilding the class, so ``super()`` works even on environments where ``ctypes`` is not installed.
- When collecting attributes using ``@attr.s(auto_attribs=True)``, attributes with a default of ``None`` are now deleted too.
- Fixed ``attr.validators.deep_iterable()`` and ``attr.validators.deep_mapping()`` type stubs.
- ``attr.validators.is_callable()`` validator now raises an exception ``attr.exceptions.NotCallableError``, a subclass of ``TypeError``, informing the received value.
- ``@attr.s(auto_exc=True)`` now generates classes that are hashable by ID, as the documentation always claimed it would.
- Added ``attr.validators.matches_re()`` that checks string attributes whether they match a regular expression.
- Keyword-only attributes (``kw_only=True``) and attributes that are excluded from the ``attrs``'s ``__init__`` (``init=False``) now can appear before mandatory attributes.
- The fake filename for generated methods is now more stable.
  It won't change when you restart the process.
- The value passed to ``@attr.ib(repr=?)`` can now be either a boolean (as before) or a callable.
  That callable must return a string and is then used for formatting the attribute by the generated ``__repr__()`` method.
- Added ``attr.__version_info__`` that can be used to reliably check the version of ``attrs`` and write forward- and backward-compatible code.

diffstat:

 devel/py-attrs/Makefile |   4 ++--
 devel/py-attrs/PLIST    |   6 +++++-
 devel/py-attrs/distinfo |  10 +++++-----
 3 files changed, 12 insertions(+), 8 deletions(-)

diffs (47 lines):

diff -r 19efd0c833c0 -r c5aedec53580 devel/py-attrs/Makefile
--- a/devel/py-attrs/Makefile   Mon Oct 07 20:19:39 2019 +0000
+++ b/devel/py-attrs/Makefile   Mon Oct 07 20:25:01 2019 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2019/03/03 12:17:05 adam Exp $
+# $NetBSD: Makefile,v 1.13 2019/10/07 20:25:01 adam Exp $
 
-DISTNAME=      attrs-19.1.0
+DISTNAME=      attrs-19.2.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=a/attrs/}
diff -r 19efd0c833c0 -r c5aedec53580 devel/py-attrs/PLIST
--- a/devel/py-attrs/PLIST      Mon Oct 07 20:19:39 2019 +0000
+++ b/devel/py-attrs/PLIST      Mon Oct 07 20:25:01 2019 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.5 2018/09/03 07:40:18 adam Exp $
+@comment $NetBSD: PLIST,v 1.6 2019/10/07 20:25:01 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -21,6 +21,10 @@
 ${PYSITELIB}/attr/_make.py
 ${PYSITELIB}/attr/_make.pyc
 ${PYSITELIB}/attr/_make.pyo
+${PYSITELIB}/attr/_version.py
+${PYSITELIB}/attr/_version.pyc
+${PYSITELIB}/attr/_version.pyi
+${PYSITELIB}/attr/_version.pyo
 ${PYSITELIB}/attr/converters.py
 ${PYSITELIB}/attr/converters.pyc
 ${PYSITELIB}/attr/converters.pyi
diff -r 19efd0c833c0 -r c5aedec53580 devel/py-attrs/distinfo
--- a/devel/py-attrs/distinfo   Mon Oct 07 20:19:39 2019 +0000
+++ b/devel/py-attrs/distinfo   Mon Oct 07 20:25:01 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.9 2019/03/03 12:17:05 adam Exp $
+$NetBSD: distinfo,v 1.10 2019/10/07 20:25:01 adam Exp $
 
-SHA1 (attrs-19.1.0.tar.gz) = 638b04fda29463067296a2a330b53856f40a32cb
-RMD160 (attrs-19.1.0.tar.gz) = af44a046cf42ff74c5c66a99849c977f8c97ff03
-SHA512 (attrs-19.1.0.tar.gz) = 22ee45e8b10a7abe10e720788c5cfab424d0bfe70e595dfb116928b8ebea497a747e8234d96549da00f0967de750fb943db0cd3669354253a27be2ca30fe413a
-Size (attrs-19.1.0.tar.gz) = 124220 bytes
+SHA1 (attrs-19.2.0.tar.gz) = f0ee52eca7c0a27b44a32dca001f920f0f76c7f7
+RMD160 (attrs-19.2.0.tar.gz) = b7a5eb4f333dd7b48bf10843ca3bca35b171c367
+SHA512 (attrs-19.2.0.tar.gz) = c6239f5553d99f324a36193d9f6e684fdce26efcf4da866d1b995cd644909ec4b58ac6ef6c20a0fda4b8a16d00ec0aacfd3970a52b68997fd10804d5286b41c6
+Size (attrs-19.2.0.tar.gz) = 134333 bytes



Home | Main Index | Thread Index | Old Index