-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Update Cython to 3.0.0 #36054
Update Cython to 3.0.0 #36054
Conversation
I wonder if it would make sense to split this in two parts where the first (large) part involves all the method renaming since this will work fine with either cython 0.29 or 3, and leave the changes that force upgrading to cython 3 (if any) to a second (small) part that is easier to review, test, maintain, etc. Ideally the same codebase should work on both cython 0.29 and 3, as it will take some time for distros to upgrade. If not possible, a small(ish) patch that we maintain as a PR here is good to ease adoption. Maybe everything up to 4fefac1 is good as a first part, i.e. can be merged fine without updating cython, it seems it's all renaming methods in ways that won't change behaviour with old cython and makes supporting cython 3 easier. I haven't yet found the time to actually try this, sorry. |
Here are the changes needed to get Sage compiled with Cython 3. Most of the commits involves renaming members from double-underscore to single-underscore or using fully-qualified names to refer to them (insight from @tornaria in #29863 (comment)). They should work just as fine with old Cython versions, and I could create a separate PR for them for easier review if desired. The rest of changes are specific to Cython 3 and likely does not work with older versions.
Some points worth noting:
*.py
files), so hopefully it remains compatible with old pickles. The only exception is the__custom_name
change, where I could not find a good way to keep compatibility.legacy_implicit_noexcept
by adding noexcept to function declarations manually, but that can be done later.Closes #29863.
📝 Checklist
⌛ Dependencies