-
Notifications
You must be signed in to change notification settings - Fork 770
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
Porting to 0.9 after #770 #785
Comments
Thank you.
We can't implement
Please use |
Agreed we can't implement As for supporting them in |
#791 enables |
Awesome! For my #2, I found that Am I right that |
We should probably add an example near the top of
If |
or
To keep our API minimal I'm for the former idea, but it's not very problematic to adopt the later way. |
I actually prefer going in this direction (eventually) - but I think we might want to wait until we've improved the ergonomics of error handling. |
Two points (Using pyo3 master branch from today, Rust 1.43.0 nightly from 2020-02-22), both should be noted in the release notes.
first
After #770, I've noticed that I can't use
&Class
and&mut Class
as method arguments anymore, whereClass
is a#[pyclass]
annotated struct. Instead, it has to be&PyCell<Class>
(I assume, at least that works).second
Furthermore, now I can't cast
PyAny
andPyObject
objects referring to aClass
to Rust references anymore. Previously I usedPyAny::downcast_ref
(nowdowncast
) andPyObject::cast_as
. The error is in both cases the same, i.e.One way I found to fix this was to use
seg.extract::<&PyCell<OtherSegment>>.borrow()
.This is quite cumbersome -- is there/could there be a shortcut?
Of course this should also be noted in the release notes.
Thanks!
The text was updated successfully, but these errors were encountered: