diff --git a/src/sage/combinat/binary_tree.py b/src/sage/combinat/binary_tree.py index 01a1b0bdc13..5c89e138742 100644 --- a/src/sage/combinat/binary_tree.py +++ b/src/sage/combinat/binary_tree.py @@ -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)) diff --git a/src/sage/combinat/designs/ext_rep.py b/src/sage/combinat/designs/ext_rep.py index 57f3b7eb636..533d22e865d 100644 --- a/src/sage/combinat/designs/ext_rep.py +++ b/src/sage/combinat/designs/ext_rep.py @@ -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' diff --git a/src/sage/combinat/root_system/pieri_factors.py b/src/sage/combinat/root_system/pieri_factors.py index e9befac2eb3..c2e098af316 100644 --- a/src/sage/combinat/root_system/pieri_factors.py +++ b/src/sage/combinat/root_system/pieri_factors.py @@ -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 diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py index 8440a4811b1..6353ad7bbfe 100644 --- a/src/sage/databases/cremona.py +++ b/src/sage/databases/cremona.py @@ -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 diff --git a/src/sage/databases/sql_db.py b/src/sage/databases/sql_db.py index 5a14e45be94..8cbc2d0f34f 100644 --- a/src/sage/databases/sql_db.py +++ b/src/sage/databases/sql_db.py @@ -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', diff --git a/src/sage/interfaces/gnuplot.py b/src/sage/interfaces/gnuplot.py index b57967f433e..1757e616170 100644 --- a/src/sage/interfaces/gnuplot.py +++ b/src/sage/interfaces/gnuplot.py @@ -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)"') diff --git a/src/sage/interfaces/phc.py b/src/sage/interfaces/phc.py index bfd0806c97c..ee95eb99e19 100644 --- a/src/sage/interfaces/phc.py +++ b/src/sage/interfaces/phc.py @@ -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 diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py index d7dadb7343e..8d0b85e22c8 100644 --- a/src/sage/lfunctions/dokchitser.py +++ b/src/sage/lfunctions/dokchitser.py @@ -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 diff --git a/src/sage/lfunctions/lcalc.py b/src/sage/lfunctions/lcalc.py index aabbd47636f..939cfbbca72 100644 --- a/src/sage/lfunctions/lcalc.py +++ b/src/sage/lfunctions/lcalc.py @@ -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 diff --git a/src/sage/lfunctions/sympow.py b/src/sage/lfunctions/sympow.py index 7ba8b19df54..7af1940f62b 100644 --- a/src/sage/lfunctions/sympow.py +++ b/src/sage/lfunctions/sympow.py @@ -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 diff --git a/src/sage/misc/citation.pyx b/src/sage/misc/citation.pyx index 19231769501..0fdd53ae5ff 100644 --- a/src/sage/misc/citation.pyx +++ b/src/sage/misc/citation.pyx @@ -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 = {} diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx index 2a3a61fdce0..1f5aee9762d 100644 --- a/src/sage/misc/persist.pyx +++ b/src/sage/misc/persist.pyx @@ -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))) diff --git a/src/sage/modular/buzzard.py b/src/sage/modular/buzzard.py index c83f4dcaca6..194988cf207 100644 --- a/src/sage/modular/buzzard.py +++ b/src/sage/modular/buzzard.py @@ -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 diff --git a/src/sage/modular/modform/half_integral.py b/src/sage/modular/modform/half_integral.py index 0e945a0c4ef..94587840566 100644 --- a/src/sage/modular/modform/half_integral.py +++ b/src/sage/modular/modform/half_integral.py @@ -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] diff --git a/src/sage/numerical/backends/glpk_backend.pyx b/src/sage/numerical/backends/glpk_backend.pyx index 3a60b981b43..d93d90e97c8 100644 --- a/src/sage/numerical/backends/glpk_backend.pyx +++ b/src/sage/numerical/backends/glpk_backend.pyx @@ -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" diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 4386e6f2e9e..de70f49839c 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -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 diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 3e9b04a936c..8abec816845 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -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 diff --git a/src/sage/repl/ipython_extension.py b/src/sage/repl/ipython_extension.py index ded5cdbde78..0898c5334e0 100644 --- a/src/sage/repl/ipython_extension.py +++ b/src/sage/repl/ipython_extension.py @@ -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() @@ -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: diff --git a/src/sage/rings/cfinite_sequence.py b/src/sage/rings/cfinite_sequence.py index b73764ce5d2..68b0cd183e7 100644 --- a/src/sage/rings/cfinite_sequence.py +++ b/src/sage/rings/cfinite_sequence.py @@ -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 diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index 561c575b0a6..1de13904dc7 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -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) diff --git a/src/sage/rings/padics/relaxed_template.pxi b/src/sage/rings/padics/relaxed_template.pxi index 6c155e1c8a3..d9425c88682 100644 --- a/src/sage/rings/padics/relaxed_template.pxi +++ b/src/sage/rings/padics/relaxed_template.pxi @@ -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: diff --git a/src/sage/rings/polynomial/cyclotomic.pyx b/src/sage/rings/polynomial/cyclotomic.pyx index f9bd920b231..f868b9f2a31 100644 --- a/src/sage/rings/polynomial/cyclotomic.pyx +++ b/src/sage/rings/polynomial/cyclotomic.pyx @@ -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 diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index 3fc086becfd..397553341de 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -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 diff --git a/src/sage/rings/polynomial/real_roots.pyx b/src/sage/rings/polynomial/real_roots.pyx index ccebbfba87f..e394d1601fe 100644 --- a/src/sage/rings/polynomial/real_roots.pyx +++ b/src/sage/rings/polynomial/real_roots.pyx @@ -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 diff --git a/src/sage/sandpiles/sandpile.py b/src/sage/sandpiles/sandpile.py index f29d7395d7f..3776fc999b3 100644 --- a/src/sage/sandpiles/sandpile.py +++ b/src/sage/sandpiles/sandpile.py @@ -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 diff --git a/src/sage/sat/solvers/dimacs.py b/src/sage/sat/solvers/dimacs.py index abc94569f59..7fb9ef7c667 100644 --- a/src/sage/sat/solvers/dimacs.py +++ b/src/sage/sat/solvers/dimacs.py @@ -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 diff --git a/src/sage/schemes/affine/affine_rational_point.py b/src/sage/schemes/affine/affine_rational_point.py index 513b5d67aa0..73a4c7d0ba6 100644 --- a/src/sage/schemes/affine/affine_rational_point.py +++ b/src/sage/schemes/affine/affine_rational_point.py @@ -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 diff --git a/src/sage/schemes/affine/affine_space.py b/src/sage/schemes/affine/affine_space.py index 9562cdcf785..f0654de0eb9 100644 --- a/src/sage/schemes/affine/affine_space.py +++ b/src/sage/schemes/affine/affine_space.py @@ -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 diff --git a/src/sage/schemes/curves/affine_curve.py b/src/sage/schemes/curves/affine_curve.py index 4ba91613843..731babfaaea 100644 --- a/src/sage/schemes/curves/affine_curve.py +++ b/src/sage/schemes/curves/affine_curve.py @@ -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 diff --git a/src/sage/schemes/curves/projective_curve.py b/src/sage/schemes/curves/projective_curve.py index cce01fb546b..2e69efabc54 100644 --- a/src/sage/schemes/curves/projective_curve.py +++ b/src/sage/schemes/curves/projective_curve.py @@ -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, diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index 9783877f153..da10953408d 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -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] diff --git a/src/sage/schemes/elliptic_curves/ell_egros.py b/src/sage/schemes/elliptic_curves/ell_egros.py index bc782475f2e..d487235ab35 100644 --- a/src/sage/schemes/elliptic_curves/ell_egros.py +++ b/src/sage/schemes/elliptic_curves/ell_egros.py @@ -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 diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py index fefcee82307..6e5a6c5f3c4 100644 --- a/src/sage/schemes/elliptic_curves/ell_rational_field.py +++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py @@ -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() diff --git a/src/sage/schemes/elliptic_curves/ell_tate_curve.py b/src/sage/schemes/elliptic_curves/ell_tate_curve.py index 533078f0808..53deed90f4f 100644 --- a/src/sage/schemes/elliptic_curves/ell_tate_curve.py +++ b/src/sage/schemes/elliptic_curves/ell_tate_curve.py @@ -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 diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py index de9cbc670de..a4cdd111a95 100644 --- a/src/sage/schemes/elliptic_curves/height.py +++ b/src/sage/schemes/elliptic_curves/height.py @@ -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 diff --git a/src/sage/schemes/elliptic_curves/isogeny_class.py b/src/sage/schemes/elliptic_curves/isogeny_class.py index 440792d5615..f137e39eb6c 100644 --- a/src/sage/schemes/elliptic_curves/isogeny_class.py +++ b/src/sage/schemes/elliptic_curves/isogeny_class.py @@ -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 diff --git a/src/sage/schemes/elliptic_curves/padic_lseries.py b/src/sage/schemes/elliptic_curves/padic_lseries.py index d462d6c7151..4ee2bddbb17 100644 --- a/src/sage/schemes/elliptic_curves/padic_lseries.py +++ b/src/sage/schemes/elliptic_curves/padic_lseries.py @@ -68,14 +68,13 @@ from sage.rings.all import LaurentSeriesRing, PowerSeriesRing, PolynomialRing, Integers from sage.rings.integer import Integer -from sage.arith.all import valuation, binomial, kronecker_symbol, gcd, prime_divisors +from sage.arith.all import valuation, binomial, kronecker_symbol, gcd, prime_divisors, LCM from sage.structure.sage_object import SageObject from sage.structure.richcmp import richcmp_method, richcmp -from sage.misc.all import denominator +from sage.misc.functional import denominator from sage.misc.verbose import verbose, get_verbose -import sage.arith.all as arith from sage.modules.free_module_element import vector import sage.matrix.all as matrix @@ -1671,8 +1670,8 @@ def Dp_valued_height(self,prec=20): elog = Ehat.log(prec + Integer(3)) # we will have to do it properly with David Harvey's _multiply_point() - n = arith.LCM(E.tamagawa_numbers()) - n = arith.LCM(n, E.Np(p)) # allowed here because E has good reduction at p + n = LCM(E.tamagawa_numbers()) + n = LCM(n, E.Np(p)) # allowed here because E has good reduction at p def height(P,check=True): if P.is_finite_order(): diff --git a/src/sage/schemes/projective/projective_rational_point.py b/src/sage/schemes/projective/projective_rational_point.py index 6196eaa1021..bc0b33e8dfb 100644 --- a/src/sage/schemes/projective/projective_rational_point.py +++ b/src/sage/schemes/projective/projective_rational_point.py @@ -59,7 +59,8 @@ from sage.arith.all import gcd, srange, next_prime, previous_prime, crt from sage.rings.all import ZZ, RR from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF -from sage.misc.all import cartesian_product_iterator, prod +from sage.misc.mrange import cartesian_product_iterator +from sage.misc.misc_c import prod from sage.misc.mrange import xmrange from sage.schemes.generic.scheme import is_Scheme from sage.parallel.ncpus import ncpus diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/projective/projective_space.py index 82763ef7344..2da42665500 100644 --- a/src/sage/schemes/projective/projective_space.py +++ b/src/sage/schemes/projective/projective_space.py @@ -80,9 +80,9 @@ # **************************************************************************** from sage.arith.all import gcd, binomial, srange -from sage.rings.all import (PolynomialRing, - Integer, - ZZ) +from sage.rings.all import PolynomialRing +from sage.rings.integer import Integer +from sage.rings.integer_ring import ZZ from sage.rings.ring import CommutativeRing from sage.rings.rational_field import is_RationalField @@ -94,9 +94,9 @@ from sage.categories.number_fields import NumberFields from sage.categories.homset import Hom from sage.categories.map import Map -from sage.misc.all import (latex, - prod) -from sage.misc.all import cartesian_product_iterator +from sage.misc.latex import latex +from sage.misc.misc_c import prod +from sage.misc.mrange import cartesian_product_iterator from sage.misc.persist import register_unpickle_override from sage.structure.category_object import normalize_names diff --git a/src/sage/schemes/toric/chow_group.py b/src/sage/schemes/toric/chow_group.py index ea00dd42dd8..dde1ac5f600 100644 --- a/src/sage/schemes/toric/chow_group.py +++ b/src/sage/schemes/toric/chow_group.py @@ -119,14 +119,16 @@ # **************************************************************************** from __future__ import annotations -from sage.misc.all import flatten +from sage.misc.flatten import flatten from sage.misc.fast_methods import WithEqualityById from sage.modules.fg_pid.fgp_module import FGP_Module_class from sage.modules.fg_pid.fgp_element import FGP_Element from sage.modules.free_module import FreeModule from sage.structure.sage_object import SageObject from sage.structure.factory import UniqueFactory -from sage.rings.all import ZZ, QQ, Infinity +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ +from sage.rings.infinity import Infinity import sage.geometry.abc from sage.schemes.toric.variety import is_ToricVariety diff --git a/src/sage/schemes/toric/divisor.py b/src/sage/schemes/toric/divisor.py index e5cd6cb05bd..16979be716c 100644 --- a/src/sage/schemes/toric/divisor.py +++ b/src/sage/schemes/toric/divisor.py @@ -172,7 +172,10 @@ from sage.geometry.toric_lattice_element import is_ToricLatticeElement from sage.topology.simplicial_complex import SimplicialComplex from sage.matrix.constructor import matrix -from sage.misc.all import cached_method, flatten, latex, prod +from sage.misc.cachefunc import cached_method +from sage.misc.flatten import flatten +from sage.misc.latex import latex +from sage.misc.misc_c import prod from sage.modules.free_module_element import vector from sage.modules.free_module import (FreeModule_ambient_field, FreeModule_ambient_pid) diff --git a/src/sage/schemes/toric/fano_variety.py b/src/sage/schemes/toric/fano_variety.py index 8935197298d..f35747ee5d3 100644 --- a/src/sage/schemes/toric/fano_variety.py +++ b/src/sage/schemes/toric/fano_variety.py @@ -136,7 +136,8 @@ import re from sage.geometry.all import Cone, FaceFan, Fan, LatticePolytope -from sage.misc.all import latex, prod +from sage.misc.latex import latex +from sage.misc.misc_c import prod from sage.rings.all import (PolynomialRing, QQ) from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing diff --git a/src/sage/schemes/toric/variety.py b/src/sage/schemes/toric/variety.py index 6286947d1f6..e9449737c6f 100644 --- a/src/sage/schemes/toric/variety.py +++ b/src/sage/schemes/toric/variety.py @@ -322,10 +322,14 @@ import sage.geometry.abc from sage.geometry.cone import Cone from sage.geometry.fan import Fan -from sage.misc.all import latex, prod, cached_method +from sage.misc.latex import latex +from sage.misc.misc_c import prod +from sage.misc.cachefunc import cached_method from sage.structure.unique_representation import UniqueRepresentation from sage.modules.free_module_element import vector -from sage.rings.all import PolynomialRing, ZZ, QQ +from sage.rings.all import PolynomialRing +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from sage.rings.quotient_ring_element import QuotientRingElement from sage.rings.quotient_ring import QuotientRing_generic from sage.schemes.affine.affine_space import AffineSpace diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx index 843cfee7f4c..cb9a2e755e2 100644 --- a/src/sage/symbolic/expression.pyx +++ b/src/sage/symbolic/expression.pyx @@ -1467,7 +1467,7 @@ cdef class Expression(Expression_abc): MATHML version of the string pi + 2 """ - from sage.misc.all import mathml + from sage.misc.mathml import mathml try: obj = self.pyobject() except TypeError: diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py index e07e50feea1..4801c05856e 100644 --- a/src/sage/symbolic/relation.py +++ b/src/sage/symbolic/relation.py @@ -1570,7 +1570,7 @@ def solve_mod(eqns, modulus, solution_dict=False): """ from sage.rings.all import Integer, Integers, crt_basis from sage.structure.element import Expression - from sage.misc.all import cartesian_product_iterator + from sage.misc.mrange import cartesian_product_iterator from sage.modules.free_module_element import vector from sage.matrix.constructor import matrix @@ -1686,7 +1686,7 @@ def _solve_mod_prime_power(eqns, p, m, vars): """ from sage.rings.all import Integers, PolynomialRing from sage.modules.free_module_element import vector - from sage.misc.all import cartesian_product_iterator + from sage.misc.mrange import cartesian_product_iterator mrunning = 1 ans = [] diff --git a/src/sage/symbolic/units.py b/src/sage/symbolic/units.py index 86db0b94ce4..c5259354d9a 100644 --- a/src/sage/symbolic/units.py +++ b/src/sage/symbolic/units.py @@ -497,7 +497,7 @@ def evalunitdict(): sage: sage.symbolic.units.evalunitdict() """ - from sage.misc.all import sage_eval + from sage.misc.sage_eval import sage_eval for key, value in unitdict.items(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.items()]) @@ -978,7 +978,7 @@ def unit_derivations_expr(v): Z = unit_derivations[v] if isinstance(Z,str): d = dict([(x,str_to_unit(x)) for x in vars_in_str(Z)]) - from sage.misc.all import sage_eval + from sage.misc.sage_eval import sage_eval Z = sage_eval(Z, d) unit_derivations[v] = Z return Z @@ -1387,7 +1387,7 @@ def base_units(unit): sage: sage.symbolic.units.base_units(var('x')) x """ - from sage.misc.all import sage_eval + from sage.misc.sage_eval import sage_eval if str(unit) not in unit_to_type: return unit elif unit_to_type[str(unit)] == 'si_prefixes' or unit_to_type[str(unit)] == 'unit_multipliers': @@ -1451,7 +1451,7 @@ def convert_temperature(expr, target): if len(expr.variables()) != 1: raise ValueError("Cannot convert") elif target is None or unit_to_type[str(target)] == 'temperature': - from sage.misc.all import sage_eval + from sage.misc.sage_eval import sage_eval expr_temp = expr.variables()[0] coeff = expr/expr_temp if target is not None: