Created attachment 1571838 [details] test.py Trying to import glib2reactor in python3 fails with the below error. Try with the attached test.py, which should just print on the console "Bye", instead of error. > $ /usr/bin/python3 ./test.py > Traceback (most recent call last): > File "./test.py", line 3, in <module> > from twisted.internet import glib2reactor > File "/usr/lib64/python3.7/site-packages/twisted/internet/glib2reactor.py", line 19, in <module> > from twisted.internet import gtk2reactor > File "/usr/lib64/python3.7/site-packages/twisted/internet/gtk2reactor.py", line 45, in <module> > import gobject > ModuleNotFoundError: No module named 'gobject' Running it with python2 works as expected: > $ /usr/bin/python2 ./test.py > Bye According to [1], you might change "import gobject" with something else. Depending on the effort, either with ".... as gobject", or do all the related renames. Tested with: python2-twisted-19.2.0-1.fc30.x86_64 python3-twisted-19.2.0-1.fc30.x86_64 [1] https://stackoverflow.com/questions/37323567/install-gobject-module
You probably know that, but in case you might find it useful, here's something "portable": try: import gobject except ImportError: from gi.repository import GObject as gobject (which I found in the project I spotted this with).
Upstream bug report: https://twistedmatrix.com/trac/ticket/9642
python-twisted-19.2.0-3.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ed3ce55067
Thanks. I see they suggest to use 'gireactor', instead of 'gtk2reactor'. I agree with the rationale about gtk2 being too old and possibly not shipped. They also claim "Possibly this module should be removed entirely", I'm not sure whether they mean the "gtk2reactor" or the "twisted" module with that "this". I hope they mean the former.
they mean the "gtk2reactor" module
python-twisted-19.2.0-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ed3ce55067
(In reply to Miro Hrončok from comment #5) > they mean the "gtk2reactor" module Okay, that sounds good. I'm sorry for a lame question, though I've basically no idea of python, the less of the 'twisted' or 'gtk2reactor'... Does anybody know whether anywhere exists a porting guide from gtk2reactor to gireactor?
> ...from gtk2reactor to gireactor? Oops, "from glib2reactor to gireactor".
FEDORA-2019-dbd2eccffa has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-dbd2eccffa
python-twisted-19.2.1-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-dbd2eccffa
python-twisted-19.2.1-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.