[issue29138] No __hash__() inheritance warning with -Werror

2017-01-02 Thread Martin Panter

Martin Panter added the comment:

Thanks, I will try to look at that some time

--
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29138] No __hash__() inheritance warning with -Werror

2017-01-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue8627.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
superseder:  -> Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29138] No __hash__() inheritance warning with -Werror

2017-01-02 Thread Martin Panter

New submission from Martin Panter:

Normally there is a Python 3 compatibility warning emitted when a class is 
based on object, implements __eq__(), but does not define __hash__():

$ python -3 -c 'class C(object): __eq__ = lambda self, other: True'
-c:1: DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 
3.x

But when warnings are raised as exceptions, this warning seems to be suppressed:

$ python -3 -Werror -c 'class C(object): __eq__ = lambda self, other: True'

Perhaps there is bad exception handling at the warn() call site.

--
messages: 284539
nosy: martin.panter
priority: normal
severity: normal
stage: needs patch
status: open
title: No __hash__() inheritance warning with -Werror
type: behavior
versions: Python 2.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com