-
Notifications
You must be signed in to change notification settings - Fork 782
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
Don't use intocallback in method macros #2664
Conversation
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.
Thanks! I guess this goes in "changed" section of changelog?
There's similar for the proto methods, do you think we can use a similar approach?
Can users still call any callback trait since pyproto was removed? Also..ugh
How do we deal with this in CI again? These counts change depending on the features 😭 I have filed rust-lang/rust#102752 which should do away both with the horrible error message and the "and ... others" thing, so these errors should get even better :) |
09ca410
to
391a65f
Compare
Okay, I think this works. |
Ah, I have a better idea, |
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.
Thanks, this is looking really good! Sorry for my extended delay on reply, my son and I have been ill over the weekend previous and I'm finally better and catching up with things.
Can users still call any callback trait since pyproto was removed?
So eventually I would like to remove src/callback.rs
and put everything in it into impl_
details. Users shouldn't be using that stuff directly as far as I'm concerned.
For the __dunder__
methods, the generated code is built up in pieces (because it needed to be flexible to support the variety of forms those dunders take).
The last uses of callback::convert
which might be doing ok-wrapping are here and here.
If you want, we could save those for a separate PR?
<PyErr as From<&PyArithmeticError>> | ||
<PyErr as From<&PyAssertionError>> | ||
<PyErr as From<&PyAttributeError>> | ||
and $N others |
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.
Aha nice find!
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.
Not a find, I made it 😉
Get well soon 👍
I think that's be a good idea |
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.
Cool, in which case let's merge this 👍
Get well soon 👍
Thanks, I'm fine now but my son still getting over it.
This makes the errors much nicer.