From 319915922a0cc4cd0fc08ec9317cbd9a98d5b1c7 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Tue, 19 May 2026 00:18:12 +0100 Subject: [PATCH] x11-terms/terminator: enable py3.14 Added patch to fix test Signed-off-by: Alexey Sokolov Closes: https://bugs.gentoo.org/974176 Part-of: https://codeberg.org/gentoo/gentoo/pulls/917 Merges: https://codeberg.org/gentoo/gentoo/pulls/917 Signed-off-by: Sam James --- ...minator-2.1.5-accelerator-parse-hash.patch | 42 +++++++++++++++++++ x11-terms/terminator/terminator-2.1.5.ebuild | 5 ++- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 x11-terms/terminator/files/terminator-2.1.5-accelerator-parse-hash.patch diff --git a/x11-terms/terminator/files/terminator-2.1.5-accelerator-parse-hash.patch b/x11-terms/terminator/files/terminator-2.1.5-accelerator-parse-hash.patch new file mode 100644 index 0000000000000..502475f2ec827 --- /dev/null +++ b/x11-terms/terminator/files/terminator-2.1.5-accelerator-parse-hash.patch @@ -0,0 +1,42 @@ +https://github.com/gnome-terminator/terminator/pull/1092 + +From 22785efe3bbeb49b1de011d2fc9d14b5c1bed5e4 Mon Sep 17 00:00:00 2001 +From: Anton Bolshakov +Date: Wed, 3 Jun 2026 12:26:31 +0800 +Subject: [PATCH] tests: fix accelerator_parse hash mismatch on Python 3.14 + +gi._gi.ResultTuple (returned by Gtk.accelerator_parse()) has __hash__ +hardcoded to 0, while plain tuples use content-based hashing. This +breaks set membership checks: (key, mods) in {ResultTuple(...)} fails +even though equality holds, because Python set lookup uses hash first. + +Fix: wrap Gtk.accelerator_parse() calls with tuple() so both the set +contents and the lookup key share the same hash implementation. + +Fixes: #1089 +--- + tests/test_prefseditor_keybindings.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/test_prefseditor_keybindings.py b/tests/test_prefseditor_keybindings.py +index 56ee3b74..5f1079cc 100644 +--- a/tests/test_prefseditor_keybindings.py ++++ b/tests/test_prefseditor_keybindings.py +@@ -56,7 +56,7 @@ def test_non_empty_default_keybinding_accels_are_distinct(): + from terminatorlib import config + + all_default_accelerators = [ +- Gtk.accelerator_parse(accel) ++ tuple(Gtk.accelerator_parse(accel)) + for accel in config.DEFAULTS["keybindings"].values() + if accel != "" # ignore empty key bindings + ] +@@ -156,7 +156,7 @@ def test_duplicate_accels_not_possible_to_set(accel_params): + binding = liststore.get_value(liststore.get_iter(path), 0) + + all_default_accelerators = { +- Gtk.accelerator_parse(accel) ++ tuple(Gtk.accelerator_parse(accel)) + for accel in config.DEFAULTS["keybindings"].values() + if accel != "" # ignore empty key bindings + } diff --git a/x11-terms/terminator/terminator-2.1.5.ebuild b/x11-terms/terminator/terminator-2.1.5.ebuild index 49ae7c299d660..97f1c069f8e3b 100644 --- a/x11-terms/terminator/terminator-2.1.5.ebuild +++ b/x11-terms/terminator/terminator-2.1.5.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{11..13} ) +PYTHON_COMPAT=( python3_{11..14} ) inherit distutils-r1 optfeature verify-sig virtualx xdg DESCRIPTION="Multiple GNOME terminals in one window" @@ -44,6 +44,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/terminator.asc PATCHES=( "${FILESDIR}"/terminator-1.91-desktop.patch + "${FILESDIR}"/terminator-2.1.5-accelerator-parse-hash.patch ) src_test() {