Bug 1221961 - python-gobject: Gobject instrospection is not working correctly with python 3.12
Summary: python-gobject: Gobject instrospection is not working correctly with python 3.12
Status: RESOLVED WONTFIX
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: GNOME (show other bugs)
Version: Current
Hardware: Other openSUSE Tumbleweed
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-26 10:16 UTC by Daniel Garcia
Modified: 2024-03-27 01:35 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Simple python gtk example (159 bytes, text/x-python)
2024-03-26 10:16 UTC, Daniel Garcia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Garcia 2024-03-26 10:16:32 UTC
Created attachment 873813 [details]
Simple python gtk example

Gtk python bindings for python 3.12 are not working correctly, this simple example works with python 3.11 but crash for python 3.12 because it cannot find the Display.

python3.12 /tmp/window.py 

(process:31981): Gtk-CRITICAL **: 11:14:38.279: _gtk_css_lookup_resolve: assertion '(((__extension__ ({ GTypeInstance *__inst = (GTypeInstance*) ((provider)); GType __t = ((_gtk_style_provider_private_get_type ())); gboolean __r; if (!__inst) __r = (0); else if (__inst->g_class && __inst->g_class->g_type == __t) __r = (!(0)); else __r = g_type_check_instance_is_a (__inst, __t); __r; }))))' failed
/tmp/window.py:6: Warning: g_object_set_data_full: assertion 'G_IS_OBJECT (object)' failed
  win = Gtk.Window()

(process:31981): Gtk-ERROR **: 11:14:38.281: Can't create a GtkStyleContext without a display connection
Trace/breakpoint trap (core dumped)
Comment 1 Daniel Garcia 2024-03-26 10:53:13 UTC
It's working after installing python312-gobject-Gdk, that's required by python312-gobject-devel.

Is this okay? Should I depend on python-gobject-devel to be able to run scripts or it's a problem in the python-gobject package requirements or it should work with just python312-gobject?
Comment 2 Dominique Leuenberger 2024-03-26 11:03:58 UTC
(In reply to Daniel Garcia from comment #1)
> It's working after installing python312-gobject-Gdk, that's required by
> python312-gobject-devel.
> 
> Is this okay? Should I depend on python-gobject-devel to be able to run
> scripts or it's a problem in the python-gobject package requirements or it
> should work with just python312-gobject?

I was somewhat expecting that - yes, we intentionally split the -Gdk part away and let the packagers in responsibility to pull this in.

This otoh allows to have gi-base cLI tools that do not pull in a graphical stack
Comment 3 OBSbugzilla Bot 2024-03-27 01:35:02 UTC
This is an autogenerated message for OBS integration:
This bug (1221961) was mentioned in
https://build.opensuse.org/request/show/1162470 Factory / python-liblarch