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:           Tue Jun 23 04:50:52 UTC 2026

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

Log Message:
py-wrapt: updated to 2.2.2

2.2.2

Bugs Fixed

When @wrapt.lru_cache was applied to an instance method that was overridden in a subclass, and the subclass method called the base class method via super(), a RecursionError was raised instead of the 
base class method being invoked. The per-instance cache for each method was stored as an attribute on the instance whose name was derived only from the method __name__, so the base and derived 
methods shared a single cache slot. The subclass cache was therefore found again when the base method was reached through super(), re-entering the subclass body and recursing without end. The cache 
attribute name now incorporates a unique identifier for each decorated method so that a base method and a method that overrides it use distinct per-instance caches.

When @wrapt.lru_cache was applied to a method of a class deriving from wrapt.ObjectProxy, the per-instance cache was stored on the wrapped object rather than on the proxy. This is because the proxy 
__setattr__ forwards attribute assignment to the wrapped object for any name that is not a recognised proxy attribute, and the cache attribute name was not one. Storing the cache on the wrapped 
object had several consequences: the wrapped object was polluted with cache attributes it never defined; the cache held a reference back to the proxy through the bound method it wrapped, so a wrapped 
object that outlived the proxy kept the proxy alive and prevented its collection; wrapping an object that does not accept arbitrary attributes, such as one using __slots__, caused the first cached 
call to fail with an AttributeError; and two proxies sharing a single wrapped object shared one cache and could return results computed for the wrong proxy. The cache attribute is now stored on the 
pro
xy itself using the proxy __self_setattr__ method when the instance is a wrapt object proxy, falling back to setattr for ordinary instances.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/devel/py-wrapt/Makefile
cvs rdiff -u -r1.26 -r1.27 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.32 pkgsrc/devel/py-wrapt/Makefile:1.33
--- pkgsrc/devel/py-wrapt/Makefile:1.32 Fri May 22 15:52:22 2026
+++ pkgsrc/devel/py-wrapt/Makefile      Tue Jun 23 04:50:52 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.32 2026/05/22 15:52:22 adam Exp $
+# $NetBSD: Makefile,v 1.33 2026/06/23 04:50:52 adam Exp $
 
-DISTNAME=      wrapt-2.2.1
+DISTNAME=      wrapt-2.2.2
 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.26 pkgsrc/devel/py-wrapt/distinfo:1.27
--- pkgsrc/devel/py-wrapt/distinfo:1.26 Fri May 22 15:52:22 2026
+++ pkgsrc/devel/py-wrapt/distinfo      Tue Jun 23 04:50:52 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.26 2026/05/22 15:52:22 adam Exp $
+$NetBSD: distinfo,v 1.27 2026/06/23 04:50:52 adam Exp $
 
-BLAKE2s (wrapt-2.2.1.tar.gz) = cecf33f65d82ceb34abdea7e0aac81407e33fc5b6f5fe1fe42205091c8758943
-SHA512 (wrapt-2.2.1.tar.gz) = fb7952f8931b28dcfe7c10d545657af9f369f60b96defbeb0bcda0fc2b17068fbeb38fc5395d1908091c2ebf392467b42285dfc28355b8fe92d8865515590915
-Size (wrapt-2.2.1.tar.gz) = 127620 bytes
+BLAKE2s (wrapt-2.2.2.tar.gz) = 4ae49985b595cb8716d05e72be5f00d85078b41e651dfe19b6f2635008d9288d
+SHA512 (wrapt-2.2.2.tar.gz) = 2b9865d1d54c3e58191220e08a83eb7bd1739c9779b17f3bd4101489f02ffb6c6d4ab9abfa7cdb7c621b35d90e24e648254737f0046f2019755c5b29978b1bb6
+Size (wrapt-2.2.2.tar.gz) = 129068 bytes



Home | Main Index | Thread Index | Old Index