[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Re: Patch to add a "/Deprecated/" annotation to SIP
From: Phil Thompson <phil () riverbankcomputing ! co ! uk>
Date: 2008-09-20 13:18:38
Message-ID: dc0712fb4e3304674d6f52cb6b42b13c () localhost
[Download RAW message or body]
On Fri, 19 Sep 2008 20:39:07 +0200, Giovanni Bajo <rasky@develer.com>
wrote:
> Hi Phil,
>
> this patch to SIP adds a "/Deprecated/" annotation that can be used to
> mark functions that are deprecated. It causes a DeprecationWarning to be
> raised at runtime whenever the function is invoked.
>
> Once a package correctly uses /Deprecated/, the users of the package can
> disable the warning (if they find it annoying) using the standard Python
> warning filter machinery (eg: it allows to disable warnings by matching
> the module name with a regexp). So I don't see a need to provide an
> alternative way to compile it on/off (eg: as SIP command line argument),
> nor at runtime.
>
> This will be used by an upcoming PyQt3Support release that will mark all
> PyQt3 classes and methods as deprecated, to allow developers to quickly
> identify spots where Qt3Support is still in use.
>
> The patch has been written by Lorenzo Berni (I'm submitting it on his
> behalf).
Applied - with a few changes...
You can also apply the annotation to a class so that all its sub-classes,
ctors and methods get deprecated.
I've improved the messages generated.
Thanks,
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic