From 28104c58d2457e2b74245a49e703d020cc2489df Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 27 Nov 2007 23:16:44 +0000 Subject: 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. --- Python/sysmodule.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 774a7db89b..617c38a2d7 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1167,6 +1167,8 @@ _PySys_Init(void) PyString_FromString(Py_GetExecPrefix())); SET_SYS_FROM_STRING("maxint", PyInt_FromLong(PyInt_GetMax())); + SET_SYS_FROM_STRING("py3kwarning", + PyBool_FromLong(Py_Py3kWarningFlag)); #ifdef Py_USING_UNICODE SET_SYS_FROM_STRING("maxunicode", PyInt_FromLong(PyUnicode_GetMax())); -- cgit v1.2.1