Description of problem: $ rpm -q python3-slip python3-slip-0.6.0-3.fc21.noarch $ python3 Python 3.4.2 (default, Jan 12 2015, 12:13:20) [GCC 4.9.2 20150107 (Red Hat 4.9.2-5)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import slip.dbus.service Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.4/site-packages/slip/dbus/__init__.py", line 8, in <module> from . import service File "/usr/lib/python3.4/site-packages/slip/dbus/service.py", line 32, in <module> from .._wrappers import _gobject as GObject File "/usr/lib/python3.4/site-packages/slip/_wrappers/_gobject.py", line 53, in <module> setattr(_self, what, getattr(_mod, what)) File "/usr/lib64/python3.4/site-packages/gi/__init__.py", line 62, in __getattr__ raise AttributeError(_static_binding_error) AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183 The problem is in slip._wrappers._gobject which tries to abstract between gobject and gi.repository.GObject. The code which detects if to use gi.repository.GObject is probably based on a wrong assumption that 'gobject' is not listed in sys.modules when gi.repository.GObject is imported. It is apparently not true: >>> import sys >>> import gi.repository.GObject >>> 'gi.repository.GObject' in sys.modules True >>> 'gobject' in sys.modules True The following patch fixes this issue for me: diff -up /usr/lib/python3.4/site-packages/slip/_wrappers/_gobject.py.orig /usr/lib/python3.4/site-packages/slip/_wrappers/_gobject.py --- /usr/lib/python3.4/site-packages/slip/_wrappers/_gobject.py.orig 2015-02-19 12:19:48.278330524 +0100 +++ /usr/lib/python3.4/site-packages/slip/_wrappers/_gobject.py 2015-02-19 12:36:31.801840987 +0100 @@ -35,10 +35,10 @@ _self = sys.modules[__name__] _mod = None while _mod is None: - if 'gobject' in sys.modules: - _mod = sys.modules['gobject'] - elif 'gi.repository.GObject' in sys.modules: + if 'gi.repository.GObject' in sys.modules: _mod = sys.modules['gi.repository.GObject'] + elif 'gobject' in sys.modules: + _mod = sys.modules['gobject'] # if not yet imported, try to import gobject first, then # gi.repository.GObject ... if _mod is None:
Hi, can this be please resolved? It is currently blocking setroubleshoot python3 support.
python-slip-0.6.1-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/python-slip-0.6.1-1.fc22
python-slip-0.6.1-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/python-slip-0.6.1-1.fc21
python-slip-0.6.1-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/python-slip-0.6.1-1.fc20
Package python-slip-0.6.1-1.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-slip-0.6.1-1.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-6246/python-slip-0.6.1-1.fc22 then log in and leave karma (feedback).
python-slip-0.6.1-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
python-slip-0.6.1-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
python-slip-0.6.1-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
*** Bug 1144673 has been marked as a duplicate of this bug. ***