Problem with twisted gtk3reactor and pygtkcompat on 13.1

I am trying to work with an application that uses gtk3reactor from python-twisted. When run, it reports:

Traceback (most recent call last):  File "./postr", line 24, in <module>
    from twisted.internet import gtk3reactor
  File "/usr/lib64/python2.7/site-packages/twisted/internet/", line 26, in <module>
    from twisted.internet import gireactor
  File "/usr/lib64/python2.7/site-packages/twisted/internet/", line 84, in <module>
    from gi import pygtkcompat
  File "/usr/lib64/python2.7/site-packages/gi/", line 10, in <module>
ImportError: No module named pygtkcompat

There is no file /usr/lib64/python2.7/site-packages/gi/, but there are pygtkcompat.pyc and .pyo, and they come from python-gobject-3.10.2. It appears to be the only missing .py file in that package.

I have read that twisted should be importing pygtkcompat directly instead of via gi.pygtkcompat, but there is no plain pygtkcompat import on my system, nor have I found a package that provides it. Looking at my Ubuntu systems, there is a separate pygtkcompat directory that part of the python-gi (gobject introspection) package, and the gtk3reactor import works.

Is this a bug in the python-gobject package, or some other problem?

If you look at the package on OBS;

# Drop pygtkcompat's useless and we lack other stuff for it to work
rm %{buildroot}%{local_py_sitedir}/gi/
rm -r %{buildroot}%{local_py_sitedir}/pygtkcompat/
rm examples/Makefile*

So, not a bug…

So there’s no way to use gtk3reactor in twisted? This is a stock install of python-Twisted-13.2.0-2.4.1.x86_64.

Perhaps send an email to one of the maintainer(s) to find out why it (and other bits) aren’t working?

Else you could branch on OBS, rem out the deletion of the files and install your own version?