-
Notifications
You must be signed in to change notification settings - Fork 729
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
Allow calling Py::as_ref() and Py::into_ref() against PySequence, PyIterator and PyMapping. #1682
Conversation
3f821ad
to
b9f28dc
Compare
Sorry for being AWOL the past week, I've been swamped and not able to keep up with OSS. This is top of my list to review either tonight or tomorrow evening. |
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, overall I'm in favour of having these two APIs for Py<PySequence>
. I think it's perfectly fine to add these in manually. Maybe in the future we'll have a trait which automatically produces this API again.
If it's not too much to ask, would you be willing to add the same for Py<PyIterator>
, which is in almost exactly the same position?
That's also what I've been wondering. Sounds nice. |
a050004
to
f115c70
Compare
I think I've done with them. Can you take a look? |
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, it's looking almost there!
There's a new implementation for IntoPyPointer
for PyAny
which isn't sound and needs to be removed.
Also I made a few comments to tidy up the tests a little bit.
Finally, looks like you may need to run cargo fmt
before you repush.
I'm going to finish this up and also add support for |
2cfdcd9
to
00a4f43
Compare
00a4f43
to
ae05020
Compare
This patch allows one to call
Py::as_ref()
againstPySequence
by supplyingPyTypeInfo
for it.