Skip to content

Commit b0df140

Browse files
author
Release Manager
committed
gh-35090: sage.{algebras,combinat,matroids}: Replace imports from sage.*.all for namespace packages <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> ### 📚 Description <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If it resolves an open issue, please link to the issue here. For example "Closes #1337" --> Fixes #34946 ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have made sure that the title is self-explanatory and the description concisely explains the PR. - [x] I have linked an issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open pull requests that this PR logically depends on --> <!-- - #xyz: short description why this is a dependency - #abc: ... --> URL: #35090 Reported by: Matthias Köppe Reviewer(s): Matthias Köppe, Tobias Diez, Travis Scrimshaw
2 parents 44aef4a + 912e4c5 commit b0df140

File tree

97 files changed

+259
-227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+259
-227
lines changed

src/sage/algebras/affine_nil_temperley_lieb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Distributed under the terms of the GNU General Public License (GPL)
88
# https://www.gnu.org/licenses/
99
# ****************************************************************************
10-
from sage.categories.all import AlgebrasWithBasis
10+
from sage.categories.algebras_with_basis import AlgebrasWithBasis
1111
from sage.combinat.root_system.cartan_type import CartanType
1212
from sage.combinat.root_system.weyl_group import WeylGroup
1313
from sage.rings.ring import Ring

src/sage/algebras/cluster_algebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354

355355
from copy import copy
356356

357-
from sage.arith.all import binomial
357+
from sage.arith.misc import binomial
358358
from sage.categories.homset import Hom
359359
from sage.categories.morphism import SetMorphism
360360
from sage.categories.rings import Rings

src/sage/algebras/free_algebra.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149

150150
from sage.structure.factory import UniqueFactory
151151
from sage.misc.cachefunc import cached_method
152-
from sage.all import PolynomialRing
152+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
153153
from sage.rings.ring import Algebra
154154
from sage.categories.algebras_with_basis import AlgebrasWithBasis
155155
from sage.combinat.free_module import CombinatorialFreeModule
@@ -282,7 +282,7 @@ def create_key(self, base_ring, arg1=None, arg2=None,
282282
PolRing = PolynomialRing(base_ring, *args, **kwds)
283283
if degrees is None:
284284
return (PolRing,)
285-
from sage.all import TermOrder
285+
from sage.rings.polynomial.term_order import TermOrder
286286
T = TermOrder(PolRing.term_order(), PolRing.ngens() + 1)
287287
varnames = list(PolRing.variable_names())
288288
newname = 'x'

src/sage/algebras/free_algebra_quotient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def hamilton_quatalg(R):
359359
"""
360360
n = 3
361361
from sage.algebras.free_algebra import FreeAlgebra
362-
from sage.matrix.all import MatrixSpace
362+
from sage.matrix.matrix_space import MatrixSpace
363363
A = FreeAlgebra(R, n, 'i')
364364
F = A.monoid()
365365
i, j, k = F.gens()

src/sage/algebras/group_algebra.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
# http://www.gnu.org/licenses/
3636
#*****************************************************************************
3737

38-
from sage.rings.all import IntegerRing
39-
from sage.categories.all import Rings
38+
from sage.rings.integer_ring import IntegerRing
39+
from sage.categories.rings import Rings
4040
from sage.categories.magmas import Magmas
4141
from sage.categories.additive_magmas import AdditiveMagmas
4242
from sage.categories.sets_cat import Sets

src/sage/algebras/hecke_algebras/ariki_koike_algebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def dimension(self):
540540
sage: LT.dimension()
541541
29160
542542
"""
543-
from sage.arith.all import factorial
543+
from sage.arith.misc import factorial
544544
return self._r**self._n * factorial(self._n)
545545

546546
def some_elements(self):

src/sage/algebras/iwahori_hecke_algebra.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@
3030
from sage.structure.parent import Parent
3131
from sage.structure.unique_representation import UniqueRepresentation
3232
from sage.categories.realizations import Realizations, Category_realization_of_parent
33-
from sage.categories.all import AlgebrasWithBasis, FiniteDimensionalAlgebrasWithBasis, CoxeterGroups
33+
from sage.categories.algebras_with_basis import AlgebrasWithBasis
34+
from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis
35+
from sage.categories.coxeter_groups import CoxeterGroups
3436
from sage.rings.integer_ring import ZZ
3537
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing
36-
from sage.arith.all import is_square
38+
from sage.arith.misc import is_square
3739
from sage.combinat.root_system.coxeter_group import CoxeterGroup
3840
from sage.sets.family import Family
3941
from sage.combinat.free_module import CombinatorialFreeModule

src/sage/algebras/lie_algebras/bch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from sage.arith.misc import bernoulli
2121
from sage.categories.lie_algebras import LieAlgebras
2222
from sage.combinat.integer_vector import IntegerListsLex
23-
from sage.arith.all import factorial
23+
from sage.arith.misc import factorial
2424
from sage.rings.rational_field import QQ
2525
from sage.structure.element import canonical_coercion
2626

src/sage/algebras/lie_algebras/free_lie_algebra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def graded_dimension(self, k):
265265
"""
266266
if k == 0:
267267
return 0
268-
from sage.arith.all import moebius
268+
from sage.arith.misc import moebius
269269
s = len(self.lie_algebra_generators())
270270
k = ZZ(k) # Make sure we have something that is in ZZ
271271
return sum(moebius(d) * s**(k // d) for d in k.divisors()) // k

src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# (at your option) any later version.
1515
# https://www.gnu.org/licenses/
1616
# ****************************************************************************
17-
from sage.arith.all import factorial
17+
from sage.arith.misc import factorial
1818
from sage.misc.misc_c import prod
1919
from sage.misc.repr import repr_lincomb
2020
from sage.misc.latex import latex

0 commit comments

Comments
 (0)