[Python-Dev] Proposal: go back to enabling DeprecationWarning by default

Barry Warsaw barry at python.org
Mon Nov 6 13:10:57 EST 2017


On Nov 5, 2017, at 23:08, Serhiy Storchaka <storchaka at gmail.com> wrote:

> Following issues on GitHub related to new Python releases I have found that many projects try to fix deprecation warning, but there are projects that are surprised by ending of deprecation periods and removing features.

Like others here, I’ve also been bitten by silently ignored DeprecationWarnings.  We had some admittedly dodgy code in a corner of Mailman that we could have fixed earlier if we’d seen the warnings.  But we never did, so the first indication of a problem was when code actually *broke* with the new version of Python.  The problem was compounded because it wasn’t us that saw it first, it was a user, so now they had a broken installation and we had to issue a hot fix.  If we’d seen the DeprecationWarnings in the previous version of Python, we would have fixed them and all would have been good.

It’s true that those warnings can cause problems though.  There are certain build/CI environments, e.g. in Ubuntu, that fail when they see unexpected stderr output.  So when we start seeing new deprecations, we got build(-ish) time failures.  I still think that’s a minor price to pay for projects that *want* to do the right thing but don’t because those warnings are essentially hidden until they are breakages.  We have tools to help, so let’s use them.

Staying current and code clean is hard and never ending.  Welcome to software development!

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://mail.python.org/pipermail/python-dev/attachments/20171106/4f337985/attachment.sig>


More information about the Python-Dev mailing list