File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,10 @@ Core and Builtins
1313-----------------
1414
1515- Issue #8627: Remove bogus "Overriding __cmp__ blocks inheritance of
16- __hash__ in 3.x" warning.
16+ __hash__ in 3.x" warning. Also fix "XXX undetected error" that
17+ arises from the "Overriding __eq__ blocks inheritance ..." warning
18+ when turned into an exception: in this case the exception simply
19+ gets ignored.
1720
1821- Issue #8748: Fix two issues with comparisons between complex and integer
1922 objects. (1) The comparison could incorrectly return True in some cases
Original file line number Diff line number Diff line change @@ -3869,10 +3869,16 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
38693869 (base -> tp_hash != PyObject_HashNotImplemented ) &&
38703870 !OVERRIDES_HASH (type )) {
38713871 if (OVERRIDES_EQ (type )) {
3872- PyErr_WarnPy3k ("Overriding "
3873- "__eq__ blocks inheritance "
3874- "of __hash__ in 3.x" ,
3875- 1 );
3872+ if (PyErr_WarnPy3k ("Overriding "
3873+ "__eq__ blocks inheritance "
3874+ "of __hash__ in 3.x" ,
3875+ 1 ) < 0 )
3876+ /* XXX This isn't right. If the warning is turned
3877+ into an exception, we should be communicating
3878+ the error back to the caller, but figuring out
3879+ how to clean-up in that case is tricky. See
3880+ issue 8627 for more. */
3881+ PyErr_Clear ();
38763882 }
38773883 }
38783884 }
You can’t perform that action at this time.
0 commit comments