Re: PyGObject and g_resources_register


sorry for the late answer!

Conscious User [2012-07-14  8:03 -0300]:
> I've recently noticed that the method g_resources_register
> in PyGObject corresponds to Gio.Resource._register, with a
> trailing underscore. Gio.Resource.register does not work.
> (Python 3 version of PyGObject 3.2.0 in Ubuntu Precise)
> 1) Is/Was this a bug or a conscious decision?

Most certainly not a conscious decision, it's a bug somewhere between
glib and gobject-introspection. I suppose g-i scanner gets confused
because the class name is GResource (singular) but the method name is
g_resources_* (plural)? Can you please file this against glib,
component "introspection" in

> 2) If it's a bug, can I trust that using _register will be
> forwards compatible or should I wrap the call with a
> try/except for AttributeError?

If/when it gets fixed, we'll certainly add a backwards compat shim
with a deprecation warning for a while.



Martin Pitt                        |
Ubuntu Developer (  | Debian Developer  (

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