summaryrefslogtreecommitdiff
path: root/Python/exceptions.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-08-14 15:51:29 +0000
committerBarry Warsaw <barry@python.org>2002-08-14 15:51:29 +0000
commitb3effee3dc0d8fb7663a099442164d491ab621d8 (patch)
treeb829f1038afdeda10cbdca6dcc1105da5ecbc871 /Python/exceptions.c
parente787e2ec55bce44c2d8c23c17d6aa8d82dd42c6a (diff)
downloadcpython-b3effee3dc0d8fb7663a099442164d491ab621d8.tar.gz
Added a FutureWarning for constructs that will change semantically in
the future. Changed PEP 237 hex constant warnings from DeprecationWarning to FutureWarning. Updated the documentation.
Diffstat (limited to 'Python/exceptions.c')
-rw-r--r--Python/exceptions.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Python/exceptions.c b/Python/exceptions.c
index 934850aa06..c4bd626ded 100644
--- a/Python/exceptions.c
+++ b/Python/exceptions.c
@@ -112,7 +112,8 @@ Exception\n\
+-- PendingDeprecationWarning\n\
+-- SyntaxWarning\n\
+-- OverflowWarning\n\
- +-- RuntimeWarning"
+ +-- RuntimeWarning\n\
+ +-- FutureWarning"
);
@@ -902,6 +903,10 @@ PyDoc_STRVAR(OverflowWarning__doc__,
PyDoc_STRVAR(RuntimeWarning__doc__,
"Base class for warnings about dubious runtime behavior.");
+PyDoc_STRVAR(FutureWarning__doc__,
+"Base class for warnings about constructs that will change semantically "
+"in the future.");
+
/* module global functions */
@@ -964,6 +969,7 @@ PyObject *PyExc_PendingDeprecationWarning;
PyObject *PyExc_SyntaxWarning;
PyObject *PyExc_OverflowWarning;
PyObject *PyExc_RuntimeWarning;
+PyObject *PyExc_FutureWarning;
@@ -1044,6 +1050,8 @@ static struct {
OverflowWarning__doc__},
{"RuntimeWarning", &PyExc_RuntimeWarning, &PyExc_Warning,
RuntimeWarning__doc__},
+ {"FutureWarning", &PyExc_FutureWarning, &PyExc_Warning,
+ FutureWarning__doc__},
/* Sentinel */
{NULL}
};