comparison Python/sysmodule.c @ 44038:d44fffda2cd0 legacy-trunk

Expose Py_Py3kWarningFlag as sys.py3kwarning as discussed in #1504 Also added a warning.warnpy3k() as convenient method for Python 3.x related deprecation warnings.
author Christian Heimes <christian@cheimes.de>
date Tue, 27 Nov 2007 23:16:44 +0000
parents 31c92828aefb
children c218d1ac916e
comparison
equal deleted inserted replaced
44037:60e6eaa378d9 44038:d44fffda2cd0
1165 PyString_FromString(Py_GetPrefix())); 1165 PyString_FromString(Py_GetPrefix()));
1166 SET_SYS_FROM_STRING("exec_prefix", 1166 SET_SYS_FROM_STRING("exec_prefix",
1167 PyString_FromString(Py_GetExecPrefix())); 1167 PyString_FromString(Py_GetExecPrefix()));
1168 SET_SYS_FROM_STRING("maxint", 1168 SET_SYS_FROM_STRING("maxint",
1169 PyInt_FromLong(PyInt_GetMax())); 1169 PyInt_FromLong(PyInt_GetMax()));
1170 SET_SYS_FROM_STRING("py3kwarning",
1171 PyBool_FromLong(Py_Py3kWarningFlag));
1170 #ifdef Py_USING_UNICODE 1172 #ifdef Py_USING_UNICODE
1171 SET_SYS_FROM_STRING("maxunicode", 1173 SET_SYS_FROM_STRING("maxunicode",
1172 PyInt_FromLong(PyUnicode_GetMax())); 1174 PyInt_FromLong(PyUnicode_GetMax()));
1173 #endif 1175 #endif
1174 SET_SYS_FROM_STRING("builtin_module_names", 1176 SET_SYS_FROM_STRING("builtin_module_names",