[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I committed the patch from Raymond's name, but GitHub set me as the author of the commit. :( -- ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d94a65a0694a188713f91ba7c9fffded090247dc by Serhiy Storchaka in branch '2.7': bpo-25732: Make functools.total_ordering implementing __ne__. (#3748) https://github.com/python/cpython/commit/d94a65a0694a188713f91ba7c9fffded090247dc --

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3735 stage: commit review -> patch review ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, do you want to bring this to fruition? -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2016-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2016-06-04 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry for the delayed review. I agree it makes sense to fix this for 2.7, and the proposed solution looks good to me. However, the latest patch looks it was only partway through editing - the additional test cases seem to be copies of the existing test cases,

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: ncoghlan -> rhettinger ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: The docs are correct but are apparently misleading ("rich comparison methods" means all six comparison methods while "rich comparison ordering methods" means only the four that provide order). That said, I think it would be perfectly reasonable to amend

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now defined __ne__ always silently overridden. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This doesn't work with new-style classes that always have __ne__ inherited from object. I afraid that the only way to fix this issue is to backport Python 3 behavior of default __ne__, automatically fallback to __eq__. --

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> ncoghlan Added file: http://bugs.python.org/file41182/total_ordering_ne2.diff ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. Then the patch LGTM. -- stage: needs patch -> commit review ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: In Python 2.7, __ne__ isn't inherited from object. -- ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: ncoghlan -> ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file41186/total_ordering_ne3.diff ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Nick, I'm inclined to put this in. Only bugs can come out of the current arrangement. Do you have any further thoughts? -- assignee: -> ncoghlan ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2015-11-25 Thread David Seddon
New submission from David Seddon: The documentation for functools.total_ordering states that rich comparison can be enabled on a class by specifying an __eq__ method, and one of __lt__(), __le__(), __gt__(), or __ge__(). If these instructions are followed, this results in an incorrect