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 17.4.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ecf40ea6f6a1
branches:  trunk
changeset: 373421:ecf40ea6f6a1
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Jan 01 21:08:46 2018 +0000

description:
py-attrs: updated to 17.4.0

17.4.0:

Backward-incompatible Changes
- The traversal of MROs when using multiple inheritance was backward:
  If you defined a class C that subclasses A and B like C(A, B), attrs would have collected the attributes from B *before* those of A.
  This is now fixed and means that in classes that employ multiple inheritance, the output of __repr__ and the order of positional arguments in __init__ changes.
  Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible.
  Generally speaking, it's advisable to prefer kwargs-based initialization anyways ? *especially* if you employ multiple inheritance and diamond-shaped hierarchies.
- The __repr__ set by attrs
  no longer produces an AttributeError
  when the instance is missing some of the specified attributes
  (either through deleting
  or after using init=False on some attributes).

  This can break code
  that relied on repr(attr_cls_instance) raising AttributeError
  to check if any attr-specified members were unset.

  If you were using this,
  you can implement a custom method for checking this::

      def has_unset_members(self):
          for field in attr.fields(type(self)):
              try:
                  getattr(self, field.name)
              except AttributeError:
                  return True
          return False

Deprecations
- The attr.ib(convert=callable) option is now deprecated in favor of attr.ib(converter=callable).
  This is done to achieve consistency with other noun-based arguments like *validator*.
  *convert* will keep working until at least January 2019 while raising a DeprecationWarning.

Changes
- Generated __hash__ methods now hash the class type along with the attribute values.
  Until now the hashes of two classes with the same values were identical which was a bug.
  The generated method is also *much* faster now.
- attr.ib\ ?s metadata argument now defaults to a unique empty dict instance instead of sharing a common empty dict for all.
  The singleton empty dict is still enforced.
- ctypes is optional now however if it's missing, a bare super() will not work in slots classes.
  This should only happen in special environments like Google App Engine.
- The attribute redefinition feature introduced in 17.3.0 now takes into account if an attribute is redefined via multiple inheritance.
  In that case, the definition that is closer to the base of the class hierarchy wins.
- Subclasses of auto_attribs=True can be empty now.
- Equality tests are *much* faster now.
- All generated methods now have correct __module__, __name__, and (on Python 3) __qualname__ attributes.

diffstat:

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

diffs (54 lines):

diff -r 47c9cefd9f31 -r ecf40ea6f6a1 devel/py-attrs/Makefile
--- a/devel/py-attrs/Makefile   Mon Jan 01 20:38:00 2018 +0000
+++ b/devel/py-attrs/Makefile   Mon Jan 01 21:08:46 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2017/11/16 07:57:53 adam Exp $
+# $NetBSD: Makefile,v 1.9 2018/01/01 21:08:46 adam Exp $
 
-DISTNAME=      attrs-17.3.0
+DISTNAME=      attrs-17.4.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=a/attrs/}
@@ -10,10 +10,10 @@
 COMMENT=       Attributes without boilerplate
 LICENSE=       mit
 
-USE_LANGUAGES=         # none
-
 # This is a test dependency; disabled because hypothesis requires attrs
 #BUILD_DEPENDS+=       ${PYPKGPREFIX}-hypothesis-[0-9]*:../../devel/py-hypothesis
 
+USE_LANGUAGES= # none
+
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 47c9cefd9f31 -r ecf40ea6f6a1 devel/py-attrs/PLIST
--- a/devel/py-attrs/PLIST      Mon Jan 01 20:38:00 2018 +0000
+++ b/devel/py-attrs/PLIST      Mon Jan 01 21:08:46 2018 +0000
@@ -1,8 +1,9 @@
-@comment $NetBSD: PLIST,v 1.3 2017/05/20 06:01:46 adam Exp $
+@comment $NetBSD: PLIST,v 1.4 2018/01/01 21:08:46 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
 ${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
+${PYSITELIB}/${EGG_INFODIR}/requires.txt
 ${PYSITELIB}/${EGG_INFODIR}/top_level.txt
 ${PYSITELIB}/attr/__init__.py
 ${PYSITELIB}/attr/__init__.pyc
diff -r 47c9cefd9f31 -r ecf40ea6f6a1 devel/py-attrs/distinfo
--- a/devel/py-attrs/distinfo   Mon Jan 01 20:38:00 2018 +0000
+++ b/devel/py-attrs/distinfo   Mon Jan 01 21:08:46 2018 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.5 2017/11/16 07:57:53 adam Exp $
+$NetBSD: distinfo,v 1.6 2018/01/01 21:08:46 adam Exp $
 
-SHA1 (attrs-17.3.0.tar.gz) = ee2fd8132f71a7529d777df0b813903a73ad28ca
-RMD160 (attrs-17.3.0.tar.gz) = 5b74724bb9be052c406a7c016e403212801cdecd
-SHA512 (attrs-17.3.0.tar.gz) = 69a104a0a00c13946ca61c5e21a6acd4e75a43c775d54f270c9da3fd9475df54997c32a25a5c47a24012daac2f525457b1727fb2bb7291afb90627bf87d818ee
-Size (attrs-17.3.0.tar.gz) = 89046 bytes
+SHA1 (attrs-17.4.0.tar.gz) = 69720cce49ab349a07f7b007ac5834309c390893
+RMD160 (attrs-17.4.0.tar.gz) = 25f3223a5b56ef351f6bd68353396dab0c720d3b
+SHA512 (attrs-17.4.0.tar.gz) = b631cd5af1be7c78175230363a3cf9d37cb0237d87b24f994812b5734985d114708d5bf7ee5d92b8b13c6b8daa313efde4a9f60f0630df0b62bbcf4928a016ff
+Size (attrs-17.4.0.tar.gz) = 97071 bytes



Home | Main Index | Thread Index | Old Index