diff mbox series

[meta-python,2/2] python3-wrapt: Upgrade 2.4.0 -> 2.5.0

Message ID 20261013091818.2843061-2-leon.anavi@konsulko.com
State New
Headers show
Series [meta-python,1/2] python3-texttable: Upgrade 1.7.0 -> 1.7.1 | expand

Commit Message

Leon Anavi Oct. 13, 2026, 9:18 a.m. UTC
Upgrade to release 2.5.0:

- 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 "Docstring
  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.

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
---
 .../python/{python3-wrapt_2.4.0.bb => python3-wrapt_2.5.0.bb}   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta-python/recipes-devtools/python/{python3-wrapt_2.4.0.bb => python3-wrapt_2.5.0.bb} (87%)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-wrapt_2.4.0.bb b/meta-python/recipes-devtools/python/python3-wrapt_2.5.0.bb
similarity index 87%
rename from meta-python/recipes-devtools/python/python3-wrapt_2.4.0.bb
rename to meta-python/recipes-devtools/python/python3-wrapt_2.5.0.bb
index 18d533f6e1..588c123fda 100644
--- a/meta-python/recipes-devtools/python/python3-wrapt_2.4.0.bb
+++ b/meta-python/recipes-devtools/python/python3-wrapt_2.5.0.bb
@@ -8,7 +8,7 @@  inherit pypi python_setuptools_build_meta ptest-python-pytest
 
 DEPENDS += "python3-wheel-native"
 
-SRC_URI[sha256sum] = "7082fc1f94b020ac275870c4af71b09cff22876fe6e9c4c0ad01ea21d217b288"
+SRC_URI[sha256sum] = "c48cdb6c904dca76d9915a579e4a5fab6b0c25f650c1019ce78a78effaf7a345"
 
 # python3-misc for 'this' module, python3-image for colorsys (test_deferred_patching)
 RDEPENDS:${PN}-ptest += " \