[Python-checkins] python/dist/src/Python compile.c,2.256,2.257 exceptions.c,1.33,1.34

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
2002年8月14日 08:51:31 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv32164/Python
Modified Files:
	compile.c exceptions.c 
Log Message:
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.
Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.256
retrieving revision 2.257
diff -C2 -d -r2.256 -r2.257
*** compile.c	14 Aug 2002 07:46:28 -0000	2.256
--- compile.c	14 Aug 2002 15:51:28 -0000	2.257
***************
*** 1159,1163 ****
 		if (x < 0 && errno == 0) {
 			if (PyErr_WarnExplicit(
! 				 PyExc_DeprecationWarning,
 				 "hex/oct constants > sys.maxint "
 				 "will return positive values "
--- 1159,1163 ----
 		if (x < 0 && errno == 0) {
 			if (PyErr_WarnExplicit(
! 				 PyExc_FutureWarning,
 				 "hex/oct constants > sys.maxint "
 				 "will return positive values "
Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** exceptions.c	29 Jul 2002 13:42:14 -0000	1.33
--- exceptions.c	14 Aug 2002 15:51:29 -0000	1.34
***************
*** 113,117 ****
 +-- SyntaxWarning\n\
 +-- OverflowWarning\n\
! +-- RuntimeWarning"
 );
 
--- 113,118 ----
 +-- SyntaxWarning\n\
 +-- OverflowWarning\n\
! +-- RuntimeWarning\n\
! +-- FutureWarning"
 );
 
***************
*** 903,906 ****
--- 904,911 ----
 "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.");
+ 
 
 
***************
*** 965,968 ****
--- 970,974 ----
 PyObject *PyExc_OverflowWarning;
 PyObject *PyExc_RuntimeWarning;
+ PyObject *PyExc_FutureWarning;
 
 
***************
*** 1045,1048 ****
--- 1051,1056 ----
 {"RuntimeWarning", &PyExc_RuntimeWarning, &PyExc_Warning,
 RuntimeWarning__doc__},
+ {"FutureWarning", &PyExc_FutureWarning, &PyExc_Warning,
+ FutureWarning__doc__},
 /* Sentinel */
 {NULL}

AltStyle によって変換されたページ (->オリジナル) /