Skip to content

fix: remove unused GObject and Gtk imports with legacy aliases#1057

Open
dmzoneill wants to merge 1 commit intognome-terminator:masterfrom
dmzoneill-forks:fix/issue-1031-gobject-import
Open

fix: remove unused GObject and Gtk imports with legacy aliases#1057
dmzoneill wants to merge 1 commit intognome-terminator:masterfrom
dmzoneill-forks:fix/issue-1031-gobject-import

Conversation

@dmzoneill
Copy link
Copy Markdown

Fixes #1031

Summary

This PR resolves the deprecation warning that appears in syslog when right-clicking to open the popup menu:

TerminalPopupMenu::show: When using gi.repository you must not import static modules like "gobject". 
Please change all occurrences of "import gobject" to "from gi.repository import GObject".

Changes

Removed two unused import statements from terminatorlib/ipc.py:

  • from gi.repository import Gtk as gtk
  • from gi.repository import GObject as gobject

These imports were not used anywhere in the file, but the lowercase aliases (gobject and gtk) 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 ipc module, 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.

…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.
@dmzoneill dmzoneill closed this Feb 13, 2026
@mattrose
Copy link
Copy Markdown
Member

Why was this closed?

@tompreuss
Copy link
Copy Markdown

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.

@mattrose
Copy link
Copy Markdown
Member

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.

@mattrose mattrose reopened this Feb 14, 2026
@dmzoneill
Copy link
Copy Markdown
Author

there is no reason to have these warning in this day and age.

@dmzoneill dmzoneill closed this Mar 29, 2026
@mattrose
Copy link
Copy Markdown
Member

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

@mattrose mattrose reopened this Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Syslog error message on popup menu

3 participants