[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Berker Peksag
Changes by Berker Peksag : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Roy Williams
Roy Williams added the comment: OK, let's close this issue and I'll ping the TIP thread/this issue again. On Sun, Sep 25, 2016, 11:16 AM Ned Batchelder wrote: > > Ned Batchelder added the comment: > > Roy, the code on GitHub isn't a literal copy of the Python 3 code,

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Ned Batchelder
Ned Batchelder added the comment: Roy, the code on GitHub isn't a literal copy of the Python 3 code, since it uses six, "from __future__ import", conditional imports of builtins, and so on. This can be fixed in GitHub. -- ___ Python tracker

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Antti Haapala
Antti Haapala added the comment: Well, as far as I understand, this is a bug in the backport only. The Python 2.6+ backport does not behave identically to Python 3 code in Python 2, unless `__hash__ = None` is added. unittest.mock in Python 3 is not affected in any way. --

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Roy Williams
Roy Williams added the comment: Hey Antti My understanding is the version available on PyPi is now a strict backport of what's in Python 3, so they suggested filling the bug in bugs.python.org so it can be backported.

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-25 Thread Antti Haapala
Antti Haapala added the comment: So you mean that unittest.mock should explicitly set `__hash__ = None`; but this is already what the unittest.mock does, in Python 3; there is no need to set `__hash__ = None`; it is the backport that needs to do this in order to stay compatible. There is no

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-24 Thread Ned Batchelder
Changes by Ned Batchelder : -- nosy: +nedbat ___ Python tracker ___ ___

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-23 Thread Roy Williams
Changes by Roy Williams : -- type: -> behavior ___ Python tracker ___ ___

[issue28260] mock._Any and mock._Call implement __eq__ but not __hash__

2016-09-23 Thread Roy Williams
New submission from Roy Williams: I am investigating a migration to Python 3, and to facilitate this we are using the -3 flag as decribed here: https://docs.python.org/3/howto/pyporting.html#prevent-compatibility-regressions . When using this flag I encountered some issues inside of mock