Re: Inconsistencies with GtkClutter Object Instantiation in Python

On Sat, Mar 31, 2012 at 11:18, Simon Feltman <s feltman gmail com> wrote:
> The main issue I'm seeing is a lack of consistency with object
> instantiation. In Gtk most objects can be instantiated as you would expect
> in python, for example: Gtk.Button(). However, GtkClutter and Clutter seem
> to mostly require usage in the form of: otherwise
> crashes can occur, but not in all cases. For instance,
> will segfault and GtkClutter.Texture() must be used
> instead. Should these bugs be filed against pygobject or clutter-gtk? I also
> have no problem digging into these a bit more to essentially triage them to
> the right group where it makes sense.

I think that's a bug in the C implementation. All classes should be
instantiable via g_object_new and the new_* constructors considered a
convenience for C programmers.

So I would file a bug for clutter-gtk, ideally with a patch.



> Bugs aside, the pattern of using "<api>_<class>_new_<something>" seems
> consistent throughout the gnome C API's but does not map well to python. A
> lot of the instantiation inconsistencies could be remedied with pygobject
> overrides for GtkClutter and Clutter. But is this something that can be
> fixed deeper in gobject introspection? Furthermore, I had found mention,
> while searching, of a override file living in the now deprecated
> pyclutter lib, but this file no longer seems to exist anywhere. This also
> raises the question of where files like this should live. Is it the
> responsibility of pygobject to present a consistent pythonic API for gobject
> supported libs or the libs themself?
> Finally, if the python ports of the clutter-gtk examples are useful to
> others, does it makes sense to include them with the a source package, and
> if so, which one: pygobject or clutter-gtk?
> Thanks,
> -Simon
> _______________________________________________
> python-hackers-list mailing list
> python-hackers-list gnome org

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