8 Commits

Author SHA256 Message Date
ddc8d3b37e Accepting request 1324668 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1324668
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Twisted?expand=0&rev=76
2025-12-29 14:15:49 +00:00
74f4059fa8 - Add createElement.patch to fix tests with fixed python interpreters
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=166
2025-12-29 10:05:19 +00:00
2d7dedf6ec Accepting request 1307729 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1307729
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Twisted?expand=0&rev=75
2025-09-30 15:34:36 +00:00
58b79240ad - Update to 25.5.0
* twisted.internet.interfaces.IReactorMulticast now accept IPv6
    literals and allow for IPv6 multicast.
  * TCP throughput when sending data is slightly faster.
  * twisted.trial.unittest.TestCase.defer* methods were removed and
    converted to private methods.
  * Deprecations and removals in twisted.internet.defer
  * twisted.conch.client.direct.SSHClientTransport.verifyHostKey no
    longer crashes with an encoding error while attempting to verify
    the peer's IP address.
  * The twisted.web.websockets module has been added, adding a
    websockets server and client based on the wsproto library.
- Add py314.patch to fix or skip tests failing with Python 3.14

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=164
2025-09-29 10:36:24 +00:00
de6005c406 Accepting request 1299062 from devel:languages:python
- Make the libalternatives transition conditional

OBS-URL: https://build.opensuse.org/request/show/1299062
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Twisted?expand=0&rev=74
2025-08-13 14:23:03 +00:00
a0e2ce730e - Make the libalternatives transition conditional
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=162
2025-08-12 12:33:41 +00:00
05539b2905 Accepting request 1288536 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1288536
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-Twisted?expand=0&rev=73
2025-06-26 09:34:35 +00:00
2dedd9364c - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Twisted?expand=0&rev=160
2025-06-25 12:33:07 +00:00
8 changed files with 170 additions and 27 deletions

37
createElement.patch Normal file
View 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):

50
py314.patch Normal file
View File

@@ -0,0 +1,50 @@
Index: twisted-25.5.0/src/twisted/internet/asyncioreactor.py
===================================================================
--- twisted-25.5.0.orig/src/twisted/internet/asyncioreactor.py
+++ twisted-25.5.0/src/twisted/internet/asyncioreactor.py
@@ -9,7 +9,7 @@ asyncio-based reactor implementation.
import errno
import sys
-from asyncio import AbstractEventLoop, get_event_loop
+from asyncio import AbstractEventLoop, get_running_loop, new_event_loop, set_event_loop
from typing import Dict, Optional, Type
from zope.interface import implementer
@@ -47,7 +47,11 @@ class AsyncioSelectorReactor(PosixReacto
def __init__(self, eventloop: Optional[AbstractEventLoop] = None):
if eventloop is None:
- _eventloop: AbstractEventLoop = get_event_loop()
+ try:
+ _eventloop: AbstractEventLoop = get_running_loop()
+ except RuntimeError:
+ _eventloop: AbstractEventLoop = new_event_loop()
+ set_event_loop(_eventloop)
else:
_eventloop = eventloop
Index: twisted-25.5.0/src/twisted/web/test/test_webclient.py
===================================================================
--- twisted-25.5.0.orig/src/twisted/web/test/test_webclient.py
+++ twisted-25.5.0/src/twisted/web/test/test_webclient.py
@@ -5,7 +5,8 @@
Tests L{twisted.web.client} helper APIs
"""
-
+import sys
+from unittest import SkipTest
from urllib.parse import urlparse
from twisted.trial import unittest
@@ -23,6 +24,9 @@ class URLJoinTests(unittest.TestCase):
resulting URL if neither the base nor the new path include a fragment
identifier.
"""
+ if sys.version_info[1] == 14:
+ raise SkipTest("https://github.com/twisted/twisted/issues/12427")
+
self.assertEqual(
client._urljoin(b"http://foo.com/bar", b"/quux"), b"http://foo.com/quux"
)

View File

@@ -1,3 +1,35 @@
-------------------------------------------------------------------
Mon Dec 29 09:46:30 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add createElement.patch to fix tests with fixed python interpreters
-------------------------------------------------------------------
Fri Sep 26 09:06:02 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Update to 25.5.0
* twisted.internet.interfaces.IReactorMulticast now accept IPv6
literals and allow for IPv6 multicast.
* TCP throughput when sending data is slightly faster.
* twisted.trial.unittest.TestCase.defer* methods were removed and
converted to private methods.
* Deprecations and removals in twisted.internet.defer
* twisted.conch.client.direct.SSHClientTransport.verifyHostKey no
longer crashes with an encoding error while attempting to verify
the peer's IP address.
* The twisted.web.websockets module has been added, adding a
websockets server and client based on the wsproto library.
- Add py314.patch to fix or skip tests failing with Python 3.14
-------------------------------------------------------------------
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> Tue Oct 29 18:00:39 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-Twisted # spec file for package python-Twisted
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@@ -18,16 +18,20 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test" %if "%{flavor}" == "test"
%bcond_without test
%define psuffix -test %define psuffix -test
%bcond_without test
%else %else
%bcond_with test
%define psuffix %{nil} %define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif %endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-Twisted%{psuffix} Name: python-Twisted%{psuffix}
Version: 24.10.0 Version: 25.5.0
Release: 0 Release: 0
Summary: An asynchronous networking framework written in Python Summary: An asynchronous networking framework written in Python
License: MIT License: MIT
@@ -45,6 +49,10 @@ Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch
Patch5: no-cython_test_exception_raiser.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 # 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 Patch6: remove-dependency-version-upper-bounds.patch
# PATCH-FIX-UPSTREAM https://github.com/twisted/twisted/issues/12430 Add support for Python 3.14
Patch7: py314.patch
# PATCH-FIX-UPSTREAM https://github.com/twisted/twisted/pull/12551 use createElement in the test rather than instantiating Element
Patch8: createElement.patch
BuildRequires: %{python_module hatch-fancy-pypi-readme} BuildRequires: %{python_module hatch-fancy-pypi-readme}
BuildRequires: %{python_module hatchling} BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module incremental >= 24.7.0} BuildRequires: %{python_module incremental >= 24.7.0}
@@ -54,8 +62,9 @@ BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: git-core BuildRequires: git-core
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives # twisted[tls] is so common, let's keep it tied to the main package for the time being.
Requires(postun): update-alternatives Requires: python-Twisted-tls = %{version}
BuildArch: noarch
# SECTION install requires # SECTION install requires
Requires: python-Automat >= 0.8.0 Requires: python-Automat >= 0.8.0
Requires: python-attrs >= 19.2.0 Requires: python-attrs >= 19.2.0
@@ -65,8 +74,13 @@ Requires: python-incremental >= 24.7.0
Requires: python-typing_extensions >= 3.6.5 Requires: python-typing_extensions >= 3.6.5
Requires: python-zope.interface >= 4.4.2 Requires: python-zope.interface >= 4.4.2
# /SECTION # /SECTION
# twisted[tls] is so common, let's keep it tied to the main package for the time being. %if %{with libalternatives}
Requires: python-Twisted-tls = %{version} BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with test} %if %{with test}
BuildRequires: %{python_module Twisted-all_non_platform = %{version}} BuildRequires: %{python_module Twisted-all_non_platform = %{version}}
BuildRequires: %{python_module Twisted-conch_nacl = %{version}} BuildRequires: %{python_module Twisted-conch_nacl = %{version}}
@@ -75,7 +89,6 @@ BuildRequires: %{python_module hypothesis}
# declared nowhere but required to pass 8 tests with timezone checks # declared nowhere but required to pass 8 tests with timezone checks
BuildRequires: %{python_module pytz} BuildRequires: %{python_module pytz}
%endif %endif
BuildArch: noarch
%python_subpackages %python_subpackages
%description %description
@@ -216,6 +229,8 @@ rm %{buildroot}%{_bindir}/mailmail %{buildroot}%{_mandir}/man1/mailmail.1
# no manpage for twist yet: # no manpage for twist yet:
%python_clone -a %{buildroot}%{_bindir}/twist %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 %endif
%if %{with test} %if %{with test}
@@ -239,11 +254,20 @@ export OPENSSL_CONF=''
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m twisted.trial twisted %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python -m twisted.trial twisted
%endif %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 %post
%if !%{with libalternatives}
# these were master alternatives until Dec 2020. Remove before the install as slave links # 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 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 (update-alternatives --quiet --list $f 2>&1 >/dev/null) && update-alternatives --quiet --remove-all $f
done done
%endif
%{python_install_alternative twistd cftp ckeygen conch pyhtmlizer tkconch trial twist %{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} twistd.1 cftp.1 ckeygen.1 conch.1 pyhtmlizer.1 tkconch.1 trial.1}

View File

@@ -1,7 +1,7 @@
Index: twisted-24.10.0/pyproject.toml Index: twisted-25.5.0/pyproject.toml
=================================================================== ===================================================================
--- twisted-24.10.0.orig/pyproject.toml --- twisted-25.5.0.orig/pyproject.toml
+++ twisted-24.10.0/pyproject.toml +++ twisted-25.5.0/pyproject.toml
@@ -97,8 +97,8 @@ serial = [ @@ -97,8 +97,8 @@ serial = [
] ]
@@ -12,4 +12,4 @@ Index: twisted-24.10.0/pyproject.toml
+ "priority >= 1.1.0", + "priority >= 1.1.0",
] ]
all-non-platform = [ websocket = [

View File

@@ -2,21 +2,21 @@
src/twisted/test/test_udp.py | 3 ++- src/twisted/test/test_udp.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
Index: twisted-24.3.0/src/twisted/test/test_udp.py Index: twisted-25.5.0/src/twisted/test/test_udp.py
=================================================================== ===================================================================
--- twisted-24.3.0.orig/src/twisted/test/test_udp.py --- twisted-25.5.0.orig/src/twisted/test/test_udp.py
+++ twisted-24.3.0/src/twisted/test/test_udp.py +++ twisted-25.5.0/src/twisted/test/test_udp.py
@@ -8,7 +8,7 @@ Tests for implementations of L{IReactorU @@ -22,7 +22,7 @@ from socket import (
inet_pton,
socket,
import os )
-from unittest import skipIf -from unittest import skipIf
+from unittest import skipIf, SkipTest +from unittest import skipIf, SkipTest
from twisted.internet import defer, error, interfaces, protocol, reactor, udp from twisted.internet import defer, error, interfaces, protocol, reactor, udp
from twisted.internet.defer import Deferred, gatherResults, maybeDeferred from twisted.internet.address import IPv4Address, IPv6Address
@@ -578,6 +578,7 @@ class MulticastTests(TestCase): @@ -638,6 +638,7 @@ class MulticastTests(TestCase):
skip = "This reactor does not support multicast" wrongAddressFamily: str = "::1"
def setUp(self): def setUp(self):
+ raise SkipTest("Multicast networking doesn't work with OBS") + raise SkipTest("Multicast networking doesn't work with OBS")

Binary file not shown.

3
twisted-25.5.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1deb272358cb6be1e3e8fc6f9c8b36f78eb0fa7c2233d2dbe11ec6fee04ea316
size 3545725