Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
503594fd6f | ||
| 3495cb2ae8 |
37
createElement.patch
Normal file
37
createElement.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From b035f4a1a952c93445a01f2e17df88689ddf9bdf Mon Sep 17 00:00:00 2001
|
||||
From: Glyph <code@glyph.im>
|
||||
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><b><c><d/></c></b></a>")
|
||||
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("<a><b><c><d/></c></b></a>")
|
||||
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):
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 8 09:57:04 UTC 2026 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add createElement.patch to fix tests with fixed python interpreters
|
||||
(bsc#1256325)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 12 12:32:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Make the libalternatives transition conditional
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 25 12:21:34 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 29 18:00:39 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-Twisted
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -18,13 +18,17 @@
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%bcond_without test
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%bcond_with test
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1500
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-Twisted%{psuffix}
|
||||
Version: 24.10.0
|
||||
@@ -45,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}
|
||||
@@ -54,8 +60,9 @@ BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: git-core
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
# twisted[tls] is so common, let's keep it tied to the main package for the time being.
|
||||
Requires: python-Twisted-tls = %{version}
|
||||
BuildArch: noarch
|
||||
# SECTION install requires
|
||||
Requires: python-Automat >= 0.8.0
|
||||
Requires: python-attrs >= 19.2.0
|
||||
@@ -65,8 +72,13 @@ Requires: python-incremental >= 24.7.0
|
||||
Requires: python-typing_extensions >= 3.6.5
|
||||
Requires: python-zope.interface >= 4.4.2
|
||||
# /SECTION
|
||||
# twisted[tls] is so common, let's keep it tied to the main package for the time being.
|
||||
Requires: python-Twisted-tls = %{version}
|
||||
%if %{with libalternatives}
|
||||
BuildRequires: alts
|
||||
Requires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%endif
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module Twisted-all_non_platform = %{version}}
|
||||
BuildRequires: %{python_module Twisted-conch_nacl = %{version}}
|
||||
@@ -75,7 +87,6 @@ BuildRequires: %{python_module hypothesis}
|
||||
# declared nowhere but required to pass 8 tests with timezone checks
|
||||
BuildRequires: %{python_module pytz}
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -216,6 +227,8 @@ rm %{buildroot}%{_bindir}/mailmail %{buildroot}%{_mandir}/man1/mailmail.1
|
||||
|
||||
# no manpage for twist yet:
|
||||
%python_clone -a %{buildroot}%{_bindir}/twist
|
||||
# group all the alternatives under one master
|
||||
%python_group_libalternatives twistd cftp ckeygen conch pyhtmlizer tkconch trial twist
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
@@ -239,11 +252,20 @@ export OPENSSL_CONF=''
|
||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m twisted.trial twisted
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative twistd
|
||||
# these were master alternatives until Dec 2020
|
||||
for f in cftp ckeygen conch pyhtmlizer tkconch trial twist; do
|
||||
%python_libalternatives_reset_alternative $f
|
||||
done
|
||||
|
||||
%post
|
||||
%if !%{with libalternatives}
|
||||
# these were master alternatives until Dec 2020. Remove before the install as slave links
|
||||
for f in cftp ckeygen conch pyhtmlizer tkconch trial twist; do
|
||||
(update-alternatives --quiet --list $f 2>&1 >/dev/null) && update-alternatives --quiet --remove-all $f
|
||||
done
|
||||
%endif
|
||||
%{python_install_alternative twistd cftp ckeygen conch pyhtmlizer tkconch trial twist
|
||||
twistd.1 cftp.1 ckeygen.1 conch.1 pyhtmlizer.1 tkconch.1 trial.1}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user