* 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
51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
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"
|
|
)
|