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:           Sat May 20 06:01:46 UTC 2017

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

Log Message:
Changes 17.1.0:
Backward-incompatible changes:
* attrs will set the __hash__() method to None by default now. The way hashes were handled before was in conflict with Python’s specification. This may break some software although this breakage is 
most likely just surfacing of latent bugs. You can always make attrs create the __hash__() method using @attr.s(hash=True).
* Correspondingly, attr.ib‘s hash argument is None by default too and mirrors the cmp argument as it should.

Deprecations:
* attr.assoc() is now deprecated in favor of attr.evolve() and will stop working in 2018.

Changes:
Fix default hashing behavior. Now hash mirrors the value of cmp and classes are unhashable by default.
Added attr.evolve() that, given an instance of an attrs class and field changes as keyword arguments, will instantiate a copy of the given instance with the changes applied. evolve() replaces 
assoc(), which is now deprecated. evolve() is significantly faster than assoc(), and requires the class have an initializer that can take the field values as keyword arguments (like attrs itself can 
generate).
FrozenInstanceError is now raised when trying to delete an attribute from a frozen class.
Frozen-ness of classes is now inherited.
__attrs_post_init__() is now run if validation is disabled.
Added attr.validators.in_(options) that, given the allowed options, checks whether the attribute value is in it. This can be used to check constants, enums, mappings, etc.
Added attr.validators.and_() that composes multiple validators into one.
For convenience, the validator argument of @attr.s now can take a list of validators that are wrapped using and_().
Accordingly, attr.validators.optional() now can take a list of validators too.
Validators can now be defined conveniently inline by using the attribute as a decorator. Check out the examples to see it in action!
attr.Factory() now has a takes_self argument that makes the initializer to pass the partially initialized instance into the factory. In other words you can define attribute defaults based on other 
attributes.
Default factories can now also be defined inline using decorators. They are always passed the partially initialized instance.
Conversion can now be made optional using attr.converters.optional().
attr.make_class() now accepts the keyword argument bases which allows for subclassing.
Metaclasses are now preserved with slots=True.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-attrs/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-attrs/PLIST \
    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.3 pkgsrc/devel/py-attrs/Makefile:1.4
--- pkgsrc/devel/py-attrs/Makefile:1.3  Mon Feb 13 18:57:05 2017
+++ pkgsrc/devel/py-attrs/Makefile      Sat May 20 06:01:46 2017
@@ -1,12 +1,12 @@
-# $NetBSD: Makefile,v 1.3 2017/02/13 18:57:05 adam Exp $
+# $NetBSD: Makefile,v 1.4 2017/05/20 06:01:46 adam Exp $
 
-DISTNAME=      attrs-16.3.0
+DISTNAME=      attrs-17.1.0
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_PYPI:=a/attrs/}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=      https://attrs.readthedocs.org/
+HOMEPAGE=      https://www.attrs.org/
 COMMENT=       Attributes without boilerplate
 LICENSE=       mit
 

Index: pkgsrc/devel/py-attrs/PLIST
diff -u pkgsrc/devel/py-attrs/PLIST:1.2 pkgsrc/devel/py-attrs/PLIST:1.3
--- pkgsrc/devel/py-attrs/PLIST:1.2     Mon Feb 13 18:57:05 2017
+++ pkgsrc/devel/py-attrs/PLIST Sat May 20 06:01:46 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2017/02/13 18:57:05 adam Exp $
+@comment $NetBSD: PLIST,v 1.3 2017/05/20 06:01:46 adam Exp $
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
@@ -19,6 +19,9 @@ ${PYSITELIB}/attr/_funcs.pyo
 ${PYSITELIB}/attr/_make.py
 ${PYSITELIB}/attr/_make.pyc
 ${PYSITELIB}/attr/_make.pyo
+${PYSITELIB}/attr/converters.py
+${PYSITELIB}/attr/converters.pyc
+${PYSITELIB}/attr/converters.pyo
 ${PYSITELIB}/attr/exceptions.py
 ${PYSITELIB}/attr/exceptions.pyc
 ${PYSITELIB}/attr/exceptions.pyo
Index: pkgsrc/devel/py-attrs/distinfo
diff -u pkgsrc/devel/py-attrs/distinfo:1.2 pkgsrc/devel/py-attrs/distinfo:1.3
--- pkgsrc/devel/py-attrs/distinfo:1.2  Mon Feb 13 18:57:05 2017
+++ pkgsrc/devel/py-attrs/distinfo      Sat May 20 06:01:46 2017
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2017/02/13 18:57:05 adam Exp $
+$NetBSD: distinfo,v 1.3 2017/05/20 06:01:46 adam Exp $
 
-SHA1 (attrs-16.3.0.tar.gz) = ce3d6456b024a21cc20291d605964dbcff205e64
-RMD160 (attrs-16.3.0.tar.gz) = 89b7aa7b8ffe2463faf83520d596c88c49af5ebd
-SHA512 (attrs-16.3.0.tar.gz) = 1a91e6f27ecaf20c409c3abf88ffed5c6cfdbba8cff44637399b713271ff838a054f5859dd29440b2780d81b40673033e3f8e43dd491bece72e0a4f08c4ef688
-Size (attrs-16.3.0.tar.gz) = 57512 bytes
+SHA1 (attrs-17.1.0.tar.gz) = d856db735ebcf3111dae408d2b69afc7d97ff119
+RMD160 (attrs-17.1.0.tar.gz) = 80e50902d23de6bffc96ffdc123f7a2c5f4a44ba
+SHA512 (attrs-17.1.0.tar.gz) = 5d902dfefdcfdc693931e0600833d3bc412d26026fda8691cc8f2652b4e872dfd17ac600a463c11152df11db1c9bbf6e598360d1ead50d9ebf5bae4124921517
+Size (attrs-17.1.0.tar.gz) = 76069 bytes



Home | Main Index | Thread Index | Old Index