Movatterモバイル変換
[0]ホーム
[Python-Dev] Proposal: go back to enabling DeprecationWarning by default
Barry Warsawbarry at python.org
Sun Nov 5 23:14:59 EST 2017
On Nov 5, 2017, at 18:05, Nick Coghlan <ncoghlan at gmail.com> wrote:> So my proposal is simple (and not really new): let's revert back to> the way things were in 2.6 and earlier, with DeprecationWarning being> visible by default+1> As part of this though, I'd suggest amending the documentation for> DeprecationWarning [1] to specifically cover how to turn it off> programmatically (`warnings.simplefilter("ignore",> DeprecationWarning)`), at the command line (`python -W> ignore::DeprecationWarning ...`), and via the environment> (`PYTHONWARNINGS=ignore::DeprecationWarning`).+1I’d also consider adding convenient shortcuts for each of these. I think DeprecationWarning is special enough to warrant it. Possibly:warnings.silence_deprecations()python -X silence-deprecationsPYTHONSILENCEDEPRECATIONS=xCheers,-Barry-------------- next part --------------A non-text attachment was scrubbed...Name: signature.ascType: application/pgp-signatureSize: 833 bytesDesc: Message signed with OpenPGPURL: <http://mail.python.org/pipermail/python-dev/attachments/20171105/9bfa50bf/attachment.sig>
More information about the Python-Devmailing list
[8]ページ先頭