Re: [Python-Dev] Removing PendingDeprecationWarning

2019年3月24日 05:01:22 -0700

On 2019年3月22日 at 12:45, Inada Naoki <[email protected]> wrote:
>
> Hi, all.
>
> I'm thinking about removing PendingDeprecationWarning.
> (previous discussion:
> https://discuss.python.org/t/pendingdeprecationwarning-is-really-useful/1038)
>
> It was added "not be printed by default" version of DeprecationWarning.
> But DeprecationWarning is not printed by default now.
No, this was covered in PEP 565, and PendingDeprecationWarning was
explicitly kept as a way of opting out of the revised semantics of
DeprecationWarning.
In Python 3.7 and above, the semantics are:
* PendingDeprecationWarning: never shown by default
* DeprecationWarning: shown by default in the __main__ module
* FutureWarning: shown by default everywhere
PEP section: 
https://www.python.org/dev/peps/pep-0565/#additional-use-case-for-futurewarning
The documentation was also updated to match:
* https://docs.python.org/3/library/warnings.html#warning-categories
* https://docs.python.org/3/library/exceptions.html#warnings
Cheers,
Nick.
-- 
Nick Coghlan | [email protected] | Brisbane, Australia
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to