]> granicus.if.org Git - python/commitdiff
Close #12501: Adjust callable() warning: callable() is only not supported in
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 8 Jul 2011 00:07:45 +0000 (02:07 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 8 Jul 2011 00:07:45 +0000 (02:07 +0200)
Python 3.1. callable() is again supported in Python 3.2.

Lib/test/test_builtin.py
Misc/NEWS
Python/bltinmodule.c

index 1d35a6afe574a27bf39578efed0d9345c1aa41f1..ae3a67c59467443dffbe90a5210820d6d0be89d9 100644 (file)
@@ -1683,6 +1683,7 @@ class TestSorted(unittest.TestCase):
 
 def _run_unittest(*args):
     with check_py3k_warnings(
+            (".+ not supported in 3.1", DeprecationWarning),
             (".+ not supported in 3.x", DeprecationWarning),
             (".+ is renamed to imp.reload", DeprecationWarning),
             ("classic int division", DeprecationWarning)):
index d062d10223bf092e8c7313620fd5113b8fb43047..1491862865a743a11f6ee94e68e93022f2dd3fd6 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -9,6 +9,9 @@ What's New in Python 2.7.3?
 Core and Builtins
 -----------------
 
+- Issue #12501: Adjust callable() warning: callable() is only not supported in
+  Python 3.1. callable() is again supported in Python 3.2.
+
 - Issue #9611, #9015: FileIO.read(), FileIO.readinto(), FileIO.write() and
   os.write() clamp the length to INT_MAX on Windows.
 
index 764ae87ed91eefeabc1893b636fba115bf334664..c746e414f54508dfce81dafc9858470d6a4613a1 100644 (file)
@@ -224,7 +224,7 @@ Return the binary representation of an integer or long integer.");
 static PyObject *
 builtin_callable(PyObject *self, PyObject *v)
 {
-    if (PyErr_WarnPy3k("callable() not supported in 3.x; "
+    if (PyErr_WarnPy3k("callable() not supported in 3.1; "
                        "use isinstance(x, collections.Callable)", 1) < 0)
         return NULL;
     return PyBool_FromLong((long)PyCallable_Check(v));