You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In short, I learned recently about Objects for Type Hinting in Qiskit/rustworkx#1345 and they are not available in pyo3-ffi. Those specific types have been part of the Stable ABI since 3.9.
Currently, I can still achieve my goals by importing types.GenericAlias via the Python interpreter but I still think typing objects deserve to be included.
I am willing to contribute the Rust bindings if they are welcome.
The text was updated successfully, but these errors were encountered:
Yep a PR to add these to pyo3-ffi seems straightforward. Going further, a way to define __class_getitem__ that's similar to python might be nice (e.g. by doing it with #[pyclass(generic)] as an option)
Yep a PR to add these to pyo3-ffi seems straightforward.
I recently had to touch pyo3-ffi a bunch to add support for free-threaded Python. Please feel free to ping me if you get stuck - although genericaliasobject.h looks pretty straightforward!
In short, I learned recently about Objects for Type Hinting in Qiskit/rustworkx#1345 and they are not available in
pyo3-ffi
. Those specific types have been part of the Stable ABI since 3.9.Currently, I can still achieve my goals by importing
types.GenericAlias
via the Python interpreter but I still think typing objects deserve to be included.I am willing to contribute the Rust bindings if they are welcome.
The text was updated successfully, but these errors were encountered: