diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-27 23:16:44 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-27 23:16:44 (GMT) |
commit | 28104c58d2457e2b74245a49e703d020cc2489df (patch) | |
tree | 32607b7c0a2319ecff83e9ade5613a37d65a18d7 /Python/sysmodule.c | |
parent | 715ec1818de43836cffea50d5f4b5e53fc68a849 (diff) | |
download | cpython-28104c58d2457e2b74245a49e703d020cc2489df.zip cpython-28104c58d2457e2b74245a49e703d020cc2489df.tar.gz cpython-28104c58d2457e2b74245a49e703d020cc2489df.tar.bz2 |
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.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 774a7db..617c38a 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())); |