Bug 2359500 - subversion fails to build with Python 3.14: AssertionError: 3 != 4 : Memory leak! Expected a ref count of 4 for svn_merge_range_t object, but got 3 instead (path: b'/trunk', index: 0)
Summary: subversion fails to build with Python 3.14: AssertionError: 3 != 4 : Memory l...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: subversion
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Korbar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-04-14 13:22 UTC by Karolina Surma
Modified: 2025-04-14 13:22 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-04-14 13:22:15 UTC
subversion fails to build with Python 3.14.0a7.

+ make check-swig-py
mkdir /builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/libsvn
if [ "LD_LIBRARY_PATH" = "DYLD_LIBRARY_PATH" ]; then for d in /builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/libsvn_swig_py /builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/../../../libsvn_*; do if [ -n "$DYLD_LIBRARY_PATH" ]; then LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$d/.libs"; else LD_LIBRARY_PATH="$d/.libs"; fi; done; export LD_LIBRARY_PATH; fi; \
cd /builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python; \
  /usr/bin/python3 /builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/tests/run_all.py
..................F.........................s........................................................................F...........................................
======================================================================
FAIL: test_mergeinfo_leakage__incorrect_range_t_refcounts (mergeinfo.SubversionMergeinfoTestCase.test_mergeinfo_leakage__incorrect_range_t_refcounts)
Ensure that the ref counts on svn_merge_range_t objects returned by
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/subversion-1.14.5-build/subversion-1.14.5/subversion/bindings/swig/python/tests/mergeinfo.py", line 147, in test_mergeinfo_leakage__incorrect_range_t_refcounts
    self.assertEqual(refcount, expected, (
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
      "Memory leak!  Expected a ref count of %d for svn_merge_range_t "
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      "object, but got %d instead (path: %s, index: %d).  Probable "
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      "cause: incorrect Py_INCREF/Py_DECREF usage in libsvn_swig_py/"
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      "swigutil_py.c." % (expected, refcount, path, i)))
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 3 != 4 : Memory leak!  Expected a ref count of 4 for svn_merge_range_t object, but got 3 instead (path: b'/trunk', index: 0).  Probable cause: incorrect Py_INCREF/Py_DECREF usage in libsvn_swig_py/swigutil_py.c.

======================================================================
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 438, in test_replay_batons_refcounts
    self.assertEqual(sys.getrefcount(e_ptr), 2,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     "leak on editor baton after replay without errors")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 1 != 2 : leak on editor baton after replay without errors

----------------------------------------------------------------------
Ran 161 tests in 3.317s

FAILED (failures=2, skipped=1)

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08899613-subversion/

For all our attempts to build subversion with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/subversion/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.