Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fix Cython 3 compatibility #2345
Fix Cython 3 compatibility #2345
Changes from 5 commits
b8cc539
c0a7b98
8a1c2ed
2f7c051
5413d58
d6b267d
f0aa23d
51d3c3a
502be17
5531827
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Does this actually no longer work with Cython 3.0, or did you just change this to ensure it's using a newer version on CI?
I don't think it's a problem if we require a recent version of Cython, but I'd like to check that if it really doesn't work on Cython 0.x any more.
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.
I think it is fine on older Cython's for the syntax used in this PR. I've been doing this change in my own projects to avoid inconsistent builds. I haven't seen any major troubles between different builds beyond some Cython 3 bugs that were fixed. Just a little scared to let it choose whatever. Not a strong opinion on my part as a non-maintainer of this project.
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.
Oh! Maybe this should set a limit (not sure what to) since Cython is deprecating the
IF
compiler condition (or whatever it is called in Cython-land). I'm not sure if a version has been set when it will actually be removed, but I also know people are still working on the best suggestions for migrating away from it (literal C code, macros, etc).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.
Good point. Let's put an upper bound of
<4
on it, in the hope that actually removingIF
would trigger another major version. Last I heard, the warnings about it were being turned off for now while migration paths are worked out, so I don't think removal is imminent 🤞 .And if the syntax still works on 0.29.x, let's leave the lower bound as it is for now. Although I don't think we actually test building with older Cythons, so it may break without us noticing. 🤷 Testing at the intersection of so many big dependencies (HDF5, Numpy, Python, Cython) is kind of a headache.
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.
Leave it as it is in
master
or leave it as it is in this PR? I'll assume 0.29 included.