homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author njs
Recipients njs
Date 2015年05月27日.08:06:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432713990.67.0.935342603332.issue24294@psf.upfronthosting.co.za>
In-reply-to
Content
DeprecationWarning and PendingDeprecationWarning are invisible by default. The rationale for this is that they are only useful to people who are writing code, so they should not be shown to end-users who are merely running code.
If someone is typing stuff into the interactive REPL, though, and the code they type uses some deprecated functionality, then we should actually show them this warning. We know that the author is sitting right there. And they're probably going to take whatever they tested interactively and move it into a more permanent form and ugh.
This problem is particularly acute for packages that are primarily used through the interactive prompt, like numpy. I am tired of getting bugs like this: https://github.com/numpy/numpy/issues/5919
The solution is simple: when entering interactive mode, the REPL should do something like:
warnings.filterwarnings("default", category=DeprecationWarning, module="__main__")
warnings.filterwarnings("default", category=PendingDeprecationWarning, module="__main__")
History
Date User Action Args
2015年05月27日 08:06:30njssetrecipients: + njs
2015年05月27日 08:06:30njssetmessageid: <1432713990.67.0.935342603332.issue24294@psf.upfronthosting.co.za>
2015年05月27日 08:06:30njslinkissue24294 messages
2015年05月27日 08:06:30njscreate

AltStyle によって変換されたページ (->オリジナル) /