Skip to content

Commit

Permalink
Doc: update PendingDeprecationWarning explanation (GH-12837)
Browse files Browse the repository at this point in the history
Keep the nudge towards DeprecationWarning, but remove the
"Note" markup and generally shorten the description.

Ref: https://github.com/python/cpython/pull/12505/filesGH-r273978757
(cherry picked from commit a3283ef)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
  • Loading branch information
miss-islington and methane committed Apr 15, 2019
1 parent 28ed39e commit 871ba6c
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions Doc/library/exceptions.rst
Expand Up @@ -691,16 +691,13 @@ The following exceptions are used as warning categories; see the

.. exception:: PendingDeprecationWarning

Base class for warnings about features which will be deprecated in the
future.
Base class for warnings about features which are obsolete and
expected to be deprecated in the future, but are not deprecated
at the moment.

.. 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.
This class is rarely used as emitting a warning about a possible
upcoming deprecation is unusual, and :exc:`DeprecationWarning`
is preferred for already active deprecations.


.. exception:: SyntaxWarning
Expand Down

0 comments on commit 871ba6c

Please sign in to comment.