Bug 12286 - Can't import gobject in python 3.8
Summary: Can't import gobject in python 3.8
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 12346 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-25 12:41 UTC by Grzegorz Blach
Modified: 2019-12-03 22:51 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Blach 2019-10-25 12:41:54 UTC
This appears to be a similar problem to libselinux:

>>> import gobject
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/gobject/__init__.py", line 26, in <module>
  File "/usr/lib/python3.8/site-packages/glib/__init__.py", line 22, in <module>
SystemError: initialization of _glib raised unreported exception
Comment 1 Thomas Petazzoni 2019-11-27 14:05:09 UTC
*** Bug 12346 has been marked as a duplicate of this bug. ***
Comment 2 Thomas Petazzoni 2019-11-28 18:36:44 UTC
Unfortunately, the version of python-gobject we use is very old, because it was I guess the latest version that doesn't need gobject-introspection.

The same issue was reported to Arch Linux (https://bugs.archlinux.org/task/64541), and they simply removed their python-gobject2 package.

So I think for now, we should disallow our python-gobject package with Python 3.x, until we merge the gobject-introspection support, which will allow us to update to a newer version of python-gobject.
Comment 3 HiFiBerry (Daniel) 2019-11-28 19:07:36 UTC
As Python2 support ends in less than 2 months, just disabling it on Python3 won't really help as there should be no new software anymore that still uses Python2.
What's the state of the introspection code?
Comment 4 Arnout Vandecappelle 2019-12-03 22:51:29 UTC
"Fixed" by commit 4a392d1678 which excludes python-gobject for python3.