Title: Py3k warnings in Python 2.7 tests
Type: Stage: resolved
Components: Tests Versions: Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: benjamin.peterson, python-dev, r.david.murray, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-10-23 16:29 by serhiy.storchaka, last changed 2016-10-25 06:53 by serhiy.storchaka. This issue is now closed.

File name Uploaded Description Edit
tests_py3k_warns.patch serhiy.storchaka, 2016-10-23 16:29 review
tests_py3k_warns_2.patch serhiy.storchaka, 2016-10-23 17:16 review
Messages (5)
msg279268 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-10-23 16:29
Several warnings are emitted when run Python 2.7 tests with -Wd -3 options.

1. "DeprecationWarning: <> not supported in 3.x; use !=" and "DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator" in Tools/scripts/

2. "DeprecationWarning: Overriding __eq__ blocks inheritance of __hash__ in 3.x" in Lib/test/

3. "SyntaxWarning: tuple parameter unpacking has been removed in 3.x" in Lib/lib-tk/

Proposed patch fixes these warnings.
msg279269 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-10-23 16:40
I don't think it should ever be necessary to raise unhashable type from a __hash__ method.  Can't you just set it to None?
msg279270 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-10-23 17:12
Yes, this work just great! And even generate appropriate error message.
msg279361 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-25 06:52
New changeset 77571b528f6a by Serhiy Storchaka in branch '2.7':
Issue #28515: Fixed py3k warnings.
msg279362 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-10-25 06:53
Thank you David for your advise.
Date User Action Args
2016-10-25 06:53:04serhiy.storchakasetstatus: open -> closed
messages: + msg279362

assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2016-10-25 06:52:00python-devsetnosy: + python-dev
messages: + msg279361
2016-10-23 17:16:35serhiy.storchakasetfiles: + tests_py3k_warns_2.patch
2016-10-23 17:12:43serhiy.storchakasetmessages: + msg279270
2016-10-23 16:40:33r.david.murraysetnosy: + r.david.murray
messages: + msg279269
2016-10-23 16:29:34serhiy.storchakacreate