GNOME Bugzilla – Bug 705754
dir(GProps) not showing properties with Python3
Last modified: 2013-10-15 03:52:35 UTC
A small difference I noticed. The following shows properties with python2.7 but not with python3.3 ########### from gi.repository import Gtk x = Gtk.Window() print(x.props) print(dir(x.props))
The following fix has been pushed: a2fa531 Add dir method to GObject props accessor
Created attachment 257320 [details] [review] Add dir method to GObject props accessor Remove special case __members__ attribute from the props accessor objects getattr method. This has been deprecated since Python 2.3 and removed in Python 3. Replace this with a __dir__ method making use of the old members list building code. Additionally fix error where the GObjectClass was being unref'd too many times when using dir(Object.props), causing a GLib critical.