Skip to content

Commit cf49215

Browse files
author
Release Manager
committed
gh-35012: Issue #34949: sage.{categories,matrix,structure}: Replace imports from sage.*.all for namespace packages Closes #34949 URL: #35012 Reported by: Matthias Köppe Reviewer(s): Tobias Diez
2 parents c6508c5 + d905cc3 commit cf49215

Some content is hidden

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

61 files changed

+188
-153
lines changed

src/sage/arith/long.pxd

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# sage.doctest: optional - sage.misc.cython
12
r"""
23
Fast conversion of Python objects to C long
34
"""
@@ -113,7 +114,7 @@ cdef inline bint integer_check_long(x, long* value, int* err) except -1:
113114
114115
We create a pure Python wrapper of this function::
115116
116-
sage: cython(''' # optional - sage.misc.cython
117+
sage: cython('''
117118
....: from sage.arith.long cimport *
118119
....: from sage.rings.integer cimport smallInteger
119120
....: def check_long(x):
@@ -246,7 +247,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err):
246247
247248
We create a pure Python wrapper of this function::
248249
249-
sage: cython(''' # optional - sage.misc.cython
250+
sage: cython('''
250251
....: from sage.arith.long cimport *
251252
....: def check_long_py(x):
252253
....: cdef long value
@@ -387,7 +388,7 @@ cdef inline bint is_small_python_int(obj):
387388
388389
EXAMPLES::
389390
390-
sage: cython(''' # optional - sage.misc.cython
391+
sage: cython('''
391392
....: from sage.arith.long cimport is_small_python_int
392393
....: def is_small_wrapper(x):
393394
....: return is_small_python_int(x)

src/sage/categories/bialgebras.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
# *****************************************************************************
1111

1212
from sage.categories.category_types import Category_over_base_ring
13-
from sage.categories.all import Algebras, Coalgebras
13+
from sage.categories.algebras import Algebras
14+
from sage.categories.coalgebras import Coalgebras
1415
from sage.categories.super_modules import SuperModulesCategory
1516
from sage.misc.lazy_import import LazyImport
1617

src/sage/categories/category.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class Category(UniqueRepresentation, SageObject):
153153
154154
This is achieved as follows::
155155
156-
sage: from sage.categories.all import Category
156+
sage: from sage.categories.category import Category
157157
sage: class EuclideanDomains(Category):
158158
....: # operations on the category itself
159159
....: def super_categories(self):
@@ -201,7 +201,7 @@ class inheritance from ``C.parent_class``.
201201
202202
::
203203
204-
sage: from sage.categories.all import Category
204+
sage: from sage.categories.category import Category
205205
sage: from sage.misc.lazy_attribute import lazy_attribute
206206
sage: class As (Category):
207207
....: def super_categories(self):

src/sage/categories/chain_complexes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def super_categories(self):
4646
[Category of modules over Ring of integers modulo 9]
4747
4848
"""
49-
from sage.categories.all import Fields, Modules, VectorSpaces
49+
from sage.categories.fields import Fields
50+
from sage.categories.modules import Modules
51+
from sage.categories.vector_spaces import VectorSpaces
5052
base_ring = self.base_ring()
5153
if base_ring in Fields():
5254
return [VectorSpaces(base_ring)]

src/sage/categories/coalgebras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# *****************************************************************************
1111

1212
from .category_types import Category_over_base_ring
13-
from sage.categories.all import Modules
13+
from sage.categories.modules import Modules
1414
from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring
1515
from sage.categories.tensor import TensorProductsCategory
1616
from sage.categories.dual import DualObjectsCategory

src/sage/categories/coalgebras_with_basis.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
from sage.misc.lazy_attribute import lazy_attribute
1414
from sage.misc.lazy_import import LazyImport
1515
from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring
16-
from sage.categories.all import ModulesWithBasis, tensor, Hom
16+
from sage.categories.modules_with_basis import ModulesWithBasis
17+
from sage.categories.tensor import tensor
18+
from sage.categories.homset import Hom
1719
from sage.categories.super_modules import SuperModulesCategory
1820
from sage.categories.filtered_modules import FilteredModulesCategory
1921

src/sage/categories/examples/algebras_with_basis.py

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

1111
from sage.misc.cachefunc import cached_method
1212
from sage.sets.family import Family
13-
from sage.categories.all import AlgebrasWithBasis
13+
from sage.categories.algebras_with_basis import AlgebrasWithBasis
1414
from sage.combinat.free_module import CombinatorialFreeModule
1515
from sage.combinat.words.words import Words
1616

src/sage/categories/examples/commutative_additive_monoids.py

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

1111
from sage.misc.cachefunc import cached_method
1212
from sage.structure.parent import Parent
13-
from sage.categories.all import CommutativeAdditiveMonoids
13+
from sage.categories.commutative_additive_monoids import CommutativeAdditiveMonoids
1414
from .commutative_additive_semigroups import FreeCommutativeAdditiveSemigroup
1515

1616
class FreeCommutativeAdditiveMonoid(FreeCommutativeAdditiveSemigroup):

src/sage/categories/examples/commutative_additive_semigroups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from sage.structure.parent import Parent
1313
from sage.structure.element_wrapper import ElementWrapper
1414
from sage.structure.unique_representation import UniqueRepresentation
15-
from sage.categories.all import CommutativeAdditiveSemigroups
15+
from sage.categories.commutative_additive_semigroups import CommutativeAdditiveSemigroups
1616
from sage.sets.family import Family
1717

1818
class FreeCommutativeAdditiveSemigroup(UniqueRepresentation, Parent):

src/sage/categories/examples/finite_coxeter_groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from sage.misc.cachefunc import cached_method
1212
from sage.structure.parent import Parent
1313
from sage.structure.element_wrapper import ElementWrapper
14-
from sage.categories.all import FiniteCoxeterGroups
14+
from sage.categories.finite_coxeter_groups import FiniteCoxeterGroups
1515
from sage.structure.unique_representation import UniqueRepresentation
1616
from sage.misc.functional import is_odd, is_even
1717
from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix

0 commit comments

Comments
 (0)