"The specified reactor cannot be used, failed with error: cannot import name enable."

Bug #1103159 reported by Glyph Lefkowitz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Twisted Buildbot Configuration
New
Undecided
Barry Warsaw
pygobject
New
Undecided
Unassigned

Bug Description

After attempting to fix xvfb not starting, the "ubuntu-12.10-py2.7" buildbot (which is now actually running 13.04?) now fails with:

    ./bin/trial: The specified reactor cannot be used, failed with error: cannot import name enable.

<https://buildbot.twistedmatrix.com/builders/ubuntu-12.10-py2.7-gtk/builds/137/steps/gtk3/logs/stdio>

Maybe this is a bug in Twisted itself, but it seems like the builder ought to be able to get further along. Is it missing some packages post-upgrade?

Revision history for this message
Barry Warsaw (barry) wrote : Re: [Bug 1103159] [NEW] "The specified reactor cannot be used, failed with error: cannot import name enable."

On Jan 22, 2013, at 08:34 PM, Glyph Lefkowitz wrote:

>After attempting to fix xvfb not starting, the "ubuntu-12.10-py2.7"
>buildbot (which is now actually running 13.04?) now fails with:
>
> ./bin/trial: The specified reactor cannot be used, failed with
>error: cannot import name enable.
>
><https://buildbot.twistedmatrix.com/builders/ubuntu-12.10-py2.7-gtk/builds/137/steps/gtk3/logs/stdio>
>
>Maybe this is a bug in Twisted itself, but it seems like the builder
>ought to be able to get further along. Is it missing some packages
>post-upgrade?

Possibly, although from the machine's command line:

ubuntu@twisted-python3-buildbot-slave:~$ python
Python 2.7.3 (default, Jan 6 2013, 12:15:04)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gi.pygtkcompat
__main__:1: PyGIDeprecationWarning: gi.pygtkcompat is being deprecated in favor of using "pygtkcompat" directly.
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/gi/pygtkcompat.py", line 8, in <module>
    from pygtkcompat import (enable,
ImportError: cannot import name enable
>>> import pygtkcompat
>>> pygtkcompat.enable
<function enable at 0xea0ed8>
>>>

Revision history for this message
Glyph Lefkowitz (glyph) wrote :

Looks like this was (sort of) filed as a bug in Twisted already.

http://twistedmatrix.com/trac/ticket/6280

Revision history for this message
Glyph Lefkowitz (glyph) wrote :

I'm adding an "also affects" for PyGTK, because I'd like them to have some visibility on how constantly deprecating and removing APIs affects their downstream projects.

Revision history for this message
Glyph Lefkowitz (glyph) wrote :

As mentioned on the Twisted ticket, it would be great if someone could pinpoint the exact versions of PyGTK where the deprecation and the removal occurred.

Revision history for this message
dobey (dobey) wrote :

The deprecation was added in this commit:

http://git.gnome.org/browse/pygobject/commit/gi/pygtkcompat.py?id=8180b8092f99b7c9f0dee1742418efdbd23ab330

Which was first in version 3.7.2.

affects: pygtk → pygobject
Revision history for this message
Glyph Lefkowitz (glyph) wrote :

Thanks for the info on the deprecation, Rodney. You wouldn't happen to know which version the removal happened in, would you?

Revision history for this message
dobey (dobey) wrote :

Glyph, I don't think the removal of gi.pygtkcompat has happened yet. It's still there with a DeprecationWarning, but for some reason can cause twisted to crash. I haven't investigated the crash into pygobject source myself, but the patch I submitted to upstream twisted will get rid of the warning and the crash, and still work on both the new and old versions of pygobject, as it tries the new API and falls back to the old.

Revision history for this message
Glyph Lefkowitz (glyph) wrote :

Rodney, thanks for contributing that patch, but I'd be interested to see when that particular behavior changed. Why don't you think the removal has happened yet, when the error seems to be that the expected module has been removed?

Revision history for this message
dobey (dobey) wrote :

Deprecated doesn't mean it was removed; but that it will be at some time in the future. A crash is likely due to a bug in pygobject itself, with the way it handles the deprecation. So, pyobject is doing the deprecation wrong which breaks things, but my patch also fixes twisted so that the breakage doesn't affect it any more. I think pygobject probably needs fixed as well, but I don't know if that will happen, or how complex a change it would be (I don't really know the code too well for it).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.