79cf3ad
From 0bd00bf2fdb3d0039913a3ce747f20197f55c1aa Mon Sep 17 00:00:00 2001
79cf3ad
From: Adam Williamson <awilliam@redhat.com>
79cf3ad
Date: Fri, 27 Oct 2023 16:56:24 -0700
79cf3ad
Subject: [PATCH] Adjust to deprecation of 3-arg signature of generator.throw()
79cf3ad
79cf3ad
In Python 3.12, the 3-arg signature of generator.throw() is
79cf3ad
deprecated, you're only supposed to use the 1-arg signature
79cf3ad
where you pass only an exception instance. I *think* this is the
79cf3ad
right thing to pass in this case.
79cf3ad
79cf3ad
Signed-off-by: Adam Williamson <awilliam@redhat.com>
79cf3ad
---
79cf3ad
 src/twisted/python/failure.py | 2 +-
79cf3ad
 1 file changed, 1 insertion(+), 1 deletion(-)
79cf3ad
79cf3ad
diff --git a/src/twisted/python/failure.py b/src/twisted/python/failure.py
79cf3ad
index ca893ca4c9..c006d555e5 100644
79cf3ad
--- a/src/twisted/python/failure.py
79cf3ad
+++ b/src/twisted/python/failure.py
79cf3ad
@@ -516,7 +516,7 @@ class Failure(BaseException):
79cf3ad
         """
79cf3ad
         # Note that the actual magic to find the traceback information
79cf3ad
         # is done in _findFailure.
79cf3ad
-        return g.throw(self.type, self.value, self.tb)
79cf3ad
+        return g.throw(self.value.with_traceback(self.tb))
79cf3ad
 
79cf3ad
     @classmethod
79cf3ad
     def _findFailure(cls):
79cf3ad
-- 
79cf3ad
2.41.0
79cf3ad