pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py-attrs



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Jan  1 21:08:46 UTC 2018

Modified Files:
        pkgsrc/devel/py-attrs: Makefile PLIST distinfo

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/py-attrs/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-attrs/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/py-attrs/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-attrs/Makefile
diff -u pkgsrc/devel/py-attrs/Makefile:1.8 pkgsrc/devel/py-attrs/Makefile:1.9
--- pkgsrc/devel/py-attrs/Makefile:1.8  Thu Nov 16 07:57:53 2017
+++ pkgsrc/devel/py-attrs/Makefile      Mon Jan  1 21:08:46 2018
@@ -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 @@ MAINTAINER= pkgsrc-users%NetBSD.org@localhost
 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"

Index: pkgsrc/devel/py-attrs/PLIST
diff -u pkgsrc/devel/py-attrs/PLIST:1.3 pkgsrc/devel/py-attrs/PLIST:1.4
--- pkgsrc/devel/py-attrs/PLIST:1.3     Sat May 20 06:01:46 2017
+++ pkgsrc/devel/py-attrs/PLIST Mon Jan  1 21:08:46 2018
@@ -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

Index: pkgsrc/devel/py-attrs/distinfo
diff -u pkgsrc/devel/py-attrs/distinfo:1.5 pkgsrc/devel/py-attrs/distinfo:1.6
--- pkgsrc/devel/py-attrs/distinfo:1.5  Thu Nov 16 07:57:53 2017
+++ pkgsrc/devel/py-attrs/distinfo      Mon Jan  1 21:08:46 2018
@@ -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