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:           Wed Sep 30 07:22:22 UTC 2026

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

Log Message:
py-wrapt: updated to 2.5.0

2.5.0

New Features

Added with_doc, a decorator for overriding the docstring that help(), pydoc and other introspection tools see for a wrapped callable without mutating the wrapped function itself. It is the companion 
of with_signature. The docstring can be supplied directly, or as a factory callable that derives it from the wrapped function at decoration time. When stacked above with_signature the factory sees 
the overridden signature and can embed it in the docstring. Assigning to __doc__ on the resulting wrapper replaces the override, and deleting it restores delegation to the wrapped function. 
Previously the only option was to assign to __doc__ on a wrapper, which writes through to the wrapped function since __doc__ on every proxy delegates to the wrapped object, and so changed what was 
reported for the wrapped function everywhere. The override is handled for instance methods, class methods and static methods, and propagates through outer wrapt decorators stacked on top. See the 
“Docstrin
g Override” section of Bundled Decorators for details.
with_signature now accepts a doc argument for overriding the docstring at the same time as the signature, and the factory callable may return a tuple of (signature_or_prototype, docstring) so that a 
single factory can derive both from the wrapped function in one pass. When doc is supplied, the docstring from the tuple is ignored. When neither is given, __doc__ continues to delegate to the 
wrapped function as before, including for assignment and deletion.
A class derived from wrapt.BaseObjectProxy may now define __doc__ as a property, or other descriptor, in its class body, and that is used for instances of the class in place of the default delegation 
of __doc__ to the wrapped object. This works with both the pure Python implementation and the C extension, and the descriptor is inherited by further derived classes. Previously the pure Python 
metaclass overwrote such a descriptor with the default delegating property, and the C extension forwarded __doc__ to the wrapped object before consulting the type, so it was never used. Only __doc__ 
is affected, with __module__ always delegating to the wrapped object. This is the mechanism with_doc relies on.


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

Index: pkgsrc/devel/py-wrapt/PLIST
diff -u pkgsrc/devel/py-wrapt/PLIST:1.10 pkgsrc/devel/py-wrapt/PLIST:1.11
--- pkgsrc/devel/py-wrapt/PLIST:1.10    Mon Aug 31 10:25:16 2026
+++ pkgsrc/devel/py-wrapt/PLIST Wed Sep 30 07:22:22 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2026/08/31 10:25:16 adam Exp $
+@comment $NetBSD: PLIST,v 1.11 2026/09/30 07:22:22 adam Exp $
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA
 ${PYSITELIB}/${WHEEL_INFODIR}/RECORD
 ${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
@@ -22,6 +22,9 @@ ${PYSITELIB}/wrapt/caching.pyo
 ${PYSITELIB}/wrapt/decorators.py
 ${PYSITELIB}/wrapt/decorators.pyc
 ${PYSITELIB}/wrapt/decorators.pyo
+${PYSITELIB}/wrapt/doc.py
+${PYSITELIB}/wrapt/doc.pyc
+${PYSITELIB}/wrapt/doc.pyo
 ${PYSITELIB}/wrapt/exceptions.py
 ${PYSITELIB}/wrapt/exceptions.pyc
 ${PYSITELIB}/wrapt/exceptions.pyo

Index: pkgsrc/devel/py-wrapt/distinfo
diff -u pkgsrc/devel/py-wrapt/distinfo:1.30 pkgsrc/devel/py-wrapt/distinfo:1.31
--- pkgsrc/devel/py-wrapt/distinfo:1.30 Fri Sep 11 11:07:13 2026
+++ pkgsrc/devel/py-wrapt/distinfo      Wed Sep 30 07:22:22 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.30 2026/09/11 11:07:13 adam Exp $
+$NetBSD: distinfo,v 1.31 2026/09/30 07:22:22 adam Exp $
 
-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
+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



Home | Main Index | Thread Index | Old Index