diff Python/exceptions.c @ 24818:31d2860089e6 legacy-trunk

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.
author Barry Warsaw <barry@python.org>
date Wed, 14 Aug 2002 15:51:29 +0000
parents 36e2fd3f08f7
children 0337dad8403e
line wrap: on
line diff
--- a/Python/exceptions.c	Wed Aug 14 15:46:02 2002 +0000
+++ b/Python/exceptions.c	Wed Aug 14 15:51:29 2002 +0000
@@ -112,7 +112,8 @@
       +-- PendingDeprecationWarning\n\
       +-- SyntaxWarning\n\
       +-- OverflowWarning\n\
-      +-- RuntimeWarning"
+      +-- RuntimeWarning\n\
+      +-- FutureWarning"
 );
 
 
@@ -902,6 +903,10 @@
 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_SyntaxWarning;
 PyObject *PyExc_OverflowWarning;
 PyObject *PyExc_RuntimeWarning;
+PyObject *PyExc_FutureWarning;
 
 
 
@@ -1044,6 +1050,8 @@
   OverflowWarning__doc__},
  {"RuntimeWarning", &PyExc_RuntimeWarning, &PyExc_Warning,
   RuntimeWarning__doc__},
+ {"FutureWarning", &PyExc_FutureWarning, &PyExc_Warning,
+  FutureWarning__doc__},
  /* Sentinel */
  {NULL}
 };