bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)

(cherry picked from commit 176d26364b)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
This commit is contained in:
Miss Islington (bot) 2019-04-05 02:07:21 -07:00 committed by GitHub
parent 6f9cd142a2
commit 86fbe0287d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

@ -694,6 +694,14 @@ The following exceptions are used as warning categories; see the
Base class for warnings about features which will be deprecated in the
future.
.. note::
PendingDeprecationWarning was introduced as an "ignored by default"
version of DeprecationWarning. But :exc:`DeprecationWarning` is also
ignored by default since Python 2.7 and 3.2.
There is not much difference between PendingDeprecationWarning and
DeprecationWarning nowadays. DeprecationWarning is recommended
in general.
.. exception:: SyntaxWarning

View File

@ -109,11 +109,11 @@ The following warnings category classes are currently defined:
+----------------------------------+-----------------------------------------------+
.. versionchanged:: 3.7
Previously :exc:`DeprecationWarning` and :exc:`FutureWarning` were
distinguished based on whether a feature was being removed entirely or
changing its behaviour. They are now distinguished based on their
intended audience and the way they're handled by the default warnings
filters.
Previously :exc:`DeprecationWarning` and :exc:`FutureWarning` were
distinguished based on whether a feature was being removed entirely or
changing its behaviour. They are now distinguished based on their
intended audience and the way they're handled by the default warnings
filters.
.. _warning-filter: