Re: Deprecation documentation



On Tue, 2015-06-23 at 01:33 +0200, Jonas Platte wrote:
Hi,
tried to get deprecation pragmas generated. That has worked so far,
but now I would like to include the corresponding documentation (the
deprecation reason as seen in the .gir files as <doc-deprecated>).
I've tried to see how pygobject does this, and found this [1].

However, if I try to do this the same way (implementation: [2]) I
never get back anything (-> there is no "deprecated" attribute; I 
also
tried "doc-deprecated"). So, was I looking in the completely wrong
part of pygobject? How do I get the deprecation reason correctly?

From my little knowledge of Haskell, your code looks good. However, I
don’t think this actually works in pygobject.

   $ python -Wall  # -Wall to enable deprecation warnings
   > from gi.repository import Gio
   > foo = Gio.Application()
   > Gio.Application.set_action_group(foo, None)
   __main__:1: DeprecationWarning: Gio.Application.set_action_group is
deprecated

Looking at Gio-2.0.gir, I would expect to see a deprecation message
starting with “Use the #GActionMap interface instead”.

As far as I remember, deprecation documentation is not copied into the
.typelib file, which is what GIRepository uses; so it’s not available
to the GBaseInfo. This is the underlying problem.

In fact, there’s a bug report about it:

https://bugzilla.gnome.org/show_bug.cgi?id=694728

Philip

Attachment: signature.asc
Description: This is a digitally signed message part



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