diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-08 02:07:45 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-07-08 02:07:45 +0200 |
commit | ba8b3a2ca7a43684cf67b174a4b245b8ba596a5c (patch) | |
tree | ac4944546147e094877e4163b1c2ccf868a4775b | |
parent | 885b164bfe9907dcedc4c9260801bd59a790c0c5 (diff) | |
download | cpython-git-ba8b3a2ca7a43684cf67b174a4b245b8ba596a5c.tar.gz |
Close #12501: Adjust callable() warning: callable() is only not supported in
Python 3.1. callable() is again supported in Python 3.2.
-rw-r--r-- | Lib/test/test_builtin.py | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Python/bltinmodule.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 1d35a6afe5..ae3a67c594 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -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)): @@ -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. diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 764ae87ed9..c746e414f5 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -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)); |