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
Cython has a Pure Python Mode. In some form, this has been around for a while. Starting in Cython 3 they have started to really advertise it. The docs include pure Python examples (and show them by default) so users now need to select the Cython examples
Think this is worth exploring as this could be helpful in a few ways:
More developers know Python than Cython
Tooling designed for Python can run on Pure Python Mode Cython files
Having pure Python code reduces friction when trying new things
Now it is hard to say whether Pure Python Mode has enough for RAPIDS to use. Also we won't really know if it works for RAPIDS without trying it. So think the first step will involve picking code from a small, well-scoped project and see how changing it goes
Lastly as the goal would be to have pure Python code in the end. We should try to do as much as possible in pure Python. Only falling back to things like .pxd files as a last resort
As we explore, we are going to learn things. So part of the process will involve raising issues and discussing with upstream developers about our experiences and suggestions we may have
The text was updated successfully, but these errors were encountered:
jakirkham
changed the title
Explore using Cython's pure Python mode
Explore using Cython's Pure Python Mode
Jan 24, 2025
I investigated this when I switched RAPIDS over to Cython 3 (which is the changelog that you linked). See rapidsai/cudf#15135. tl;dr pure Python mode has come a long way and is a strong focus for the Cython developers, and I think this is possible for pure Cython code, but I do not think it will be possible at any point in the foreseeable future to rewrite Cython bindings to C++ using pure Python mode.
Cython has a Pure Python Mode. In some form, this has been around for a while. Starting in Cython 3 they have started to really advertise it. The docs include pure Python examples (and show them by default) so users now need to select the Cython examples
Think this is worth exploring as this could be helpful in a few ways:
Now it is hard to say whether Pure Python Mode has enough for RAPIDS to use. Also we won't really know if it works for RAPIDS without trying it. So think the first step will involve picking code from a small, well-scoped project and see how changing it goes
Lastly as the goal would be to have pure Python code in the end. We should try to do as much as possible in pure Python. Only falling back to things like
.pxd
files as a last resortAs we explore, we are going to learn things. So part of the process will involve raising issues and discussing with upstream developers about our experiences and suggestions we may have
The text was updated successfully, but these errors were encountered: