Merge pull request #122624 from collares/pari-2.13

pari: 2.11.4 -> 2.13.1, update sage test expectations

authored by Timo Kaufmann and committed by GitHub 6cf64704 e392df43

+76 -4
+13 -4
pkgs/applications/science/math/pari/default.nix
··· 12 13 stdenv.mkDerivation rec { 14 pname = "pari"; 15 - version = "2.11.4"; 16 17 src = fetchurl { 18 - # Versions with current majorMinor values are at http://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz 19 - url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz"; 20 - sha256 = "sha256-v8iPxPc1L0hA5uNSxy8DacvqikVAOxg0piafNwmXCxw="; 21 }; 22 23 buildInputs = [ 24 gmp
··· 12 13 stdenv.mkDerivation rec { 14 pname = "pari"; 15 + version = "2.13.1"; 16 17 src = fetchurl { 18 + urls = [ 19 + "https://pari.math.u-bordeaux.fr/pub/pari/unix/${pname}-${version}.tar.gz" 20 + # old versions are at the url below 21 + "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz" 22 + ]; 23 + sha256 = "sha256-gez31wzNquIwFlz/Ynyc4uwpe48i+fQHQiedhfht/LE="; 24 }; 25 + 26 + patches = [ 27 + # rebased version of 3edb98db78, see 28 + # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284 29 + ./rnfdisc.patch 30 + ]; 31 32 buildInputs = [ 33 gmp
+51
pkgs/applications/science/math/pari/rnfdisc.patch
···
··· 1 + commit 0d8a3ac970291c62b56104172418b3f2ca30927c 2 + Author: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> 3 + Date: Sun Mar 28 13:27:24 2021 +0200 4 + 5 + rnfdisc_factored: remove spurious Q_primpart [#2284] 6 + 7 + diff --git a/src/basemath/base2.c b/src/basemath/base2.c 8 + index 7e7d0db9d..c461826f4 100644 9 + --- a/src/basemath/base2.c 10 + +++ b/src/basemath/base2.c 11 + @@ -3582,7 +3582,7 @@ rnfdisc_factored(GEN nf, GEN pol, GEN *pd) 12 + 13 + nf = checknf(nf); 14 + pol = rnfdisc_get_T(nf, pol, &lim); 15 + - disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, Q_primpart(pol))); 16 + + disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, pol)); 17 + pol = nfX_to_monic(nf, pol, NULL); 18 + fa = idealfactor_partial(nf, disc, lim); 19 + P = gel(fa,1); l = lg(P); 20 + diff --git a/src/test/32/rnf b/src/test/32/rnf 21 + index 1e743f415..c016dce00 100644 22 + --- a/src/test/32/rnf 23 + +++ b/src/test/32/rnf 24 + @@ -853,9 +853,10 @@ error("inconsistent dimensions in idealtwoelt.") 25 + 0 26 + 0 27 + 1 28 + -[[7361, 3786, 318, 5823; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1], [-3, 6, -2, 0] 29 + -~] 30 + -[2, -1] 31 + +[[433, 322, 318, 1318/17; 0, 1, 0, 12/17; 0, 0, 1, 5/17; 0, 0, 0, 1/17], [25 32 + +/17, -12/17, 12/17, 16/17]~] 33 + +[1, -1] 34 + +[[12, 0, 0, 0; 0, 12, 4, 0; 0, 0, 4, 0; 0, 0, 0, 4], [6, 5, -1, 2]~] 35 + *** at top-level: rnfdedekind(nf,P,pr2,1) 36 + *** ^----------------------- 37 + *** rnfdedekind: sorry, Dedekind in the difficult case is not yet implemented. 38 + diff --git a/src/test/in/rnf b/src/test/in/rnf 39 + index 7851ae291..318d5349e 100644 40 + --- a/src/test/in/rnf 41 + +++ b/src/test/in/rnf 42 + @@ -212,6 +212,9 @@ k = nfinit(y^4 + 10*y^2 + 17); 43 + rnfdisc(k, x^2 - x + 1/Mod(y,k.pol)) 44 + rnfdisc(k, x^2 - x + 1/2) 45 + 46 + +k = nfinit(y^4 - 10*y^2 + 1); 47 + +rnfdisc(k,x^2-(y^3/2+y^2-5*y/2+1)) 48 + + 49 + \\ ERRORS, keep at end of file 50 + rnfdedekind(nf, P, pr2, 1) 51 + rnfdedekind(nf, P)
+12
pkgs/applications/science/math/sage/sage-src.nix
··· 78 79 # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests 80 ./patches/ignore-cmp-deprecation.patch 81 ]; 82 83 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
··· 78 79 # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests 80 ./patches/ignore-cmp-deprecation.patch 81 + 82 + # https://trac.sagemath.org/ticket/30801. this patch has 83 + # positive_review but has not been merged upstream yet, so we 84 + # don't use fetchSageDiff because it returns a file that contains 85 + # each commit as a separate patch instead of a single diff, and 86 + # some commits from the pari update branch are already in 9.3.rc5 87 + # (auto-resolvable merge conflicts). 88 + (fetchpatch { 89 + name = "pari-2.13.1.patch"; 90 + url = "https://github.com/sagemath/sagetrac-mirror/compare/d6c5cd9be78cc448ee4c54bac93385b1244a234c...10a4531721d2700fd717e2b3a1364508ffd971c3.diff"; 91 + sha256 = "sha256-zMjRMEReoiTvmt+vvV0Ij1jtyLSLwSXBEVXqgvmq1D4="; 92 + }) 93 ]; 94 95 patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;