Closed Icxolu closed 3 months ago
I noticed here that
PyBacked*
does not implementDebug
. Maybe we should add one inpyo3
(which could just delegate to the debug of theDeref::Target
). SomePartialEq
/Eq
impls could also be nice I think. cc @davidhewitt
Definitely. I think we could even have PartialEq<&str>
or similar. Maybe we should also have implemented Hash
, Ord
, and PartialOrd
?
I also just separately had noticed Send
/Sync
were missing https://github.com/PyO3/pyo3/pull/4007
These types were definitely a somewhat-last-minute addition that have turned out to be super useful (in particular PyBackedStr
) and need some additional love and documentation!
One more thing I just noticed is that we now have access to Borrowed::to_owned
which should allow us to get rid of a FIXME
somewhere IIRC.
@Icxolu So if I am not mistaken this is it to make rust-numpy useful as dependency together with pyo3 0.21? Meaning I will cut a 0.21 release now or is there anything you still want to do before that?
(Regarding my own PR, I don't think the ufunc support is pressing enough to delay the release with the whole PyO3 ecosystem using to the new bound API.)
I think at this point rust-numpy should be compatible and useful together with pyo3 0.21. The things (I'm aware of) that are left are
inner
, dot
and einsum
pyarray!
macroBoth of these should be only additive (introducting _bound
variant, and deprecating the old one), so I think it would also be fine to leave them for a point release. I'll leave that up to you.
In any case a big thanks for all the reviewing ❤️
This disables
pyo3
sgil-ref
migration feature, and fixes all the deprecations that are still left.One major change to note is in
PyArrayDescr::names
, which I changed to return aVec<PyBackedStr>
instead ofVec<&str>
. I don't think we can support the old signature anymore without gil-refs.I noticed here that
PyBacked*
does not implementDebug
. Maybe we should add one inpyo3
(which could just delegate to the debug of theDeref::Target
). SomePartialEq
/Eq
impls could also be nice I think. cc @davidhewitt