Skip to content

Commit

Permalink
Merge pull request #1118 from skirpichev/3.9
Browse files Browse the repository at this point in the history
Drop support for CPython 3.7
  • Loading branch information
skirpichev committed Feb 9, 2021
2 parents 7f24859 + 513bd61 commit 0a338eb
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
test:
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9]
coverage: [false]
include:
- python-version: 3.7
- python-version: 3.9
coverage: true
runs-on: ubuntu-latest
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# Regular Python bytecode file
*.pyc
__pycache__/

# Optimized Python bytecode file
*.pyo
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ formats:
- htmlzip
- pdf
build:
image: stable
image: latest
python:
version: 3.7
version: 3.8
install:
- method: pip
path: .
Expand Down
1 change: 1 addition & 0 deletions diofant/core/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,7 @@ def mystr(expr, **settings):
for _, r in reps):
pre += '_'
continue
reps # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

obj = Expr.__new__(cls, expr, *sympify(tuple(zip(variables, point))))
Expand Down
1 change: 0 additions & 1 deletion diofant/interactive/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def visit_Constant(self, node):
args=[ast.Str(s=repr(node.n))], keywords=[],
starargs=None, kwargs=None)
return node
visit_Num = visit_Constant

def visit_Call(self, node):
if isinstance(node.func, ast.Name) and node.func.id == 'Float':
Expand Down
1 change: 1 addition & 0 deletions diofant/polys/factortools.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def _trial_division(self, f, factors):
if r.is_zero:
f, k = q, k + 1
else:
r # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

result.append((factor, k))
Expand Down
1 change: 1 addition & 0 deletions diofant/polys/polyfuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def symmetrize(F, *gens, **args):
if _height != -1:
monom, coeff = _monom, _coeff
else:
_height # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

exponents = []
Expand Down
1 change: 1 addition & 0 deletions diofant/polys/univar.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def decompose(self):
f, h = result
F = [h] + F
else:
result # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

return [f] + F
Expand Down
1 change: 1 addition & 0 deletions diofant/simplify/powsimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ def update(b):
if (last # no more radicals in base
or len(common_b) == 1 # nothing left to join with
or all(k[1] == 1 for k in common_b)): # no rad's in common_b
common_b # XXX "peephole" optimization, http://bugs.python.org/issue2506
break
# see what we can exponentiate base by to remove any radicals
# so we know what to search for
Expand Down
1 change: 1 addition & 0 deletions diofant/simplify/ratsimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def _ratsimpmodprime(a, b, allsol, N=0, D=0):
if N + D != maxdeg:
allsol = [allsol[-1]]

N # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

steps += 1
Expand Down
1 change: 1 addition & 0 deletions diofant/simplify/trigsimp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ def __trigsimp(expr, deep=False):
was = expr
if m[a_t] == 0 or \
-m[a_t] in m[c].args or m[a_t] + m[c] == 0:
m # XXX "peephole" optimization, http://bugs.python.org/issue2506
break
if d in m and m[a_t]*m[d] + m[c] == 0:
break
Expand Down
2 changes: 2 additions & 0 deletions diofant/solvers/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,7 @@ def checkodesol(ode, sol, func=None, order='auto', solve_for_func=True):
s = simplify(num).xreplace(reps).xreplace({_func: func})
testnum += 1
else:
testnum # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

if not s:
Expand Down Expand Up @@ -4601,6 +4602,7 @@ def _solve_undetermined_coefficients(eq, func, order, match):
if check*x**mult in trialset:
mult += 1
else:
mult # XXX "peephole" optimization, http://bugs.python.org/issue2506
break
trialset.add(check*x**mult)
notneedset.add(check)
Expand Down
1 change: 1 addition & 0 deletions diofant/solvers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def checksol(f, sol, **flags):
if flags.get('force', True):
# don't do a zero check with the positive assumptions in place
val = val.subs(reps)
val # XXX "peephole" optimization, http://bugs.python.org/issue2506
break

if val == was:
Expand Down
1 change: 1 addition & 0 deletions diofant/utilities/enumerative.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ def multiset_partitions_taocp(multiplicities):
f[lpart + 1] = b
# Return to M2
else:
k # XXX "peephole" optimization, http://bugs.python.org/issue2506
break # Continue to M4

# M4 Visit a partition
Expand Down
1 change: 1 addition & 0 deletions diofant/utilities/iterables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,7 @@ def partitions(n, m=None, k=None, size=False):
if r:
ms[r] = 1
keys.append(r)
r # XXX "peephole" optimization, http://bugs.python.org/issue2506
break
room -= need
if size:
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Installation
------------

The Diofant can be installed on any computer with Python 3.7
The Diofant can be installed on any computer with Python 3.8
or above. You can install latest release with pip::

pip install diofant
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,13 @@ classifiers = Development Status :: 4 - Beta
Topic :: Software Development :: Libraries :: Python Modules
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
[options]
zip_safe = True
packages = find:
python_requires = >=3.7
python_requires = >=3.8
setup_requires = setuptools>=36.7.0
setuptools_scm
pip>=9.0.1
Expand Down

0 comments on commit 0a338eb

Please sign in to comment.