Re: Bug#1117897: pygobject FTBFS with Python 3.14: TestReferences AssertionErrors
Simon McVittie <[email protected]>
| Newsgroups | gmane.linux.debian.devel.python |
|---|---|
| Message-ID | <[email protected]> |
Version: 3.54.3-1
On Sun, 12 Oct 2025 at 18:03:19 +0100, Simon McVittie wrote:
>On Sun, 12 Oct 2025 at 11:24:48 +0200, Stefano Rivera wrote:
>>pygobject fails to build with Python 3.14 as an available version.
>...
>>I think it has been fixed in a new upstream version, but that needs to
>>be checked.
Confirmed fixed in experimental (but *not* in unstable).
>Please note that we are not yet ready to upgrade pygobject to its
>latest upstream versions
Still true.
>if the python3.14 transition is to happen any time soon, it is
>likely to be necessary to backport the fixes for test regressions
I tried backporting the obvious fix for expected refcounts in tests
(0972c8b49040c08416648eca5ec9aac7a340666f), but this is not sufficient.
Two tests still fail with 3.14.
One is in tests/test_generictreemodel.py, which is testing pygobject 2
compatibility code that was deleted in the current upstream release (so
there will be no upstream fix to backport for this):
______________________ TestReferences.test_iteration_refs ______________________
self = <tests.test_generictreemodel.TestReferences testMethod=test_iteration_refs>
def test_iteration_refs(self):
...
for node in nodes:
if hasattr(sys, "getrefcount"):
> self.assertEqual(sys.getrefcount(node), 5)
E AssertionError: 4 != 5
tests/test_generictreemodel.py:258: AssertionError
The other is that in tests/test_properties.py, a different value
is observed for the *GLib* refcount:
_____________ TestCPropsAccessor.test_held_object_ref_count_setter _____________
self = <tests.test_properties.TestCPropsAccessor testMethod=test_held_object_ref_count_setter>
def test_held_object_ref_count_setter(self):
...
> self.assertEqual(held.__grefcount__, 2)
E AssertionError: 3 != 2
smcv