python3-sympy: update to 1.13.1.

This commit is contained in:
Gonzalo Tornaría 2024-07-14 00:29:33 -03:00 committed by Andrew J. Hesford
parent b5acc5e531
commit 6afdf87546
3 changed files with 16 additions and 32 deletions

View File

@ -0,0 +1,13 @@
Upstream at https://github.com/sympy/sympy/pull/26823
--- a/sympy/codegen/tests/test_fnodes.py
+++ b/sympy/codegen/tests/test_fnodes.py
@@ -44,7 +44,7 @@ def test_size_assumed_shape():
'program myprog\n'
'use mod_rms, only: rms\n'
'real*8, dimension(4), parameter :: x = [4, 2, 2, 2]\n'
- 'print *, dsqrt(7d0) - rms(x)\n'
+ 'print "(f7.5)", dsqrt(7d0) - rms(x)\n'
'end program\n'
))
], clean=True)

View File

@ -1,26 +0,0 @@
Fix integer_nthroot(2, 10**10) in 32 bit.
See: https://github.com/sympy/sympy/issues/18374#issuecomment-1081196879
diff --git a/sympy/core/power.py b/sympy/core/power.py
index 59ab7c53a4..ae3ee25c93 100644
--- a/sympy/core/power.py
+++ b/sympy/core/power.py
@@ -21,6 +21,8 @@
from mpmath.libmp import sqrtrem as mpmath_sqrtrem
+from ctypes import c_ulong
+ULONG_MAX = c_ulong(-1).value
def isqrt(n):
@@ -74,7 +76,7 @@ def integer_nthroot(y, n):
raise ValueError("y must be nonnegative")
if n < 1:
raise ValueError("n must be positive")
- if HAS_GMPY and n < 2**63:
+ if HAS_GMPY and n <= ULONG_MAX:
# Currently it works only for n < 2**63, else it produces TypeError
# sympy issue: https://github.com/sympy/sympy/issues/18374
# gmpy2 issue: https://github.com/aleaxit/gmpy/issues/257

View File

@ -1,23 +1,20 @@
# Template file for 'python3-sympy'
pkgname=python3-sympy
version=1.12.1
version=1.13.1
revision=1
build_style=python3-pep517
hostmakedepends="python3-setuptools python3-wheel"
depends="python3-mpmath"
checkdepends="$depends python3-pytest python3-pytest-xdist gcc-fortran
python3-Cython python3-devel python3-ipython python3-lxml python3-matplotlib
python3-numexpr python3-numpy python3-scipy"
python3-numexpr python3-numpy python3-scipy python3-hypothesis"
short_desc="Computer algebra system for Python3"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="BSD-3-Clause"
homepage="https://sympy.org/"
changelog="https://github.com/sympy/sympy/wiki/Release-Notes"
distfiles="${PYPI_SITE}/s/sympy/sympy-${version}.tar.gz"
checksum=2877b03f998cd8c08f07cd0de5b767119cd3ef40d09f41c30d722f6686b0fb88
# slow tests are broken
make_check_args="-m not(slow)"
checksum=9cebf7e04ff162015ce31c9c6c9144daa34a93bd082f54fd8f12deca4f47515f
post_install() {
vman doc/man/isympy.1