GNOME Bugzilla – Bug 312337
gobject.type_register() "already registered" warning should be a deprecation warning
Last modified: 2006-01-09 14:13:50 UTC
Until auto-registration was introduced, all GObject sub-classes had to be registered using gobject.type_register() Now, that type_register() is deprecated, however, code written for the previous API now causes a warning to be printed: Warning: Class Foo is already GObject-registered Since this warning is caused by an API deprecation, existing code that filters deprecation warnings using: warnings.filterwarnings("ignore", category=exceptions.DeprecationWarning) should not see the warning. Discussed this on irc yesterday without conclusion, so I thought I'd file a bug with a patch. The wording for the warning is what gjc suggested
Created attachment 50124 [details] [review] pygtk-type-register-deprecation-warning.patch
+1 from me
I guess it's fine. We can't actually do any better without breaking the API freeze. Mark, feel free commit this
2005-08-02 Mark McLoughlin <mark@skynet.ie> Fixes bug #312337 * gobject/gobjectmodule.c: (_wrap_pyg_type_register): Make the "already registered" warning a deprecation warning with a more detailed hint on what it means.