This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年01月18日 20:02 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| ipaddress_comparison.patch | serhiy.storchaka, 2015年01月18日 20:02 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg234267 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年01月18日 20:02 | |
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. |
|||
| msg234612 - (view) | Author: Alyssa Coghlan (ncoghlan) * (Python committer) | Date: 2015年01月24日 13:03 | |
+1, looks good to me. That test for ordering and comparison interoperability is actually pretty neat - I wonder if we could make it more generally available as a "check my class handles NotImplemented correctly" check (in unittest?), which would potentially be useful in pursuing a fix for issue #11477. The fact the default __ne__ implementation doesn't handle NotImplemented correctly should probably be filed as a separate issue. |
|||
| msg234617 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年01月24日 15:07 | |
> The fact the default __ne__ implementation doesn't handle NotImplemented correctly should probably be filed as a separate issue. May be this is a part of issue21408. |
|||
| msg234719 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年01月26日 08:12 | |
New changeset 9a7d965ab80f by Serhiy Storchaka in branch '3.4': Issue #23268: Fixed bugs in the comparison of ipaddress classes. https://hg.python.org/cpython/rev/9a7d965ab80f New changeset 051f2a234d8a by Serhiy Storchaka in branch 'default': Issue #23268: Fixed bugs in the comparison of ipaddress classes. https://hg.python.org/cpython/rev/051f2a234d8a |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:12 | admin | set | github: 67457 |
| 2015年01月26日 08:17:29 | serhiy.storchaka | set | status: open -> closed assignee: serhiy.storchaka resolution: fixed stage: patch review -> resolved |
| 2015年01月26日 08:12:28 | python-dev | set | nosy:
+ python-dev messages: + msg234719 |
| 2015年01月24日 15:18:29 | serhiy.storchaka | set | dependencies: + delegation of `!=` to the right-hand side argument is not always done |
| 2015年01月24日 15:07:47 | serhiy.storchaka | set | messages: + msg234617 |
| 2015年01月24日 13:03:33 | ncoghlan | set | messages: + msg234612 |
| 2015年01月18日 20:02:38 | serhiy.storchaka | create | |