Repository navigation
python-xmlsec-1.3.7 a few tests fails while building with Python3.15 #426
Description
opc@rawhide-arm64:~/rpmbuild/my/wip/python-xmlsec$ python -V
Python 3.15.0b4
Fedora Bug Report: https://bugzilla.redhat.com/show_bug.cgi?id=2507024
tests/test_main.py::TestCallbacks::test_failed_sign_because_default_callbacks PASSED [ 80%]
tests/test_main.py::TestCallbacks::test_register_non_callables PASSED [ 81%]
tests/test_main.py::TestCallbacks::test_sign_data_from_callbacks FAILED [ 81%]
tests/test_main.py::TestCallbacks::test_sign_data_not_first_callback FAILED [ 81%]
tests/test_main.py::TestCallbacks::test_sign_external_data_default_callbacks_fails PASSED [ 82%]
tests/test_main.py::TestCallbacks::test_sign_external_data_fails_on_read_callback_wrong_returns PASSED [ 82%]
tests/test_main.py::TestCallbacks::test_sign_external_data_no_callbacks_fails PASSED [ 82%]
tests/test_main.py::TestCallbacks::test_sign_external_data_no_matching_callbacks_fails PASSED [ 83%]
=================================== FAILURES ===================================
_________________ TestCallbacks.test_sign_data_from_callbacks __________________
self = <tests.test_main.TestCallbacks testMethod=test_sign_data_from_callbacks>
result =
def run(self, result=None):
# run first time
super().run(result=result)
if self.iterations == 0:
return
m_usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
o_count = gc.get_count()[0]
m_hits = 0
o_hits = 0
for _ in range(self.iterations):
super().run(result=result)
m_usage_n = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
if m_usage_n > m_usage:
m_usage = m_usage_n
m_hits += 1
o_count_n = gc.get_count()[0]
if o_count_n > o_count:
o_count = o_count_n
o_hits += 1
del m_usage_n
del o_count_n
if m_hits > int(self.iterations * 0.8):
result.buffer = False
try:
raise AssertionError('memory leak detected')
except AssertionError:
result.addError(self, sys.exc_info())
if o_hits > int(self.iterations * 0.8):
result.buffer = False
try:
raise AssertionError('unreferenced objects detected')
E AssertionError: unreferenced objects detected
tests/base.py:67: AssertionError
_______________ TestCallbacks.test_sign_data_not_first_callback ________________
self = <tests.test_main.TestCallbacks testMethod=test_sign_data_not_first_callback>
result =
def run(self, result=None):
# run first time
super().run(result=result)
if self.iterations == 0:
return
m_usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
o_count = gc.get_count()[0]
m_hits = 0
o_hits = 0
for _ in range(self.iterations):
super().run(result=result)
m_usage_n = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
if m_usage_n > m_usage:
m_usage = m_usage_n
m_hits += 1
o_count_n = gc.get_count()[0]
if o_count_n > o_count:
o_count = o_count_n
o_hits += 1
del m_usage_n
del o_count_n
if m_hits > int(self.iterations * 0.8):
result.buffer = False
try:
raise AssertionError('memory leak detected')
except AssertionError:
result.addError(self, sys.exc_info())
if o_hits > int(self.iterations * 0.8):
result.buffer = False
try:
raise AssertionError('unreferenced objects detected')
E AssertionError: unreferenced objects detected
tests/base.py:67: AssertionError
=========================== short test summary info ============================
FAILED tests/test_main.py::TestCallbacks::test_sign_data_from_callbacks - Ass...
FAILED tests/test_main.py::TestCallbacks::test_sign_data_not_first_callback
=================== 2 failed, 277 passed, 7 skipped in 0.27s ===================
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.RnprSa (%check)
Bad exit status from /var/tmp/rpm-tmp.RnprSa (%check)
Finish: rpmbuild python-xmlsec-1.3.17-8.fc45.src.rpm
Finish: build phase for python-xmlsec-1.3.17-8.fc45.src.rpm
INFO: ccache stats:
Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file.
Cacheable calls: 10 / 11 (90.91%)
Hits: 10 / 10 (100.0%)
Direct: 0 / 10 ( 0.00%)
Preprocessed: 10 / 10 (100.0%)
Misses: 0 / 10 ( 0.00%)
Uncacheable calls: 1 / 11 ( 9.09%)
Local storage:
Cache size (GB): 1.0 / 8.0 (11.91%)
Hits: 10 / 10 (100.0%)
Misses: 0 / 10 ( 0.00%)
ERROR: Exception(/home/opc/rpmbuild/my/wip/python-xmlsec/python-xmlsec-1.3.17-8.fc45.src.rpm) Config(fedora-rawhide-aarch64) 0 minutes 6 seconds
INFO: Results and/or logs in: /home/opc/rpmbuild/my/wip/python-xmlsec/results_python-xmlsec/1.3.17/8.fc45
ERROR: Command failed:
Activity
rosset commentedon Aug 1, 2026
Fix-test-memory-leak-detection-on-Python-3.15.patch
this patch forces garbage collection and monitors the total count of live GC-tracked objects instead of Gen 0 allocation counts, preventing false-positive memory leak failures caused by collectible reference cycles under Python 3.15
please double check if this change make sense, thanks
Rahul-pamula commentedon Aug 1, 2026
I'm interested in working on this issue. I'll investigate the Python 3.15 GC behavior, review the proposed patch, and work on a fix. If anyone is already working on it, please let me know to avoid duplicate effort.
rosset commentedon Aug 25, 2026
ping