Compare commits
15 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| afc1b48337 | |||
| 279afc697e | |||
| 8d1aabf1ca | |||
| dfcd43d8ea | |||
| b8a80de828 | |||
| 49de8706ff | |||
| 9bd801de6a | |||
| 0400fba187 | |||
| d280501f81 | |||
| 3690f2870c | |||
| c7b2f92b82 | |||
| d4f4e0c97e | |||
| e1731eaccf | |||
| fe71c07b12 | |||
| 2b3c77a2a3 |
@@ -1,20 +1,19 @@
|
|||||||
From df79d69adea5c819bb104861dccf1bbe25851644 Mon Sep 17 00:00:00 2001
|
From 7130df7ee21ebd93d7e15e7c4ef752b759f8e1c3 Mon Sep 17 00:00:00 2001
|
||||||
From: Thomas Grainger <tagrain@gmail.com>
|
From: Thomas Grainger <tagrain@gmail.com>
|
||||||
Date: Sun, 21 Feb 2021 11:54:25 +0000
|
Date: Sun, 21 Feb 2021 11:54:25 +0000
|
||||||
Subject: [PATCH 1/2] delegate to stdlib parse qs
|
Subject: [PATCH] delegate to stdlib parse qs
|
||||||
|
|
||||||
---
|
---
|
||||||
src/twisted/web/http.py | 26 +-------------------------
|
src/twisted/web/http.py | 29 +---------------------
|
||||||
src/twisted/web/newsfragments/10096.bugfix | 1 +
|
src/twisted/web/newsfragments/10096.bugfix | 1 +
|
||||||
src/twisted/web/server.py | 5 ++---
|
2 files changed, 2 insertions(+), 28 deletions(-)
|
||||||
3 files changed, 4 insertions(+), 28 deletions(-)
|
|
||||||
create mode 100644 src/twisted/web/newsfragments/10096.bugfix
|
create mode 100644 src/twisted/web/newsfragments/10096.bugfix
|
||||||
|
|
||||||
Index: Twisted-22.1.0/src/twisted/web/http.py
|
Index: twisted-24.10.0/src/twisted/web/http.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Twisted-22.1.0.orig/src/twisted/web/http.py
|
--- twisted-24.10.0.orig/src/twisted/web/http.py
|
||||||
+++ Twisted-22.1.0/src/twisted/web/http.py
|
+++ twisted-24.10.0/src/twisted/web/http.py
|
||||||
@@ -113,6 +113,7 @@ from urllib.parse import (
|
@@ -125,6 +125,7 @@ from urllib.parse import (
|
||||||
ParseResultBytes,
|
ParseResultBytes,
|
||||||
unquote_to_bytes as unquote,
|
unquote_to_bytes as unquote,
|
||||||
urlparse as _urlparse,
|
urlparse as _urlparse,
|
||||||
@@ -22,7 +21,7 @@ Index: Twisted-22.1.0/src/twisted/web/http.py
|
|||||||
)
|
)
|
||||||
|
|
||||||
from zope.interface import Attribute, Interface, implementer, provider
|
from zope.interface import Attribute, Interface, implementer, provider
|
||||||
@@ -263,31 +264,6 @@ def urlparse(url):
|
@@ -371,34 +372,6 @@ def urlparse(url):
|
||||||
return ParseResultBytes(scheme, netloc, path, params, query, fragment)
|
return ParseResultBytes(scheme, netloc, path, params, query, fragment)
|
||||||
|
|
||||||
|
|
||||||
@@ -30,6 +29,9 @@ Index: Twisted-22.1.0/src/twisted/web/http.py
|
|||||||
- """
|
- """
|
||||||
- Like C{cgi.parse_qs}, but with support for parsing byte strings on Python 3.
|
- Like C{cgi.parse_qs}, but with support for parsing byte strings on Python 3.
|
||||||
-
|
-
|
||||||
|
- This was created to help with Python 2 to Python 3 migration.
|
||||||
|
- Consider using L{urllib.parse.parse_qs}.
|
||||||
|
-
|
||||||
- @type qs: C{bytes}
|
- @type qs: C{bytes}
|
||||||
- """
|
- """
|
||||||
- d = {}
|
- d = {}
|
||||||
@@ -54,39 +56,9 @@ Index: Twisted-22.1.0/src/twisted/web/http.py
|
|||||||
def datetimeToString(msSinceEpoch=None):
|
def datetimeToString(msSinceEpoch=None):
|
||||||
"""
|
"""
|
||||||
Convert seconds since epoch to HTTP datetime string.
|
Convert seconds since epoch to HTTP datetime string.
|
||||||
Index: Twisted-22.1.0/src/twisted/web/newsfragments/10096.bugfix
|
Index: twisted-24.10.0/src/twisted/web/newsfragments/10096.bugfix
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ Twisted-22.1.0/src/twisted/web/newsfragments/10096.bugfix
|
+++ twisted-24.10.0/src/twisted/web/newsfragments/10096.bugfix
|
||||||
@@ -0,0 +1 @@
|
@@ -0,0 +1 @@
|
||||||
+delegate to urllib.parse:parse_qs in twisted.web.http:parse_qs to avoid CVE-2021-23336 and the associated CI failures
|
+delegate to urllib.parse:parse_qs in twisted.web.http:parse_qs to avoid CVE-2021-23336 and the associated CI failures
|
||||||
Index: Twisted-22.1.0/src/twisted/web/server.py
|
|
||||||
===================================================================
|
|
||||||
--- Twisted-22.1.0.orig/src/twisted/web/server.py
|
|
||||||
+++ Twisted-22.1.0/src/twisted/web/server.py
|
|
||||||
@@ -21,7 +21,7 @@ import zlib
|
|
||||||
from binascii import hexlify
|
|
||||||
from html import escape
|
|
||||||
from typing import List, Optional
|
|
||||||
-from urllib.parse import quote as _quote
|
|
||||||
+from urllib.parse import quote as _quote, unquote_to_bytes as _unquote_to_bytes
|
|
||||||
|
|
||||||
from zope.interface import implementer
|
|
||||||
|
|
||||||
@@ -37,7 +37,6 @@ from twisted.python.deprecate import dep
|
|
||||||
from twisted.spread.pb import Copyable, ViewPoint
|
|
||||||
from twisted.web import http, iweb, resource, util
|
|
||||||
from twisted.web.error import UnsupportedMethod
|
|
||||||
-from twisted.web.http import unquote
|
|
||||||
|
|
||||||
NOT_DONE_YET = 1
|
|
||||||
|
|
||||||
@@ -211,7 +210,7 @@ class Request(Copyable, http.Request, co
|
|
||||||
|
|
||||||
# Resource Identification
|
|
||||||
self.prepath = []
|
|
||||||
- self.postpath = list(map(unquote, self.path[1:].split(b"/")))
|
|
||||||
+ self.postpath = [_unquote_to_bytes(v) for v in self.path[1:].split(b"/")]
|
|
||||||
|
|
||||||
# Short-circuit for requests whose path is '*'.
|
|
||||||
if self.path == b"*":
|
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
---
|
diff --git a/src/twisted/test/test_failure.py b/src/twisted/test/test_failure.py
|
||||||
src/twisted/test/test_failure.py | 3 ++-
|
index a9e920c10e..de9c499972 100644
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
--- a/src/twisted/test/test_failure.py
|
||||||
|
+++ b/src/twisted/test/test_failure.py
|
||||||
Index: twisted-23.10.0/src/twisted/test/test_failure.py
|
@@ -19,7 +19,8 @@ from types import TracebackType
|
||||||
===================================================================
|
from typing import Any, Generator, cast
|
||||||
--- twisted-23.10.0.orig/src/twisted/test/test_failure.py
|
|
||||||
+++ twisted-23.10.0/src/twisted/test/test_failure.py
|
|
||||||
@@ -18,7 +18,8 @@ from types import TracebackType
|
|
||||||
from typing import Any, Generator
|
|
||||||
from unittest import skipIf
|
from unittest import skipIf
|
||||||
|
|
||||||
-from cython_test_exception_raiser import raiser # type: ignore[import]
|
-from cython_test_exception_raiser import raiser
|
||||||
+# from cython_test_exception_raiser import raiser # type: ignore[import]
|
+# from cython_test_exception_raiser import raiser
|
||||||
+raiser = None
|
+raiser = None
|
||||||
|
|
||||||
from twisted.python import failure, reflect
|
from twisted.python import failure, reflect
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
src/twisted/conch/test/test_keys.py | 3 +++
|
src/twisted/conch/test/test_keys.py | 3 +++
|
||||||
1 file changed, 3 insertions(+)
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
Index: Twisted-22.10.0/src/twisted/conch/test/test_keys.py
|
Index: twisted-24.10.0/src/twisted/conch/test/test_keys.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Twisted-22.10.0.orig/src/twisted/conch/test/test_keys.py
|
--- twisted-24.10.0.orig/src/twisted/conch/test/test_keys.py
|
||||||
+++ Twisted-22.10.0/src/twisted/conch/test/test_keys.py
|
+++ twisted-24.10.0/src/twisted/conch/test/test_keys.py
|
||||||
@@ -15,6 +15,7 @@ from twisted.python import randbytes
|
@@ -15,6 +15,7 @@ from twisted.python import randbytes
|
||||||
from twisted.python.filepath import FilePath
|
from twisted.python.filepath import FilePath
|
||||||
from twisted.python.reflect import requireModule
|
from twisted.python.reflect import requireModule
|
||||||
@@ -14,9 +14,9 @@ Index: Twisted-22.10.0/src/twisted/conch/test/test_keys.py
|
|||||||
|
|
||||||
cryptography = requireModule("cryptography")
|
cryptography = requireModule("cryptography")
|
||||||
if cryptography is None:
|
if cryptography is None:
|
||||||
@@ -259,6 +260,8 @@ class KeyTests(unittest.TestCase):
|
@@ -278,6 +279,8 @@ class KeyTests(unittest.TestCase):
|
||||||
for k, v in data.items():
|
publicKey = keys.Key.fromString(public)
|
||||||
self.assertEqual(privateKey.data()[k], v)
|
self.assertTrue(publicKey._sk)
|
||||||
|
|
||||||
+ @pyunit.skip('Upstream ticket https://twistedmatrix.com/trac/ticket/9665' +
|
+ @pyunit.skip('Upstream ticket https://twistedmatrix.com/trac/ticket/9665' +
|
||||||
+ ' has still not been resolved.')
|
+ ' has still not been resolved.')
|
||||||
|
|||||||
@@ -1,3 +1,216 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
- update to 24.10.0:
|
||||||
|
* Python 3.13 is now supported.
|
||||||
|
* twisted.internet.defer.succeed() is significantly faster, and
|
||||||
|
awaiting Deferred has also been sped up.
|
||||||
|
* twisted.python.failure.Failure creation no longer records the
|
||||||
|
place where it was created. This reduces creation time by 60%
|
||||||
|
at least, thereby speeding up Deferred error handling.
|
||||||
|
* twisted.internet.defer.Deferred no longer removes the
|
||||||
|
traceback object from Failures. This may result in more
|
||||||
|
objects staying in memory if you don't clean up failed
|
||||||
|
Deferreds, but it speeds up error handling and enables
|
||||||
|
improvements to traceback reporting.
|
||||||
|
* twisted.internet.defer APIs are 2%-4% faster in many cases.
|
||||||
|
* twisted.internet.defer.Deferred runs callbacks with chained
|
||||||
|
Deferreds a little faster.
|
||||||
|
* The reactor now will use a little less CPU when events have
|
||||||
|
been scheduled with callLater().
|
||||||
|
* Creation of twisted.python.failure.Failure is now faster.
|
||||||
|
* Fixed unreleased regression caused by PR 12109.
|
||||||
|
* twisted.logger.eventAsText can now format the output having
|
||||||
|
types/classes as input. This was a regression introduced in
|
||||||
|
Twisted 24.3.0.
|
||||||
|
* twisted.internet.endpoints.clientFromString for TLS endpoints
|
||||||
|
with "bindAddress=" no longer crashes during connect.
|
||||||
|
twisted.internet.endpoints.HostnameEndpoint() no longer
|
||||||
|
crashes when given a bindAddress= argument that is just a
|
||||||
|
string, and that argument now accepts either address strings
|
||||||
|
or (address, port) tuples.
|
||||||
|
* The URLs from README and pyproject.toml were updated.
|
||||||
|
* #11236, #12060, #12062, #12099, #12219, #12290, #12296,
|
||||||
|
#12305, #12329, #12331, #12339
|
||||||
|
* twisted.conch.ssh.keys.Key can now load public blob keys of
|
||||||
|
type sk-ssh-ed25519@openssh.com and sk-ecdsa-
|
||||||
|
sha2-nistp256@openssh.com.
|
||||||
|
* twisted.conch tests no longer rely on OpenSSH supporting DSA
|
||||||
|
keys, fixing compatibility with OpenSSH >= 9.8.
|
||||||
|
* twisted.conch.ssh.SSHCiphers no longer supports the
|
||||||
|
cast128-ctr, cast128-cbc, blowfish-ctr, and blowfish-cbc
|
||||||
|
ciphers. The Blowfish and CAST5 ciphers were removed as they
|
||||||
|
were deprecated by the Python cryptography library.
|
||||||
|
* #12313
|
||||||
|
* The twisted.web HTTP server and client now reject HTTP header
|
||||||
|
names containing whitespace or other invalid characters by
|
||||||
|
raising twisted.web.http_headers.InvalidHeaderName, improving
|
||||||
|
compliance with RFC 9110. As a side effect, the server is
|
||||||
|
slightly faster.
|
||||||
|
* twisted.web.client and twisted.web.server now disable the
|
||||||
|
Nagle algorithm (enable TCP_NODELAY), reducing the latency of
|
||||||
|
small HTTP queries.
|
||||||
|
* twisted.web.server is 1-2% faster in some cases.
|
||||||
|
* twisted.web's HTTP/1.1 server now rejects header values
|
||||||
|
containing a NUL byte with a 400 error, in compliance with
|
||||||
|
RFC 9110.
|
||||||
|
* twisted.internet.address no longer raises DeprecationWarning
|
||||||
|
when used with attrs>=24.1.0.
|
||||||
|
* twisted.web's HTTP/1.1 server now accepts '&' within tokens
|
||||||
|
(methods, header field names, etc.), in compliance with RFC
|
||||||
|
9110.
|
||||||
|
* #9743, #12276
|
||||||
|
* Trial's -j flag now accepts an auto keyword to spawn a number
|
||||||
|
of workers based on the available CPUs.
|
||||||
|
- drop 12313-fix-test_manhole.patch: upstream
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 25 06:38:11 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Add upstream patch 12313-fix-test_manhole.patch to fix test failure
|
||||||
|
with latest python312
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 9 14:23:03 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 24.7.0
|
||||||
|
* 24.7.0.rc2 fixed an unreleased regression caused by PR 12109. (#12279)
|
||||||
|
* twisted.web.util.redirectTo now HTML-escapes the provided URL in the fallback
|
||||||
|
response body it returns (GHSA-cf56-g6w6-pqq2, CVE-2024-41810). (#9839)
|
||||||
|
* The HTTP 1.0 and 1.1 server provided by twisted.web could process pipelined
|
||||||
|
HTTP requests out-of-order, possibly resulting in information disclosure
|
||||||
|
(CVE-2024-41671/GHSA-c8m8-j448-xjx7) (#12248)
|
||||||
|
* twisted.protocols.ftp now supports the IPv6 extensions defined in RFC 2428. (#9645)
|
||||||
|
* twisted.internet.defer.inlineCallbacks can now yield a coroutine. (#9972)
|
||||||
|
* twisted.python._shellcomp.ZshArgumentsGenerator was updated for Python 3.13. (#12065)
|
||||||
|
* twisted.web.wsgi request environment now contains the peer port number as `REMOTE_PORT`. (#12096)
|
||||||
|
* twisted.internet.defer.Deferred.callback() and twisted.internet.defer.Deferred.addCallbacks()
|
||||||
|
no longer use `assert` to check the type of the arguments. You should now use type checking
|
||||||
|
to validate your code. These changes were done to reduce the CPU usage. (#12122)
|
||||||
|
* Added two new methods, twisted.logger.Logger.failuresHandled and twisted.logger.Logger.\
|
||||||
|
failureHandler, which allow for more concise and convenient handling of exceptions when
|
||||||
|
dispatching out to application code. The former can arbitrarily customize failure handling
|
||||||
|
at the call site, and the latter can be used for performance-sensitive cases where no
|
||||||
|
additional information needs to be logged. (#12188)
|
||||||
|
* twisted.internet.defer.Deferred.addCallback now runs about 10% faster. (#12223)
|
||||||
|
* twisted.internet.defer.Deferred error handling is now faster, taking 40% less time to run. (#12227)
|
||||||
|
* twisted.internet.ssl.Certificate.__repr__ can now handle certificates without
|
||||||
|
a common name (CN) in the certificate itself or the signing CA. (#5851)
|
||||||
|
* Type annotations have been added to twisted.conch.interfaces.IKnownHostEntry
|
||||||
|
and its implementations, twisted.conch.client.knownhosts.PlainHost and
|
||||||
|
twisted.conch.client.knownhosts.HashedHost, correcting a variety of
|
||||||
|
type confusion issues throughout the conch client code. (#9713)
|
||||||
|
* twisted.python.failure.Failure once again utilizes the custom
|
||||||
|
pickling logic it used to in the past. (#12112)
|
||||||
|
* twisted.conch.client.knownhosts.KnownHostsFile.verifyHostKey no longer logs
|
||||||
|
an exception when automatically adding an IP address host key, which means
|
||||||
|
the interactive `conch` command-line no longer will either. (#12141)
|
||||||
|
* The IRC server example found in the documentation was updated for readability. (#12097)
|
||||||
|
* Remove contextvars from list of optional dependencies. (#12128)
|
||||||
|
* The documentation for installing Twisted was moved into a single page. (#12145)
|
||||||
|
* The project's compatibility policy now clearly indicates that the GitHub Actions
|
||||||
|
test matrix defines the supported platforms. (#12167)
|
||||||
|
* Updated imap4client.py example, it no longer references Python 2. (#12252)
|
||||||
|
* twisted.internet.defer.returnValue has been deprecated. You can replace
|
||||||
|
it with the standard `return` statement. (#9930)
|
||||||
|
* The `twisted-iocpsupport` is no longer a hard dependency on Windows.
|
||||||
|
* The IOCP support is now installed together with the other Windows soft
|
||||||
|
* dependencies via `twisted[windows-platform]`. (#11893)
|
||||||
|
* twisted.python.deprecate helper function will now always strip whitespaces from the docstrings.
|
||||||
|
* This is done to have the same behaviour as with Python 3.13. (#12063)
|
||||||
|
* twisted.conch.manhole.ManholeInterpreter.write, twisted.conch.manhole.ManholeInterpreter.
|
||||||
|
addOutput, twisted.mail.imap4.IMAP4Server.sendUntaggedResponse `async` argument,
|
||||||
|
deprecated since 18.9.0, has been removed. (#12130)
|
||||||
|
* twisted.web.soap was removed.
|
||||||
|
* The SOAP support was already broken, for at least the last 4 years.
|
||||||
|
* The SOAP support in Twisted has no active maintainer. (#12146)
|
||||||
|
* Fix #11744, #11771, #12113, #12154, #12169, #12179, #12193, #12195,
|
||||||
|
#12197, #12215, #12221, #12243, #12249, #12254, #12259, #12669
|
||||||
|
* twisted.conch.insults.window.Widget.functionKeyReceived now dispatches
|
||||||
|
functional key events to corresponding `func_KEYNAME` methods, where `KEYNAME` can be `F1`, `F2`,
|
||||||
|
`HOME`, `UP_ARROW` etc. This is a regression introduced with #8214 in Twisted 16.5.0, where events
|
||||||
|
changed from `const` objects to bytestrings in square brackets like `[F1]`. (#12046)
|
||||||
|
* twisted.web.agent.Agent now allows duplicate Content-Length headers having the same value, per RFC
|
||||||
|
9110 section 8.6. It is otherwise more strict when parsing Content-Length header values. (#9064)
|
||||||
|
* twisted.web.client.HTTPConnectionPool used by HTTP clients now runs faster by using a little less CPU. (#12108)
|
||||||
|
* twisted.web.http_headers now uses less CPU, making a small HTTP client request 10% faster or so. (#12116)
|
||||||
|
* twisted.web's HTTP/1.1 server now runs a little faster, with about 10% lower CPU overhead. (#12133)
|
||||||
|
* twisted.web's HTTP 1.1 server is an additional 5% faster. (#12155)
|
||||||
|
* twisted.web.http.IM_A_TEAPOT was added and returns `I'm a teapot`
|
||||||
|
* as default message for the status code 418,
|
||||||
|
* as defined in RFC 2324 section 2.3.2. (#12104)
|
||||||
|
* The HTTP 1.0/1.1 server provided by twisted.web is now more picky about the first line of a request,
|
||||||
|
improving compliance with RFC 9112. (#12233)
|
||||||
|
* The HTTP 1.0/1.1 server provided by twisted.web now constraints the character set of HTTP header names,
|
||||||
|
improving compliance with RFC 9110. (#12235)
|
||||||
|
* Fix ReverseProxyResource example in developer guide. (#12152)
|
||||||
|
* twisted.web.util.ChildRedirector, which has never worked on Python 3, has been removed. (#9591)
|
||||||
|
* ``twisted.web.http.Request.setResponseCode()`` no longer validates the types of inputs;
|
||||||
|
we encourage you to use a type checker like mypy to catch these sort of errors. The
|
||||||
|
long-deprecated ``twisted.web.server.string_date_time()`` and ``twisted.web.server.date_time_string()``
|
||||||
|
APIs were removed altogether. (#12133)
|
||||||
|
* twisted.web.http.HTTPClient is now deprecated in favor of twisted.web.client.Agent (#12158)
|
||||||
|
* Fix #12098, #12194, #12200, #12241, #12257
|
||||||
|
- Drop CVE-2024-41671.patch, merged upstream
|
||||||
|
- Drop CVE-2024-41810.patch, merged upstream
|
||||||
|
- Refresh 1521_delegate_parseqs_stdlib_bpo42967.patch
|
||||||
|
- Refresh no-cython_test_exception_raiser.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 31 06:07:19 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add a couple of upstream patches to fix http process information
|
||||||
|
disclosure (CVE-2024-41671, bsc#1228549) and XSS via html injection
|
||||||
|
(CVE-2024-41810, bsc#1228552):
|
||||||
|
* CVE-2024-41671.patch gh#twisted/twisted@4a930de12fb6
|
||||||
|
* CVE-2024-41810.patch gh#twisted/twisted@046a164f89a0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 2 19:43:29 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 24.3.0:
|
||||||
|
* twisted.logger.formatEvent now honors dotted method names,
|
||||||
|
not just flat function names, in format strings, as it has
|
||||||
|
long been explicitly documented to do. So, you will now get
|
||||||
|
the expected result from formatEvent("here's the result of
|
||||||
|
calling a method at log-format time: {obj.method()}",
|
||||||
|
obj=...)
|
||||||
|
* twisted.web.http.HTTPChannel now ignores the trailer headers
|
||||||
|
provided in the last chunk of a chunked encoded response,
|
||||||
|
rather than raising an exception.
|
||||||
|
* twisted.protocols.tls.BufferingTLSTransport, used by default
|
||||||
|
by twisted.protocols.tls.TLSMemoryBIOFactory, was refactored
|
||||||
|
for improved performance when doing a high number of small
|
||||||
|
writes.
|
||||||
|
* twisted.python.failure.Failure now throws exception for
|
||||||
|
generators without triggering a deprecation warnings on
|
||||||
|
Python 3.12.
|
||||||
|
* twisted.internet.process.Process, used by
|
||||||
|
reactor.spawnProcess, now copies the parent environment when
|
||||||
|
the env=None argument is passed on Posix systems and
|
||||||
|
os.posix_spawnp is used internally.
|
||||||
|
* twisted.internet.defer.inlineCallbacks.returnValue's stack
|
||||||
|
introspection was adjusted for the latest PyPy 7.3.14
|
||||||
|
release, allowing legacy @inlineCallbacks to run on new PyPY
|
||||||
|
versions.
|
||||||
|
* twisted.trial.reporter.TestRun.startTest() is no longer
|
||||||
|
called for tests with skip annotation or skip attribute for
|
||||||
|
Python 3.12.1 or newer. This is the result of upstream Python
|
||||||
|
gh-106584 change. The behavior is not change in 3.12.0 or
|
||||||
|
older.
|
||||||
|
- drop twisted-pr12054-testinvokationpy3.12.1.patch,
|
||||||
|
stop-using-3-arg-throw.patch (upstream)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 1 08:33:49 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
Thu Feb 1 08:33:49 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
#
|
#
|
||||||
# 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,17 +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
|
||||||
|
|
||||||
%define skip_python2 1
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-Twisted%{psuffix}
|
Name: python-Twisted%{psuffix}
|
||||||
Version: 23.10.0
|
Version: 24.10.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
|
||||||
@@ -42,44 +45,46 @@ Patch2: no-test_successResultOfWithFailureHasTraceback.patch
|
|||||||
# PATCH-FIX-UPSTREAM 1521_delegate_parseqs_stdlib_bpo42967.patch https://twistedmatrix.com/trac/ticket/10096 mcepl@suse.com
|
# PATCH-FIX-UPSTREAM 1521_delegate_parseqs_stdlib_bpo42967.patch https://twistedmatrix.com/trac/ticket/10096 mcepl@suse.com
|
||||||
# overcome incompatibility with the solution for bpo#42967.
|
# overcome incompatibility with the solution for bpo#42967.
|
||||||
Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch
|
Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch
|
||||||
# PATCH-FIX-UPSTREAM twisted-pr12054-testinvokationpy3.12.1.patch gh#twisted/twisted#12054 fixes gh#twisted/twisted#12052
|
|
||||||
Patch4: twisted-pr12054-testinvokationpy3.12.1.patch
|
|
||||||
# PATCH-FIX-OPENSUSE We don't want to package yet another module, and it is easily skippable
|
# PATCH-FIX-OPENSUSE We don't want to package yet another module, and it is easily skippable
|
||||||
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 gh#twisted/twisted#2280e5fcd0c9e9d34f5b7650c68f19c1498e49cd
|
|
||||||
Patch7: stop-using-3-arg-throw.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 >= 21.3.0}
|
BuildRequires: %{python_module incremental >= 24.7.0}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
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
|
||||||
Requires: python-constantly >= 15.1
|
Requires: python-constantly >= 15.1
|
||||||
Requires: python-hyperlink >= 17.1.1
|
Requires: python-hyperlink >= 17.1.1
|
||||||
Requires: python-incremental >= 21.3.0
|
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}}
|
||||||
|
BuildRequires: %{python_module httpx}
|
||||||
|
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}
|
||||||
BuildRequires: %{python_module hypothesis}
|
|
||||||
%endif
|
%endif
|
||||||
BuildArch: noarch
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -220,6 +225,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}
|
||||||
@@ -243,11 +250,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}
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
Index: twisted-23.10.0/pyproject.toml
|
Index: twisted-24.10.0/pyproject.toml
|
||||||
===================================================================
|
===================================================================
|
||||||
--- twisted-23.10.0.orig/pyproject.toml
|
--- twisted-24.10.0.orig/pyproject.toml
|
||||||
+++ twisted-23.10.0/pyproject.toml
|
+++ twisted-24.10.0/pyproject.toml
|
||||||
@@ -95,8 +95,8 @@ serial = [
|
@@ -97,8 +97,8 @@ serial = [
|
||||||
]
|
]
|
||||||
|
|
||||||
http2 = [
|
http2 = [
|
||||||
- "h2 >= 3.0, < 5.0",
|
- "h2 >= 3.2, < 5.0",
|
||||||
- "priority >= 1.1.0, < 2.0",
|
- "priority >= 1.1.0, < 2.0",
|
||||||
+ "h2 >= 3.0",
|
+ "h2 >= 3.2",
|
||||||
+ "priority >= 1.1.0",
|
+ "priority >= 1.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
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-22.10.0/src/twisted/test/test_udp.py
|
Index: twisted-24.3.0/src/twisted/test/test_udp.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- Twisted-22.10.0.orig/src/twisted/test/test_udp.py
|
--- twisted-24.3.0.orig/src/twisted/test/test_udp.py
|
||||||
+++ Twisted-22.10.0/src/twisted/test/test_udp.py
|
+++ twisted-24.3.0/src/twisted/test/test_udp.py
|
||||||
@@ -8,7 +8,7 @@ Tests for implementations of L{IReactorU
|
@@ -8,7 +8,7 @@ Tests for implementations of L{IReactorU
|
||||||
|
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ Index: Twisted-22.10.0/src/twisted/test/test_udp.py
|
|||||||
|
|
||||||
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.defer import Deferred, gatherResults, maybeDeferred
|
||||||
@@ -581,6 +581,7 @@ class MulticastTests(TestCase):
|
@@ -578,6 +578,7 @@ class MulticastTests(TestCase):
|
||||||
skip = "This reactor does not support multicast"
|
skip = "This reactor does not support multicast"
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
From 2280e5fcd0c9e9d34f5b7650c68f19c1498e49cd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Williamson <awilliam@redhat.com>
|
|
||||||
Date: Fri, 27 Oct 2023 16:56:24 -0700
|
|
||||||
Subject: [PATCH] #12026 Adjust to deprecation of 3-arg generator.throw()
|
|
||||||
|
|
||||||
In Python 3.12, the 3-arg signature of generator.throw() is
|
|
||||||
deprecated, you're only supposed to use the 1-arg signature
|
|
||||||
where you pass only an exception instance. I *think* this is the
|
|
||||||
right thing to pass in this case.
|
|
||||||
|
|
||||||
Signed-off-by: Adam Williamson <awilliam@redhat.com>
|
|
||||||
---
|
|
||||||
src/twisted/newsfragments/12026.bugfix | 1 +
|
|
||||||
src/twisted/python/failure.py | 2 +-
|
|
||||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
create mode 100644 src/twisted/newsfragments/12026.bugfix
|
|
||||||
|
|
||||||
diff --git a/src/twisted/newsfragments/12026.bugfix b/src/twisted/newsfragments/12026.bugfix
|
|
||||||
new file mode 100644
|
|
||||||
index 00000000000..4f06cf79a4a
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/twisted/newsfragments/12026.bugfix
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+twisted.python.failure.Failure now throws exception for generators without triggering a deprecation warnings on Python 3.12.
|
|
||||||
diff --git a/src/twisted/python/failure.py b/src/twisted/python/failure.py
|
|
||||||
index ca893ca4c94..c006d555e55 100644
|
|
||||||
--- a/src/twisted/python/failure.py
|
|
||||||
+++ b/src/twisted/python/failure.py
|
|
||||||
@@ -516,7 +516,7 @@ def throwExceptionIntoGenerator(self, g):
|
|
||||||
"""
|
|
||||||
# Note that the actual magic to find the traceback information
|
|
||||||
# is done in _findFailure.
|
|
||||||
- return g.throw(self.type, self.value, self.tb)
|
|
||||||
+ return g.throw(self.value.with_traceback(self.tb))
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def _findFailure(cls):
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:987847a0790a2c597197613686e2784fd54167df3a55d0fb17c8412305d76ce5
|
|
||||||
size 3495627
|
|
||||||
BIN
twisted-24.10.0.tar.gz
LFS
Normal file
BIN
twisted-24.10.0.tar.gz
LFS
Normal file
Binary file not shown.
@@ -1,83 +0,0 @@
|
|||||||
From 3038382d8b01912358419cee96a56730499881e1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adi Roiban <adi.roiban@chevah.com>
|
|
||||||
Date: Mon, 18 Dec 2023 13:42:28 +0000
|
|
||||||
Subject: [PATCH 1/4] Run with latest Python.
|
|
||||||
|
|
||||||
---
|
|
||||||
.github/workflows/test.yaml | 6 +++---
|
|
||||||
src/twisted/newsfragments/12052.1.misc | 0
|
|
||||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
create mode 100644 src/twisted/newsfragments/12052.1.misc
|
|
||||||
|
|
||||||
Index: twisted-23.10.0/src/twisted/trial/reporter.py
|
|
||||||
===================================================================
|
|
||||||
--- twisted-23.10.0.orig/src/twisted/trial/reporter.py
|
|
||||||
+++ twisted-23.10.0/src/twisted/trial/reporter.py
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
"""
|
|
||||||
Defines classes that handle the results of tests.
|
|
||||||
"""
|
|
||||||
-
|
|
||||||
+from __future__ import annotations
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
@@ -16,7 +16,7 @@ import unittest as pyunit
|
|
||||||
import warnings
|
|
||||||
from collections import OrderedDict
|
|
||||||
from types import TracebackType
|
|
||||||
-from typing import TYPE_CHECKING, List, Tuple, Type, Union
|
|
||||||
+from typing import TYPE_CHECKING, List, Optional, Tuple, Type, Union
|
|
||||||
|
|
||||||
from zope.interface import implementer
|
|
||||||
|
|
||||||
@@ -87,6 +87,11 @@ class TestResult(pyunit.TestResult):
|
|
||||||
|
|
||||||
@ivar successes: count the number of successes achieved by the test run.
|
|
||||||
@type successes: C{int}
|
|
||||||
+
|
|
||||||
+ @ivar _startTime: The time when the current test was started. It defaults to
|
|
||||||
+ L{None}, which means that the test was skipped.
|
|
||||||
+ @ivar _lastTime: The duration of the current test run. It defaults to
|
|
||||||
+ L{None}, which means that the test was skipped.
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Used when no todo provided to addExpectedFailure or addUnexpectedSuccess.
|
|
||||||
@@ -96,6 +101,9 @@ class TestResult(pyunit.TestResult):
|
|
||||||
expectedFailures: List[Tuple[itrial.ITestCase, str, "Todo"]] # type: ignore[assignment]
|
|
||||||
unexpectedSuccesses: List[Tuple[itrial.ITestCase, str]] # type: ignore[assignment]
|
|
||||||
successes: int
|
|
||||||
+ _testStarted: Optional[int]
|
|
||||||
+ # The duration of the test. It is None until the test completes.
|
|
||||||
+ _lastTime: Optional[int]
|
|
||||||
|
|
||||||
def __init__(self):
|
|
||||||
super().__init__()
|
|
||||||
@@ -104,6 +112,8 @@ class TestResult(pyunit.TestResult):
|
|
||||||
self.unexpectedSuccesses = []
|
|
||||||
self.successes = 0
|
|
||||||
self._timings = []
|
|
||||||
+ self._testStarted = None
|
|
||||||
+ self._lastTime = None
|
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
|
||||||
return "<%s run=%d errors=%d failures=%d todos=%d dones=%d skips=%d>" % (
|
|
||||||
@@ -146,7 +156,8 @@ class TestResult(pyunit.TestResult):
|
|
||||||
@type test: L{pyunit.TestCase}
|
|
||||||
"""
|
|
||||||
super().stopTest(test)
|
|
||||||
- self._lastTime = self._getTime() - self._testStarted
|
|
||||||
+ if self._testStarted is not None:
|
|
||||||
+ self._lastTime = self._getTime() - self._testStarted
|
|
||||||
|
|
||||||
def addFailure(self, test, fail):
|
|
||||||
"""
|
|
||||||
Index: twisted-23.10.0/src/twisted/newsfragments/12052.removal
|
|
||||||
===================================================================
|
|
||||||
--- /dev/null
|
|
||||||
+++ twisted-23.10.0/src/twisted/newsfragments/12052.removal
|
|
||||||
@@ -0,0 +1,4 @@
|
|
||||||
+twisted.trial.reporter.TestRun.startTest() is no longer called for tests
|
|
||||||
+with skip annotation or skip attribute for Python 3.12.1 or newer.
|
|
||||||
+This is the result of upstream Python gh-106584 change.
|
|
||||||
+The behavior is not change in 3.12.0 or older.
|
|
||||||
Reference in New Issue
Block a user