void-packages/srcpkgs/python3-Twisted/patches/sendmail_getargspec.patch

33 lines
1.3 KiB
Diff

From 00bf5be704bee022ba4d9b24eb6c2c768b4a1921 Mon Sep 17 00:00:00 2001
From: eevel <eevel@weezel3.weezelnet>
Date: Wed, 26 Oct 2022 19:49:33 -0500
Subject: [PATCH] fix sendmail tests for python 3.11
---
src/twisted/mail/test/test_smtp.py | 3 ++-
src/twisted/newsfragments/10345.misc | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 src/twisted/newsfragments/10345.misc
diff --git a/src/twisted/mail/test/test_smtp.py b/src/twisted/mail/test/test_smtp.py
index 906eeaad410..4c1885935e4 100644
--- a/src/twisted/mail/test/test_smtp.py
+++ b/src/twisted/mail/test/test_smtp.py
@@ -1771,7 +1771,8 @@ def test_defaultReactorIsGlobalReactor(self):
The default C{reactor} parameter of L{twisted.mail.smtp.sendmail} is
L{twisted.internet.reactor}.
"""
- args, varArgs, keywords, defaults = inspect.getargspec(smtp.sendmail)
+ fullSpec = inspect.getfullargspec(smtp.sendmail)
+ defaults = fullSpec[3]
self.assertEqual(reactor, defaults[2])
def _honorsESMTPArguments(self, username, password):
diff --git a/src/twisted/newsfragments/10345.misc b/src/twisted/newsfragments/10345.misc
new file mode 100644
index 00000000000..2d51e2a7002
--- /dev/null
+++ b/src/twisted/newsfragments/10345.misc
@@ -0,0 +1 @@
+Fix SendmailTests for python 3.11.