This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, mark.dickinson, ncoghlan
Date 2012-11-17.22:29:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAP1=2W51k_XtPZ_VN3Z1+WBXF=KHb3hUQLSDXH4a63FAKSerFg@mail.gmail.com>
In-reply-to <1353175621.86.0.335563838987.issue8627@psf.upfronthosting.co.za>
Content
Go ahead and reopen. I just couldn't find the lines anymore when I closed
it.
On Nov 17, 2012 3:07 PM, "Mark Dickinson" <report@bugs.python.org> wrote:

>
> Mark Dickinson added the comment:
>
> To clarify, here's the bug:  the following code should raise an exception,
> but doesn't:
>
> iwasawa:cpython mdickinson$ ./python.exe -3
> Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00)
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import warnings; warnings.filterwarnings("error")
> >>> class A(object):
> ...     def __eq__(self, other):
> ...         return False
> ...
>
>
> Without "warnings.filterwarnings("error")", the warning gets issued as
> expected:
>
> iwasawa:cpython mdickinson$ ./python.exe -3
> Python 2.7.3+ (2.7:333fe4c4897a, Nov 17 2012, 18:01:00)
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> class A(object):
> ...     def __eq__(self, object):
> ...         return False
> ...
> __main__:1: DeprecationWarning: Overriding __eq__ blocks inheritance of
> __hash__ in 3.x
>
> Brett, is it okay to re-open this?  Perhaps a change of title would help?
>  Or I can open a new issue for the remaining problem, if you think that's
> better.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue8627>
> _______________________________________
>
History
Date User Action Args
2012-11-17 22:29:48brett.cannonsetrecipients: + brett.cannon, mark.dickinson, ncoghlan
2012-11-17 22:29:48brett.cannonlinkissue8627 messages
2012-11-17 22:29:48brett.cannoncreate