-
Notifications
You must be signed in to change notification settings - Fork 7
Fix build with Cython 3.1 #3
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
Conversation
|
Thanks. I won't be able to look at this for a few days. The Windows build failure looks like something Pari knows how to deal with - they know the size of a long in Windows. So I am guessing some small configure tweak will fix it. |
|
@culler wrote:
The windows failure is not caused by this PR, it is a pre-existing condition. |
|
The Windows CI is now working again for the main branch, so I reran it on this PR. It fails, perhaps due to PARI's doing @culler do you have any suggestions? |
|
I think we can ignore the errors about redefining LONG_MIN and LONG_MAX. But the other errors are definitely the result of the crazy |
Cython 3.1 no longer discards extension types' `__cmp__` method. However `cmp()` is not a thing in Python 3, at the very least the doctests have to be modified/removed. Sage's `cypari2` opted for the following. See cython/cython@9a22b49. Based off of sagemath/cypari2@1db13c9.
Cython 3.1 no longer discards extension types' `__hex__` method. This would mean these tests get run. But `hex` does not use `.__hex__` in Python 3 so these tests aren't actually testing the function definition they live under. Sage's `cypari2` also has no tests for `__hex__`. See cython/cython@9a22b49.
1171675 to
d8e0485
Compare
This is what is left of a commit from PR 3-manifolds#3 after rebasing.
This is what is left of a commit from PR 3-manifolds#3 after rebasing.
d8e0485 to
0206edc
Compare
|
Hi Alex, Thank you very much for working on this. We truly do appreciate your efforts! However, I think we have now resolved this issue. (As of yesterday, and it was quite technical.) The current CI runs are using the latest Cython. |
|
Oh that's great to hear! I somehow missed that before rebasing. I'll go ahead and close this then. |
I tried my hand at getting CyPari to build (and to pass its tests) under Cython 3.1.
This comes at the cost of dropping Python 2 compatibility (if that was still a thing).
Most of this just came from looking at
cypari2and what changes they made.See cython/cython#5870, cython/cython@9a22b49 for the root of these changes.