After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 694067 - pygtkcompat: Make it more compatible
pygtkcompat: Make it more compatible
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-18 08:43 UTC by Simon Feltman
Modified: 2014-08-06 04:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pygtkcompat: Add Gtk.Window.set_geometry_hints which accepts keyword arguments (2.65 KB, patch)
2013-02-18 08:47 UTC, Simon Feltman
committed Details | Review
pygtkcompat: Add Widget.window, scroll_to_mark, and window methods (2.36 KB, patch)
2013-02-18 08:47 UTC, Simon Feltman
committed Details | Review

Description Simon Feltman 2013-02-18 08:43:49 UTC
This ticket can be used for tracking simple patches to the pygtkcompat layer.
Comment 1 Simon Feltman 2013-02-18 08:47:37 UTC
Created attachment 236559 [details] [review]
pygtkcompat: Add Gtk.Window.set_geometry_hints which accepts keyword arguments

Monkey patch a keyword argument version of set_geometry_hints onto Gtk.Window.
This version is compatible with pygtk and takes keywords instead of a
Gdk.Geometry and Gdk.GeometryMask.
Comment 2 Simon Feltman 2013-02-18 08:47:38 UTC
Created attachment 236560 [details] [review]
pygtkcompat: Add Widget.window, scroll_to_mark, and window methods

Fix gi.pygtkcompat attempting relative import in Python < 3.0.
Add Gtk.Widget.window property which uses get_window()
Add Gtk.TextView.scroll_to_mark with defaults
Add Gtk.window_list_toplevels and Gtk.window_set_default_icon_name
Comment 3 Martin Pitt 2013-02-26 09:22:00 UTC
Comment on attachment 236560 [details] [review]
pygtkcompat: Add Widget.window, scroll_to_mark, and window methods

What was the error without using absolute_import? We have some test case coverage of pygtkcompat and I didn't see it fail for 2.7?
Comment 4 Simon Feltman 2013-02-26 09:50:40 UTC
(In reply to comment #3)
> (From update of attachment 236560 [details] [review])
> What was the error without using absolute_import? We have some test case
> coverage of pygtkcompat and I didn't see it fail for 2.7?

>>> import gi.pygtkcompat
Traceback (most recent call last):
  • File "<stdin>", line 1 in <module>
  • File "/home/simon/opt/gnome3/lib/python2.7/site-packages/gi/pygtkcompat.py", line 8 in <module>
    from pygtkcompat import (enable,
ImportError: cannot import name enable


It is tries to import enable from itself because the absolute module has the same name. It looks like the tests were changed to use the absolute pygtkcompat so this wasn't showing up.
Comment 5 Simon Feltman 2013-02-26 10:31:08 UTC
Comment on attachment 236559 [details] [review]
pygtkcompat: Add Gtk.Window.set_geometry_hints which accepts keyword arguments

Attachment 236559 [details] pushed as e8e2bbe - pygtkcompat: Add Gtk.Window.set_geometry_hints which accepts keyword arguments
Comment 6 Simon Feltman 2013-02-26 12:39:54 UTC
Comment on attachment 236560 [details] [review]
pygtkcompat: Add Widget.window, scroll_to_mark, and window methods

Attachment 236560 [details] pushed as 9f8258c - pygtkcompat: Add Widget.window, scroll_to_mark, and window methods
Comment 7 Simon Feltman 2014-08-06 04:53:03 UTC
No point in keeping this open, we can log individual tickets as more things come up.