On 05/22/2012 03:50 AM, Peter wrote:
> We had the same discussion for Biopython two years ago, and
> introduced our own warning class to avoid our deprecations being
> silent (and thus almost pointless). It is just a subclass of Warning
> (originally we used a subclass of UserWarning).
For SpacePy we took a similar but slightly different approach; this is
in the top-level __init__:
if config['enable_deprecation_warning']:
warnings.filterwarnings('default', '', DeprecationWarning,
'^spacepy', 0, False)
enable_deprecation_warning is True by default, but can be changed in the
user's config file. This keeps everything as DeprecationWarning but only
fiddles with the filter for spacepy (and it's set to default, not always.)
--
Jonathan Niehof
ISR-3 Space Data Systems
Los Alamos National Laboratory
MS-D466
Los Alamos, NM 87545
Phone: 505-667-9595
email: [email protected]
Correspondence /
Technical data or Software Publicly Available
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion