New submission from Serhiy Storchaka: Here is a patch which fixes following errors in comparison of ipaddress classes.
1. Ordering comparison raised AttributeError when compared with foreign classes. 2. Ordering comparison didn't return NotImplemented when compared with foreign classes. This prevented fallback to foreign class comparison method. 3. There was a bug in _TotalOrderingMixin.__le__(). It could return False instead of NotImplemented if compared network and address of different versions. 4. There was a typo in ComparisonTests.test_incompatible_versions(). As far as functools.total_ordering now is fixed and more correct and tested than _TotalOrderingMixin, _TotalOrderingMixin is dropped away. ---------- components: Library (Lib) files: ipaddress_comparison.patch keywords: patch messages: 234267 nosy: ncoghlan, pmoody, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix comparison of ipaddress classes type: behavior versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file37767/ipaddress_comparison.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23268> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com