Don't use intocallback in method macros#2664
Conversation
davidhewitt
left a comment
There was a problem hiding this comment.
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, |
davidhewitt
left a comment
There was a problem hiding this comment.
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 |
Get well soon 👍
I think that's be a good idea |
davidhewitt
left a comment
There was a problem hiding this comment.
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.