deprecations += [
("classic (int|long) division", DeprecationWarning),
("coerce.. not supported", DeprecationWarning),
- ("Overriding __cmp__ ", DeprecationWarning),
(".+__(get|set|del)slice__ has been removed", DeprecationWarning)]
with test_support.check_warnings(*deprecations):
# Run all local test cases, with PTypesLongInitTest first.
Core and Builtins
-----------------
+- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of
+ __hash__ in 3.x" warning.
+
- Issue #8748: Fix two issues with comparisons between complex and integer
objects. (1) The comparison could incorrectly return True in some cases
(2**53+1 == complex(2**53) == 2**53), breaking transivity of equality.
}
#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
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 "