summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2002-05-29 15:54:55 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2002-05-29 15:54:55 (GMT)
commitd68f5171ebb2f3404548c846523e9e43308a4130 (patch)
treee04245cfbfd036be2c9f8b30c09459ddbbe27710 /Python
parente85ee8d815ed5fa3cbbc2770cd09bcbaf605182c (diff)
downloadcpython-d68f5171ebb2f3404548c846523e9e43308a4130.zip
cpython-d68f5171ebb2f3404548c846523e9e43308a4130.tar.gz
cpython-d68f5171ebb2f3404548c846523e9e43308a4130.tar.bz2
As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning). Docs could be improved.
Diffstat (limited to 'Python')
-rw-r--r--Python/exceptions.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c
index 607d5cf..bd8f55d 100644
--- a/Python/exceptions.c
+++ b/Python/exceptions.c
@@ -110,6 +110,7 @@ Exception\n\
|\n\
+-- UserWarning\n\
+-- DeprecationWarning\n\
+ +-- PendingDeprecationWarning\n\
+-- SyntaxWarning\n\
+-- OverflowWarning\n\
+-- RuntimeWarning";
@@ -920,6 +921,11 @@ 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.";
static char
@@ -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__},