-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Upgrade to pari 2.17, cypari 2.2.1 #38749
base: develop
Are you sure you want to change the base?
Conversation
Needs work because this is not compatible with 2.15. So either it needs to be merged with the pari upgrade or be made to work with older pari too (no idea how). Running tests now. |
Many test failures. |
a6acbfb
to
f619b6f
Compare
If the changes here eventually allow us to use a system Pari 2.17, then we should undo the change in #38772. |
With this MR and the cypari fixes sagemath/cypari2#165 and sagemath/cypari2#166 all tests are passing with pari 2.17. The changes are not compatible with 2.15 though, making them compatible requires more work. Also, some pari opeations (such as the number field prime ideals above a given prime) give random output with 2.17, which makes it harder to test. To solve both issues (and make tests more future proof), we should gradually move away from testing the exact output to just testing that the output is correct. |
257246c
to
b3c57e1
Compare
ee8ee5a
to
29d8cc2
Compare
pari 2.17.1 is out with the needed fixes, so we should go ahead with the upgrade. We just need a cypari release including sagemath/cypari2#166 |
I think you missed one hunk in the last merge: --- a/src/sage/rings/integer.pyx
+++ b/src/sage/rings/integer.pyx
@@ -5585,7 +5585,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement):
sage: 5.is_norm(K)
False
sage: n.is_norm(K, element=True)
- (True, 4*beta + 6)
+ (True, -4*beta + 6)
sage: n.is_norm(K, element=True)[1].norm()
4
sage: n = 5 |
Two more doctest fixes: 0a0be0c and 6d00b9c With this + all, I have everything working just fine 🎉 void-linux/void-packages#51902 In case it's useful to someone else, I have a branch for pari-2.17 support and a branch for python 3.13 support, both based on 10.5: It would be nice to move forward to pari 2.17 early in the 10.6 cycle. You can take my review and testing as a positive review for this PR, but of course it can't be merged until pari is updated. |
[(Number Field in a0 with defining polynomial x, Ring morphism: | ||
From: Number Field in a0 with defining polynomial x | ||
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
Defn: 0 |--> 0, None), | ||
(Number Field in a1 with defining polynomial x^2 - 2, Ring morphism: | ||
From: Number Field in a1 with defining polynomial x^2 - 2 | ||
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
Defn: a1 |--> -a^2 - 3/2, None), | ||
(Number Field in a2 with defining polynomial x^2 + 4, Ring morphism: | ||
From: Number Field in a2 with defining polynomial x^2 + 4 | ||
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
Defn: a2 |--> 2*a^3 + 7*a, None), | ||
(Number Field in a3 with defining polynomial x^2 + 2, Ring morphism: | ||
From: Number Field in a3 with defining polynomial x^2 + 2 | ||
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
Defn: a3 |--> -2*a^3 - 5*a, None), | ||
(Number Field in a4 with defining polynomial x^4 + 1, Ring morphism: | ||
From: Number Field in a4 with defining polynomial x^4 + 1 | ||
To: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
Defn: a4 |--> -a^3 - 1/2*a^2 - 5/2*a - 3/4, Ring morphism: | ||
From: Number Field in a with defining polynomial 2*x^4 + 6*x^2 + 1/2 | ||
To: Number Field in a4 with defining polynomial x^4 + 1 | ||
Defn: a |--> 1/2*a4^3 + a4^2 + 1/2*a4)] |
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.
Something here looks like a messed up merge. This block was changed in #39027, you seem to be reverting some of those changes.
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.
Thanks, fixed. Looks like the changes in #39027 are transparent to doctesting.
Documentation preview for this PR (built with commit 1570ab0; changes) is ready! 🎉 |
NEXT_PRIME_VIADIFF
is removed in 2.17, portpari_prime_range
topari_PRIMES
insteadNeeds sagemath/cypari2#165 applied to cypari