public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-xmlsec] f45: Fix test memory leak detection on Python 3.15
@ 2026-09-28 10:04 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-09-28 10:04 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-xmlsec
            Branch : f45
            Commit : 98aacaae05b499de1919d7aa68e5d53265dda488
            Author : Miro Hrončok <miro@hroncok.cz>
            Date   : 2026-09-12T10:06:00+00:00
            Stats  : +27/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-xmlsec/c/98aacaae05b499de1919d7aa68e5d53265dda488?branch=f45

            Log:
            Fix test memory leak detection on Python 3.15

- Fixes: rhbz#2507024

---
diff --git a/Fix-test-memory-leak-detection-on-Python-3.15.patch b/Fix-test-memory-leak-detection-on-Python-3.15.patch
new file mode 100644
index 0000000..a289274
--- /dev/null
+++ b/Fix-test-memory-leak-detection-on-Python-3.15.patch
@@ -0,0 +1,23 @@
+diff -ur xmlsec-1.3.17.orig/tests/base.py xmlsec-1.3.17/tests/base.py
+--- xmlsec-1.3.17.orig/tests/base.py	2026-08-01 18:03:41.993662244 -0300
++++ xmlsec-1.3.17/tests/base.py	2026-08-01 18:03:48.009014638 -0300
+@@ -39,7 +39,8 @@
+             return
+ 
+         m_usage = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
+-        o_count = gc.get_count()[0]
++        gc.collect()
++        o_count = len(gc.get_objects())
+         m_hits = 0
+         o_hits = 0
+         for _ in range(self.iterations):
+@@ -48,7 +49,8 @@
+             if m_usage_n > m_usage:
+                 m_usage = m_usage_n
+                 m_hits += 1
+-            o_count_n = gc.get_count()[0]
++            gc.collect()
++            o_count_n = len(gc.get_objects())
+             if o_count_n > o_count:
+                 o_count = o_count_n
+                 o_hits += 1

diff --git a/python-xmlsec.spec b/python-xmlsec.spec
index feb86af..274cef7 100644
--- a/python-xmlsec.spec
+++ b/python-xmlsec.spec
@@ -13,6 +13,10 @@ Source0:        https://files.pythonhosted.org/packages/source/x/%{srcname}/%{sr
 # https://github.com/xmlsec/python-xmlsec/pull/422
 Patch0:         0001-Bump-xmlsec1-unix-lib-to-1.3.11.patch
 
+# https://github.com/xmlsec/python-xmlsec/issues/426
+# Patch by Filipe Rosset
+Patch1:         https://github.com/user-attachments/files/30623434/Fix-test-memory-leak-detection-on-Python-3.15.patch
+
 BuildRequires:  gcc
 BuildRequires:  python3-devel
 BuildRequires:  python3-pytest

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-28 10:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-28 10:04 [rpms/python-xmlsec] f45: Fix test memory leak detection on Python 3.15 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox