Skip to content

Commit a3283ef

Browse files
methanencoghlan
authored andcommitted
Doc: update PendingDeprecationWarning explanation (GH-12837)
Keep the nudge towards DeprecationWarning, but remove the "Note" markup and generally shorten the description. Ref: https://github.com/python/cpython/pull/12505/files#r273978757
1 parent a9a2880 commit a3283ef

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Doc/library/exceptions.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -691,16 +691,13 @@ The following exceptions are used as warning categories; see the
691691

692692
.. exception:: PendingDeprecationWarning
693693

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

697-
.. note::
698-
PendingDeprecationWarning was introduced as an "ignored by default"
699-
version of DeprecationWarning. But :exc:`DeprecationWarning` is also
700-
ignored by default since Python 2.7 and 3.2.
701-
There is not much difference between PendingDeprecationWarning and
702-
DeprecationWarning nowadays. DeprecationWarning is recommended
703-
in general.
698+
This class is rarely used as emitting a warning about a possible
699+
upcoming deprecation is unusual, and :exc:`DeprecationWarning`
700+
is preferred for already active deprecations.
704701

705702

706703
.. exception:: SyntaxWarning

0 commit comments

Comments
 (0)