From 97b4dfde64984e1276fb563a2ee7b4f6d85962f8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 6 Dec 2021 21:46:30 -0800 Subject: [PATCH] git grep -l 'misc.all import' | xargs sed -i.bak 's/misc.all import sage_eval/misc.sage_eval import sage_eval/' --- src/sage/modular/buzzard.py | 2 +- src/sage/rings/cfinite_sequence.py | 2 +- src/sage/symbolic/units.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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/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/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: