summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2023-10-18 17:50:35 +0200
committerMichał Górny <mgorny@gentoo.org>2023-10-18 17:56:29 +0200
commitb7926c19b2c7a6f591e23fa7129d56105eeea746 (patch)
tree6da164a54391d1214e360f37276eac9254b68ad6 /dev-python/twisted/files
parentdev-util/ninja: add pkg_postinst workaround for ninja symlink (diff)
downloadgentoo-b7926c19b2c7a6f591e23fa7129d56105eeea746.tar.gz
gentoo-b7926c19b2c7a6f591e23fa7129d56105eeea746.tar.bz2
gentoo-b7926c19b2c7a6f591e23fa7129d56105eeea746.zip
dev-python/twisted: Remove old
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/twisted/files')
-rw-r--r--dev-python/twisted/files/twisted-22.1.0-force-gtk3.patch67
-rw-r--r--dev-python/twisted/files/twisted-22.10.0-python3.11-tests.patch100
-rw-r--r--dev-python/twisted/files/twisted-22.10.0-sendmail.patch28
3 files changed, 0 insertions, 195 deletions
diff --git a/dev-python/twisted/files/twisted-22.1.0-force-gtk3.patch b/dev-python/twisted/files/twisted-22.1.0-force-gtk3.patch
deleted file mode 100644
index 7c9f2d558d65..000000000000
--- a/dev-python/twisted/files/twisted-22.1.0-force-gtk3.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 9344f8cd80ecb2907dbfddfeeb8cc9ffdb50bc94 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 22 May 2021 01:11:48 +0200
-Subject: [PATCH] Force using GTK+3 in twisted.internet.gireactor
-
-Modify twisted.internet.gireactor to explicitly request GTK+ version 3.
-Otherwise it uses the newest version installed which could be GTK+4
-that gireactor is currently incompatible with.
----
- src/twisted/internet/gireactor.py | 3 +++
- src/twisted/internet/test/test_gireactor.py | 3 +++
- src/twisted/newsfragments/10200.bugfix | 1 +
- 3 files changed, 7 insertions(+)
- create mode 100644 src/twisted/newsfragments/10200.bugfix
-
-diff --git a/src/twisted/internet/gireactor.py b/src/twisted/internet/gireactor.py
-index e2d24b599..838fa982e 100644
---- a/src/twisted/internet/gireactor.py
-+++ b/src/twisted/internet/gireactor.py
-@@ -21,6 +21,7 @@ On Python 3, pygobject v3.4 or later is required.
- """
-
-
-+import gi # type: ignore[import]
- import gi.pygtkcompat # type: ignore[import]
- from gi.repository import GLib # type: ignore[import]
-
-@@ -69,6 +70,7 @@ class GIReactor(_glibbase.GlibReactorBase):
- def __init__(self, useGtk=False):
- _gtk = None
- if useGtk is True:
-+ gi.require_version("Gtk", "3.0")
- from gi.repository import Gtk as _gtk
-
- _glibbase.GlibReactorBase.__init__(self, GLib, _gtk, useGtk=useGtk)
-@@ -113,6 +115,7 @@ class PortableGIReactor(_glibbase.PortableGlibReactorBase):
- def __init__(self, useGtk=False):
- _gtk = None
- if useGtk is True:
-+ gi.require_version("Gtk", "3.0")
- from gi.repository import Gtk as _gtk
-
- _glibbase.PortableGlibReactorBase.__init__(self, GLib, _gtk, useGtk=useGtk)
-diff --git a/src/twisted/internet/test/test_gireactor.py b/src/twisted/internet/test/test_gireactor.py
-index c25ada63f..3bb88a07f 100644
---- a/src/twisted/internet/test/test_gireactor.py
-+++ b/src/twisted/internet/test/test_gireactor.py
-@@ -26,6 +26,9 @@ else:
- gtk3reactor = None
- else:
- gtk3reactor = _gtk3reactor
-+ import gi # type: ignore[import]
-+
-+ gi.require_version("Gtk", "3.0")
- from gi.repository import Gtk
-
- from twisted.internet.error import ReactorAlreadyRunning
-diff --git a/src/twisted/newsfragments/10200.bugfix b/src/twisted/newsfragments/10200.bugfix
-new file mode 100644
-index 000000000..7afb343be
---- /dev/null
-+++ b/src/twisted/newsfragments/10200.bugfix
-@@ -0,0 +1 @@
-+twisted.internet.gireactor was fixed to force GTK+3 in order to fix use of incompatible GTK+4 API when installed
---
-2.35.1
-
diff --git a/dev-python/twisted/files/twisted-22.10.0-python3.11-tests.patch b/dev-python/twisted/files/twisted-22.10.0-python3.11-tests.patch
deleted file mode 100644
index b75c97d4997f..000000000000
--- a/dev-python/twisted/files/twisted-22.10.0-python3.11-tests.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-https://src.fedoraproject.org/rpms/python-twisted/blob/rawhide/f/0003-Fix-tests-for-Python-3.11.patch
-
-From b0574816f622bc187389df2183e2bef0492fe5f5 Mon Sep 17 00:00:00 2001
-From: eevel <eevel@weezel3.weezelnet>
-Date: Wed, 2 Nov 2022 20:35:55 -0500
-Subject: [PATCH 3/6] Fix tests for Python 3.11
-
-This is based on a subset of commits from this pull request.
-
-https://github.com/twisted/twisted/pull/11734
-
-- fix twisted.persisted tests (cherry picked from commit 4f6d7fb0749429b092fe7538a7d2b11fe58319a6)
-- fix tests for twisted.spread (cherry picked from commit 525377178adfa987ed56be753aec0fce35d721dc)
-- fix test for twisted.web (cherry picked from commit afcc224a02f72e5d12fa35d223bd753e8086b135)
-- fix persisted tests in twisted.test (cherry picked from commit 4b5ab38b09b326cec7967e04bd4cae8a84bb6784)
-- fix twisted.trial tests (cherry picked from commit f8f56d45113e5f2467a5e8375186e5db6309dfc6)
-- make test_flatten backwards-compatible (cherry picked from commit d91675ac5ffe907fcdbb3d1cedb1240008d81fd1)
---- a/src/twisted/persisted/aot.py
-+++ b/src/twisted/persisted/aot.py
-@@ -399,8 +399,10 @@ class AOTUnjellier:
- inst = klass.__new__(klass)
- if hasattr(klass, "__setstate__"):
- self.callAfter(inst.__setstate__, state)
-- else:
-+ elif isinstance(state, dict):
- inst.__dict__ = state
-+ else:
-+ inst.__dict__ = state.__getstate__()
- return inst
-
- elif c is Ref:
---- a/src/twisted/spread/flavors.py
-+++ b/src/twisted/spread/flavors.py
-@@ -398,6 +398,8 @@ class RemoteCopy(Unjellyable):
- object's dictionary (or a filtered approximation of it depending
- on my peer's perspective).
- """
-+ if not state:
-+ state = {}
- state = {
- x.decode("utf8") if isinstance(x, bytes) else x: y for x, y in state.items()
- }
---- a/src/twisted/spread/jelly.py
-+++ b/src/twisted/spread/jelly.py
-@@ -154,7 +154,8 @@ def _newInstance(cls, state):
- instance = _createBlank(cls)
-
- def defaultSetter(state):
-- instance.__dict__ = state
-+ if isinstance(state, dict):
-+ instance.__dict__ = state or {}
-
- setter = getattr(instance, "__setstate__", defaultSetter)
- setter(state)
---- a/src/twisted/test/test_persisted.py
-+++ b/src/twisted/test/test_persisted.py
-@@ -378,6 +378,10 @@ class AOTTests(TestCase):
- def __dict__(self):
- raise AttributeError()
-
-+ @property
-+ def __getstate__(self):
-+ raise AttributeError()
-+
- self.assertRaises(TypeError, aot.jellyToSource, UnknownType())
-
- def test_basicIdentity(self):
---- a/src/twisted/trial/test/test_pyunitcompat.py
-+++ b/src/twisted/trial/test/test_pyunitcompat.py
-@@ -218,8 +218,10 @@ class PyUnitResultTests(SynchronousTestCase):
- pyresult = pyunit.TestResult()
- result = PyUnitResultAdapter(pyresult)
- result.addError(self, f)
-+ tback = "".join(traceback.format_exception(*exc_info))
- self.assertEqual(
-- pyresult.errors[0][1], "".join(traceback.format_exception(*exc_info))
-+ pyresult.errors[0][1].endswith("ZeroDivisionError: division by zero\n"),
-+ tback.endswith("ZeroDivisionError: division by zero\n"),
- )
-
- def test_trialSkip(self):
---- a/src/twisted/web/test/test_flatten.py
-+++ b/src/twisted/web/test/test_flatten.py
-@@ -706,10 +706,9 @@ class FlattenerErrorTests(SynchronousTestCase):
- Exception while flattening:
- \\[<unrenderable>\\]
- <unrenderable>
-- .*
-+ <Deferred at .* current result: <twisted.python.failure.Failure builtins.RuntimeError: example>>
- File ".*", line \\d*, in _flattenTree
-- element = await element
-- RuntimeError: example
-+ element = await element.*
- """
- ),
- flags=re.MULTILINE,
---
-2.39.2
-
-
diff --git a/dev-python/twisted/files/twisted-22.10.0-sendmail.patch b/dev-python/twisted/files/twisted-22.10.0-sendmail.patch
deleted file mode 100644
index eec57752815d..000000000000
--- a/dev-python/twisted/files/twisted-22.10.0-sendmail.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-https://src.fedoraproject.org/rpms/python-twisted/raw/rawhide/f/0005-fix-sendmail-tests-for-python-3.11.patch
-
-From f29ae1ae433cd9529410a93fd5675cb01460460e Mon Sep 17 00:00:00 2001
-From: eevel <eevel@weezel3.weezelnet>
-Date: Wed, 26 Oct 2022 19:49:33 -0500
-Subject: [PATCH 5/6] fix sendmail tests for python 3.11
-
-(cherry picked from commit 00bf5be704bee022ba4d9b24eb6c2c768b4a1921)
---- a/src/twisted/mail/test/test_smtp.py
-+++ b/src/twisted/mail/test/test_smtp.py
-@@ -1771,7 +1771,8 @@ class SendmailTests(TestCase):
- 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):
---- /dev/null
-+++ b/src/twisted/newsfragments/10345.misc
-@@ -0,0 +1 @@
-+Fix SendmailTests for python 3.11.
---
-2.39.2
-
-