]> granicus.if.org Git - python/commitdiff
Merged revisions 81736 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Sat, 5 Jun 2010 11:59:41 +0000 (11:59 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 5 Jun 2010 11:59:41 +0000 (11:59 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81736 | mark.dickinson | 2010-06-05 12:52:24 +0100 (Sat, 05 Jun 2010) | 1 line

  Issue #8627: remove out-of-date warning about overriding __cmp__
........

Misc/NEWS
Objects/typeobject.c

index 2480c8a3f80c11dee2f0f13da5b03c763d2ea498..cb457b24776c5408075a41a03980548b63af7933 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.6.6 alpha 1?
 Core and Builtins
 -----------------
 
+- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of
+  __hash__ in 3.x" warning.
+
 - Issue #3798: Write sys.exit() message to sys.stderr to use stderr encoding
   and error handler, instead of writing to the C stderr file in utf-8
 
index 30e7a2d45665db9e19853340432173859db791bd..af2dc0b071ea4cbc2ede452f9cc876fb8980f0a6 100644 (file)
@@ -3707,7 +3707,6 @@ overrides_name(PyTypeObject *type, char *name)
 }
 
 #define OVERRIDES_HASH(x)       overrides_name(x, "__hash__")
-#define OVERRIDES_CMP(x)        overrides_name(x, "__cmp__")
 #define OVERRIDES_EQ(x)         overrides_name(x, "__eq__")
 
 static void
@@ -3853,12 +3852,6 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
                 if (base->tp_hash &&
                                 (base->tp_hash != PyObject_HashNotImplemented) &&
                                 !OVERRIDES_HASH(type)) {
-                    if (OVERRIDES_CMP(type)) {
-                        PyErr_WarnPy3k("Overriding "
-                          "__cmp__ blocks inheritance "
-                          "of __hash__ in 3.x",
-                          1);
-                    }
                     if (OVERRIDES_EQ(type)) {
                         PyErr_WarnPy3k("Overriding "
                           "__eq__ blocks inheritance "