-
Notifications
You must be signed in to change notification settings - Fork 34
Add __radd__ etc methods for Cython 3.x
#35
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
b24ec90
test: use cython==3.0.0a11 to build in CI
oscarbenjamin 5fe55f3
fix: add __radd__ etc to fmpz
oscarbenjamin 12885b6
test: also use cython 3 on Windows
oscarbenjamin 3bacb07
fix: remove redundant paths in dunder methods
oscarbenjamin 978696a
fix: add __rdunder__ methods for fmpq and nmod
oscarbenjamin 1556939
fix: add __rdunder__ fmpz_mat, fmpq_mat and nmp_mat
oscarbenjamin 19d7526
fix: add __rdunder__ fmpz_poly, fmpq_poly and nmp_poly
oscarbenjamin 4d9175b
fix: add __rdunder__ methods fmpz_series, fmpq_series
oscarbenjamin 3c03077
fix: add __rdunder__ methods for arb and acb
oscarbenjamin fcda89f
Use cython 3.0.0b2
oscarbenjamin 5082c78
fix: add modulus arg to acb.__rpow__
oscarbenjamin 5a4a2aa
fix: __rdunder__ acb_poly, acb_series, arb_poly, arb_series
oscarbenjamin d3c2519
Use cython==3.0.0b2 in Cirruc CI as well
oscarbenjamin 0a8bf5c
fix: add __rdunder__ methods for acb_mat and arb_mat
oscarbenjamin 913f69c
Add redundant type casts for older Cython
oscarbenjamin a390bdc
fix: fmpz_mat * nmod_mat -> nmod_mat
oscarbenjamin 12bc215
Use GMP mirror from GitHub in CI
oscarbenjamin e1c0c70
Update Cython -> 3.0.0, GMP -> 6.3.0
oscarbenjamin d4db446
Do not apply GMP macos_arm64 patch
oscarbenjamin 0370688
Remove version constraints for Cython
oscarbenjamin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: add __radd__ etc to fmpz
This is needed for Cython 3.x compatibility: https://cython.readthedocs.io/en/latest/src/userguide/special_methods.html#arithmetic-methods Similar methods should be added to all python-flint types that have arithmetic operations.
- Loading branch information
commit 5fe55f3817be07d723c08ebe141b82fc182d7cd5
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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'm not sure about this.
Actually I see that with current master and Cython 0.29 we have:
So I guess the existing
__pow__method should be changed. At leastOverflowErroris not the right exception to raise.Python itself gives:
In principle an
fmpqcould be returned but I'm not sure if that's better than an error.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.
gmpy2 returns
mpfr:It's probably good to maintain compatibility with
gmpy2.mpzandintitself if possible so thatmpzcan be used interchangeably with those. I'm not sure what type that really means in thepython-flintcontext though.