best way to create warning for obsolete functions and call new one

Gelonida N gelonida at gmail.com
Wed Mar 28 03:31:09 EDT 2012


Hi Dan,

On 03/26/2012 11:24 PM, Dan Sommers wrote:
> On Mon, 26 Mar 2012 22:26:11 +0200
> Gelonida N <gelonida at gmail.com> wrote:
> 
>> As these modules are used by quite some projects and as I do not want
>> to force everybody to rename immediately I just want to warn users,
>> that they call functions, that have been renamed and that will be
>> obsoleted.
> 
> You want a  DeprecationWarning.


Yes, this is a good idea.
In my case I had to combine it with
 logging.captureWarnings()






More information about the Python-list mailing list