From 503594fd6ff6415a7a3821b67192eb14e6725c10d8c8a90e651a71d335b33584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 8 Jan 2026 10:58:41 +0100 Subject: [PATCH] bsc#1256325 --- createElement.patch | 37 +++++++++++++++++++++++++++++++++++++ python-Twisted.changes | 6 ++++++ python-Twisted.spec | 2 ++ 3 files changed, 45 insertions(+) create mode 100644 createElement.patch diff --git a/createElement.patch b/createElement.patch new file mode 100644 index 0000000..5c6f60a --- /dev/null +++ b/createElement.patch @@ -0,0 +1,37 @@ +From b035f4a1a952c93445a01f2e17df88689ddf9bdf Mon Sep 17 00:00:00 2001 +From: Glyph +Date: Wed, 10 Dec 2025 01:10:32 -0800 +Subject: [PATCH] use createElement in the test rather than instantiating + Element + +--- + src/twisted/newsfragments/12549.misc | 0 + src/twisted/web/test/test_domhelpers.py | 6 +++--- + 2 files changed, 3 insertions(+), 3 deletions(-) + create mode 100644 src/twisted/newsfragments/12549.misc + +diff --git a/src/twisted/newsfragments/12549.misc b/src/twisted/newsfragments/12549.misc +new file mode 100644 +index 00000000000..e69de29bb2d +diff --git a/src/twisted/web/test/test_domhelpers.py b/src/twisted/web/test/test_domhelpers.py +index bbefd68516b..d28b89f30e8 100644 +--- a/src/twisted/web/test/test_domhelpers.py ++++ b/src/twisted/web/test/test_domhelpers.py +@@ -109,14 +109,14 @@ def test_clearNode(self): + doc1 = self.dom.parseString("") + a_node = doc1.documentElement + domhelpers.clearNode(a_node) +- self.assertEqual(a_node.toxml(), self.dom.Element("a").toxml()) ++ self.assertEqual(a_node.toxml(), doc1.createElement("a").toxml()) + + doc2 = self.dom.parseString("") + b_node = doc2.documentElement.childNodes[0] + domhelpers.clearNode(b_node) + actual = doc2.documentElement.toxml() +- expected = self.dom.Element("a") +- expected.appendChild(self.dom.Element("b")) ++ expected = doc2.createElement("a") ++ expected.appendChild(doc2.createElement("b")) + self.assertEqual(actual, expected.toxml()) + + def test_get(self): diff --git a/python-Twisted.changes b/python-Twisted.changes index f417575..144e56b 100644 --- a/python-Twisted.changes +++ b/python-Twisted.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 8 09:57:04 UTC 2026 - Markéta Machová + +- Add createElement.patch to fix tests with fixed python interpreters + (bsc#1256325) + ------------------------------------------------------------------- Tue Aug 12 12:32:55 UTC 2025 - Markéta Machová diff --git a/python-Twisted.spec b/python-Twisted.spec index 24c4b1a..5dfba90 100644 --- a/python-Twisted.spec +++ b/python-Twisted.spec @@ -49,6 +49,8 @@ Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch Patch5: no-cython_test_exception_raiser.patch # PATCH-FIX-OPENSUSE remove-dependency-version-upper-bounds.patch boo#1190036 -- run with h2 >= 4.0.0 and priority >= 2.0 Patch6: remove-dependency-version-upper-bounds.patch +# PATCH-FIX-UPSTREAM https://github.com/twisted/twisted/pull/12551 use createElement in the test rather than instantiating Element +Patch7: createElement.patch BuildRequires: %{python_module hatch-fancy-pypi-readme} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module incremental >= 24.7.0}