diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-02-08 12:18:33 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-02-08 12:43:54 +0100 |
commit | eb8d3cb0a2e53fd407e3a364b30a75366d7d8835 (patch) | |
tree | 8f220977616e856fe5503a7034cbfc105441324d /dev-python/twisted/files | |
parent | dev-libs/kuserfeedback: Stabilize 1.0.0-r1 amd64, #831587 (diff) | |
download | gentoo-eb8d3cb0a2e53fd407e3a364b30a75366d7d8835.tar.gz gentoo-eb8d3cb0a2e53fd407e3a364b30a75366d7d8835.tar.bz2 gentoo-eb8d3cb0a2e53fd407e3a364b30a75366d7d8835.zip |
dev-python/twisted: Bump to 22.1.0
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.patch | 67 |
1 files changed, 67 insertions, 0 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 new file mode 100644 index 000000000000..7c9f2d558d65 --- /dev/null +++ b/dev-python/twisted/files/twisted-22.1.0-force-gtk3.patch @@ -0,0 +1,67 @@ +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 + |