Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
HandleNotImplemented
correctly inErrorDetail.__ne__
#8538
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
HandleNotImplemented
correctly inErrorDetail.__ne__
#8538
Uh oh!
There was an error while loading.Please reload this page.
Conversation
PR#7531 resolved issue#7433 by updating `ErrorDetails.__eq__` to correctlyhandle the `NotImplemented` case. However, Python 3.9 continues to issue thefollowing warning: DeprecationWarning: NotImplemented should not be used in a boolean contextThis is because `__ne__` still doesn't handle the `NotImplemented` casecorrectly. In order to avoid this warning, this commit makes the same changefor `__ne__` as previously made for `__eq__`.
Wait. Haven't we got both of these wrong? In what context is What code is returning it? |
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.
Test - does this unapprove?
You need to "dismiss review" from the panel at the bottom.
No, we've got this right, seethe docs:
|
Gotcha, thanks. |
As I said in#7433 (comment) I'm happy to add a test for this case, given some guidance. |
Perhaps we're okay with it not having one. |
Please rename „r” to „result” or something else. |
@wieczorek1990 The change here is consistent with the existing code above. |
Thanks,@tomchristie 🙏 |
I don’t think short names are good code. |
Generally agreed. |
@tomchristie Here:#8585 |
…encode#8538)PRencode#7531 resolved issueencode#7433 by updating `ErrorDetails.__eq__` to correctlyhandle the `NotImplemented` case. However, Python 3.9 continues to issue thefollowing warning: DeprecationWarning: NotImplemented should not be used in a boolean contextThis is because `__ne__` still doesn't handle the `NotImplemented` casecorrectly. In order to avoid this warning, this commit makes the same changefor `__ne__` as previously made for `__eq__`.
As per the sole commit:
refs#7433#7531