[Python-Dev] [python-committers] Enabling depreciation warnings feature code cutoff
Antoine Pitrou
solipsis at pitrou.net
Wed Nov 8 04:21:57 EST 2017
On Wed, 8 Nov 2017 11:35:13 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> On 8 November 2017 at 10:03, Guido van Rossum <guido at python.org> wrote:
> > OK, so let's come up with a set of heuristics that does the right thing for
> > those cases specifically. I'd say whenever you're executing code from a
> > zipfile or some such it's not considered your own code (by default).
>
> My current preferred heuristic is just to add a new default filter to the list:
>
> once::DeprecationWarning:__main__
Special cases are not special enough to break the rules.
In other words, I'm -1 on this. Not only does it add complication and
inconsistency (bound to catch people by surprise) to an already
non-trivial set of default warning settings, but it doesn't even solve
any problem that I'm aware of. The idea that __main__ scripts should
get special treatment here is entirely gratuitous.
Regards
Antoine.
More information about the Python-Dev
mailing list