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.
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 @@
 		   	    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()));