Hello, On 2025/07/24 20:51, Joe Orton wrote: > On Thu, Jul 24, 2025 at 11:41:20AM +0100, Joe Orton wrote: >> On Wed, Jul 23, 2025 at 09:08:48PM +0200, Daniel Sahlberg wrote: >>> Hi, >>> >>> The patch below has been floating in dev@ for about a month. It looks looks >>> like an improvement to me, but it is way out of my comfort zone. >>> >>> @Joe Orton <jor...@redhat.com> are you able to test this? >> >> Sure thing, I've fired off a test build against Fedora Rawhide with >> Yasuhito's patch applied, will let you know how it goes. > > It failed as below. I'm testing 1.14.5 with the attached patch, which > brings repository.py to match trunk + Yasuhito's patch. > > ====================================================================== > FAIL: test_replay_batons_refcounts > (repository.SubversionRepositoryTestCase.test_replay_batons_refcounts) > Issue SVN-4917: check ref-count of batons created and used in callbacks > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/tests/repository.py", > line 447, in test_replay_batons_refcounts > self.assertEqual(sys.getrefcount(baton_tuple[2]), baton_tuple[3], > ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > "leak on baton %s after replay without errors" > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > % repr(baton_tuple)) > ^^^^^^^^^^^^^^^^^^^^ > AssertionError: 2 != 0 : leak on baton (b'dir baton', b'', (b'', b'', 11), 0) > after replay without errors > ----------------------------------------------------------------------
Thank you for testing. The intention of those tests are detection of extra reference remaining after calling callback functions. However, with deferred reference counting and biased reference counting, it cannot work as I(we?) expected. So I don't think the changes on r1926575 is correct if no one cannot explain why this part of the test could pass without modifying expected refcount. I propose: * Use weakref for the tests of this purpose * Until those test is rewrited with using weakref, simply skip them on Python >= 3.14. Cheers, -- Yasuhito FUTATSUKI <futat...@yf.bsdclub.org>