On Wed, Feb 25, 2015 at 9:21 PM, Paul Moore email@example.com wrote:
On 25 February 2015 at 10:17, Chris Angelico firstname.lastname@example.org wrote:
Agreed; the difference does need justification. Here's justification: Interactive execution places code and output right next to each other. The warning would be emitted right at the time when the corresponding code is entered.
On the other hand, what if "import <3rd party module>" flags a deprecation warning because of something the module author does? Certainly I can just ignore it (as it's "only" a warning) but it would get annoying pretty fast if I couldn't suppress it...
That might be a good excuse to lean on the module's author or submit a patch. :) But yes, that does present a problem, especially since warnings will, by default, show only once (if I'm understanding the docs correctly) - you ignore it in the import, and it's suppressed for the rest of the session.