Skip to content

Commit

Permalink
sagemathgh-35302: update pari to 2.15.4, drop patch
Browse files Browse the repository at this point in the history
    
### 📚 Description

update pari to 2.15.4, drop patch

Will fix sagemath#35219

### 📝 Checklist

- [x] I have made sure that the title is self-explanatory and the
description concisely explains the PR.
    
URL: sagemath#35302
Reported by: Dima Pasechnik
Reviewer(s): Dima Pasechnik, Lorenz Panny, Michael Orlitzky
  • Loading branch information
Release Manager committed Oct 25, 2023
2 parents 07a2afd + 79667bf commit abcbeed
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 19 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/pari/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=pari-VERSION.tar.gz
sha1=498e3cd0b7ded8be3fa1cba1125ca5213ed39453
md5=562a6e973ca3980dc6c1eb2c4f252e92
cksum=4081416981
sha1=ae962671b5bf86849d2021113dfb5b2f59331a10
md5=4ab5c81d93f4bccb94e483b8b48fc336
cksum=598072677
upstream_url=https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/pari/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.15.2.p1
2.15.4
14 changes: 0 additions & 14 deletions build/pkgs/pari/patches/bug2441.patch

This file was deleted.

19 changes: 19 additions & 0 deletions build/pkgs/pari/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,25 @@ SAGE_SPKG_CONFIGURE([pari], [
AC_MSG_NOTICE([Otherwise Sage will build its own pari/GP.])
sage_spkg_install_pari=yes
fi
AC_MSG_CHECKING([whether factor() bug 2469 of pari 2.15.3 is fixed])
result=`echo "f=factor(2^2203-1); print(\"ok\")" | timeout 1 $GP -qf`
if test x"$result" = xok; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no; cannot use system pari/GP with known bug])
sage_spkg_install_pari=yes
fi
AC_MSG_CHECKING([whether qfbclassno() bug 2466 of pari 2.15.3 is fixed])
result=`echo "qfbclassno(33844)" | $GP -qf`
if test x"$result" = x3; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no; cannot use system pari/GP with known bug])
sage_spkg_install_pari=yes
fi
fi dnl end GP test
if test x$sage_spkg_install_pari = xno; then dnl main PARI test
Expand Down
5 changes: 5 additions & 0 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2688,6 +2688,11 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds):
Traceback (most recent call last):
...
TypeError: unable to factor 'xyz'
Test that :issue:`35219` is fixed::
sage: len(factor(2^2203-1,proof=false))
1
"""
try:
m = n.factor
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ def _next_var_name(self):
The vector of results is correctly resized when the stack has
to be enlarged during this operation::
sage: g = Gp(stacksize=10^4,init_list_length=12000) # long time
sage: g = Gp(stacksize=3*10^6,init_list_length=12000) # long time
sage: for n in [1..13000]: # long time
....: a = g(n)
sage: g('length(sage)') # long time
Expand Down
8 changes: 8 additions & 0 deletions src/sage/rings/number_field/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,14 @@ def class_number(self, proof=None):
NotImplementedError: computation of class numbers of non-maximal orders
not in quadratic fields is not implemented
TESTS:
Test for PARI bug #2466::
sage: x = polygen(ZZ)
sage: R.<t> = EquationOrder(x^2 - 8461)
sage: R.class_number()
3
"""
if not self.is_maximal():
K = self.number_field()
Expand Down

0 comments on commit abcbeed

Please sign in to comment.