How to suppress "DeprecationWarning: Old style callback, use cb_func(ok, store) instead"
Neil Cerutti
horpner at yahoo.com
Sat Feb 3 05:24:49 EST 2007
On 2007-02-03, Gabriel Genellina <gagsl-py at yahoo.com.ar> wrote:
> En Sat, 03 Feb 2007 06:12:33 -0300, Peter Otten <__peter__ at web.de>
> escribió:
>
>> John Nagle wrote:
>>
>>> How do I suppress "DeprecationWarning: Old style callback, use
>>> cb_func(ok,
>>> store) instead". A library is triggering this message, the library is
>>> being fixed, but I need to make the message disappear from the output
>>> of a
>>> CGI program.
>>
>> import warnings
>> warnings.filterwarnings("ignore", message="Old style callback, use
>> cb_func(ok, store) instead")
>
> Or you can be more aggressive and filter out all DeprecationWarnings:
> warnings.simplefilter("ignore",DeprecationWarning)
> (same as using option -Wignore::DeprecationWarning on the python command
> line)
Ah, yes! The null module. Python should have more of these. I
mean "shouldn't". ;)
--
Neil Cerutti
More information about the Python-list
mailing list