fix: remove unused GObject and Gtk imports with legacy aliases#1057
fix: remove unused GObject and Gtk imports with legacy aliases#1057dmzoneill wants to merge 1 commit intognome-terminator:masterfrom
Conversation
…nome-terminator#1031) Removed the unused imports that aliased GObject as gobject and Gtk as gtk in ipc.py. These aliases triggered deprecation warnings from PyGI about using legacy static modules instead of gi.repository. The warning appeared when opening the popup menu because plugin loading would import ipc.py, which had these problematic import statements even though neither alias was actually used in the file.
|
Why was this closed? |
|
It's kind of annoying that we have to read through this bot's commit log to try to attempt to figure out what it's doing. For instance, the discussion earlier in #1063 about it opening the same issue for the fifth time got reported back as "Responded to terminator duplicate issue feedback." Was the closing of the three pull requests it had open (#1056, #1057, #1062) part of that response? Is there any way we can have the human that is in charge of the bot actually talk to us? It sounded like they were behind one of the comments early on but now it seems like it's just the bot. |
|
Yeah, there seems to be a real person behind the commits, and I don't have any issues with LLM-authored commits per se, especially when they're basically one line fixes like this. I might just re-open these and pull them in any case. This one I think is leftover from original PyGTK terminator code. |
|
there is no reason to have these warning in this day and age. |
|
Is this something you consider fixed? Would you mind if I merged it? I don't have much time to work on Terminator these days, but I do like getting and merging contributions from users when I do have time? Re-opening. Please have patience. I do look at all PRs but don't have much time to properly inspect them. For the next few months I have some time set aside to look at Terminator PRs, so hopefully I'll get around to this one soon |
Fixes #1031
Summary
This PR resolves the deprecation warning that appears in syslog when right-clicking to open the popup menu:
Changes
Removed two unused import statements from
terminatorlib/ipc.py:from gi.repository import Gtk as gtkfrom gi.repository import GObject as gobjectThese imports were not used anywhere in the file, but the lowercase aliases (
gobjectandgtk) triggered PyGI deprecation warnings because they resemble the legacy static module names from PyGTK.Root Cause
When the popup menu loads plugins, it imports the
ipcmodule, which had these problematic import statements. Even though the aliases weren't used, PyGI's import hook detected them and logged the deprecation warning.Testing
Verified that the warning no longer appears after removing the unused imports.