mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning). Docs could be improved.
This commit is contained in:
parent
e85ee8d815
commit
d68f5171eb
7 changed files with 48 additions and 16 deletions
|
@ -110,6 +110,7 @@ Exception\n\
|
|||
|\n\
|
||||
+-- UserWarning\n\
|
||||
+-- DeprecationWarning\n\
|
||||
+-- PendingDeprecationWarning\n\
|
||||
+-- SyntaxWarning\n\
|
||||
+-- OverflowWarning\n\
|
||||
+-- RuntimeWarning";
|
||||
|
@ -919,6 +920,11 @@ static char
|
|||
DeprecationWarning__doc__[] =
|
||||
"Base class for warnings about deprecated features.";
|
||||
|
||||
static char
|
||||
PendingDeprecationWarning__doc__[] =
|
||||
"Base class for warnings about features which will be deprecated "
|
||||
"in the future.";
|
||||
|
||||
static char
|
||||
SyntaxWarning__doc__[] = "Base class for warnings about dubious syntax.";
|
||||
|
||||
|
@ -987,6 +993,7 @@ PyObject *PyExc_MemoryErrorInst;
|
|||
PyObject *PyExc_Warning;
|
||||
PyObject *PyExc_UserWarning;
|
||||
PyObject *PyExc_DeprecationWarning;
|
||||
PyObject *PyExc_PendingDeprecationWarning;
|
||||
PyObject *PyExc_SyntaxWarning;
|
||||
PyObject *PyExc_OverflowWarning;
|
||||
PyObject *PyExc_RuntimeWarning;
|
||||
|
@ -1063,6 +1070,8 @@ static struct {
|
|||
{"UserWarning", &PyExc_UserWarning, &PyExc_Warning, UserWarning__doc__},
|
||||
{"DeprecationWarning", &PyExc_DeprecationWarning, &PyExc_Warning,
|
||||
DeprecationWarning__doc__},
|
||||
{"PendingDeprecationWarning", &PyExc_PendingDeprecationWarning, &PyExc_Warning,
|
||||
PendingDeprecationWarning__doc__},
|
||||
{"SyntaxWarning", &PyExc_SyntaxWarning, &PyExc_Warning, SyntaxWarning__doc__},
|
||||
{"OverflowWarning", &PyExc_OverflowWarning, &PyExc_Warning,
|
||||
OverflowWarning__doc__},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue