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: Fri Sep 11 11:07:13 UTC 2026
Modified Files:
pkgsrc/devel/py-wrapt: Makefile distinfo
Log Message:
py-wrapt: updated to 2.4.1
2.4.1
Bugs Fixed
The C extension implementation of PartialCallableObjectProxy did not expose the bound positional and keyword arguments supplied when the proxy was created, whereas the pure Python implementation
makes them available as the _self_args and _self_kwargs attributes. The C extension implementation now provides read only _self_args and _self_kwargs attributes so that both implementations behave
the same.
inspect.signature() applied to a PartialCallableObjectProxy reported the full signature of the wrapped callable, including the parameters that the bound positional and keyword arguments already
supply, whereas for functools.partial those parameters are removed. The proxy did not define __signature__, so inspect followed __wrapped__ back to the callable and reported its signature unchanged.
The proxy now provides __signature__ on instances, in both the pure Python and C extension implementations, giving the same result as for an equivalent functools.partial, including a ValueError when
more positional arguments are bound than the callable accepts.
This also affected wrapper functions used with FunctionWrapper and @wrapt.decorator. When a wrapped method is called via its class with the instance passed explicitly, the wrapper function receives a
PartialCallableObjectProxy with the instance bound, and args without the instance. A wrapper which bound args and kwargs against inspect.signature(wrapped) would fail for such calls with a TypeError
about a missing argument, while working for calls made via the instance. The reported signature now omits the bound instance so the binding succeeds.
The signature of a partial whose wrapped callable is itself an already bound method is still reported incorrectly, for reasons outside of the control of wrapt. See the “Known Issues” documentation
for details.
The C extension intercepts the __module__ and __doc__ attributes by name in its attribute get and set slots so that they are forwarded to the wrapped object. The name was compared by identity against
an interned string, which relied on the attribute name having been interned. Names originating from Python source code always are, but a name constructed at runtime, for example by string
concatenation or by decoding, is not, and for such a name the interception was skipped. Getting the attribute then returned the value captured when the proxy was created rather than the current value
on the wrapped object, and setting it stored the value on the proxy rather than the wrapped object. The comparison now falls back to comparing by value when the identity check fails, guarded by a
length check so that the cost for non matching names is unchanged.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 pkgsrc/devel/py-wrapt/Makefile
cvs rdiff -u -r1.29 -r1.30 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.35 pkgsrc/devel/py-wrapt/Makefile:1.36
--- pkgsrc/devel/py-wrapt/Makefile:1.35 Mon Aug 31 10:25:16 2026
+++ pkgsrc/devel/py-wrapt/Makefile Fri Sep 11 11:07:13 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.35 2026/08/31 10:25:16 adam Exp $
+# $NetBSD: Makefile,v 1.36 2026/09/11 11:07:13 adam Exp $
-DISTNAME= wrapt-2.4.0
+DISTNAME= wrapt-2.4.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.29 pkgsrc/devel/py-wrapt/distinfo:1.30
--- pkgsrc/devel/py-wrapt/distinfo:1.29 Mon Aug 31 10:25:16 2026
+++ pkgsrc/devel/py-wrapt/distinfo Fri Sep 11 11:07:13 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.29 2026/08/31 10:25:16 adam Exp $
+$NetBSD: distinfo,v 1.30 2026/09/11 11:07:13 adam Exp $
-BLAKE2s (wrapt-2.4.0.tar.gz) = def2fecfd597220a55cf5786eaa72e4411a2f9c84144607e9352bd08ae6c6bed
-SHA512 (wrapt-2.4.0.tar.gz) = 7d832d4600dfccf3813c19e37879688fe4bc136bdcb357f53ce3b32029b46a088dc8423328dd2bc875eee564618a5e078a4deaad8826c9f215c71d226fdfbb43
-Size (wrapt-2.4.0.tar.gz) = 161179 bytes
+BLAKE2s (wrapt-2.4.1.tar.gz) = dedc25873f7bbd7708268a937a45b0facef4c0145ff2e82f68b63766a03546a4
+SHA512 (wrapt-2.4.1.tar.gz) = c996422b1dd73687609cfae475cf32d4ba2960686fb6a7ad28edd5314d62d944c13f4ec83e1cd6daa2542aac0d2b9e3fadaa1718da753dce4a8486a92688f880
+Size (wrapt-2.4.1.tar.gz) = 164597 bytes
Home |
Main Index |
Thread Index |
Old Index