Skip to content

Commit

Permalink
Merge #32989
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 21, 2021
2 parents 607316f + 1ab9441 commit 0e814dc
Show file tree
Hide file tree
Showing 46 changed files with 96 additions and 73 deletions.
1 change: 0 additions & 1 deletion src/sage/combinat/binary_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -1916,7 +1916,6 @@ def canopee(self):
Here is a less trivial implementation of this::
sage: from sage.sets.finite_set_map_cy import fibers
sage: from sage.misc.all import attrcall
sage: def baxter(n):
....: f = fibers(lambda t: tuple(t.canopee()),
....: BinaryTrees(n))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/combinat/designs/ext_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

from urllib.request import urlopen

from sage.misc.all import tmp_filename
from sage.misc.temporary_file import tmp_filename


XML_NAMESPACE = 'http://designtheory.org/xml-namespace'
Expand Down
5 changes: 3 additions & 2 deletions src/sage/combinat/root_system/pieri_factors.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@

from sage.misc.cachefunc import cached_method
from sage.misc.constant_function import ConstantFunction
from sage.misc.all import prod, attrcall
from sage.misc.call import attrcall
from sage.misc.misc_c import prod
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
from sage.structure.parent import Parent
from sage.structure.unique_representation import UniqueRepresentation
from sage.rings.integer import Integer
from sage.rings.rational_field import QQ
from sage.rings.infinity import infinity
from sage.arith.all import binomial
from sage.arith.misc import binomial
import sage.combinat.ranker
from sage.sets.recursively_enumerated_set import RecursivelyEnumeratedSet
from sage.combinat.root_system.root_system import RootSystem
Expand Down
2 changes: 1 addition & 1 deletion src/sage/databases/cremona.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
import sage.schemes.elliptic_curves.constructor as elliptic
from .sql_db import SQLDatabase, verify_column
from sage.features.databases import DatabaseCremona
from sage.misc.all import walltime
from sage.misc.misc import walltime

import re
import string
Expand Down
2 changes: 1 addition & 1 deletion src/sage/databases/sql_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
import sqlite3 as sqlite
import os
import re
from sage.misc.all import tmp_filename
from sage.misc.temporary_file import tmp_filename
from sage.structure.sage_object import SageObject

sqlite_keywords = ['ABORT','ACTION','ADD','AFTER','ALL','ALTER','ANALYZE',
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/gnuplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def plot3d_parametric(self, f='cos(u)*(3 + v*cos(u/2)), sin(u)*(3 + v*cos(u/2)),
self(cmd)

def interact(self, cmd):
from sage.misc.all import SAGE_TMP
from sage.misc.misc import SAGE_TMP
file = os.path.join(SAGE_TMP, 'gnuplot')
with open(file, 'w') as f:
f.write(cmd + '\n pause -1 "Press return to continue (no further rotation possible)"')
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/phc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import pexpect
import random

from sage.misc.all import tmp_filename
from sage.misc.temporary_file import tmp_filename
from sage.rings.real_mpfr import RR
from sage.rings.all import CC
from sage.rings.integer import Integer
Expand Down
6 changes: 4 additions & 2 deletions src/sage/lfunctions/dokchitser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
import string

from sage.structure.sage_object import SageObject
from sage.rings.all import ComplexField, Integer
from sage.misc.all import sage_eval, SAGE_TMP
from sage.rings.all import ComplexField
from sage.rings.integer import Integer
from sage.misc.sage_eval import sage_eval
from sage.misc.misc import SAGE_TMP
from sage.misc.verbose import verbose
import sage.interfaces.gp
from sage.env import SAGE_EXTCODE
Expand Down
2 changes: 1 addition & 1 deletion src/sage/lfunctions/lcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import os

from sage.structure.sage_object import SageObject
from sage.misc.all import pager
from sage.misc.pager import pager
import sage.rings.all
import sage.schemes.elliptic_curves.ell_generic

Expand Down
2 changes: 1 addition & 1 deletion src/sage/lfunctions/sympow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import os

from sage.structure.sage_object import SageObject
from sage.misc.all import pager
from sage.misc.pager import pager
from sage.misc.verbose import verbose
import sage.rings.all

Expand Down
2 changes: 1 addition & 1 deletion src/sage/misc/citation.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Dependency usage tracking for citations
"""

from sage.misc.all import tmp_filename
from sage.misc.temporary_file import tmp_filename
from sage.env import SAGE_LOCAL, SAGE_VENV

systems = {}
Expand Down
2 changes: 1 addition & 1 deletion src/sage/misc/persist.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ def unpickle_all(dir, debug=False, run_test_suite=False):
# This could use instead Python's tarfile module
if dir.endswith('.tar.bz2'):
# create a temporary directory
from sage.misc.all import tmp_dir
from sage.misc.temporary_file import tmp_dir
T = tmp_dir()
# extract tarball to it
os.system('cd "%s"; bunzip2 -c "%s" | tar fx - '%(T, os.path.abspath(dir)))
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/buzzard.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#############################################################################

from sage.interfaces.gp import Gp
from sage.misc.all import sage_eval
from sage.misc.sage_eval import sage_eval

_gp = None

Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/modform/half_integral.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def half_integral_weight_modform_basis(chi, k, prec):
B = C.basis()

# This computation of S below -- of course --dominates the whole function.
#from sage.misc.all import cputime
#from sage.misc.misc import cputime
#tm = cputime()
#print "Computing basis..."
S = [f.q_expansion(prec) for f in B]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/numerical/backends/glpk_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ cdef class GLPKBackend(GenericBackend):
End of report
"""

from sage.misc.all import SAGE_TMP
from sage.misc.misc import SAGE_TMP

if filename is None:
fname = SAGE_TMP + "/ranges.tmp"
Expand Down
9 changes: 3 additions & 6 deletions src/sage/numerical/interactive_simplex_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,9 @@
identity_matrix,
matrix,
random_matrix)
from sage.misc.all import (LatexExpr,
cached_function,
cached_method,
latex,
randint,
random)
from sage.misc.latex import LatexExpr, latex
from sage.misc.cachefunc import cached_function, cached_method
from sage.misc.prandom import randint, random
from sage.misc.html import HtmlFragment
from sage.misc.misc import get_main_globals
from sage.modules.all import random_vector, vector
Expand Down
3 changes: 2 additions & 1 deletion src/sage/quadratic_forms/genera/genus.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
# ****************************************************************************

from sage.misc.lazy_import import lazy_import
from sage.misc.all import prod, cached_method
from sage.misc.misc_c import prod
from sage.misc.cachefunc import cached_method
from sage.arith.all import LCM, fundamental_discriminant
from sage.matrix.matrix_space import MatrixSpace
from sage.matrix.constructor import matrix
Expand Down
4 changes: 2 additions & 2 deletions src/sage/repl/ipython_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
sage: import os, re
sage: from sage.repl.interpreter import get_test_shell
sage: from sage.misc.all import tmp_dir
sage: from sage.misc.temporary_file import tmp_dir
sage: shell = get_test_shell()
sage: TMP = tmp_dir()
Expand Down Expand Up @@ -106,7 +106,7 @@ def runfile(self, s):
sage: import os
sage: from sage.repl.interpreter import get_test_shell
sage: from sage.misc.all import tmp_dir
sage: from sage.misc.temporary_file import tmp_dir
sage: shell = get_test_shell()
sage: tmp = os.path.join(tmp_dir(), 'run_cell.py')
sage: with open(tmp, 'w') as f:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/cfinite_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
from sage.structure.unique_representation import UniqueRepresentation

from sage.interfaces.gp import Gp
from sage.misc.all import sage_eval
from sage.misc.sage_eval import sage_eval

_gp = None

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/number_field/number_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -5100,7 +5100,7 @@ def selmer_group_iterator(self, S, m, proof=True):
"""
KSgens, ords = self.selmer_generators(S=S, m=m, proof=proof, orders=True)
one = self.one()
from sage.misc.all import cartesian_product_iterator
from sage.misc.mrange import cartesian_product_iterator
for ev in cartesian_product_iterator([range(o) for o in ords]):
yield prod([p ** e for p, e in zip(KSgens, ev)], one)

Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/padics/relaxed_template.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ cdef class RelaxedElement(pAdicGenericElement):
:func:`dumps`, :func:`loads`
"""
tester = self._tester(**options)
from sage.misc.all import loads, dumps
from sage.misc.persist import loads, dumps
if self._precbound >= maxordp:
tester.assertEqual(loads(dumps(self)), self.at_precision_relative())
else:
Expand Down
3 changes: 2 additions & 1 deletion src/sage/rings/polynomial/cyclotomic.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ from sage.structure.element cimport parent

from sage.arith.all import factor
from sage.rings.integer_ring import ZZ
from sage.misc.all import prod, subsets
from sage.misc.misc_c import prod
from sage.misc.misc import subsets
from sage.rings.integer cimport Integer
from sage.rings.rational cimport Rational
from sage.libs.pari.all import pari
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ from sage.interfaces.macaulay import macaulay2
from sage.interfaces.singular import singular as singular_default, is_SingularElement, SingularElement
from sage.interfaces.macaulay2 import macaulay2 as macaulay2_default, is_Macaulay2Element

from sage.misc.all import prod as mul
from sage.misc.misc_c import prod as mul
from sage.misc.sage_eval import sage_eval


Expand Down
3 changes: 2 additions & 1 deletion src/sage/rings/polynomial/real_roots.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ from sage.modules.all import vector, FreeModule
from sage.matrix.all import MatrixSpace
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.polynomial.polynomial_ring import polygen
from sage.misc.all import numerator, denominator, prod
from sage.misc.functional import numerator, denominator
from sage.misc.misc_c import prod

from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
from sage.modules.vector_integer_dense cimport Vector_integer_dense
Expand Down
13 changes: 10 additions & 3 deletions src/sage/sandpiles/sandpile.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,19 @@
from sage.topology.simplicial_complex import SimplicialComplex
from sage.interfaces.singular import singular
from sage.matrix.constructor import matrix, identity_matrix
from sage.misc.all import prod, det, tmp_filename, exists, denominator
from sage.misc.functional import det, denominator
from sage.misc.misc import exists
from sage.misc.misc_c import prod
from sage.misc.temporary_file import tmp_filename
from sage.arith.srange import xsrange
from sage.modules.free_module_element import vector
from sage.plot.colors import rainbow
from sage.arith.all import falling_factorial, lcm
from sage.rings.all import Integer, PolynomialRing, QQ, ZZ
from sage.arith.functions import lcm
from sage.arith.misc import falling_factorial
from sage.rings.integer import Integer
from sage.rings.integer_ring import ZZ
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.rational_field import QQ
from sage.symbolic.constants import I, pi
from sage.symbolic.ring import SR
from sage.features.four_ti_2 import FourTi2Executable
Expand Down
2 changes: 1 addition & 1 deletion src/sage/sat/solvers/dimacs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import shlex

from sage.sat.solvers.satsolver import SatSolver
from sage.misc.all import tmp_filename
from sage.misc.temporary_file import tmp_filename
from time import sleep


Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/affine/affine_rational_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.misc.all import cartesian_product_iterator
from sage.misc.mrange import cartesian_product_iterator
from sage.schemes.generic.scheme import is_Scheme


Expand Down
4 changes: 2 additions & 2 deletions src/sage/schemes/affine/affine_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from sage.categories.fields import Fields
_Fields = Fields()
from sage.categories.number_fields import NumberFields
from sage.misc.all import (latex,
cartesian_product_iterator)
from sage.misc.latex import latex
from sage.misc.mrange import cartesian_product_iterator
from sage.structure.category_object import normalize_names
from sage.schemes.generic.scheme import AffineScheme
from sage.schemes.generic.ambient_space import AmbientSpace
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/curves/affine_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@

from sage.arith.misc import binomial
from sage.interfaces.singular import singular
from sage.misc.all import add
from builtins import sum as add

from sage.categories.fields import Fields
from sage.categories.finite_fields import FiniteFields
Expand Down
6 changes: 4 additions & 2 deletions src/sage/schemes/curves/projective_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,11 @@

from sage.interfaces.singular import singular
from sage.matrix.constructor import matrix
from sage.misc.all import add, sage_eval
from builtins import sum as add
from sage.misc.sage_eval import sage_eval

from sage.rings.all import degree_lowest_rational_function, IntegerRing
from sage.rings.all import degree_lowest_rational_function
from sage.rings.integer_ring import IntegerRing
from sage.rings.number_field.number_field import NumberField
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.qqbar import (number_field_elements_from_algebraics,
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,7 @@ def __init_from_kernel_list(self, kernel_gens):
# but it won't speed things up too much.

kernel_set = Set([self.__E1(0)])
from sage.misc.all import flatten
from sage.misc.flatten import flatten

def all_multiples(itr, terminal):
mult_list = [terminal]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/ell_egros.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.misc.all import xmrange
from sage.misc.mrange import xmrange
from sage.rings.rational_field import QQ
from .constructor import EllipticCurve, EllipticCurve_from_j

Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/ell_rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -6579,7 +6579,7 @@ def S_integral_x_coords_with_abs_bounded_by(abs_bound):
return set(xs)
#<-------------------------------------------------------------------------
#End internal functions ###############################################
from sage.misc.all import cartesian_product_iterator
from sage.misc.mrange import cartesian_product_iterator

E = self
tors_points = E.torsion_points()
Expand Down
3 changes: 2 additions & 1 deletion src/sage/schemes/elliptic_curves/ell_tate_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
from sage.modular.modform.constructor import EisensteinForms, CuspForms
from sage.schemes.elliptic_curves.constructor import EllipticCurve
from sage.functions.log import log
from sage.misc.all import denominator, prod
from sage.misc.functional import denominator
from sage.misc.misc_c import prod
import sage.matrix.all as matrix


Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/height.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from sage.rings.all import RR, RDF, RIF, CC, CDF, CIF

from sage.misc.cachefunc import cached_method
from sage.misc.all import cartesian_product_iterator
from sage.misc.mrange import cartesian_product_iterator
from sage.arith.all import lcm, factorial
from sage.ext.fast_callable import fast_callable
from sage.functions.log import log, exp
Expand Down
3 changes: 2 additions & 1 deletion src/sage/schemes/elliptic_curves/isogeny_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import sage.databases.cremona
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.misc.all import flatten, cached_method
from sage.misc.flatten import flatten
from sage.misc.cachefunc import cached_method
from sage.schemes.elliptic_curves.ell_field import EllipticCurve_field
from sage.schemes.elliptic_curves.ell_number_field import EllipticCurve_number_field

Expand Down
Loading

0 comments on commit 0e814dc

Please sign in to comment.