-
-
Notifications
You must be signed in to change notification settings - Fork 396
gtk3: Avoid warnings from newer GObject-introspection imports. #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
How specific is this, i.e. does 3.0 really mean the GTK 3.0 API? GTK is now on 3.20. And how does it interact with a developer who might want to use a different version of Gtk in their own code? E.g. if the developer has already done a |
|
Ping @pkgw - we'll probably close this soon to clear the decks unless something happens with it. |
|
Oh, grrr, totally lost track of your questions. Sorry. I don't know the precise semantics but the version number only speaks to very broad binary compatibility. For the entire lifetime of the Gtk+ 3 series, the API version has been "3.0" (as one can see in the "typelib" files that gobject-introspection uses to describe the API, or the named directories for where binary Gtk+3 plugins go). So, for instance, Gtk+ 3.20 still recommands that you require API version 3.0. Gtk+ 2.0 didn't use the GObject introspection system, so as far as I know there is literally no other valid choice for this parameter. If there were some hypothetical Gtk V4 you'd need to use something different, but it'd be as big of a change as Gtk 2 vs Gtk 3. |
|
OK. And does it behave reasonably if something else has already called |
|
(Since it's supposed to be called before importing Gtk/Gdk, does it throw an error if they've already been imported?) |
|
Oh, yeah, it's sensible about that stuff. And: |
|
Cool, thanks. Do we need to do something equivalent in IPython for the event loop integration when we're running in a terminal? The relevant code is here: https://github.com/ipython/ipython/blob/master/IPython/terminal/pt_inputhooks/gtk3.py |
|
I believe you would want to add something there too, yes. My understanding is that any time you're importing a package from Here's the GNOME bug on making the warning message automatic. It looks like I was wrong and you can in fact load Gtk 2.0 through GObject introspection now; but again, you can't use Gtk 2 and Gtk 3 in the same executable and the APIs are incompatible, so if two pieces of code require the two different versions then there's just going to be no way to use them simultaneously. |
|
Yeah, I'm not too concerned about people trying to use it with Gtk 2, so long as it's not changing on every GTK 3.x release. |
Without this patch, newer versions of pygobject3 lead to the following warnings: