Order of imports and method calls alters API

Bug #1343069 reported by Christopher Lee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
New
Low
Unassigned

Bug Description

Using the python gi.repository (gir1.2-gtk-3.0) if I import Gdk make a specific method call and then import GdkX11 the API for GdkX11 is different than if I had imported both before the method call.

To reproduce:
Run the script found here (details in comments): http://pastebin.ubuntu.com/7801425/

 - Running the script without any arguments passed (i.e. the API is as expected)

 - Running it with any arguments will make the script call 'Gdk.get_default_root_window()' before the import of GdkX11 meaning the call of 'GdkX11.X11Window.foreign_new_for_display(...)' will fail with the message:
  AttributeError: type object 'gtk.gdk.X11Window' has no attribute 'foreign_new_for_display'

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

affects: gtk+3.0 (Ubuntu) → ubuntu
Changed in ubuntu:
importance: Undecided → Low
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.