GNOME Bugzilla – Bug 672168
Rename "property" to "Property"
Last modified: 2012-03-16 11:28:21 UTC
The property class living in gi/_gobject/propertyhelper.py should be renamed with title case as Property to match the rest of GObject. It was most likely initially named lowercase to match that of the builtin python property. Using title case here has a few advantages: * It matches the style of the rest of GObject. * It makes a clear distinction between the builtin python property class. * Back compatibility can easily be supported in __init__.py with "property = Property"
Created attachment 209902 [details] [review] Simple renaming to match the rest of GObject classes.
Review of attachment 209902 [details] [review]: Thanks for this, this is indeed a nice stylistic cleanup. However, I think if we do it it should be done consistently throughout the source. I. e. "make check" still ought to pass even with the "property = Property" backwards compat disabled, as at some point we want to drop this. For example, gi/module.py still seems to use "property". gi/overrides/Gtk.py also uses "property", but there I think it's actually correct, it's a native Python property. Can you please fix the rest of the code accordingly as well? (I. e. until make check passes, and then re-activate the backwards compat snippet). Thanks for all your work!
Created attachment 209915 [details] [review] Renamed property to Property Good points. I updated the unittests and re-ran with the back compatibility commented out. Also grepped for "property" in all the py files and verified gi/module.py, gi/overrides/Gtk.py, and gi/types.py are using the built-in property class.
Thank you! Pushed now, with an extra changelog comment that the old name is being kept for backwards compat.