Add -sample-set patch to fix test failure with python 3.9 (bz 1830943)

This commit is contained in:
Jerry James 2020-05-11 08:36:50 -06:00
parent 42ff37cfe1
commit 378dc570ec
3 changed files with 27 additions and 12 deletions

20
sympy-sample-set.patch Normal file
View File

@ -0,0 +1,20 @@
--- sympy-sympy-1.5.1/sympy/polys/modulargcd.py.orig 2019-12-20 15:59:54.000000000 -0700
+++ sympy-sympy-1.5.1/sympy/polys/modulargcd.py 2020-05-10 14:56:32.546383740 -0600
@@ -1010,7 +1010,7 @@ def _modgcd_multivariate_p(f, g, p, degb
d = 0
evalpoints = []
heval = []
- points = set(range(p))
+ points = list(range(p))
while points:
a = random.sample(points, 1)[0]
@@ -1606,7 +1606,7 @@ def _func_field_modgcd_p(f, g, minpoly,
evalpoints = []
heval = []
LMlist = []
- points = set(range(p))
+ points = list(range(p))
while points:
a = random.sample(points, 1)[0]

View File

@ -1,11 +0,0 @@
--- sympy-sympy-1.4/sympy/core/sympify.py.orig 2019-04-09 18:29:25.000000000 -0600
+++ sympy-sympy-1.4/sympy/core/sympify.py 2019-04-17 14:36:06.028059616 -0600
@@ -382,7 +382,7 @@ def sympify(a, locals=None, convert_xor=
try:
a = a.replace('\n', '')
expr = parse_expr(a, local_dict=locals, transformations=transformations, evaluate=evaluate)
- except (TokenError, SyntaxError) as exc:
+ except (TokenError, SyntaxError, TypeError) as exc:
raise SympifyError('could not parse %r' % a, exc)
return expr

View File

@ -1,6 +1,6 @@
Name: sympy
Version: 1.5.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A Python library for symbolic mathematics
License: BSD
URL: http://sympy.org/
@ -11,6 +11,9 @@ Patch0: %{name}-float.patch
Patch1: %{name}-doc.patch
# Default to python3 in the Cython backend
Patch2: %{name}-python3.patch
# Do not use deprecated sample from a set functionality
# https://github.com/sympy/sympy/pull/19291
Patch3: %{name}-sample-set.patch
BuildArch: noarch
@ -185,6 +188,9 @@ xvfb-run -a -n $dnum \
%{_docdir}/%{name}-doc/html
%changelog
* Mon May 11 2020 Jerry James <loganjerry@gmail.com> - 1.5.1-3
- Add -sample-set patch to fix test failure with python 3.9
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild