-
Notifications
You must be signed in to change notification settings - Fork 255
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
Support both Cython >3 and Cython < 3 #669
Conversation
... Yeah. I trusted
So, we have an issue with Sorry for the noise. (at least we learned that |
No problem. If I had responded quicker, we'd had got to this point quicker too. I think the issue could be:
pyjnius/jnius/jnius_export_class.pxi Line 266 in 7da4494
So do we need to rewrite all __cls_storage to _JavaClass__cls_storage? |
Revised PR, ready for review - This passes the tests locally and on Github. |
Good catch! However, I guess we should keep compat with both Why?
What do you think about it? |
OK, I had a go at this. I had to add an extra define to config.pxi from setup.py. This is because we needed to:
The solution isnt particularly elegant, but here we are. Aside: I note that defs create warnings from Cython 3.0, but this seems to be a rapidly developing situtation (cython/cython#4310) - the latest is that DEFs are OK, but IFs are not? Should Github actions test on Cython 3 and previous Cython? |
Since it's not here to stay for a quite long time, just looks good.
Yeah, I've read this discussion multiple times during the past months, and I'm happy that they decided to partially revert their decision on
Would be nice! |
Should we update the requirement for the Cython version to leave it verion-agnostic?
I'm not sure how to override the Cython version in the build, as I think the wheels are built in a separate venv? |
It seems that pyproject.toml (requirements) cannot be overwritten on the commandline, so I used actions in push.yml to force the Cython version by rewriting the pyproject.toml file. Of course, this doubles the number of the GHAs. I also fixed some of the code for Cython < 3 (so its good we tested this!), and did some general tidying up. I think this PR is good to go, and hopefully a new shortly release thereafter. |
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.
LGTM. Thank you for taking care of it!
There is some doubts as to whether Cython 3 support works out of the box
#665 (comment) by @misl6
This purpose of /draft/ PR is to demonstrate that the same source as #665 forced to Cython 3 does in fact fail.
Any ideas?