Use PyErr_WarnPy3k throughout
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index bcdcda6..5d191a6 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -165,10 +165,8 @@
 	PyObject *func, *alist = NULL, *kwdict = NULL;
 	PyObject *t = NULL, *retval = NULL;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "apply() not supported in 3.x; "
-		       "use func(*args, **kwargs)") < 0)
+	if (PyErr_WarnPy3k("apply() not supported in 3.x; "
+		       "use func(*args, **kwargs)", 1) < 0)
 		return NULL;
 
 	if (!PyArg_UnpackTuple(args, "apply", 1, 3, &func, &alist, &kwdict))
@@ -225,10 +223,8 @@
 static PyObject *
 builtin_callable(PyObject *self, PyObject *v)
 {
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "callable() not supported in 3.x; "
-		       "use hasattr(o, '__call__')") < 0)
+	if (PyErr_WarnPy3k("callable() not supported in 3.x; "
+		       "use hasattr(o, '__call__')", 1) < 0)
 		return NULL;
 	return PyBool_FromLong((long)PyCallable_Check(v));
 }
@@ -438,9 +434,7 @@
 	PyObject *v, *w;
 	PyObject *res;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "coerce() not supported in 3.x") < 0)
+	if (PyErr_WarnPy3k("coerce() not supported in 3.x", 1) < 0)
 		return NULL;
 
 	if (!PyArg_UnpackTuple(args, "coerce", 2, 2, &v, &w))
@@ -709,9 +703,8 @@
 	PyCompilerFlags cf;
 	int exists;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "execfile() not supported in 3.x; use exec()") < 0)
+	if (PyErr_WarnPy3k("execfile() not supported in 3.x; use exec()",
+                           1) < 0)
 		return NULL;
 
 	if (!PyArg_ParseTuple(args, "s|O!O:execfile",
@@ -937,10 +930,8 @@
 	n--;
 
 	if (func == Py_None) {
-		if (Py_Py3kWarningFlag &&
-		    PyErr_Warn(PyExc_DeprecationWarning, 
-			       "map(None, ...) not supported in 3.x; "
-			       "use list(...)") < 0)
+		if (PyErr_WarnPy3k("map(None, ...) not supported in 3.x; "
+			       "use list(...)", 1) < 0)
 			return NULL;
 		if (n == 1) {
 			/* map(None, S) is the same as list(S). */
@@ -1967,10 +1958,8 @@
 {
 	PyObject *seq, *func, *result = NULL, *it;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "reduce() not supported in 3.x; "
-		       "use functools.reduce()") < 0)
+	if (PyErr_WarnPy3k("reduce() not supported in 3.x; "
+		       "use functools.reduce()", 1) < 0)
 		return NULL;
 
 	if (!PyArg_UnpackTuple(args, "reduce", 2, 3, &func, &seq, &result))
@@ -2045,9 +2034,8 @@
 static PyObject *
 builtin_reload(PyObject *self, PyObject *v)
 {
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning, 
-		       "reload() not supported in 3.x; use imp.reload()") < 0)
+	if (PyErr_WarnPy3k("In 3.x, reload() is renamed to imp.reload()",
+                           1) < 0)
 		return NULL;
 
 	return PyImport_ReloadModule(v);
diff --git a/Python/ceval.c b/Python/ceval.c
index 7c7116c..c085851 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -3164,9 +3164,9 @@
 
 	assert(PyExceptionClass_Check(type));
 	if (Py_Py3kWarningFlag && PyClass_Check(type)) {
-		if (PyErr_Warn(PyExc_DeprecationWarning,
+		if (PyErr_WarnEx(PyExc_DeprecationWarning,
 			       "exceptions must derive from BaseException "
-			       "in 3.x") == -1)
+			       "in 3.x", 1) == -1)
 			goto raise_error;
 	}
 
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index 8c82d45..83d7d68 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -172,10 +172,8 @@
 	PyThreadState *tstate;
 	PyObject *tmp_type, *tmp_value, *tmp_tb;
 
-	if (Py_Py3kWarningFlag &&
-	    PyErr_Warn(PyExc_DeprecationWarning,
-		       "sys.exc_clear() not supported in 3.x; "
-		       "use except clauses") < 0)
+	if (PyErr_WarnPy3k("sys.exc_clear() not supported in 3.x; "
+		       "use except clauses", 1) < 0)
 		return NULL;
 
 	tstate = PyThreadState_GET();