You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
32 lines
1.1 KiB
4 weeks ago
|
From 0bd00bf2fdb3d0039913a3ce747f20197f55c1aa Mon Sep 17 00:00:00 2001
|
||
|
From: Adam Williamson <awilliam@redhat.com>
|
||
|
Date: Fri, 27 Oct 2023 16:56:24 -0700
|
||
|
Subject: [PATCH] Adjust to deprecation of 3-arg signature of 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/python/failure.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/twisted/python/failure.py b/src/twisted/python/failure.py
|
||
|
index ca893ca4c9..c006d555e5 100644
|
||
|
--- a/src/twisted/python/failure.py
|
||
|
+++ b/src/twisted/python/failure.py
|
||
|
@@ -516,7 +516,7 @@ class Failure(BaseException):
|
||
|
"""
|
||
|
# 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):
|
||
|
--
|
||
|
2.41.0
|
||
|
|