Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-wrapt for openSUSE:Factory checked in at 2026-03-14 22:21:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wrapt (Old) and /work/SRC/openSUSE:Factory/.python-wrapt.new.8177 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wrapt" Sat Mar 14 22:21:14 2026 rev:25 rq:1338805 version:2.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-wrapt/python-wrapt.changes 2026-02-04 21:00:55.295594535 +0100 +++ /work/SRC/openSUSE:Factory/.python-wrapt.new.8177/python-wrapt.changes 2026-03-14 22:21:51.027777047 +0100 @@ -1,0 +2,12 @@ +Fri Mar 13 20:32:10 UTC 2026 - Dirk Müller <[email protected]> + +- update to 2.1.2: + * When a weak function proxy was created for a bound method and + the instance it was bound to was garbage collected, calling + the proxy would silently call the function as unbound instead + of raising a ReferenceError. + * When deleting an attribute named __annotations__ on an object + proxy, the attribute was only being deleted from the proxy + and not also from the wrapped object. + +------------------------------------------------------------------- Old: ---- 2.1.1.tar.gz New: ---- 2.1.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wrapt.spec ++++++ --- /var/tmp/diff_new_pack.3FpKyB/_old 2026-03-14 22:21:51.719805695 +0100 +++ /var/tmp/diff_new_pack.3FpKyB/_new 2026-03-14 22:21:51.719805695 +0100 @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} Name: python-wrapt -Version: 2.1.1 +Version: 2.1.2 Release: 0 Summary: A Python module for decorators, wrappers and monkey patching License: BSD-2-Clause ++++++ 2.1.1.tar.gz -> 2.1.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/.github/workflows/build-test-release.yml new/wrapt-2.1.2/.github/workflows/build-test-release.yml --- old/wrapt-2.1.1/.github/workflows/build-test-release.yml 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/.github/workflows/build-test-release.yml 2026-03-06 03:29:09.000000000 +0100 @@ -250,18 +250,14 @@ strategy: matrix: os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-15-intel, macos-latest] - # arch: [auto] - # include: - # - os: ubuntu-latest - # arch: aarch64 - # - os: macos-latest - # arch: universal2 - # - os: ubuntu-latest - # arch: riscv64 + arch: [auto] + include: + - os: ubuntu-latest + arch: riscv64 steps: - uses: actions/checkout@v5 - name: Set up QEMU - if: ${{ matrix.arch == 'aarch64' || matrix.arch == 'riscv64' }} + if: ${{ matrix.arch == 'riscv64' }} uses: docker/setup-qemu-action@v3 - name: Build wheels uses: pypa/[email protected] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/docs/changes.rst new/wrapt-2.1.2/docs/changes.rst --- old/wrapt-2.1.1/docs/changes.rst 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/docs/changes.rst 2026-03-06 03:29:09.000000000 +0100 @@ -1,6 +1,22 @@ Release Notes ============= +Version 2.1.2 +------------- + +**Bugs Fixed** + +* Building of Python wheels for riscv64 Linux platform had been accidentally + removed from the build configuration. This has now been added back in. + +* When a weak function proxy was created for a bound method and the instance + it was bound to was garbage collected, calling the proxy would silently + call the function as unbound instead of raising a ``ReferenceError``. + +* When deleting an attribute named ``__annotations__`` on an object proxy, the + attribute was only being deleted from the proxy and not also from the wrapped + object. + Version 2.1.1 ------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/src/wrapt/__init__.py new/wrapt-2.1.2/src/wrapt/__init__.py --- old/wrapt-2.1.1/src/wrapt/__init__.py 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/src/wrapt/__init__.py 2026-03-06 03:29:09.000000000 +0100 @@ -2,7 +2,7 @@ Wrapt is a library for decorators, wrappers and monkey patching. """ -__version_info__ = ("2", "1", "1") +__version_info__ = ("2", "1", "2") __version__ = ".".join(__version_info__) from .__wrapt__ import ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/src/wrapt/weakrefs.py new/wrapt-2.1.2/src/wrapt/weakrefs.py --- old/wrapt-2.1.1/src/wrapt/weakrefs.py 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/src/wrapt/weakrefs.py 2026-03-06 03:29:09.000000000 +0100 @@ -103,6 +103,13 @@ instance = self._self_instance and self._self_instance() function = self.__wrapped__ and self.__wrapped__ + # If the wrapped function was originally a bound method but the + # instance it was bound to has been garbage collected, raise a + # ReferenceError rather than silently calling it as unbound. + + if self._self_instance is not None and instance is None: + raise ReferenceError("weakly-referenced object no longer exists") + # If the wrapped function was originally a bound function, for # which we retained a reference to the instance and the unbound # function we need to rebind the function and then call it. If diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/src/wrapt/wrappers.py new/wrapt-2.1.2/src/wrapt/wrappers.py --- old/wrapt-2.1.1/src/wrapt/wrappers.py 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/src/wrapt/wrappers.py 2026-03-06 03:29:09.000000000 +0100 @@ -283,6 +283,10 @@ object.__delattr__(self, name) delattr(self.__wrapped__, name) + elif name == "__annotations__": + object.__delattr__(self, name) + delattr(self.__wrapped__, name) + elif hasattr(type(self), name): object.__delattr__(self, name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/tests/core/test_update_attributes.py new/wrapt-2.1.2/tests/core/test_update_attributes.py --- old/wrapt-2.1.1/tests/core/test_update_attributes.py 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/tests/core/test_update_attributes.py 2026-03-06 03:29:09.000000000 +0100 @@ -74,6 +74,44 @@ self.assertEqual(function.__qualname__, "override_qualname") self.assertEqual(instance.__qualname__, "override_qualname") + def test_delete_qualname(self): + + @passthru_decorator + def function(): + pass + + function.__qualname__ = "override_qualname" + + self.assertEqual(function.__qualname__, "override_qualname") + + # CPython raises TypeError when deleting __qualname__ from a function + # because the C-level setter rejects a NULL value. PyPy raises + # AttributeError instead. Both indicate that deletion is not supported. + self.assertRaises( + (TypeError, AttributeError), delattr, function, "__qualname__" + ) + + def test_delete_qualname_modified_on_original(self): + def function(): + pass + + def wrapper(wrapped, instance, args, kwargs): + return wrapped(*args, **kwargs) + + instance = wrapt.FunctionWrapper(function, wrapper) + + instance.__qualname__ = "override_qualname" + + self.assertEqual(function.__qualname__, "override_qualname") + self.assertEqual(instance.__qualname__, "override_qualname") + + # CPython raises TypeError when deleting __qualname__ from a function + # because the C-level setter rejects a NULL value. PyPy raises + # AttributeError instead. Both indicate that deletion is not supported. + self.assertRaises( + (TypeError, AttributeError), delattr, instance, "__qualname__" + ) + def test_update_module(self): @passthru_decorator def function(): @@ -160,6 +198,40 @@ self.assertEqual(function.__annotations__, override_annotations) self.assertEqual(instance.__annotations__, override_annotations) + def test_delete_annotations(self): + @passthru_decorator + def function(): + pass + + override_annotations = {"override_annotations": ""} + function.__annotations__ = override_annotations + + self.assertEqual(function.__annotations__, override_annotations) + + del function.__annotations__ + + self.assertEqual(function.__annotations__, {}) + + def test_delete_annotations_modified_on_original(self): + def function(): + pass + + def wrapper(wrapped, instance, args, kwargs): + return wrapped(*args, **kwargs) + + instance = wrapt.FunctionWrapper(function, wrapper) + + override_annotations = {"override_annotations": ""} + instance.__annotations__ = override_annotations + + self.assertEqual(function.__annotations__, override_annotations) + self.assertEqual(instance.__annotations__, override_annotations) + + del instance.__annotations__ + + self.assertEqual(function.__annotations__, {}) + self.assertEqual(instance.__annotations__, {}) + if __name__ == "__main__": unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wrapt-2.1.1/tests/core/test_weak_function_proxy.py new/wrapt-2.1.2/tests/core/test_weak_function_proxy.py --- old/wrapt-2.1.1/tests/core/test_weak_function_proxy.py 2026-02-03 02:46:35.000000000 +0100 +++ new/wrapt-2.1.2/tests/core/test_weak_function_proxy.py 2026-03-06 03:29:09.000000000 +0100 @@ -1,5 +1,5 @@ -import unittest import gc +import unittest import wrapt @@ -82,6 +82,9 @@ self.assertEqual(len(result), 1) self.assertEqual(id(proxy), result[0]) + with self.assertRaises(ReferenceError): + proxy(1, 2) + def test_instancemethod_delete_function(self): class Class: def function(self, a, b): @@ -105,6 +108,9 @@ self.assertEqual(len(result), 1) self.assertEqual(id(proxy), result[0]) + with self.assertRaises(ReferenceError): + proxy(1, 2) + def test_instancemethod_delete_function_and_instance(self): class Class: def function(self, a, b): @@ -128,6 +134,9 @@ self.assertEqual(len(result), 1) self.assertEqual(id(proxy), result[0]) + with self.assertRaises(ReferenceError): + proxy(1, 2) + def test_classmethod(self): class Class: @classmethod @@ -151,6 +160,9 @@ self.assertEqual(len(result), 1) self.assertEqual(id(proxy), result[0]) + with self.assertRaises(ReferenceError): + proxy(1, 2) + def test_staticmethod(self): class Class: @staticmethod
