[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#697402: bzr-gtk: causes crash in pydoc -k when python-gtk2 is also installed



* Samuel Bronson <naesten@gmail.com>, 2013-01-04, 16:20:
from gi.repository import Gtk
import _gtk

The last line should read:
from import _gtk


This bug should be reassigned somewhere else, but I haven't decided where yet. Anyway, here are some ideas how to fix (or "fix") it:

1) Make pydoc more robust. It could spawn a worker process, which would do all the nasty import job. If the worked process segfaulted, it wouldn't be a big deal, as a new one could be spawned.

2) Fix both python-gtk2 and python-gi, so that ImportError is thrown early if you try to load Gtk$n bindings and Gtk$((5-n)) are already in sys.modules. This should be easy to do on the python-gtk2 side, and probably way more tricky on the python-gi side. Also, this solves the problem only partially, because there are other Python extensions linked to libgtk2 or libgtk3. (Certainly too many too fix them all. :/)

3) Make libgtk2 and libgtk3 use symbol versioning. Probably not something that would be accepted for wheezy. :/

--
Jakub Wilk


Reply to: