pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/py-wrapt



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Oct 19 12:16:36 UTC 2026

Modified Files:
        pkgsrc/devel/py-wrapt: Makefile distinfo

Log Message:
py-wrapt: updated to 2.5.1

2.5.1

Bugs Fixed

A LazyObjectProxy created with an interface argument that declared a path-like type, such as os.PathLike or pathlib.Path, did not define the __fspath__() special method on the class it generated. 
Because os.fspath() looks up __fspath__() on the type of the object, passing such a proxy to os.fspath(), the builtin open() or other standard library functions accepting paths raised TypeError 
before the factory callable had been invoked to create the wrapped object. The __fspath__() special method is now added when the declared interface provides it, in the same way as is already done for 
the other special methods looked up on the type, so the first path conversion triggers creation of the wrapped object and succeeds.

A callback passed to wrapt.WeakFunctionProxy which was callable but evaluated as false, such as an event emitter object which reports its number of subscribers via __len__() and is empty when first 
created, was passed the underlying weak reference object instead of the proxy when the wrapped function expired. Where the wrapped function was a bound method, such a callback could also be called 
twice, once each when the instance and the function expired. Only None is now treated as meaning no callback was supplied, which mirrors the behaviour of weakref.ref() and weakref.proxy() in the 
standard library, so these callbacks now receive the proxy and are called only once, as for any other callback.

A wrapt.AdapterFactory instance passed as the adapter argument to wrapt.decorator was ignored, and so never called, if the instance evaluated as false, such as when the factory class defined 
__bool__() or __len__(). The decorated function then retained its original signature instead of that produced by the factory. Whether an adapter factory was supplied is now determined by type before 
the truth value of the adapter is considered, so such factories are always called. As a consequence of this change a factory can now also return None, or any other false value, to indicate that no 
adapter should be used for a particular function, where previously this failed with an obscure error.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/devel/py-wrapt/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/devel/py-wrapt/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-wrapt/Makefile
diff -u pkgsrc/devel/py-wrapt/Makefile:1.37 pkgsrc/devel/py-wrapt/Makefile:1.38
--- pkgsrc/devel/py-wrapt/Makefile:1.37 Wed Sep 30 07:22:22 2026
+++ pkgsrc/devel/py-wrapt/Makefile      Mon Oct 19 12:16:36 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.37 2026/09/30 07:22:22 adam Exp $
+# $NetBSD: Makefile,v 1.38 2026/10/19 12:16:36 adam Exp $
 
-DISTNAME=      wrapt-2.5.0
+DISTNAME=      wrapt-2.5.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=w/wrapt/}

Index: pkgsrc/devel/py-wrapt/distinfo
diff -u pkgsrc/devel/py-wrapt/distinfo:1.31 pkgsrc/devel/py-wrapt/distinfo:1.32
--- pkgsrc/devel/py-wrapt/distinfo:1.31 Wed Sep 30 07:22:22 2026
+++ pkgsrc/devel/py-wrapt/distinfo      Mon Oct 19 12:16:36 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.31 2026/09/30 07:22:22 adam Exp $
+$NetBSD: distinfo,v 1.32 2026/10/19 12:16:36 adam Exp $
 
-BLAKE2s (wrapt-2.5.0.tar.gz) = 58a407c0b342e4f66051db8be30cc0ac88cc1d6461fd42d2a678e929b4e05db3
-SHA512 (wrapt-2.5.0.tar.gz) = 6ef568088e7f02bef41648fdd788c29b882526addf03241198d9146da1dcbd201fd9eecea98078b892d54eb6b819b35f4752443f8eca8a4301b6909c65321de9
-Size (wrapt-2.5.0.tar.gz) = 183288 bytes
+BLAKE2s (wrapt-2.5.1.tar.gz) = ddfcf6210c6c683c7fc9fa35643f5b735ce8f56342749e029e9ff8044e42774a
+SHA512 (wrapt-2.5.1.tar.gz) = 16fe755feda833fda4263e5984d5229656970e02ddbc6458d3e2034d57d94102c4ad8df9569c4d4386897ea06a004374c82dc3c380a2690ff876b4098b38cf00
+Size (wrapt-2.5.1.tar.gz) = 184455 bytes



Home | Main Index | Thread Index | Old Index