]> granicus.if.org Git - python/commitdiff
bpo-36404: recommend DeprecationWarning over PendingDeprecationWarning (GH-12505)
authorInada Naoki <songofacandy@gmail.com>
Fri, 5 Apr 2019 08:54:24 +0000 (17:54 +0900)
committerGitHub <noreply@github.com>
Fri, 5 Apr 2019 08:54:24 +0000 (17:54 +0900)
Doc/library/exceptions.rst
Doc/library/warnings.rst

index 57ed2914581621b50bb4f51f3348490c878cf6ee..250938003c078c733370d28a2c4e67ecbfad83ba 100644 (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
 
index b04bd79e4bbdc23d45aac0e3f1c2904531d7a176..d121f320d6a3ebbead40a12a46c6ea03faa523a0 100644 (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: