[Python-ideas] Show deprecation warnings in the interactive interpreter
Antoine Pitrou
solipsis at pitrou.net
Wed Feb 25 23:44:39 CET 2015
On Thu, 26 Feb 2015 08:34:31 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
>
> The key problem with the status quo from my perspective is that
> sysadmins currently don't get any warning that their scripts might
> have problems when Fedora next upgrades to a new version of Python,
> because they're not getting the deprecation warnings by default.
The focus on sysadmins sounds a bit gratuitous here. Furthermore I
don't see why sysadmins would only use "main scripts" and not factor
out their code. Besides, we don't want to add an option which would
*discourage* factoring out code.
Another reason why this may be counter-productive: if you run your
script through a stub, then the warnings disappear again.
And this is adding a new variant to the '-W' option, which is
already complicated to learn.
The real issue is that we silenced deprecation warnings at all. There's
nothing specific about "main scripts": every module suffers.
Regards
Antoine.
More information about the Python-ideas
mailing list