Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remaining all imports #39273

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ def plot(self, xmin=1, xmax=50, k=1, pointsize=30, rgbcolor=(0,0,1), join=True,
124.0
"""
v = [(n, sigma(n, k)) for n in range(xmin, xmax + 1)]
from sage.plot.all import list_plot
from sage.plot.plot import list_plot
P = list_plot(v, pointsize=pointsize, rgbcolor=rgbcolor, **kwds)
if join:
P += list_plot(v, plotjoined=True, rgbcolor=(0.7,0.7,0.7), **kwds)
Expand Down Expand Up @@ -3194,7 +3194,7 @@ def plot(self, xmin=1, xmax=50, pointsize=30, rgbcolor=(0, 0, 1),
46.0
"""
v = [(n, euler_phi(n)) for n in range(xmin, xmax + 1)]
from sage.plot.all import list_plot
from sage.plot.plot import list_plot
P = list_plot(v, pointsize=pointsize, rgbcolor=rgbcolor, **kwds)
if join:
P += list_plot(v, plotjoined=True, rgbcolor=(0.7,0.7,0.7), **kwds)
Expand Down Expand Up @@ -4645,7 +4645,7 @@ def plot(self, xmin=0, xmax=50, pointsize=30, rgbcolor=(0,0,1), join=True,
"""
values = self.range(xmin, xmax + 1)
v = [(n,values[n-xmin]) for n in range(xmin,xmax + 1)]
from sage.plot.all import list_plot
from sage.plot.plot import list_plot
P = list_plot(v, pointsize=pointsize, rgbcolor=rgbcolor, **kwds)
if join:
P += list_plot(v, plotjoined=True, rgbcolor=(0.7,0.7,0.7), **kwds)
Expand Down Expand Up @@ -5173,7 +5173,7 @@ def falling_factorial(x, a):
(isinstance(a, Expression) and
a.is_integer())) and a >= 0:
return prod(((x - i) for i in range(a)), z=x.parent().one())
from sage.functions.all import gamma
from sage.functions.gamma import gamma
return gamma(x + 1) / gamma(x - a + 1)


Expand Down Expand Up @@ -5265,7 +5265,7 @@ def rising_factorial(x, a):
(isinstance(a, Expression) and
a.is_integer())) and a >= 0:
return prod(((x + i) for i in range(a)), z=x.parent().one())
from sage.functions.all import gamma
from sage.functions.gamma import gamma
return gamma(x + a) / gamma(x)


Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/desolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ def desolve_rk4_inner(de, dvar):

if not (isinstance(dvar, Expression) and dvar.is_symbol()):
from sage.symbolic.ring import SR
from sage.calculus.all import diff
from sage.calculus.functional import diff
from sage.symbolic.relation import solve
if isinstance(de, Expression) and de.is_relational():
de = de.lhs() - de.rhs()
Expand Down
7 changes: 4 additions & 3 deletions src/sage/calculus/riemann.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ cdef class Riemann_Map:
sage: m.plot_boundaries(plotjoined=False, rgbcolor=[0,0,1], thickness=6) # needs sage.plot
Graphics object consisting of 1 graphics primitive
"""
from sage.plot.all import list_plot
from sage.plot.plot import list_plot

plots = list(range(self.B))
for k in range(self.B):
Expand Down Expand Up @@ -939,7 +939,8 @@ cdef class Riemann_Map:
....: thickness=2.0, min_mag=0.1)
"""
from sage.plot.complex_plot import ComplexPlot
from sage.plot.all import list_plot, Graphics
from sage.plot.plot import list_plot
from sage.plot.graphics import Graphics

cdef int k, i
if self.exterior:
Expand Down Expand Up @@ -1051,7 +1052,7 @@ cdef class Riemann_Map:
Graphics object consisting of 1 graphics primitive
"""
from sage.plot.complex_plot import ComplexPlot
from sage.plot.all import Graphics
from sage.plot.graphics import Graphics

z_values, xmin, xmax, ymin, ymax = self.compute_on_grid(plot_range,
plot_points)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/examples/finite_coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __contains__(self, x):

(also tested by :meth:`test_an_element` :meth:`test_some_elements`)
"""
from sage.structure.all import parent
from sage.structure.element import parent
return parent(x) is self

@cached_method
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/number_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def zeta_function(self, prec=53,
PARI zeta function associated to Rational Field
"""
if algorithm == 'gp':
from sage.lfunctions.all import Dokchitser
from sage.lfunctions.dokchitser import Dokchitser
r1, r2 = self.signature()
zero = [0]
one = [1]
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/sets_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from sage.misc.lazy_format import LazyFormat
from sage.categories.category import Category
from sage.categories.category_singleton import Category_singleton
# Do not use sage.categories.all here to avoid initialization loop
from sage.categories.sets_with_partial_maps import SetsWithPartialMaps
from sage.categories.subquotients import SubquotientsCategory
from sage.categories.quotients import QuotientsCategory
Expand Down Expand Up @@ -2828,17 +2827,17 @@
it is convenient to define shorthands for the various
realizations, but cumbersome to do it by hand::

sage: S = SymmetricFunctions(ZZ); S # needs sage.combinat sage.modules

Check failure on line 2830 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[0]>", line 1, in <module> S = SymmetricFunctions(ZZ); S # needs sage.combinat sage.modules File "sage/misc/lazy_import.pyx", line 406, in sage.misc.lazy_import.LazyImport.__call__ return self.get_object()(*args, **kwds) File "sage/misc/lazy_import.pyx", line 224, in sage.misc.lazy_import.LazyImport.get_object return self._get_object() File "sage/misc/lazy_import.pyx", line 265, in sage.misc.lazy_import.LazyImport._get_object raise File "sage/misc/lazy_import.pyx", line 259, in sage.misc.lazy_import.LazyImport._get_object self._object = getattr(__import__(self._module, {}, {}, [self._name]), self._name) File "/sage/src/sage/combinat/sf/sf.py", line 34, in <module> from . import schur File "/sage/src/sage/combinat/sf/schur.py", line 21, in <module> from . import classical File "/sage/src/sage/combinat/sf/classical.py", line 30, in <module> from . import jack File "/sage/src/sage/combinat/sf/jack.py", line 34, in <module> from sage.combinat.sf.sf import SymmetricFunctions ImportError: cannot import name 'SymmetricFunctions' from partially initialized module 'sage.combinat.sf.sf' (most likely due to a circular import) (/sage/src/sage/combinat/sf/sf.py)
Symmetric Functions over Integer Ring
sage: s = S.s(); s # needs sage.combinat sage.modules

Check failure on line 2832 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[1]>", line 1, in <module> s = S.s(); s # needs sage.combinat sage.modules NameError: name 'S' is not defined
Symmetric Functions over Integer Ring in the Schur basis
sage: e = S.e(); e # needs sage.combinat sage.modules

Check failure on line 2834 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[2]>", line 1, in <module> e = S.e(); e # needs sage.combinat sage.modules NameError: name 'S' is not defined
Symmetric Functions over Integer Ring in the elementary basis

This method automates the process::

sage: # needs sage.combinat sage.modules
sage: S.inject_shorthands()

Check failure on line 2840 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[3]>", line 1, in <module> S.inject_shorthands() NameError: name 'S' is not defined
Defining e as shorthand for
Symmetric Functions over Integer Ring in the elementary basis
Defining f as shorthand for
Expand All @@ -2851,21 +2850,21 @@
Symmetric Functions over Integer Ring in the powersum basis
Defining s as shorthand for
Symmetric Functions over Integer Ring in the Schur basis
sage: s[1] + e[2] * p[1,1] + 2*h[3] + m[2,1]

Check failure on line 2853 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[4]>", line 1, in <module> s[Integer(1)] + e[Integer(2)] * p[Integer(1),Integer(1)] + Integer(2)*h[Integer(3)] + m[Integer(2),Integer(1)] NameError: name 's' is not defined
s[1] - 2*s[1, 1, 1] + s[1, 1, 1, 1] + s[2, 1]
+ 2*s[2, 1, 1] + s[2, 2] + 2*s[3] + s[3, 1]
sage: e

Check failure on line 2856 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Got: e
Symmetric Functions over Integer Ring in the elementary basis
sage: p

Check failure on line 2858 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[6]>", line 1, in <module> p NameError: name 'p' is not defined
Symmetric Functions over Integer Ring in the powersum basis
sage: s

Check failure on line 2860 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[7]>", line 1, in <module> s NameError: name 's' is not defined
Symmetric Functions over Integer Ring in the Schur basis

Sometimes, like for symmetric functions, one can
request for all shorthands to be defined, including
less common ones::

sage: S.inject_shorthands("all") # needs lrcalc_python sage.combinat sage.modules

Check failure on line 2867 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[8]>", line 1, in <module> S.inject_shorthands("all") # needs lrcalc_python sage.combinat sage.modules NameError: name 'S' is not defined
Defining e as shorthand for
Symmetric Functions over Integer Ring in the elementary basis
Defining f as shorthand for
Expand Down Expand Up @@ -2894,7 +2893,7 @@
The messages can be silenced by setting ``verbose=False``::

sage: # needs sage.combinat sage.modules
sage: Q = QuasiSymmetricFunctions(ZZ)

Check failure on line 2896 in src/sage/categories/sets_cat.py

View workflow job for this annotation

GitHub Actions / test-new

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 726, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1147, in compile_and_execute exec(compiled, globs) File "<doctest sage.categories.sets_cat.Sets.WithRealizations.ParentMethods.inject_shorthands[9]>", line 1, in <module> Q = QuasiSymmetricFunctions(ZZ) File "sage/misc/lazy_import.pyx", line 406, in sage.misc.lazy_import.LazyImport.__call__ return self.get_object()(*args, **kwds) File "sage/misc/lazy_import.pyx", line 224, in sage.misc.lazy_import.LazyImport.get_object return self._get_object() File "sage/misc/lazy_import.pyx", line 265, in sage.misc.lazy_import.LazyImport._get_object raise File "sage/misc/lazy_import.pyx", line 259, in sage.misc.lazy_import.LazyImport._get_object self._object = getattr(__import__(self._module, {}, {}, [self._name]), self._name) File "/sage/src/sage/combinat/ncsf_qsym/qsym.py", line 92, in <module> from sage.combinat.sf.sf import SymmetricFunctions File "/sage/src/sage/combinat/sf/sf.py", line 34, in <module> from . import schur File "/sage/src/sage/combinat/sf/schur.py", line 21, in <module> from . import classical File "/sage/src/sage/combinat/sf/classical.py", line 30, in <module> from . import jack File "/sage/src/sage/combinat/sf/jack.py", line 34, in <module> from sage.combinat.sf.sf import SymmetricFunctions ImportError: cannot import name 'SymmetricFunctions' from partially initialized module 'sage.combinat.sf.sf' (most likely due to a circular import) (/sage/src/sage/combinat/sf/sf.py)
sage: Q.inject_shorthands(verbose=False)
sage: F[1,2,1] + 5*M[1,3] + F[2]^2
5*F[1, 1, 1, 1] - 5*F[1, 1, 2] - 3*F[1, 2, 1] + 6*F[1, 3] +
Expand Down
2 changes: 1 addition & 1 deletion src/sage/coding/goppa_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from sage.coding.linear_code import AbstractLinearCode
from sage.coding.encoder import Encoder
from sage.modules.free_module_element import vector
from sage.coding.all import codes
import sage.coding.codes_catalog as codes


def _columnize(element):
Expand Down
3 changes: 2 additions & 1 deletion src/sage/combinat/combinat.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ def bell_number(n, algorithm='flint', **options) -> Integer:
if n < 0:
raise ArithmeticError('Bell numbers not defined for negative indices')
if algorithm == 'mpmath':
from sage.libs.mpmath.all import bell, mp, mag
from sage.libs.mpmath.all import bell, mag
from mpmath import mp
old_prec = mp.dps
if 'prec' in options:
mp.dps = options['prec']
Expand Down
4 changes: 2 additions & 2 deletions src/sage/combinat/designs/block_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def are_hyperplanes_in_projective_geometry_parameters(v, k, lmbda, return_parame
....: assert are_hyperplanes_in_projective_geometry_parameters(v,k,l+1) is False
....: assert are_hyperplanes_in_projective_geometry_parameters(v,k,l-1) is False
"""
import sage.arith.all as arith
from sage.arith.misc import gcd

q1 = Integer(v - k)
q2 = Integer(k - lmbda)
Expand All @@ -161,7 +161,7 @@ def are_hyperplanes_in_projective_geometry_parameters(v, k, lmbda, return_parame
p1,e1 = q1.factor()[0]
p2,e2 = q2.factor()[0]

k = arith.gcd(e1,e2)
k = gcd(e1,e2)
d = e1//k
q = p1**k
if e2//k != d-1 or lmbda != (q**(d-1)-1)//(q-1):
Expand Down
9 changes: 4 additions & 5 deletions src/sage/combinat/designs/difference_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.arith.misc import is_prime_power
from sage.arith.misc import is_prime_power, is_square, factor
from sage.misc.cachefunc import cached_function

from sage.categories.sets_cat import EmptySetError
import sage.arith.all as arith
from sage.misc.unknown import Unknown
from sage.rings.finite_rings.integer_mod_ring import Zmod
from sage.rings.integer import Integer
Expand Down Expand Up @@ -572,13 +571,13 @@ def radical_difference_set(K, k, l=1, existence=False, check=True):
add_zero = True

# q = 4t^2 + 1, t odd
elif v % 8 == 5 and k == (v-1)//4 and arith.is_square((v-1)//4):
elif v % 8 == 5 and k == (v-1)//4 and is_square((v-1)//4):
if existence:
return True
add_zero = False

# q = 4t^2 + 9, t odd
elif v % 8 == 5 and k == (v+3)//4 and arith.is_square((v-9)//4):
elif v % 8 == 5 and k == (v+3)//4 and is_square((v-9)//4):
if existence:
return True
add_zero = True
Expand Down Expand Up @@ -3828,7 +3827,7 @@ def difference_family(v, k, l=1, existence=False, explain_construction=False, ch
G = Zmod(v)
return G, [list(range(1, v))]

factorization = arith.factor(v)
factorization = factor(v)
if len(factorization) == 1:
from sage.rings.finite_rings.finite_field_constructor import GF
K = GF(v,'z')
Expand Down
3 changes: 2 additions & 1 deletion src/sage/combinat/sf/dual.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
# https://www.gnu.org/licenses/
#*****************************************************************************
from sage.categories.modules_with_basis import ModulesWithBasis
from sage.categories.morphism import SetMorphism
from sage.categories.homset import Hom
from sage.matrix.constructor import matrix
Expand Down Expand Up @@ -166,7 +167,7 @@ def __init__(self, dual_basis, scalar, scalar_name, basis_name, prefix):
prefix=prefix)

# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self.base_ring())
category = ModulesWithBasis(self.base_ring())
self.register_coercion(SetMorphism(Hom(self._dual_basis, self, category), self._dual_to_self))
self._dual_basis.register_coercion(SetMorphism(Hom(self, self._dual_basis, category), self._self_to_dual))

Expand Down
7 changes: 4 additions & 3 deletions src/sage/combinat/sf/hall_littlewood.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
# http://www.gnu.org/licenses/
#*****************************************************************************

from sage.categories.modules_with_basis import ModulesWithBasis
from sage.structure.unique_representation import UniqueRepresentation
from sage.libs.symmetrica.all import hall_littlewood
from sage.libs.symmetrica.symmetrica import hall_littlewood_symmetrica as hall_littlewood
from . import sfa
import sage.combinat.partition
from sage.matrix.constructor import matrix
Expand Down Expand Up @@ -385,7 +386,7 @@ def __init__(self, hall_littlewood):
# common category BasesByOrthotriangularity (shared with Jack, HL, orthotriang, Mcdo)
if hasattr(self, "_s_cache"):
# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self._sym.base_ring())
category = ModulesWithBasis(self._sym.base_ring())
self .register_coercion(SetMorphism(Hom(self._s, self, category), self._s_to_self))
self._s.register_coercion(SetMorphism(Hom(self, self._s, category), self._self_to_s))

Expand Down Expand Up @@ -856,7 +857,7 @@ def __init__(self, hall_littlewood):

self._P = self._hall_littlewood.P()
# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self.base_ring())
category = ModulesWithBasis(self.base_ring())

phi = self.module_morphism(diagonal=self._P._q_to_p_normalization,
codomain=self._P, category=category)
Expand Down
17 changes: 9 additions & 8 deletions src/sage/combinat/sf/jack.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.categories.modules_with_basis import ModulesWithBasis
from sage.combinat.sf.sf import SymmetricFunctions
from sage.structure.unique_representation import UniqueRepresentation
import sage.categories.all
from sage.rings.integer import Integer
from sage.rings.rational_field import QQ
from sage.arith.misc import gcd
Expand Down Expand Up @@ -525,13 +526,13 @@ def __init__(self, jack):
# common category BasesByOrthotriangularity (shared with Jack, HL, orthotriang, Mcdo)
if hasattr(self, "_m_cache"):
# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self._sym.base_ring())
category = ModulesWithBasis(self._sym.base_ring())
self._m = self._sym.monomial()
self .register_coercion(SetMorphism(Hom(self._m, self, category), self._m_to_self))
self._m.register_coercion(SetMorphism(Hom(self, self._m, category), self._self_to_m))
if hasattr(self, "_h_cache"):
# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self._sym.base_ring())
category = ModulesWithBasis(self._sym.base_ring())
self._h = self._sym.homogeneous()
self .register_coercion(SetMorphism(Hom(self._h, self, category), self._h_to_self))
self._h.register_coercion(SetMorphism(Hom(self, self._h, category), self._self_to_h))
Expand Down Expand Up @@ -912,8 +913,8 @@ def _m_cache(self, n):
return
self._self_to_m_cache[n] = {}
t = QQt.gen()
monomial = sage.combinat.sf.sf.SymmetricFunctions(QQt).monomial()
JP = sage.combinat.sf.sf.SymmetricFunctions(QQt).jack().P()
monomial = SymmetricFunctions(QQt).monomial()
JP = SymmetricFunctions(QQt).jack().P()
JP._gram_schmidt(n, monomial, lambda p: part_scalar_jack(p, p, t),
self._self_to_m_cache[n], upper_triangular=True)
JP._invert_morphism(n, QQt, self._self_to_m_cache,
Expand Down Expand Up @@ -1080,7 +1081,7 @@ def __init__(self, jack):
# Should be shared with _q (and possibly other bases in Macdo/HL) as BasesByRenormalization
self._P = self._jack.P()
# temporary until Hom(GradedHopfAlgebrasWithBasis) works better
category = sage.categories.all.ModulesWithBasis(self.base_ring())
category = ModulesWithBasis(self.base_ring())
phi = self.module_morphism(diagonal=self.c1,
codomain=self._P, category=category)
# should use module_morphism(on_coeffs = ...) once it exists
Expand Down Expand Up @@ -1116,7 +1117,7 @@ def __init__(self, jack):
# Should be shared with _j (and possibly other bases in Macdo/HL) as BasesByRenormalization
self._P = self._jack.P()
# temporary until Hom(GradedHopfAlgebrasWithBasis) works better
category = sage.categories.all.ModulesWithBasis(self.base_ring())
category = ModulesWithBasis(self.base_ring())
phi = self._P.module_morphism(diagonal=self._P.scalar_jack_basis,
codomain=self, category=category)
self.register_coercion(self._normalize_morphism(category) * phi)
Expand Down Expand Up @@ -1348,7 +1349,7 @@ def __init__(self, Sym):
#self._self_to_m_cache = {} and we don't need to compute it separately for zonals
sfa.SymmetricFunctionAlgebra_generic.__init__(self, self._sym,
prefix='Z', basis_name='zonal')
category = sage.categories.all.ModulesWithBasis(self._sym.base_ring())
category = ModulesWithBasis(self._sym.base_ring())
self .register_coercion(SetMorphism(Hom(self._P, self, category), self.sum_of_terms))
self._P.register_coercion(SetMorphism(Hom(self, self._P, category), self._P.sum_of_terms))

Expand Down
3 changes: 2 additions & 1 deletion src/sage/combinat/sf/llt.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#
# https://www.gnu.org/licenses/
# ****************************************************************************
from sage.categories.modules_with_basis import ModulesWithBasis
from sage.structure.unique_representation import UniqueRepresentation
from . import sfa
import sage.combinat.ribbon_tableau as ribbon_tableau
Expand Down Expand Up @@ -450,7 +451,7 @@ def __init__(self, llt, prefix):
sfa.SymmetricFunctionAlgebra_generic.__init__(self, self._sym, self._basis_name)

# temporary until Hom(GradedHopfAlgebrasWithBasis work better)
category = sage.categories.all.ModulesWithBasis(self._sym.base_ring())
category = ModulesWithBasis(self._sym.base_ring())
self._m = llt._sym.m()
self .register_coercion(SetMorphism(Hom(self._m, self, category), self._m_to_self))
self._m.register_coercion(SetMorphism(Hom(self, self._m, category), self._self_to_m))
Expand Down
6 changes: 4 additions & 2 deletions src/sage/combinat/words/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ def plot_projection(self, v=None, letters=None, color=None, ring=None,
if letters is None:
letters = self.parent().alphabet()
if color is None:
from sage.plot.all import hue
from sage.plot.colors import hue
A = self.parent().alphabet()
color = {a: hue(A.rank(a) / float(A.cardinality())) for a in A}
it = self.projected_point_iterator(v, ring=ring)
Expand Down Expand Up @@ -1655,7 +1655,9 @@ def animate(self):

See www.imagemagick.org, for example.
"""
from sage.plot.all import line, polygon, animate
from sage.plot.line import line
from sage.plot.polygon import polygon
from sage.plot.animate import animate

pts = list(self.points())

Expand Down
2 changes: 1 addition & 1 deletion src/sage/crypto/lfsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@

import copy

from sage.structure.all import Sequence
from sage.structure.sequence import Sequence
from sage.rings.finite_rings.finite_field_base import FiniteField
from sage.rings.integer import Integer
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
Expand Down
2 changes: 1 addition & 1 deletion src/sage/dynamics/complex_dynamics/mandel_julia_helper.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ from sage.rings.cc import CC
from sage.rings.real_double import RDF
from sage.rings.complex_double import CDF
from sage.ext.fast_callable import fast_callable
from sage.calculus.all import symbolic_expression
from sage.calculus.expr import symbolic_expression
from sage.symbolic.ring import SR
from sage.calculus.var import var
from sage.rings.fraction_field import FractionField_generic
Expand Down
3 changes: 2 additions & 1 deletion src/sage/geometry/cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@
from sage.modules.free_module_element import vector
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.structure.all import SageObject, parent
from sage.structure.sage_object import SageObject
from sage.structure.element import parent
from sage.structure.richcmp import richcmp_method, richcmp
lazy_import('sage.geometry.integral_points', 'parallelotope_points')
from sage.geometry.convex_set import ConvexSet_closed
Expand Down
3 changes: 2 additions & 1 deletion src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
from sage.rings.real_double import RDF
from sage.functions.other import imag
from sage.misc.functional import sqrt
from sage.functions.all import arccosh, sign
from sage.functions.hyperbolic import acosh as arccosh
from sage.functions.generalized import sgn as sign

from sage.geometry.hyperbolic_space.hyperbolic_constants import EPSILON
from sage.geometry.hyperbolic_space.hyperbolic_geodesic import HyperbolicGeodesic
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/hyperbolic_space/hyperbolic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
from sage.misc.lazy_import import lazy_import
from sage.functions.other import imag, real
from sage.misc.functional import sqrt
from sage.functions.all import arccosh
from sage.functions.hyperbolic import acosh as arccosh
from sage.rings.cc import CC
from sage.rings.real_double import RDF
from sage.rings.real_mpfr import RR
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/lattice_polytope.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
from sage.rings.integer_ring import ZZ
from sage.rings.rational_field import QQ
from sage.sets.set import Set_generic
from sage.structure.all import Sequence
from sage.structure.sequence import Sequence
from sage.structure.sage_object import SageObject
from sage.structure.richcmp import richcmp_method, richcmp
from sage.geometry.convex_set import ConvexSet_compact
Expand Down
2 changes: 1 addition & 1 deletion src/sage/geometry/toric_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
from sage.misc.lazy_import import lazy_import
lazy_import('sage.geometry.toric_plotter', 'ToricPlotter')
from sage.misc.latex import latex
from sage.structure.all import parent
from sage.structure.element import parent
from sage.structure.richcmp import (richcmp_method, richcmp, rich_to_bool,
richcmp_not_equal)
from sage.modules.fg_pid.fgp_element import FGP_Element
Expand Down
Loading
Loading