-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
gh-141647: attribute breaks __eq__ behaviour of IPv4Network and IPv6Network #141651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Misc/NEWS.d/next/Library/2025-11-17-17-06-56.gh-issue-131647.tyafol.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
picnixz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we also have a similar issue in _BaseNetwork.__contains__. version is being checked before the other type. Likewise, _BaseNetwork.address_exclude checks version before checking the type of other. And there are many more methods which check other.version before checking other. I will take care of this separately.
Thank you very much again. |
|
Urhg, there are other places where |
of course its fine, I like that. |
|
closing as discuss~ cc @picnixz |
|
Actually, it's even more complex... we have mixed type equalities that are allowed, so we cannot just check with |
yes, also think about that, but old code check it, so in my patch I think its fine. and this is not doc, I wonder user own their risk? |
compore to other
__eq__always use subclass check.versionattribute inipaddressclasses break many methods #141647