From e4b376ba698e4439566358ff3f08d43e983ee218 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 29 Jun 2020 11:51:57 -0700 Subject: [PATCH 01/27] Set up all__sage_categories.py --- src/sage/all__sage_categories.py | 5 +++++ src/sage/rings/all.py | 2 +- src/sage/rings/all__sage_categories.py | 6 ++++++ src/sage/rings/ideal.py | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/sage/all__sage_categories.py create mode 100644 src/sage/rings/all__sage_categories.py diff --git a/src/sage/all__sage_categories.py b/src/sage/all__sage_categories.py new file mode 100644 index 00000000000..9aba871b139 --- /dev/null +++ b/src/sage/all__sage_categories.py @@ -0,0 +1,5 @@ +from .all__sage_objects import * + +from sage.categories.all import * + +from sage.rings.all__sage_categories import * diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index e3c7167fe12..f7cdd32f39a 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -12,7 +12,7 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from sage.rings.all__sagemath_categories import * +from .all__sage_categories import * # Ring base classes from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, diff --git a/src/sage/rings/all__sage_categories.py b/src/sage/rings/all__sage_categories.py new file mode 100644 index 00000000000..8d14e7afcda --- /dev/null +++ b/src/sage/rings/all__sage_categories.py @@ -0,0 +1,6 @@ +# Ring base classes +from .ring import Ring + +# Ideals +from .ideal import Ideal +ideal = Ideal diff --git a/src/sage/rings/ideal.py b/src/sage/rings/ideal.py index 4dba8ec9d42..a656aa309b7 100644 --- a/src/sage/rings/ideal.py +++ b/src/sage/rings/ideal.py @@ -28,8 +28,7 @@ from types import GeneratorType -from sage.categories.rings import Rings -from sage.categories.fields import Fields +import sage.rings.ring from sage.structure.element import MonoidElement from sage.structure.richcmp import rich_to_bool, richcmp from sage.structure.sequence import Sequence @@ -1863,6 +1862,7 @@ def FieldIdeal(R): over Finite Field in alpha of size 2^4 """ q = R.base_ring().order() + import sage.rings.infinity if q is sage.rings.infinity.infinity: raise TypeError("Cannot construct field ideal for R.base_ring().order()==infinity") From a960393e1aabaf64a21c52e11f11bbd27ba7cecd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 7 Nov 2023 21:03:59 -0800 Subject: [PATCH 02/27] sage.*.all*: Update from #35095 --- src/sage/algebras/all.py | 47 +--- src/sage/algebras/all__sagemath_combinat.py | 35 +++ src/sage/algebras/all__sagemath_modules.py | 11 + src/sage/algebras/all__sagemath_singular.py | 0 .../lie_algebras/all__sagemath_modules.py | 0 src/sage/algebras/steenrod/all.py | 2 +- src/sage/arith/all__sagemath_objects.py | 2 + src/sage/calculus/all.py | 35 +-- src/sage/calculus/all__sagemath_categories.py | 1 + src/sage/calculus/all__sagemath_modules.py | 17 ++ src/sage/coding/all__sagemath_gap.py | 0 src/sage/coding/codecan/all__sagemath_gap.py | 0 src/sage/combinat/all.py | 250 +----------------- src/sage/combinat/all__sagemath_categories.py | 29 ++ src/sage/combinat/all__sagemath_combinat.py | 197 ++++++++++++++ src/sage/combinat/all__sagemath_flint.py | 0 src/sage/combinat/all__sagemath_gap.py | 0 src/sage/combinat/all__sagemath_graphs.py | 31 +++ src/sage/combinat/all__sagemath_modules.py | 6 + src/sage/combinat/matrices/all.py | 6 +- .../matrices/all__sagemath_categories.py | 3 + src/sage/combinat/ncsf_qsym/all.py | 9 +- src/sage/combinat/ncsym/all.py | 9 +- .../combinat/posets/all__sagemath_flint.py | 0 src/sage/combinat/root_system/all.py | 6 +- .../combinat/root_system/all__sagemath_gap.py | 0 src/sage/combinat/words/all.py | 7 +- src/sage/data_structures/all.py | 3 +- .../all__sagemath_categories.py | 1 + .../data_structures/all__sagemath_combinat.py | 0 .../data_structures/all__sagemath_flint.py | 0 src/sage/databases/all__sagemath_graphs.py | 0 src/sage/dynamics/all.py | 9 +- src/sage/dynamics/all__sagemath_schemes.py | 1 + src/sage/dynamics/all__sagemath_symbolics.py | 4 + src/sage/ext/all__sagemath_categories.py | 2 + src/sage/ext/all__sagemath_modules.py | 0 src/sage/ext/all__sagemath_pari.py | 0 src/sage/ext/all__sagemath_symbolics.py | 0 src/sage/ext_data/all__sagemath_gap.py | 0 src/sage/ext_data/all__sagemath_singular.py | 0 src/sage/games/all.py | 6 +- src/sage/geometry/all.py | 29 +- src/sage/geometry/all__sagemath_categories.py | 0 src/sage/geometry/all__sagemath_gap.py | 4 + src/sage/geometry/all__sagemath_linbox.py | 0 src/sage/geometry/all__sagemath_modules.py | 3 + src/sage/geometry/all__sagemath_polyhedra.py | 19 ++ src/sage/geometry/all__sagemath_symbolics.py | 7 + src/sage/graphs/all__sagemath_flint.py | 0 src/sage/groups/abelian_gps/all.py | 9 +- .../groups/abelian_gps/all__sagemath_gap.py | 5 + .../abelian_gps/all__sagemath_modules.py | 4 + src/sage/groups/all.py | 41 +-- src/sage/groups/all__sagemath_categories.py | 10 + src/sage/groups/all__sagemath_combinat.py | 0 src/sage/groups/all__sagemath_gap.py | 3 + src/sage/groups/all__sagemath_graphs.py | 0 src/sage/groups/all__sagemath_groups.py | 29 ++ src/sage/groups/all__sagemath_modules.py | 10 + src/sage/groups/all__sagemath_objects.py | 0 src/sage/groups/all__sagemath_pari.py | 2 + src/sage/groups/matrix_gps/all.py | 12 +- .../groups/matrix_gps/all__sagemath_gap.py | 0 .../matrix_gps/all__sagemath_modules.py | 11 + .../perm_gps/all__sagemath_categories.py | 0 .../groups/perm_gps/all__sagemath_graphs.py | 0 .../groups/perm_gps/all__sagemath_modules.py | 0 .../partn_ref/all__sagemath_categories.py | 0 .../perm_gps/partn_ref/all__sagemath_gap.py | 0 .../partn_ref/all__sagemath_graphs.py | 0 .../partn_ref/all__sagemath_modules.py | 0 src/sage/homology/all.py | 7 +- src/sage/homology/all__sagemath_modules.py | 6 + .../interfaces/all__sagemath_categories.py | 0 src/sage/interfaces/all__sagemath_gap.py | 0 src/sage/interfaces/all__sagemath_libecm.py | 0 src/sage/interfaces/all__sagemath_pari.py | 0 src/sage/interfaces/all__sagemath_plot.py | 0 .../interfaces/all__sagemath_symbolics.py | 0 src/sage/lfunctions/all__sagemath_lcalc.py | 0 src/sage/libs/all.py | 30 +-- src/sage/libs/all__sagemath_brial.py | 0 src/sage/libs/all__sagemath_combinat.py | 5 + src/sage/libs/all__sagemath_eclib.py | 10 + src/sage/libs/all__sagemath_flint.py | 16 ++ src/sage/libs/all__sagemath_gap.py | 0 src/sage/libs/all__sagemath_giac.py | 0 src/sage/libs/all__sagemath_glpk.py | 0 src/sage/libs/all__sagemath_homfly.py | 0 src/sage/libs/all__sagemath_lcalc.py | 0 src/sage/libs/all__sagemath_libbraiding.py | 0 src/sage/libs/all__sagemath_libecm.py | 0 src/sage/libs/all__sagemath_linbox.py | 0 src/sage/libs/all__sagemath_modules.py | 0 src/sage/libs/all__sagemath_mpmath.py | 0 src/sage/libs/all__sagemath_ntl.py | 2 + src/sage/libs/all__sagemath_pari.py | 1 + src/sage/libs/all__sagemath_singular.py | 0 src/sage/libs/all__sagemath_symbolics.py | 3 + src/sage/libs/pari/all__sagemath_flint.py | 0 src/sage/matrix/all__sagemath_flint.py | 0 src/sage/matrix/all__sagemath_gap.py | 0 src/sage/matrix/all__sagemath_linbox.py | 0 src/sage/matrix/all__sagemath_ntl.py | 0 src/sage/matrix/all__sagemath_singular.py | 0 src/sage/matrix/all__sagemath_symbolics.py | 0 src/sage/misc/all.py | 141 +--------- src/sage/misc/all__sagemath_categories.py | 80 ++++++ src/sage/misc/all__sagemath_modules.py | 21 ++ src/sage/misc/all__sagemath_ntl.py | 0 src/sage/misc/all__sagemath_objects.py | 11 +- src/sage/misc/all__sagemath_repl.py | 44 ++- src/sage/modules/all__sagemath_linbox.py | 0 src/sage/modules/all__sagemath_objects.py | 0 src/sage/modules/all__sagemath_symbolics.py | 0 src/sage/monoids/all__sagemath_categories.py | 0 src/sage/numerical/all.py | 6 +- .../numerical/all__sagemath_categories.py | 0 src/sage/numerical/all__sagemath_glpk.py | 0 src/sage/numerical/all__sagemath_modules.py | 4 + .../backends/all__sagemath_categories.py | 0 .../numerical/backends/all__sagemath_glpk.py | 0 src/sage/plot/all.py | 4 +- src/sage/quadratic_forms/all.py | 20 +- .../quadratic_forms/all__sagemath_modules.py | 12 + .../quadratic_forms/all__sagemath_pari.py | 5 + src/sage/rings/all.py | 148 +---------- src/sage/rings/all__sagemath_brial.py | 0 src/sage/rings/all__sagemath_categories.py | 75 +++++- src/sage/rings/all__sagemath_combinat.py | 9 + src/sage/rings/all__sagemath_flint.py | 34 +++ src/sage/rings/all__sagemath_gap.py | 6 + src/sage/rings/all__sagemath_linbox.py | 0 src/sage/rings/all__sagemath_modules.py | 24 ++ src/sage/rings/all__sagemath_ntl.py | 6 + src/sage/rings/all__sagemath_pari.py | 12 + src/sage/rings/all__sagemath_singular.py | 0 src/sage/rings/all__sagemath_symbolics.py | 1 + src/sage/rings/finite_rings/all.py | 4 +- .../finite_rings/all__sagemath_categories.py | 8 + .../finite_rings/all__sagemath_linbox.py | 0 .../finite_rings/all__sagemath_modules.py | 0 .../rings/finite_rings/all__sagemath_ntl.py | 0 .../rings/finite_rings/all__sagemath_pari.py | 0 src/sage/rings/function_field/all.py | 7 +- .../all__sagemath_categories.py | 1 + .../function_field/all__sagemath_modules.py | 1 + .../function_field/all__sagemath_pari.py | 0 .../function_field/all__sagemath_singular.py | 0 .../function_field/all__sagemath_symbolics.py | 1 + .../number_field/all__sagemath_categories.py | 0 .../rings/number_field/all__sagemath_flint.py | 0 .../rings/number_field/all__sagemath_pari.py | 0 src/sage/rings/padics/all.py | 8 +- .../rings/padics/all__sagemath_categories.py | 1 + src/sage/rings/padics/all__sagemath_flint.py | 2 + src/sage/rings/padics/all__sagemath_ntl.py | 4 + src/sage/rings/padics/all__sagemath_pari.py | 10 + src/sage/rings/polynomial/all.py | 25 +- .../rings/polynomial/all__sagemath_brial.py | 0 .../polynomial/all__sagemath_categories.py | 21 ++ .../rings/polynomial/all__sagemath_flint.py | 0 .../rings/polynomial/all__sagemath_linbox.py | 0 .../rings/polynomial/all__sagemath_modules.py | 6 + .../rings/polynomial/all__sagemath_ntl.py | 0 .../rings/polynomial/all__sagemath_pari.py | 0 .../polynomial/all__sagemath_singular.py | 0 .../polynomial/all__sagemath_symbolics.py | 0 src/sage/schemes/all.py | 12 +- src/sage/schemes/all__sagemath_categories.py | 4 + src/sage/schemes/all__sagemath_ntl.py | 0 src/sage/schemes/all__sagemath_polyhedra.py | 1 + .../hyperelliptic_curves/all__sagemath_ntl.py | 0 src/sage/stats/all.py | 9 +- src/sage/symbolic/all__sagemath_categories.py | 0 .../all__sagemath_standard_no_symbolics.py | 0 177 files changed, 1017 insertions(+), 778 deletions(-) create mode 100644 src/sage/algebras/all__sagemath_combinat.py create mode 100644 src/sage/algebras/all__sagemath_modules.py create mode 100644 src/sage/algebras/all__sagemath_singular.py create mode 100644 src/sage/algebras/lie_algebras/all__sagemath_modules.py create mode 100644 src/sage/calculus/all__sagemath_categories.py create mode 100644 src/sage/calculus/all__sagemath_modules.py create mode 100644 src/sage/coding/all__sagemath_gap.py create mode 100644 src/sage/coding/codecan/all__sagemath_gap.py create mode 100644 src/sage/combinat/all__sagemath_categories.py create mode 100644 src/sage/combinat/all__sagemath_combinat.py create mode 100644 src/sage/combinat/all__sagemath_flint.py create mode 100644 src/sage/combinat/all__sagemath_gap.py create mode 100644 src/sage/combinat/all__sagemath_graphs.py create mode 100644 src/sage/combinat/all__sagemath_modules.py create mode 100644 src/sage/combinat/matrices/all__sagemath_categories.py create mode 100644 src/sage/combinat/posets/all__sagemath_flint.py create mode 100644 src/sage/combinat/root_system/all__sagemath_gap.py create mode 100644 src/sage/data_structures/all__sagemath_categories.py create mode 100644 src/sage/data_structures/all__sagemath_combinat.py create mode 100644 src/sage/data_structures/all__sagemath_flint.py create mode 100644 src/sage/databases/all__sagemath_graphs.py create mode 100644 src/sage/dynamics/all__sagemath_schemes.py create mode 100644 src/sage/dynamics/all__sagemath_symbolics.py create mode 100644 src/sage/ext/all__sagemath_categories.py create mode 100644 src/sage/ext/all__sagemath_modules.py create mode 100644 src/sage/ext/all__sagemath_pari.py create mode 100644 src/sage/ext/all__sagemath_symbolics.py create mode 100644 src/sage/ext_data/all__sagemath_gap.py create mode 100644 src/sage/ext_data/all__sagemath_singular.py create mode 100644 src/sage/geometry/all__sagemath_categories.py create mode 100644 src/sage/geometry/all__sagemath_gap.py create mode 100644 src/sage/geometry/all__sagemath_linbox.py create mode 100644 src/sage/geometry/all__sagemath_modules.py create mode 100644 src/sage/geometry/all__sagemath_polyhedra.py create mode 100644 src/sage/geometry/all__sagemath_symbolics.py create mode 100644 src/sage/graphs/all__sagemath_flint.py create mode 100644 src/sage/groups/abelian_gps/all__sagemath_gap.py create mode 100644 src/sage/groups/abelian_gps/all__sagemath_modules.py create mode 100644 src/sage/groups/all__sagemath_categories.py create mode 100644 src/sage/groups/all__sagemath_combinat.py create mode 100644 src/sage/groups/all__sagemath_gap.py create mode 100644 src/sage/groups/all__sagemath_graphs.py create mode 100644 src/sage/groups/all__sagemath_groups.py create mode 100644 src/sage/groups/all__sagemath_modules.py create mode 100644 src/sage/groups/all__sagemath_objects.py create mode 100644 src/sage/groups/all__sagemath_pari.py create mode 100644 src/sage/groups/matrix_gps/all__sagemath_gap.py create mode 100644 src/sage/groups/matrix_gps/all__sagemath_modules.py create mode 100644 src/sage/groups/perm_gps/all__sagemath_categories.py create mode 100644 src/sage/groups/perm_gps/all__sagemath_graphs.py create mode 100644 src/sage/groups/perm_gps/all__sagemath_modules.py create mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py create mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py create mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py create mode 100644 src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py create mode 100644 src/sage/homology/all__sagemath_modules.py create mode 100644 src/sage/interfaces/all__sagemath_categories.py create mode 100644 src/sage/interfaces/all__sagemath_gap.py create mode 100644 src/sage/interfaces/all__sagemath_libecm.py create mode 100644 src/sage/interfaces/all__sagemath_pari.py create mode 100644 src/sage/interfaces/all__sagemath_plot.py create mode 100644 src/sage/interfaces/all__sagemath_symbolics.py create mode 100644 src/sage/lfunctions/all__sagemath_lcalc.py create mode 100644 src/sage/libs/all__sagemath_brial.py create mode 100644 src/sage/libs/all__sagemath_combinat.py create mode 100644 src/sage/libs/all__sagemath_eclib.py create mode 100644 src/sage/libs/all__sagemath_flint.py create mode 100644 src/sage/libs/all__sagemath_gap.py create mode 100644 src/sage/libs/all__sagemath_giac.py create mode 100644 src/sage/libs/all__sagemath_glpk.py create mode 100644 src/sage/libs/all__sagemath_homfly.py create mode 100644 src/sage/libs/all__sagemath_lcalc.py create mode 100644 src/sage/libs/all__sagemath_libbraiding.py create mode 100644 src/sage/libs/all__sagemath_libecm.py create mode 100644 src/sage/libs/all__sagemath_linbox.py create mode 100644 src/sage/libs/all__sagemath_modules.py create mode 100644 src/sage/libs/all__sagemath_mpmath.py create mode 100644 src/sage/libs/all__sagemath_ntl.py create mode 100644 src/sage/libs/all__sagemath_pari.py create mode 100644 src/sage/libs/all__sagemath_singular.py create mode 100644 src/sage/libs/all__sagemath_symbolics.py create mode 100644 src/sage/libs/pari/all__sagemath_flint.py create mode 100644 src/sage/matrix/all__sagemath_flint.py create mode 100644 src/sage/matrix/all__sagemath_gap.py create mode 100644 src/sage/matrix/all__sagemath_linbox.py create mode 100644 src/sage/matrix/all__sagemath_ntl.py create mode 100644 src/sage/matrix/all__sagemath_singular.py create mode 100644 src/sage/matrix/all__sagemath_symbolics.py create mode 100644 src/sage/misc/all__sagemath_categories.py create mode 100644 src/sage/misc/all__sagemath_modules.py create mode 100644 src/sage/misc/all__sagemath_ntl.py create mode 100644 src/sage/modules/all__sagemath_linbox.py create mode 100644 src/sage/modules/all__sagemath_objects.py create mode 100644 src/sage/modules/all__sagemath_symbolics.py create mode 100644 src/sage/monoids/all__sagemath_categories.py create mode 100644 src/sage/numerical/all__sagemath_categories.py create mode 100644 src/sage/numerical/all__sagemath_glpk.py create mode 100644 src/sage/numerical/all__sagemath_modules.py create mode 100644 src/sage/numerical/backends/all__sagemath_categories.py create mode 100644 src/sage/numerical/backends/all__sagemath_glpk.py create mode 100644 src/sage/quadratic_forms/all__sagemath_modules.py create mode 100644 src/sage/quadratic_forms/all__sagemath_pari.py create mode 100644 src/sage/rings/all__sagemath_brial.py create mode 100644 src/sage/rings/all__sagemath_combinat.py create mode 100644 src/sage/rings/all__sagemath_flint.py create mode 100644 src/sage/rings/all__sagemath_gap.py create mode 100644 src/sage/rings/all__sagemath_linbox.py create mode 100644 src/sage/rings/all__sagemath_modules.py create mode 100644 src/sage/rings/all__sagemath_ntl.py create mode 100644 src/sage/rings/all__sagemath_pari.py create mode 100644 src/sage/rings/all__sagemath_singular.py create mode 100644 src/sage/rings/all__sagemath_symbolics.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_categories.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_linbox.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_modules.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_ntl.py create mode 100644 src/sage/rings/finite_rings/all__sagemath_pari.py create mode 100644 src/sage/rings/function_field/all__sagemath_categories.py create mode 100644 src/sage/rings/function_field/all__sagemath_modules.py create mode 100644 src/sage/rings/function_field/all__sagemath_pari.py create mode 100644 src/sage/rings/function_field/all__sagemath_singular.py create mode 100644 src/sage/rings/function_field/all__sagemath_symbolics.py create mode 100644 src/sage/rings/number_field/all__sagemath_categories.py create mode 100644 src/sage/rings/number_field/all__sagemath_flint.py create mode 100644 src/sage/rings/number_field/all__sagemath_pari.py create mode 100644 src/sage/rings/padics/all__sagemath_categories.py create mode 100644 src/sage/rings/padics/all__sagemath_flint.py create mode 100644 src/sage/rings/padics/all__sagemath_ntl.py create mode 100644 src/sage/rings/padics/all__sagemath_pari.py create mode 100644 src/sage/rings/polynomial/all__sagemath_brial.py create mode 100644 src/sage/rings/polynomial/all__sagemath_categories.py create mode 100644 src/sage/rings/polynomial/all__sagemath_flint.py create mode 100644 src/sage/rings/polynomial/all__sagemath_linbox.py create mode 100644 src/sage/rings/polynomial/all__sagemath_modules.py create mode 100644 src/sage/rings/polynomial/all__sagemath_ntl.py create mode 100644 src/sage/rings/polynomial/all__sagemath_pari.py create mode 100644 src/sage/rings/polynomial/all__sagemath_singular.py create mode 100644 src/sage/rings/polynomial/all__sagemath_symbolics.py create mode 100644 src/sage/schemes/all__sagemath_categories.py create mode 100644 src/sage/schemes/all__sagemath_ntl.py create mode 100644 src/sage/schemes/all__sagemath_polyhedra.py create mode 100644 src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py create mode 100644 src/sage/symbolic/all__sagemath_categories.py create mode 100644 src/sage/symbolic/all__sagemath_standard_no_symbolics.py diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index a98f5284eca..fe9737e57d8 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -17,53 +17,10 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -# old-style class for associative algebras, use Parent instead -from sage.rings.ring import Algebra - -import sage.algebras.catalog as algebras +from .all__sagemath_modules import * +from .all__sagemath_combinat import * from .quatalg.all import * -from .steenrod.all import * from .fusion_rings.all import * from .lie_algebras.all import * -from .quantum_groups.all import * from .lie_conformal_algebras.all import * - -# Algebra base classes -from .free_algebra import FreeAlgebra -from .free_algebra_quotient import FreeAlgebraQuotient - -from .finite_dimensional_algebras.all import FiniteDimensionalAlgebra - -lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') - -lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') -lazy_import('sage.algebras.affine_nil_temperley_lieb', - 'AffineNilTemperleyLiebTypeA') -lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') -lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', - 'SchurTensorModule']) - -lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') - -lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') - -lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') - -lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') - -from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra -from .weyl_algebra import DifferentialWeylAlgebra - -lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') - -lazy_import('sage.algebras.rational_cherednik_algebra', - 'RationalCherednikAlgebra') - -lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') - -lazy_import('sage.algebras.q_system', 'QSystem') - -lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') - -lazy_import('sage.algebras.yangian', 'Yangian') diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py new file mode 100644 index 00000000000..23e1bd4217b --- /dev/null +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -0,0 +1,35 @@ +from sage.misc.lazy_import import lazy_import + + +# Algebra base classes +lazy_import('sage.algebras.free_algebra', 'FreeAlgebra') +lazy_import('sage.algebras.free_algebra_quotient', 'FreeAlgebraQuotient') + +from .steenrod.all import * +from .quantum_groups.all import * + +lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') +lazy_import('sage.algebras.affine_nil_temperley_lieb', + 'AffineNilTemperleyLiebTypeA') +lazy_import('sage.algebras.nil_coxeter_algebra', 'NilCoxeterAlgebra') +lazy_import('sage.algebras.schur_algebra', ['SchurAlgebra', + 'SchurTensorModule']) + +lazy_import('sage.algebras.hall_algebra', 'HallAlgebra') + +lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra') + +lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra') + +lazy_import('sage.algebras.commutative_dga', 'GradedCommutativeAlgebra') + +lazy_import('sage.algebras.rational_cherednik_algebra', + 'RationalCherednikAlgebra') + +lazy_import('sage.algebras.tensor_algebra', 'TensorAlgebra') + +lazy_import('sage.algebras.q_system', 'QSystem') + +lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') + +lazy_import('sage.algebras.yangian', 'Yangian') diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py new file mode 100644 index 00000000000..d52f918d1a1 --- /dev/null +++ b/src/sage/algebras/all__sagemath_modules.py @@ -0,0 +1,11 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') + +from .algebra import Algebra +from .finite_dimensional_algebras.all import FiniteDimensionalAlgebra +from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra +from .weyl_algebra import DifferentialWeylAlgebra +lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') + +import sage.algebras.catalog as algebras diff --git a/src/sage/algebras/all__sagemath_singular.py b/src/sage/algebras/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/algebras/lie_algebras/all__sagemath_modules.py b/src/sage/algebras/lie_algebras/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/algebras/steenrod/all.py b/src/sage/algebras/steenrod/all.py index 134b2b032cf..387a88ec6e1 100644 --- a/src/sage/algebras/steenrod/all.py +++ b/src/sage/algebras/steenrod/all.py @@ -1,8 +1,8 @@ """ The Steenrod algebra """ -from .steenrod_algebra import SteenrodAlgebra, Sq from sage.misc.lazy_import import lazy_import +lazy_import('sage.algebras.steenrod.steenrod_algebra', ['SteenrodAlgebra', 'Sq']) lazy_import('sage.algebras.steenrod.steenrod_algebra_bases', 'steenrod_algebra_basis', deprecation=(32647, 'removed from namespace')) diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index 38e44245ad3..ccd64831912 100644 --- a/src/sage/arith/all__sagemath_objects.py +++ b/src/sage/arith/all__sagemath_objects.py @@ -1,2 +1,4 @@ # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package + +from sage.arith.power import generic_power as power diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index c83a97f6eb4..7f77f5c8dd3 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,21 +1,11 @@ +from .all__sagemath_modules import * + +from sage.misc.lazy_import import lazy_import from .calculus import maxima as maxima_calculus from .calculus import (laplace, inverse_laplace, limit, lim) -from .integration import numerical_integral, monte_carlo_integral -integral_numerical = numerical_integral - -from .interpolation import spline, Spline - -from .functional import (diff, derivative, - expand, - taylor, simplify) - -from .functions import (wronskian, jacobian) - -from .ode import ode_solver, ode_system - from .desolvers import (desolve, desolve_laplace, desolve_system, eulers_method, eulers_method_2x2, eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, @@ -23,15 +13,8 @@ from .var import (var, function, clear_vars) -from .transforms.all import * - -# We lazy_import the following modules since they import numpy which slows down sage startup -from sage.misc.lazy_import import lazy_import -lazy_import("sage.calculus.riemann", ["Riemann_Map"]) -lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) - -from sage.modules.free_module_element import vector -from sage.matrix.constructor import matrix +lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) +lazy_import('sage.matrix.constructor', 'matrix') def symbolic_expression(x): @@ -68,6 +51,7 @@ def symbolic_expression(x): Note that equations exist in the symbolic ring:: + sage: # needs sage.schemes sage: E = EllipticCurve('15a'); E Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field sage: symbolic_expression(E) @@ -188,21 +172,20 @@ def symbolic_expression(x): TypeError: unable to convert to a symbolic expression """ + from sage.structure.element import is_Matrix from sage.symbolic.expression import Expression from sage.symbolic.ring import SR - from sage.modules.free_module_element import is_FreeModuleElement - from sage.structure.element import is_Matrix if isinstance(x, Expression): return x elif hasattr(x, '_symbolic_'): return x._symbolic_(SR) - elif isinstance(x, (tuple, list)) or is_FreeModuleElement(x): + elif isinstance(x, (tuple, list, FreeModuleElement)): expressions = [symbolic_expression(item) for item in x] if not expressions: # Make sure it is symbolic also when length is 0 return vector(SR, 0) - if is_FreeModuleElement(expressions[0]): + if isinstance(expressions[0], FreeModuleElement): return matrix(expressions) return vector(expressions) elif is_Matrix(x): diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py new file mode 100644 index 00000000000..63e6cb18214 --- /dev/null +++ b/src/sage/calculus/all__sagemath_categories.py @@ -0,0 +1 @@ +from .functional import diff, derivative, expand, simplify, taylor diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py new file mode 100644 index 00000000000..cf51c475f98 --- /dev/null +++ b/src/sage/calculus/all__sagemath_modules.py @@ -0,0 +1,17 @@ +from .all__sagemath_categories import * + +from .integration import numerical_integral, monte_carlo_integral +integral_numerical = numerical_integral + +from .interpolation import spline, Spline + +from .functions import wronskian, jacobian + +from .ode import ode_solver, ode_system + +# We lazy_import the following modules since they import numpy which slows down sage startup +from sage.misc.lazy_import import lazy_import +lazy_import("sage.calculus.riemann", ["Riemann_Map"]) +lazy_import("sage.calculus.interpolators", ["polygon_spline","complex_cubic_spline"]) + +from .transforms.all import * diff --git a/src/sage/coding/all__sagemath_gap.py b/src/sage/coding/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/coding/codecan/all__sagemath_gap.py b/src/sage/coding/codecan/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index d1f391013e2..acef92816fe 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -56,250 +56,6 @@ from sage.misc.lazy_import import lazy_import -from .combinat import (CombinatorialClass, CombinatorialObject, - MapCombinatorialClass, - bell_number, bell_polynomial, bernoulli_polynomial, - catalan_number, euler_number, - fibonacci, fibonacci_sequence, fibonacci_xrange, - lucas_number1, lucas_number2, - number_of_tuples, number_of_unordered_tuples, - polygonal_number, stirling_number1, stirling_number2, - tuples, unordered_tuples) - -lazy_import('sage.combinat.combinat', - ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', - 'FilteredCombinatorialClass'), - deprecation=(31545, 'this class is deprecated, do not use')) - - -from .expnums import expnums - -from sage.combinat.chas.all import * -from sage.combinat.crystals.all import * -from .rigged_configurations.all import * - -from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover - -# block designs, etc -from sage.combinat.designs.all import * - -# Free modules and friends -from .free_module import CombinatorialFreeModule -from .debruijn_sequence import DeBruijnSequences - -from .schubert_polynomial import SchubertPolynomialRing -lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') -from .symmetric_group_algebra import SymmetricGroupAlgebra, HeckeAlgebraSymmetricGroupT -from .symmetric_group_representations import SymmetricGroupRepresentation, SymmetricGroupRepresentations -from .yang_baxter_graph import YangBaxterGraph - -# Permutations -from .permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition -from .affine_permutation import AffinePermutationGroup -lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', - 'SignedPermutation', - 'SignedPermutations']) -from .derangements import Derangements -lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) - -# RSK -from .rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules - -# HillmanGrassl -lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) - -# PerfectMatchings -from .perfect_matching import PerfectMatching, PerfectMatchings - -# Integer lists -from .integer_lists import IntegerListsLex - -# Compositions -from .composition import Composition, Compositions -from .composition_signed import SignedCompositions - -# Partitions -from .partition import (Partition, Partitions, PartitionsInBox, - OrderedPartitions, PartitionsGreatestLE, - PartitionsGreatestEQ, number_of_partitions) - -lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) -lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) -lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) - -# Partition algebra -from .partition_algebra import SetPartitionsAk, SetPartitionsPk, SetPartitionsTk, SetPartitionsIk, SetPartitionsBk, SetPartitionsSk, SetPartitionsRk, SetPartitionsPRk - -# Raising operators -lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') - -# Diagram algebra -from .diagram_algebras import PartitionAlgebra, BrauerAlgebra, TemperleyLiebAlgebra, PlanarAlgebra, PropagatingIdeal - -# Descent algebra -lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') - -# Vector Partitions -lazy_import('sage.combinat.vector_partition', - ['VectorPartition', 'VectorPartitions']) - -# Similarity class types -from .similarity_class_type import PrimarySimilarityClassType, PrimarySimilarityClassTypes, SimilarityClassType, SimilarityClassTypes - -# Cores -from .core import Core, Cores - -# Tableaux -lazy_import('sage.combinat.tableau', - ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", - "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) -from .skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux -from .ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux -from .ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux -from .composition_tableau import CompositionTableau, CompositionTableaux - -lazy_import('sage.combinat.tableau_tuple', - ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', - 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) -from .k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux -lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', - 'LittlewoodRichardsonTableaux']) -lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', - 'ShiftedPrimedTableau']) - -# SuperTableaux -lazy_import('sage.combinat.super_tableau', - ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) - -# Words -from .words.all import * - -lazy_import('sage.combinat.subword', 'Subwords') - -from .graph_path import GraphPaths - -# Tuples -from .tuple import Tuples, UnorderedTuples - -# Alternating sign matrices -lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', - 'AlternatingSignMatrices', - 'MonotoneTriangles', - 'ContreTableaux', - 'TruncatedStaircases')) - -# Decorated Permutations -lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', - 'DecoratedPermutations')) - -# Plane Partitions -lazy_import('sage.combinat.plane_partition', ('PlanePartition', - 'PlanePartitions')) - -# Parking Functions -lazy_import('sage.combinat.non_decreasing_parking_function', - ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) -lazy_import('sage.combinat.parking_functions', - ['ParkingFunctions', 'ParkingFunction']) - -# Trees and Tamari interval posets -from .ordered_tree import (OrderedTree, OrderedTrees, - LabelledOrderedTree, LabelledOrderedTrees) -from .binary_tree import (BinaryTree, BinaryTrees, - LabelledBinaryTree, LabelledBinaryTrees) -lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) -lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', - 'LabelledRootedTree', 'LabelledRootedTrees')) - -from .combination import Combinations - -from .set_partition import SetPartition, SetPartitions -from .set_partition_ordered import OrderedSetPartition, OrderedSetPartitions -lazy_import('sage.combinat.multiset_partition_into_sets_ordered', - ['OrderedMultisetPartitionIntoSets', - 'OrderedMultisetPartitionsIntoSets']) -from .subset import Subsets, subsets, powerset, uniq -from .necklace import Necklaces -lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) -lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) -from .sloane_functions import sloane -lazy_import('sage.combinat.superpartition', ('SuperPartition', - 'SuperPartitions')) - -lazy_import('sage.combinat.parallelogram_polyomino', - ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) - -from .root_system.all import * -from .sf.all import * -from .ncsf_qsym.all import * -from .ncsym.all import * -lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') -from .matrices.all import * -# Posets -from .posets.all import * - -# Cluster Algebras and Quivers -from .cluster_algebra_quiver.all import * - -from . import ranker - -from .integer_vector import IntegerVectors -from .integer_vector_weighted import WeightedIntegerVectors -from .integer_vectors_mod_permgroup import IntegerVectorsModPermutationGroup - -lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) - -from .species.all import * - -lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') - -lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') - -lazy_import('sage.combinat.cyclic_sieving_phenomenon', - ['CyclicSievingPolynomial', 'CyclicSievingCheck']) - -lazy_import('sage.combinat.sidon_sets', 'sidon_sets') - -# Puzzles -lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') - -# Gelfand-Tsetlin patterns -lazy_import('sage.combinat.gelfand_tsetlin_patterns', - ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) - -# Finite State Machines (Automaton, Transducer) -lazy_import('sage.combinat.finite_state_machine', - ['Automaton', 'Transducer', 'FiniteStateMachine']) -lazy_import('sage.combinat.finite_state_machine_generators', - ['automata', 'transducers']) - -# Sequences -lazy_import('sage.combinat.binary_recurrence_sequences', - 'BinaryRecurrenceSequence') -lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') -lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') - -# Six Vertex Model -lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') - -# sine-Gordon Y-systems -lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') - -# Fully Packed Loop -lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) - -# Subword complex and cluster complex -lazy_import('sage.combinat.subword_complex', 'SubwordComplex') -lazy_import("sage.combinat.cluster_complex", "ClusterComplex") - -# Constellations -lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) - -# Growth diagrams -lazy_import('sage.combinat.growth', 'GrowthDiagram') - -# Path Tableaux -lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') - -# Bijectionist -lazy_import('sage.combinat.bijectionist', 'Bijectionist') +from .all__sagemath_combinat import * +from .all__sagemath_modules import * +from .all__sagemath_graphs import * diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py new file mode 100644 index 00000000000..f259743f620 --- /dev/null +++ b/src/sage/combinat/all__sagemath_categories.py @@ -0,0 +1,29 @@ +# Integer lists +from .matrices.all__sagemath_categories import * + +from .integer_lists import IntegerListsLex +from .integer_vector import IntegerVectors + +from .combinat import (CombinatorialClass, CombinatorialObject, + MapCombinatorialClass, + bell_number, bell_polynomial, bernoulli_polynomial, + catalan_number, euler_number, + fibonacci, fibonacci_sequence, fibonacci_xrange, + lucas_number1, lucas_number2, + number_of_tuples, number_of_unordered_tuples, + polygonal_number, stirling_number1, stirling_number2, + tuples, unordered_tuples) + +lazy_import('sage.combinat.combinat', + ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', + 'FilteredCombinatorialClass'), + deprecation=(31545, 'this class is deprecated, do not use')) + +from .combination import Combinations +from .composition import Composition, Compositions +from .permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition +from .subset import Subsets, subsets, powerset, uniq +from .tuple import Tuples, UnorderedTuples + + +from .dlx import DLXMatrix, AllExactCovers, OneExactCover diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py new file mode 100644 index 00000000000..9e06eeb0c08 --- /dev/null +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -0,0 +1,197 @@ +from .all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +from .expnums import expnums + +from sage.combinat.chas.all import * +from sage.combinat.crystals.all import * +from .rigged_configurations.all import * + +# Free modules and friends +from .debruijn_sequence import DeBruijnSequences + +lazy_import('sage.combinat.schubert_polynomial', 'SchubertPolynomialRing') +lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') +lazy_import('sage.combinat.symmetric_group_algebra', ['SymmetricGroupAlgebra', 'HeckeAlgebraSymmetricGroupT']) +lazy_import('sage.combinat.symmetric_group_representations', ['SymmetricGroupRepresentation', 'SymmetricGroupRepresentations']) + +# Permutations +lazy_import('sage.combinat.affine_permutation', 'AffinePermutationGroup') +lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', + 'SignedPermutation', + 'SignedPermutations']) +from .derangements import Derangements +lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) + +# RSK +from .rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules + +# HillmanGrassl +lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) + +# PerfectMatchings +from .perfect_matching import PerfectMatching, PerfectMatchings + +# Compositions +from .composition_signed import SignedCompositions + +# Partitions +from .partition import (Partition, Partitions, PartitionsInBox, + OrderedPartitions, PartitionsGreatestLE, + PartitionsGreatestEQ, number_of_partitions) + +lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) +lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) +lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) + +# Partition algebra +lazy_import('sage.combinat.partition_algebra', ['SetPartitionsAk', 'SetPartitionsPk', 'SetPartitionsTk', + 'SetPartitionsIk', 'SetPartitionsBk', 'SetPartitionsSk', + 'SetPartitionsRk', 'SetPartitionsPRk']) + +# Raising operators +lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') + +# Diagram algebra +lazy_import('sage.combinat.diagram_algebras', ['PartitionAlgebra', 'BrauerAlgebra', 'TemperleyLiebAlgebra', + 'PlanarAlgebra', 'PropagatingIdeal']) + +# Descent algebra +lazy_import('sage.combinat.descent_algebra', 'DescentAlgebra') + +# Vector Partitions +lazy_import('sage.combinat.vector_partition', + ['VectorPartition', 'VectorPartitions']) + +# Similarity class types +lazy_import('sage.combinat.similarity_class_type', ['PrimarySimilarityClassType', 'PrimarySimilarityClassTypes', + 'SimilarityClassType', 'SimilarityClassTypes']) + +# Cores +from .core import Core, Cores + +# Tableaux +lazy_import('sage.combinat.tableau', + ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", + "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) +from .skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux +from .ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux +from .ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux +from .composition_tableau import CompositionTableau, CompositionTableaux + +lazy_import('sage.combinat.tableau_tuple', + ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', + 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) +from .k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux +lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', + 'LittlewoodRichardsonTableaux']) +lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', + 'ShiftedPrimedTableau']) + +# SuperTableaux +lazy_import('sage.combinat.super_tableau', + ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) + +# Words +from .words.all import * + +lazy_import('sage.combinat.subword', 'Subwords') + +# Alternating sign matrices +lazy_import('sage.combinat.alternating_sign_matrix', ('AlternatingSignMatrix', + 'AlternatingSignMatrices', + 'MonotoneTriangles', + 'ContreTableaux', + 'TruncatedStaircases')) + +# Decorated Permutations +lazy_import('sage.combinat.decorated_permutation', ('DecoratedPermutation', + 'DecoratedPermutations')) + +# Plane Partitions +lazy_import('sage.combinat.plane_partition', ('PlanePartition', + 'PlanePartitions')) + +# Parking Functions +lazy_import('sage.combinat.non_decreasing_parking_function', + ['NonDecreasingParkingFunctions', 'NonDecreasingParkingFunction']) +lazy_import('sage.combinat.parking_functions', + ['ParkingFunctions', 'ParkingFunction']) + +from .set_partition import SetPartition, SetPartitions +from .set_partition_ordered import OrderedSetPartition, OrderedSetPartitions +lazy_import('sage.combinat.multiset_partition_into_sets_ordered', + ['OrderedMultisetPartitionIntoSets', + 'OrderedMultisetPartitionsIntoSets']) +from .necklace import Necklaces +lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) +lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) +from .sloane_functions import sloane +lazy_import('sage.combinat.superpartition', ('SuperPartition', + 'SuperPartitions')) + +lazy_import('sage.combinat.parallelogram_polyomino', + ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) + +from .sf.all import * +from .ncsf_qsym.all import * +from .ncsym.all import * +lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') +from .matrices.all import * + +lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors') +lazy_import('sage.combinat.integer_vectors_mod_permgroup', 'IntegerVectorsModPermutationGroup') + +lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial']) + +from .species.all import * + +lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') + +lazy_import('sage.combinat.degree_sequences', 'DegreeSequences') + +lazy_import('sage.combinat.cyclic_sieving_phenomenon', + ['CyclicSievingPolynomial', 'CyclicSievingCheck']) + +lazy_import('sage.combinat.sidon_sets', 'sidon_sets') + +# Puzzles +lazy_import('sage.combinat.knutson_tao_puzzles', 'KnutsonTaoPuzzleSolver') + +# Gelfand-Tsetlin patterns +lazy_import('sage.combinat.gelfand_tsetlin_patterns', + ['GelfandTsetlinPattern', 'GelfandTsetlinPatterns']) + +# Sequences +lazy_import('sage.combinat.binary_recurrence_sequences', + 'BinaryRecurrenceSequence') +lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') +lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') + + + +# Six Vertex Model +lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') + +# sine-Gordon Y-systems +lazy_import('sage.combinat.sine_gordon', 'SineGordonYsystem') + +# Fully Packed Loop +lazy_import('sage.combinat.fully_packed_loop', ['FullyPackedLoop', 'FullyPackedLoops']) + +# Subword complex and cluster complex +lazy_import('sage.combinat.subword_complex', 'SubwordComplex') +lazy_import("sage.combinat.cluster_complex", "ClusterComplex") + +# Constellations +lazy_import('sage.combinat.constellation', ['Constellation', 'Constellations']) + +# Growth diagrams +lazy_import('sage.combinat.growth', 'GrowthDiagram') + +# Path Tableaux +lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') + +# Bijectionist +lazy_import('sage.combinat.bijectionist', 'Bijectionist') diff --git a/src/sage/combinat/all__sagemath_flint.py b/src/sage/combinat/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all__sagemath_gap.py b/src/sage/combinat/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py new file mode 100644 index 00000000000..2c022af4663 --- /dev/null +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -0,0 +1,31 @@ +from .all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Posets +from .posets.all import * + +# Trees and Tamari interval posets +from .ordered_tree import (OrderedTree, OrderedTrees, + LabelledOrderedTree, LabelledOrderedTrees) +from .binary_tree import (BinaryTree, BinaryTrees, + LabelledBinaryTree, LabelledBinaryTrees) +lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', + 'LabelledRootedTree', 'LabelledRootedTrees')) +lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) + +from .graph_path import GraphPaths + +from .yang_baxter_graph import YangBaxterGraph + +# block designs, etc +from sage.combinat.designs.all import * + +# Cluster Algebras and Quivers +from .cluster_algebra_quiver.all import * + +# Finite State Machines (Automaton, Transducer) +lazy_import('sage.combinat.finite_state_machine', + ['Automaton', 'Transducer', 'FiniteStateMachine']) +lazy_import('sage.combinat.finite_state_machine_generators', + ['automata', 'transducers']) diff --git a/src/sage/combinat/all__sagemath_modules.py b/src/sage/combinat/all__sagemath_modules.py new file mode 100644 index 00000000000..540552d4473 --- /dev/null +++ b/src/sage/combinat/all__sagemath_modules.py @@ -0,0 +1,6 @@ +from .all__sagemath_categories import * + +from .free_module import CombinatorialFreeModule +from . import ranker + +from .root_system.all import * diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index 0f6adbb5355..45f3d0018f7 100644 --- a/src/sage/combinat/matrices/all.py +++ b/src/sage/combinat/matrices/all.py @@ -10,10 +10,14 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from .all__sagemath_categories import * + from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.matrices.latin', ['LatinSquare', 'LatinSquare_generator']) -lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') lazy_import('sage.combinat.matrices.hadamard_matrix', ['hadamard_matrix', 'hadamard_matrix_www']) + +del install_doc +del lazy_import diff --git a/src/sage/combinat/matrices/all__sagemath_categories.py b/src/sage/combinat/matrices/all__sagemath_categories.py new file mode 100644 index 00000000000..a27a2bb4ecb --- /dev/null +++ b/src/sage/combinat/matrices/all__sagemath_categories.py @@ -0,0 +1,3 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') diff --git a/src/sage/combinat/ncsf_qsym/all.py b/src/sage/combinat/ncsf_qsym/all.py index db6cb1f065e..4d09a08bbe9 100644 --- a/src/sage/combinat/ncsf_qsym/all.py +++ b/src/sage/combinat/ncsf_qsym/all.py @@ -12,5 +12,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from .qsym import QuasiSymmetricFunctions -from .ncsf import NonCommutativeSymmetricFunctions +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsf_qsym.qsym', 'QuasiSymmetricFunctions') +lazy_import('sage.combinat.ncsf_qsym.ncsf', 'NonCommutativeSymmetricFunctions') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/ncsym/all.py b/src/sage/combinat/ncsym/all.py index 7a174e45ccf..864a6ac6960 100644 --- a/src/sage/combinat/ncsym/all.py +++ b/src/sage/combinat/ncsym/all.py @@ -11,5 +11,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from .ncsym import SymmetricFunctionsNonCommutingVariables -from .dual import SymmetricFunctionsNonCommutingVariablesDual +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsym.ncsym', 'SymmetricFunctionsNonCommutingVariables') +lazy_import('sage.combinat.ncsym.dual', 'SymmetricFunctionsNonCommutingVariablesDual') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/posets/all__sagemath_flint.py b/src/sage/combinat/posets/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 263a4d916d2..95500f05cc6 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -122,9 +122,9 @@ from sage.misc.lazy_import import lazy_import from .cartan_type import CartanType -from .dynkin_diagram import DynkinDiagram -from .cartan_matrix import CartanMatrix -from .coxeter_matrix import CoxeterMatrix +lazy_import('sage.combinat.root_system.dynkin_diagram', 'DynkinDiagram') +lazy_import('sage.combinat.root_system.cartan_matrix', 'CartanMatrix') +lazy_import('sage.combinat.root_system.coxeter_matrix', 'CoxeterMatrix') from .coxeter_type import CoxeterType from .root_system import RootSystem, WeylDim lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup', diff --git a/src/sage/combinat/root_system/all__sagemath_gap.py b/src/sage/combinat/root_system/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/combinat/words/all.py b/src/sage/combinat/words/all.py index 687b572c8e5..db32945a0f6 100644 --- a/src/sage/combinat/words/all.py +++ b/src/sage/combinat/words/all.py @@ -43,11 +43,16 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.misc.lazy_import import lazy_import + from .alphabet import Alphabet, build_alphabet from .morphism import WordMorphism -from .paths import WordPaths +lazy_import('sage.combinat.words.paths', 'WordPaths') from .word import Word from .word_options import WordOptions from .word_generators import words from .words import Words, FiniteWords, InfiniteWords from .lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords + +del install_doc +del lazy_import diff --git a/src/sage/data_structures/all.py b/src/sage/data_structures/all.py index eac1b4b8931..ae1d0ab8b43 100644 --- a/src/sage/data_structures/all.py +++ b/src/sage/data_structures/all.py @@ -1,2 +1 @@ - -from sage.data_structures.bitset import Bitset, FrozenBitset +from .all__sagemath_categories import * diff --git a/src/sage/data_structures/all__sagemath_categories.py b/src/sage/data_structures/all__sagemath_categories.py new file mode 100644 index 00000000000..6140cf5b919 --- /dev/null +++ b/src/sage/data_structures/all__sagemath_categories.py @@ -0,0 +1 @@ +from .bitset import Bitset, FrozenBitset diff --git a/src/sage/data_structures/all__sagemath_combinat.py b/src/sage/data_structures/all__sagemath_combinat.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/data_structures/all__sagemath_flint.py b/src/sage/data_structures/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/databases/all__sagemath_graphs.py b/src/sage/databases/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index e5c553a3d54..1dbd9579e30 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -20,10 +20,15 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from .all__sagemath_schemes import * + +try: + from .all__sagemath_symbolics import * +except ImportError: + pass + from sage.misc.lazy_import import lazy_import -from sage.dynamics.arithmetic_dynamics.all import * -from sage.dynamics.complex_dynamics.all import * from sage.dynamics.cellular_automata.all import * # Discrete dynamical systems diff --git a/src/sage/dynamics/all__sagemath_schemes.py b/src/sage/dynamics/all__sagemath_schemes.py new file mode 100644 index 00000000000..b1eac4ead2f --- /dev/null +++ b/src/sage/dynamics/all__sagemath_schemes.py @@ -0,0 +1 @@ +from sage.dynamics.arithmetic_dynamics.all import * diff --git a/src/sage/dynamics/all__sagemath_symbolics.py b/src/sage/dynamics/all__sagemath_symbolics.py new file mode 100644 index 00000000000..cd94b937f2f --- /dev/null +++ b/src/sage/dynamics/all__sagemath_symbolics.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.dynamics.complex_dynamics.mandel_julia', + ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) diff --git a/src/sage/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py new file mode 100644 index 00000000000..6210c1c60cb --- /dev/null +++ b/src/sage/ext/all__sagemath_categories.py @@ -0,0 +1,2 @@ +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float diff --git a/src/sage/ext/all__sagemath_modules.py b/src/sage/ext/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext/all__sagemath_pari.py b/src/sage/ext/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext/all__sagemath_symbolics.py b/src/sage/ext/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext_data/all__sagemath_gap.py b/src/sage/ext_data/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/ext_data/all__sagemath_singular.py b/src/sage/ext_data/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/games/all.py b/src/sage/games/all.py index e3e31bcf03e..6cf915addde 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -1,2 +1,4 @@ -from .sudoku import Sudoku, sudoku -from .hexad import Minimog +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.games.sudoku', ['Sudoku', 'sudoku']) +lazy_import('sage.games.hexad', ['Minimog']) diff --git a/src/sage/geometry/all.py b/src/sage/geometry/all.py index 3b7dcf756d8..e9f5e568a15 100644 --- a/src/sage/geometry/all.py +++ b/src/sage/geometry/all.py @@ -1,19 +1,12 @@ -from .polyhedron.all import * -from .hyperbolic_space.all import * -from .polyhedral_complex import PolyhedralComplex -from sage.misc.lazy_import import lazy_import +from .all__sagemath_polyhedra import * -lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) -lazy_import('sage.geometry', 'cone_catalog', 'cones') -lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) -lazy_import('sage.geometry.fan_morphism', 'FanMorphism') -lazy_import('sage.geometry.lattice_polytope', - ['LatticePolytope', 'NefPartition', - 'ReflexivePolytope', 'ReflexivePolytopes']) -lazy_import('sage.geometry', 'lattice_polytope') -lazy_import('sage.geometry.toric_lattice', 'ToricLattice') -lazy_import('sage.geometry', 'toric_plotter') -lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') -lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') -lazy_import('sage.geometry.hyperplane_arrangement.arrangement', 'HyperplaneArrangements') -lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') +try: + from .all__sagemath_symbolics import * +except ImportError: + pass + + +try: + from .all__sagemath_gap import * +except ImportError: + pass diff --git a/src/sage/geometry/all__sagemath_categories.py b/src/sage/geometry/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/geometry/all__sagemath_gap.py b/src/sage/geometry/all__sagemath_gap.py new file mode 100644 index 00000000000..411a7c76d9a --- /dev/null +++ b/src/sage/geometry/all__sagemath_gap.py @@ -0,0 +1,4 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') diff --git a/src/sage/geometry/all__sagemath_linbox.py b/src/sage/geometry/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/geometry/all__sagemath_modules.py b/src/sage/geometry/all__sagemath_modules.py new file mode 100644 index 00000000000..9490f68a162 --- /dev/null +++ b/src/sage/geometry/all__sagemath_modules.py @@ -0,0 +1,3 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.toric_lattice', 'ToricLattice') diff --git a/src/sage/geometry/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..1bc471abd2e --- /dev/null +++ b/src/sage/geometry/all__sagemath_polyhedra.py @@ -0,0 +1,19 @@ +from .all__sagemath_modules import * + +from .polyhedron.all import * +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.polyhedral_complex', 'PolyhedralComplex') +lazy_import('sage.geometry.cone', ['Cone', 'random_cone']) +lazy_import('sage.geometry', 'cone_catalog', 'cones') +lazy_import('sage.geometry.fan', ['Fan', 'FaceFan', 'NormalFan', 'Fan2d']) +lazy_import('sage.geometry.fan_morphism', 'FanMorphism') +lazy_import('sage.geometry.lattice_polytope', + ['LatticePolytope', 'NefPartition', + 'ReflexivePolytope', 'ReflexivePolytopes']) +lazy_import('sage.geometry', 'lattice_polytope') +lazy_import('sage.geometry', 'toric_plotter') +lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') +lazy_import('sage.geometry.hyperplane_arrangement.arrangement', 'HyperplaneArrangements') +lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') +del lazy_import diff --git a/src/sage/geometry/all__sagemath_symbolics.py b/src/sage/geometry/all__sagemath_symbolics.py new file mode 100644 index 00000000000..fb2ddf22675 --- /dev/null +++ b/src/sage/geometry/all__sagemath_symbolics.py @@ -0,0 +1,7 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') + +from sage.geometry.riemannian_manifolds.all import * + +del lazy_import diff --git a/src/sage/graphs/all__sagemath_flint.py b/src/sage/graphs/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 2bb91f85f3b..98374be35ea 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -20,10 +20,5 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -#from dual_abelian_group import DualAbelianGroup -from .abelian_group import AbelianGroup, word_problem -from .values import AbelianGroupWithValues - -# TODO: -# Implement group homset, conversion of generator images to morphism -from .abelian_group_morphism import AbelianGroupMorphism +from .all__sagemath_modules import * +from .all__sagemath_gap import * diff --git a/src/sage/groups/abelian_gps/all__sagemath_gap.py b/src/sage/groups/abelian_gps/all__sagemath_gap.py new file mode 100644 index 00000000000..0088c48b234 --- /dev/null +++ b/src/sage/groups/abelian_gps/all__sagemath_gap.py @@ -0,0 +1,5 @@ + +# TODO: +# Implement group homset, conversion of generator images to morphism + +from .abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/all__sagemath_modules.py b/src/sage/groups/abelian_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..6ea25bb7085 --- /dev/null +++ b/src/sage/groups/abelian_gps/all__sagemath_modules.py @@ -0,0 +1,4 @@ + +#from dual_abelian_group import DualAbelianGroup +from .abelian_group import AbelianGroup, word_problem +from .values import AbelianGroupWithValues diff --git a/src/sage/groups/all.py b/src/sage/groups/all.py index 5fa9ccfac39..05055ce1883 100644 --- a/src/sage/groups/all.py +++ b/src/sage/groups/all.py @@ -1,37 +1,4 @@ -from sage.misc.lazy_import import lazy_import - -from .pari_group import PariGroup - -from .matrix_gps.all import * -from .abelian_gps.all import * - -from .perm_gps.all import * - -from .generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples, order_from_multiple) - -lazy_import('sage.groups.class_function', 'ClassFunction') - -from .additive_abelian.all import * - -lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) - -lazy_import('sage.groups.free_group', 'FreeGroup') -lazy_import('sage.groups.braid', 'BraidGroup') -lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') -lazy_import('sage.groups.cubic_braid', 'AssionGroupU') -lazy_import('sage.groups.cubic_braid', 'AssionGroupS') - -lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') -lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') - -lazy_import('sage.groups.artin', 'ArtinGroup') -lazy_import('sage.groups.raag', 'RightAngledArtinGroup') - -lazy_import('sage.groups', 'groups_catalog', 'groups') - -lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') - -lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) - -lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) +from .all__sagemath_modules import * +from .all__sagemath_gap import * +from .all__sagemath_pari import * +from .all__sagemath_groups import * diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py new file mode 100644 index 00000000000..82406522b6f --- /dev/null +++ b/src/sage/groups/all__sagemath_categories.py @@ -0,0 +1,10 @@ +from .all__sagemath_objects import * + +from .generic import (discrete_log, discrete_log_rho, discrete_log_lambda, + linear_relation, multiple, multiples) + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups', 'groups_catalog', 'groups') + +del lazy_import diff --git a/src/sage/groups/all__sagemath_combinat.py b/src/sage/groups/all__sagemath_combinat.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_gap.py b/src/sage/groups/all__sagemath_gap.py new file mode 100644 index 00000000000..fc243cb01df --- /dev/null +++ b/src/sage/groups/all__sagemath_gap.py @@ -0,0 +1,3 @@ + +from .perm_gps.all import * +from .abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/all__sagemath_graphs.py b/src/sage/groups/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py new file mode 100644 index 00000000000..396a558de4c --- /dev/null +++ b/src/sage/groups/all__sagemath_groups.py @@ -0,0 +1,29 @@ +from .all__sagemath_modules import * + +try: + from .all__sagemath_pari import * +except ImportError: + pass + +from .all__sagemath_gap import * + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.class_function', 'ClassFunction') + +lazy_import('sage.groups.conjugacy_classes', ['ConjugacyClass', 'ConjugacyClassGAP']) + +lazy_import('sage.groups.free_group', 'FreeGroup') +lazy_import('sage.groups.braid', 'BraidGroup') +lazy_import('sage.groups.cubic_braid', 'CubicBraidGroup') +lazy_import('sage.groups.cubic_braid', 'AssionGroupU') +lazy_import('sage.groups.cubic_braid', 'AssionGroupS') + +lazy_import('sage.groups.artin', 'ArtinGroup') +lazy_import('sage.groups.raag', 'RightAngledArtinGroup') + +lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') + +lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) + +lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py new file mode 100644 index 00000000000..17aba8aa49d --- /dev/null +++ b/src/sage/groups/all__sagemath_modules.py @@ -0,0 +1,10 @@ +from .all__sagemath_categories import * + +from .additive_abelian.all import * +from .abelian_gps.all__sagemath_modules import * +from .matrix_gps.all__sagemath_modules import * + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') +lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') diff --git a/src/sage/groups/all__sagemath_objects.py b/src/sage/groups/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/all__sagemath_pari.py b/src/sage/groups/all__sagemath_pari.py new file mode 100644 index 00000000000..97f61bbfc2c --- /dev/null +++ b/src/sage/groups/all__sagemath_pari.py @@ -0,0 +1,2 @@ + +from sage.groups.pari_group import PariGroup diff --git a/src/sage/groups/matrix_gps/all.py b/src/sage/groups/matrix_gps/all.py index c6360cd6a03..bbdf725dc5e 100644 --- a/src/sage/groups/matrix_gps/all.py +++ b/src/sage/groups/matrix_gps/all.py @@ -1,13 +1,3 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.groups.matrix_gps.linear', 'GL') -lazy_import('sage.groups.matrix_gps.linear', 'SL') -lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') -lazy_import('sage.groups.matrix_gps.unitary', 'SU') -lazy_import('sage.groups.matrix_gps.unitary', 'GU') -lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') -lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') -lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') +from .all__sagemath_modules import * import sage.groups.matrix_gps.pickling_overrides diff --git a/src/sage/groups/matrix_gps/all__sagemath_gap.py b/src/sage/groups/matrix_gps/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/matrix_gps/all__sagemath_modules.py b/src/sage/groups/matrix_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..99cdea05871 --- /dev/null +++ b/src/sage/groups/matrix_gps/all__sagemath_modules.py @@ -0,0 +1,11 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.groups.matrix_gps.linear', 'GL') +lazy_import('sage.groups.matrix_gps.linear', 'SL') +lazy_import('sage.groups.matrix_gps.symplectic', 'Sp') +lazy_import('sage.groups.matrix_gps.unitary', 'SU') +lazy_import('sage.groups.matrix_gps.unitary', 'GU') +lazy_import('sage.groups.matrix_gps.orthogonal', 'GO') +lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') +lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') diff --git a/src/sage/groups/perm_gps/all__sagemath_categories.py b/src/sage/groups/perm_gps/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/all__sagemath_graphs.py b/src/sage/groups/perm_gps/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/all__sagemath_modules.py b/src/sage/groups/perm_gps/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_graphs.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py b/src/sage/groups/perm_gps/partn_ref/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/homology/all.py b/src/sage/homology/all.py index d9306c19daa..1334936c7a3 100644 --- a/src/sage/homology/all.py +++ b/src/sage/homology/all.py @@ -1,6 +1 @@ -from .chain_complex import ChainComplex - -from .chain_complex_morphism import ChainComplexMorphism - -from sage.misc.lazy_import import lazy_import -lazy_import('sage.homology.koszul_complex', 'KoszulComplex') +from .all__sagemath_modules import * diff --git a/src/sage/homology/all__sagemath_modules.py b/src/sage/homology/all__sagemath_modules.py new file mode 100644 index 00000000000..d9306c19daa --- /dev/null +++ b/src/sage/homology/all__sagemath_modules.py @@ -0,0 +1,6 @@ +from .chain_complex import ChainComplex + +from .chain_complex_morphism import ChainComplexMorphism + +from sage.misc.lazy_import import lazy_import +lazy_import('sage.homology.koszul_complex', 'KoszulComplex') diff --git a/src/sage/interfaces/all__sagemath_categories.py b/src/sage/interfaces/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_gap.py b/src/sage/interfaces/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_libecm.py b/src/sage/interfaces/all__sagemath_libecm.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_pari.py b/src/sage/interfaces/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_plot.py b/src/sage/interfaces/all__sagemath_plot.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/interfaces/all__sagemath_symbolics.py b/src/sage/interfaces/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/lfunctions/all__sagemath_lcalc.py b/src/sage/lfunctions/all__sagemath_lcalc.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all.py b/src/sage/libs/all.py index f85115a4da2..5a446f66548 100644 --- a/src/sage/libs/all.py +++ b/src/sage/libs/all.py @@ -1,19 +1,11 @@ - -import sage.libs.ntl.all as ntl - -from sage.libs.pari.all import pari, pari_gen, PariError - -import sage.libs.symmetrica.all as symmetrica - -from sage.misc.lazy_import import lazy_import -lazy_import('sage.libs.gap.libgap', 'libgap') - -lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') -lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) -lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') -lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') -lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') - -lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') - -lazy_import('sage.libs.giac.giac', 'libgiac') +from .all__sagemath_combinat import * +from .all__sagemath_gap import * +from .all__sagemath_flint import * +from .all__sagemath_ntl import * +from .all__sagemath_pari import * +from .all__sagemath_eclib import * + +try: + from .all__sagemath_symbolics import * +except ImportError: + pass diff --git a/src/sage/libs/all__sagemath_brial.py b/src/sage/libs/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_combinat.py b/src/sage/libs/all__sagemath_combinat.py new file mode 100644 index 00000000000..49fc95742c3 --- /dev/null +++ b/src/sage/libs/all__sagemath_combinat.py @@ -0,0 +1,5 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.symmetrica', 'all', as_='symmetrica') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_eclib.py b/src/sage/libs/all__sagemath_eclib.py new file mode 100644 index 00000000000..23d7839846c --- /dev/null +++ b/src/sage/libs/all__sagemath_eclib.py @@ -0,0 +1,10 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.eclib.constructor', 'CremonaModularSymbols') +lazy_import('sage.libs.eclib.interface', ['mwrank_EllipticCurve', 'mwrank_MordellWeil']) +lazy_import('sage.libs.eclib.mwrank', 'get_precision', 'mwrank_get_precision') +lazy_import('sage.libs.eclib.mwrank', 'set_precision', 'mwrank_set_precision') +lazy_import('sage.libs.eclib.mwrank', 'initprimes', 'mwrank_initprimes') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_flint.py b/src/sage/libs/all__sagemath_flint.py new file mode 100644 index 00000000000..796eb12104d --- /dev/null +++ b/src/sage/libs/all__sagemath_flint.py @@ -0,0 +1,16 @@ + +try: + from .all__sagemath_pari import * +except ImportError: + pass + +try: + from .all__sagemath_ntl import * +except ImportError: + pass + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.flint.qsieve', 'qsieve') + +del lazy_import diff --git a/src/sage/libs/all__sagemath_gap.py b/src/sage/libs/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_giac.py b/src/sage/libs/all__sagemath_giac.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_glpk.py b/src/sage/libs/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_homfly.py b/src/sage/libs/all__sagemath_homfly.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_lcalc.py b/src/sage/libs/all__sagemath_lcalc.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_libbraiding.py b/src/sage/libs/all__sagemath_libbraiding.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_libecm.py b/src/sage/libs/all__sagemath_libecm.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_linbox.py b/src/sage/libs/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_modules.py b/src/sage/libs/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_mpmath.py b/src/sage/libs/all__sagemath_mpmath.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_ntl.py b/src/sage/libs/all__sagemath_ntl.py new file mode 100644 index 00000000000..ad98922f701 --- /dev/null +++ b/src/sage/libs/all__sagemath_ntl.py @@ -0,0 +1,2 @@ + +import sage.libs.ntl.all as ntl diff --git a/src/sage/libs/all__sagemath_pari.py b/src/sage/libs/all__sagemath_pari.py new file mode 100644 index 00000000000..3babb25ee71 --- /dev/null +++ b/src/sage/libs/all__sagemath_pari.py @@ -0,0 +1 @@ +from sage.libs.pari.all import pari, pari_gen, PariError diff --git a/src/sage/libs/all__sagemath_singular.py b/src/sage/libs/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/libs/all__sagemath_symbolics.py b/src/sage/libs/all__sagemath_symbolics.py new file mode 100644 index 00000000000..18cbb5d7ca1 --- /dev/null +++ b/src/sage/libs/all__sagemath_symbolics.py @@ -0,0 +1,3 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.giac.giac', 'libgiac') diff --git a/src/sage/libs/pari/all__sagemath_flint.py b/src/sage/libs/pari/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_flint.py b/src/sage/matrix/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_gap.py b/src/sage/matrix/all__sagemath_gap.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_linbox.py b/src/sage/matrix/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_ntl.py b/src/sage/matrix/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_singular.py b/src/sage/matrix/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/matrix/all__sagemath_symbolics.py b/src/sage/matrix/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 8aee092368c..c562b5c1e23 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,141 +1,12 @@ -from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute -from sage.misc.lazy_import import lazy_import +#from .all__sagemath_objects import * +from .all__sagemath_environment import * +from .all__sagemath_modules import * +from .all__sagemath_repl import * -from sage.misc.all__sagemath_objects import * -from sage.misc.all__sagemath_environment import * -from sage.misc.all__sagemath_repl import * +from .remote_file import get_remote_file -from sage.misc.misc import (BackslashOperator, - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) -lazy_import('sage.misc.misc', 'union', - deprecation=32096) - -from sage.misc.banner import version - -from sage.misc.dev_tools import import_statements - -from sage.misc.html import html, pretty_print_default - -from sage.misc.table import table - -from sage.misc.sage_timeit_class import timeit - -from sage.misc.edit_module import edit - -from sage.misc.map_threaded import map_threaded - -from sage.misc.session import load_session, save_session, show_identifiers - -from sage.misc.remote_file import get_remote_file - -from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator - -from sage.misc.fpickle import pickle_function, unpickle_function - -lazy_import('sage.misc.pager', 'pager') - -lazy_import('sage.misc.sagedoc', ['browse_sage_doc', - 'search_src', 'search_def', 'search_doc', - 'tutorial', 'reference', 'manual', 'developer', - 'constructions', 'help']) -lazy_import('pydoc', 'help', 'python_help') +lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) from sage.misc.classgraph import class_graph -from sage.misc.reset import reset, restore - -from sage.misc.mathml import mathml - -from sage.misc.defaults import (set_default_variable_name, - series_precision, set_series_precision) - -lazy_import("sage.misc.cython", "cython_lambda") -lazy_import("sage.misc.cython", "cython_compile", "cython") - -from sage.misc.func_persist import func_persist - -from sage.misc.functional import (additive_order, - base_ring, - base_field, - basis, - category, - charpoly, - characteristic_polynomial, - coerce, - cyclotomic_polynomial, - decomposition, - denominator, - det, - dimension, - dim, - discriminant, - disc, - eta, - fcp, - gen, - gens, - hecke_operator, - image, - integral, integrate, - integral_closure, - interval, - xinterval, - is_even, - is_odd, - kernel, - krull_dimension, - lift, - log as log_b, - minimal_polynomial, - minpoly, - multiplicative_order, - ngens, - norm, - numerator, - numerical_approx, - n, N, - objgens, - objgen, - order, - rank, - regulator, - round, - quotient, - quo, - isqrt, - squarefree_part, - sqrt, - symbolic_sum as sum, - symbolic_prod as product, - transpose) - - -from sage.misc.latex import LatexExpr, latex, view - -from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate - -from sage.misc.prandom import * - -from sage.misc.timing import walltime, cputime - -from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_global, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends - -lazy_import('sage.misc.inline_fortran', 'fortran') - -lazy_import('sage.misc.banner', 'banner', deprecation=34259) -lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) -lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) -lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) -lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) -lazy_import('sage.misc.trace', 'trace', deprecation=34259) -lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', - 'standard_packages', 'optional_packages', - 'experimental_packages', 'package_versions'), - deprecation=34259) -lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py new file mode 100644 index 00000000000..c64c3f97701 --- /dev/null +++ b/src/sage/misc/all__sagemath_categories.py @@ -0,0 +1,80 @@ + +from .all__sagemath_objects import * + +from .html import html, pretty_print_default + +from .mathml import mathml + +from .table import table + +from .map_threaded import map_threaded + +from .mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator + +from .defaults import (set_default_variable_name, + series_precision, set_series_precision) + + +from .functional import (additive_order, + base_ring, + base_field, + basis, + category, + charpoly, + characteristic_polynomial, + coerce, + cyclotomic_polynomial, + decomposition, + denominator, + det, + dimension, + dim, + discriminant, + disc, + eta, + fcp, + gen, + gens, + hecke_operator, + image, + integral, integrate, + integral_closure, + interval, + xinterval, + is_commutative, + is_even, + is_integrally_closed, + is_field, + is_odd, + kernel, + krull_dimension, + lift, + log as log_b, + minimal_polynomial, + minpoly, + multiplicative_order, + ngens, + norm, + numerator, + numerical_approx, + n, N, + objgens, + objgen, + order, + rank, + regulator, + round, + quotient, + quo, + isqrt, + squarefree_part, + sqrt, + symbolic_sum as sum, + symbolic_prod as product, + transpose) + +from .latex import LatexExpr, latex, view + +from .fpickle import pickle_function, unpickle_function + +from .persist import unpickle_global diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py new file mode 100644 index 00000000000..3b30aaeca19 --- /dev/null +++ b/src/sage/misc/all__sagemath_modules.py @@ -0,0 +1,21 @@ +# All of sage.misc.all except for development tools, session management, +# and deprecated functionality + +from .lazy_attribute import lazy_attribute, lazy_class_attribute +from .lazy_import import lazy_import + +from .all__sagemath_categories import * + +from .misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) + +from .temporary_file import tmp_dir, tmp_filename # Depends on sage.env + +from .mathml import mathml + +from .func_persist import func_persist diff --git a/src/sage/misc/all__sagemath_ntl.py b/src/sage/misc/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 30a76f38fab..b06bfeaa78a 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -33,4 +33,13 @@ from sage.misc.abstract_method import abstract_method -from sage.misc.timing import walltime, cputime +from .randstate import seed, set_random_seed, initial_seed, current_randstate + +from .prandom import * + +from .timing import walltime, cputime + +from .sage_timeit_class import timeit + +from .session import load_session, save_session, show_identifiers +from .reset import reset, restore diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index c7acba4ab07..c3216265b45 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,3 +1,43 @@ -from sage.misc.sage_eval import sage_eval, sageobj +from .all__sagemath_objects import * -from sage.misc.sage_input import sage_input +from .sage_eval import sage_eval, sageobj + +from .sage_input import sage_input + +from .banner import version + +lazy_import('sage.misc.banner', 'banner', deprecation=34259) + +lazy_import('sage.misc.sagedoc', ['browse_sage_doc', + 'search_src', 'search_def', 'search_doc', + 'tutorial', 'reference', 'manual', 'developer', + 'constructions', 'help']) + +lazy_import('pydoc', 'help', 'python_help') + +from .explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends + +lazy_import('sage.misc.trace', 'trace', deprecation=34259) + +lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) + +from .dev_tools import import_statements + +lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) + +from .edit_module import edit + +lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) + +lazy_import('sage.misc.pager', 'pager') + + +lazy_import("sage.misc.cython", "cython_lambda") +lazy_import("sage.misc.cython", "cython_compile", "cython") +lazy_import('sage.misc.inline_fortran', 'fortran') + +lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', + 'standard_packages', 'optional_packages', + 'experimental_packages', 'package_versions')) + +lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) diff --git a/src/sage/modules/all__sagemath_linbox.py b/src/sage/modules/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/modules/all__sagemath_objects.py b/src/sage/modules/all__sagemath_objects.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/modules/all__sagemath_symbolics.py b/src/sage/modules/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/monoids/all__sagemath_categories.py b/src/sage/monoids/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all.py b/src/sage/numerical/all.py index 8b69da18652..a4f65cf44b5 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -1,7 +1,7 @@ +from .all__sagemath_modules import * + from sage.misc.lazy_import import lazy_import -lazy_import("sage.numerical.optimize", - ["find_fit", "find_local_maximum", "find_local_minimum", - "find_root", "minimize", "minimize_constrained"]) + lazy_import("sage.numerical.mip", ["MixedIntegerLinearProgram"]) lazy_import("sage.numerical.sdp", ["SemidefiniteProgram"]) lazy_import("sage.numerical.backends.generic_backend", ["default_mip_solver"]) diff --git a/src/sage/numerical/all__sagemath_categories.py b/src/sage/numerical/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all__sagemath_glpk.py b/src/sage/numerical/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/all__sagemath_modules.py b/src/sage/numerical/all__sagemath_modules.py new file mode 100644 index 00000000000..b1f25aedd4f --- /dev/null +++ b/src/sage/numerical/all__sagemath_modules.py @@ -0,0 +1,4 @@ +from sage.misc.lazy_import import lazy_import +lazy_import("sage.numerical.optimize", + ["find_fit", "find_local_maximum", "find_local_minimum", + "find_root", "minimize", "minimize_constrained"]) diff --git a/src/sage/numerical/backends/all__sagemath_categories.py b/src/sage/numerical/backends/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/backends/all__sagemath_glpk.py b/src/sage/numerical/backends/all__sagemath_glpk.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 1f16e2d6789..2db3c52821d 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -34,6 +34,6 @@ from .step import plot_step_function -from .hyperbolic_arc import hyperbolic_arc -from .hyperbolic_polygon import hyperbolic_triangle, hyperbolic_polygon +lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") +lazy_import("sage.plot.hyperbolic_polygon", ["hyperbolic_triangle", "hyperbolic_polygon"]) lazy_import("sage.plot.hyperbolic_regular_polygon", "hyperbolic_regular_polygon") diff --git a/src/sage/quadratic_forms/all.py b/src/sage/quadratic_forms/all.py index 81d395f375c..fbb7f2fdccb 100644 --- a/src/sage/quadratic_forms/all.py +++ b/src/sage/quadratic_forms/all.py @@ -1,19 +1,3 @@ -from .binary_qf import BinaryQF, BinaryQF_reduced_representatives -from .bqf_class_group import BQFClassGroup - -from .ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc - -from .quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants - -from .random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, - random_ternaryqf, random_ternaryqf_with_conditions) - -from .extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number - -from .special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, - quadratic_L_function__exact, quadratic_L_function__numerical) - -from .genera.genus import Genus - -from .constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form +from .all__sagemath_modules import * +from .all__sagemath_pari import * diff --git a/src/sage/quadratic_forms/all__sagemath_modules.py b/src/sage/quadratic_forms/all__sagemath_modules.py new file mode 100644 index 00000000000..e27f1eb15a9 --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_modules.py @@ -0,0 +1,12 @@ +from .binary_qf import BinaryQF, BinaryQF_reduced_representatives + +from .ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc + +from .quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants + +from .random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, + random_ternaryqf, random_ternaryqf_with_conditions) + +from .extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number + +from .constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py new file mode 100644 index 00000000000..874de9d4f0b --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -0,0 +1,5 @@ + +from .special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, + quadratic_L_function__exact, quadratic_L_function__numerical) + +from .genera.genus import Genus diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index f7cdd32f39a..35f6838ba8a 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -12,159 +12,33 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from .all__sage_categories import * +from .all__sagemath_combinat import * +from .all__sagemath_flint import * +from .all__sagemath_modules import * -# Ring base classes -from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - PrincipalIdealDomain) - -lazy_import("sage.rings.ring", "DedekindDomain") - -# Ring element base classes -from sage.structure.element import (CommutativeAlgebraElement, - RingElement, CommutativeRingElement, IntegralDomainElement, - DedekindDomainElement, PrincipalIdealDomainElement, - EuclideanDomainElement, FieldElement) - -# Ideals -from sage.rings.ideal import Ideal -ideal = Ideal - -# Quotient -from sage.rings.quotient_ring import QuotientRing - -# Infinities -from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing - -# Rational integers. -from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis -from sage.rings.integer import Integer - -# Rational numbers -from sage.rings.rational_field import RationalField, QQ -from sage.rings.rational import Rational -Rationals = RationalField - -# Integers modulo n. -from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod -from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod -Integers = IntegerModRing +try: + from .all__sagemath_symbolics import * +except ImportError: + pass # Finite fields from sage.rings.finite_rings.all import * -# Number field -from sage.rings.number_field.all import * - # Function field from sage.rings.function_field.all import * -# Finite residue fields -from sage.rings.finite_rings.residue_field import ResidueField - -# p-adic field -from sage.rings.padics.all import * -from sage.rings.padics.padic_printing import _printer_defaults as padic_printing - -# valuations -from sage.rings.valuation.all import * - -# Semirings -from sage.rings.semirings.all import * - -# Real numbers -from sage.rings.real_mpfr import (RealField, RR, - create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. -Reals = RealField - -from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement - -from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF - -from sage.rings.real_arb import RealBallField, RBF - # Polynomial Rings and Polynomial Quotient Rings from sage.rings.polynomial.all import * - -# Algebraic numbers -from sage.rings.qqbar import (AlgebraicRealField, AA, - AlgebraicReal, - AlgebraicField, QQbar, - AlgebraicNumber, - number_field_elements_from_algebraics) -from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField, E - -# Intervals -from sage.rings.real_mpfi import (RealIntervalField, - RIF, - RealInterval) - -# Complex numbers -from sage.rings.complex_mpfr import ComplexField -from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber -Complexes = ComplexField -from sage.rings.complex_interval_field import ComplexIntervalField -from sage.rings.complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) - -from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF - -from sage.rings.complex_mpc import MPComplexField - -from sage.rings.complex_arb import ComplexBallField, CBF - -lazy_import("sage.rings.imaginary_unit", "I") - -# Power series rings -from sage.rings.power_series_ring import PowerSeriesRing - -# Laurent series ring in one variable -from sage.rings.laurent_series_ring import LaurentSeriesRing - -# Lazy Laurent series ring -lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', - 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) - -# Tate algebras -from sage.rings.tate_algebra import TateAlgebra - -# Puiseux series ring -from sage.rings.puiseux_series_ring import PuiseuxSeriesRing - -# Pseudo-ring of PARI objects. -from sage.rings.pari_ring import PariRing, Pari - -# Big-oh notation -from sage.rings.big_oh import O - -# Fraction field -from sage.rings.fraction_field import FractionField -Frac = FractionField - -# Localization -from sage.rings.localization import Localization - # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences -from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single - -from sage.rings.monomials import monomials - -from sage.rings.cc import CC -from sage.rings.cif import CIF - -# invariant theory -from sage.rings.invariants.all import * - -from sage.rings.fast_arith import prime_range - -# continued fractions -from sage.rings.continued_fraction import (continued_fraction, - continued_fraction_list) +from .fast_arith import prime_range # asymptotic ring -from sage.rings.asymptotic.all import * +#from .asymptotic.all import * +lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') +lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') # Register classes in numbers abc from sage.rings import numbers_abc diff --git a/src/sage/rings/all__sagemath_brial.py b/src/sage/rings/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index d03d1c6b483..07bde5d1f89 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,6 +1,79 @@ # Ring base classes -from sage.rings.ring import Ring +from .ring import (Ring, Field, CommutativeRing, IntegralDomain, + DedekindDomain, PrincipalIdealDomain, EuclideanDomain) + +# Ring element base classes +from sage.structure.element import (CommutativeAlgebraElement, + RingElement, CommutativeRingElement, IntegralDomainElement, + DedekindDomainElement, PrincipalIdealDomainElement, + EuclideanDomainElement, FieldElement) + +# Rational numbers +from .rational import Rational +from .rational_field import RationalField, QQ +Rationals = RationalField + +# Rational integers. +from .integer_ring import IntegerRing, ZZ, crt_basis +from .integer import Integer + +# Integers modulo n. +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod +from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod +Integers = IntegerModRing + +# Infinities +from .infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing +oo = infinity + +# Quotient +from .quotient_ring import QuotientRing + +# Localization +from .localization import Localization + +# Fraction field +from .fraction_field import FractionField +Frac = FractionField + +# Function field +from .function_field.all__sagemath_categories import * + +# Double precision floating point numbers +from .real_double import RealDoubleField, RDF, RealDoubleElement + # Ideals from sage.rings.ideal import Ideal ideal = Ideal + +# Semirings +from .semirings.all import * + +from .finite_rings.all__sagemath_categories import * +from .number_field.all__sagemath_categories import * +from .padics.all__sagemath_categories import * +from .polynomial.all__sagemath_categories import * + +# Power series rings +from .power_series_ring import PowerSeriesRing + +# Laurent series ring in one variable +from .laurent_series_ring import LaurentSeriesRing + +# Puiseux series ring +from .puiseux_series_ring import PuiseuxSeriesRing + +# Big-oh notation +from .big_oh import O + +# continued fractions +from sage.rings.continued_fraction import (continued_fraction, + continued_fraction_list) + +# Lazy reals +from .real_lazy import RealLazyField, RLF, ComplexLazyField, CLF + +# Preliminary version of real numbers for doctesting without sage.rings.real_mpfr. +# sage.rings.all redefines it. +RealNumber = RR = RDF # used by the preparser to wrap real literals diff --git a/src/sage/rings/all__sagemath_combinat.py b/src/sage/rings/all__sagemath_combinat.py new file mode 100644 index 00000000000..73acfce9257 --- /dev/null +++ b/src/sage/rings/all__sagemath_combinat.py @@ -0,0 +1,9 @@ +from .all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Lazy Laurent series ring +lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing', + 'LazySymmetricFunctions', 'LazyDirichletSeriesRing']) + +del lazy_import diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py new file mode 100644 index 00000000000..61ca5667c9e --- /dev/null +++ b/src/sage/rings/all__sagemath_flint.py @@ -0,0 +1,34 @@ + +from .all__sagemath_ntl import * + +# Real numbers +from sage.rings.real_arb import RealBallField, RBF + +from sage.rings.complex_arb import ComplexBallField, CBF + +# Number field +from .number_field.all import * + +from .monomials import monomials + +# Algebraic numbers +from .qqbar import (AlgebraicRealField, AA, + AlgebraicReal, + AlgebraicField, QQbar, + AlgebraicNumber, + number_field_elements_from_algebraics) + +# Intervals +from .real_mpfi import (RealIntervalField, + RIF, + RealInterval) + +# Complex numbers +from .complex_interval_field import ComplexIntervalField +from .complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) + +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.rings.imaginary_unit", "I") + +from .cif import CIF diff --git a/src/sage/rings/all__sagemath_gap.py b/src/sage/rings/all__sagemath_gap.py new file mode 100644 index 00000000000..82933d8cb54 --- /dev/null +++ b/src/sage/rings/all__sagemath_gap.py @@ -0,0 +1,6 @@ + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.rings.universal_cyclotomic_field', ['UniversalCyclotomicField', 'E']) + +del lazy_import diff --git a/src/sage/rings/all__sagemath_linbox.py b/src/sage/rings/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_modules.py b/src/sage/rings/all__sagemath_modules.py new file mode 100644 index 00000000000..86c622842f9 --- /dev/null +++ b/src/sage/rings/all__sagemath_modules.py @@ -0,0 +1,24 @@ +from .all__sagemath_categories import * + +from .function_field.all__sagemath_modules import * +from .polynomial.all__sagemath_modules import * + +# Real numbers +from .real_mpfr import (RealField, RR, + create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. +Reals = RealField + +# Complex numbers + +from .complex_mpfr import ComplexField +from .complex_mpfr import create_ComplexNumber as ComplexNumber +Complexes = ComplexField + +from .complex_double import ComplexDoubleField, ComplexDoubleElement, CDF + +from .cc import CC + +from .complex_mpc import MPComplexField + +# invariant theory +from .invariants.all import * diff --git a/src/sage/rings/all__sagemath_ntl.py b/src/sage/rings/all__sagemath_ntl.py new file mode 100644 index 00000000000..2e4a22cd324 --- /dev/null +++ b/src/sage/rings/all__sagemath_ntl.py @@ -0,0 +1,6 @@ + +from .all__sagemath_pari import * + +from .padics.all__sagemath_ntl import * + +from .bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single diff --git a/src/sage/rings/all__sagemath_pari.py b/src/sage/rings/all__sagemath_pari.py new file mode 100644 index 00000000000..cdb2f220cf9 --- /dev/null +++ b/src/sage/rings/all__sagemath_pari.py @@ -0,0 +1,12 @@ + +# Pseudo-ring of PARI objects. +from .pari_ring import PariRing, Pari + +# p-adic field +from .padics.all__sagemath_pari import * + +# valuations +from .valuation.all import * + +# Tate algebras +from .tate_algebra import TateAlgebra diff --git a/src/sage/rings/all__sagemath_singular.py b/src/sage/rings/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/all__sagemath_symbolics.py b/src/sage/rings/all__sagemath_symbolics.py new file mode 100644 index 00000000000..1334936c7a3 --- /dev/null +++ b/src/sage/rings/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from .all__sagemath_modules import * diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 5d3d3f21c73..5e7e652e861 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -18,6 +18,4 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .finite_field_constructor import FiniteField -from .conway_polynomials import conway_polynomial, exists_conway_polynomial -GF = FiniteField +from .all__sagemath_categories import * diff --git a/src/sage/rings/finite_rings/all__sagemath_categories.py b/src/sage/rings/finite_rings/all__sagemath_categories.py new file mode 100644 index 00000000000..00710ed2fe7 --- /dev/null +++ b/src/sage/rings/finite_rings/all__sagemath_categories.py @@ -0,0 +1,8 @@ +from .finite_field_constructor import FiniteField + +GF = FiniteField + +from .conway_polynomials import conway_polynomial, exists_conway_polynomial + +# Finite residue fields +from .residue_field import ResidueField diff --git a/src/sage/rings/finite_rings/all__sagemath_linbox.py b/src/sage/rings/finite_rings/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_modules.py b/src/sage/rings/finite_rings/all__sagemath_modules.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_ntl.py b/src/sage/rings/finite_rings/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/finite_rings/all__sagemath_pari.py b/src/sage/rings/finite_rings/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 455fa9fe19e..8922ed8d173 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,4 +1,9 @@ -from .constructor import FunctionField +from .all__sagemath_modules import * + +try: + from .all__sagemath_symbolics import * +except ImportError: + pass from sage.misc.lazy_import import lazy_import diff --git a/src/sage/rings/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py new file mode 100644 index 00000000000..b6bba3369c3 --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_categories.py @@ -0,0 +1 @@ +from .constructor import FunctionField diff --git a/src/sage/rings/function_field/all__sagemath_modules.py b/src/sage/rings/function_field/all__sagemath_modules.py new file mode 100644 index 00000000000..ae1d0ab8b43 --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_modules.py @@ -0,0 +1 @@ +from .all__sagemath_categories import * diff --git a/src/sage/rings/function_field/all__sagemath_pari.py b/src/sage/rings/function_field/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all__sagemath_singular.py b/src/sage/rings/function_field/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/all__sagemath_symbolics.py b/src/sage/rings/function_field/all__sagemath_symbolics.py new file mode 100644 index 00000000000..1334936c7a3 --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from .all__sagemath_modules import * diff --git a/src/sage/rings/number_field/all__sagemath_categories.py b/src/sage/rings/number_field/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/number_field/all__sagemath_flint.py b/src/sage/rings/number_field/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/number_field/all__sagemath_pari.py b/src/sage/rings/number_field/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/padics/all.py b/src/sage/rings/padics/all.py index 7014f5622d8..016d922fd8a 100644 --- a/src/sage/rings/padics/all.py +++ b/src/sage/rings/padics/all.py @@ -1,6 +1,2 @@ -from .factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER -from .factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER -from .factory import pAdicExtension -from .padic_generic import local_print_mode -from .pow_computer import PowComputer -from .pow_computer_ext import PowComputer_ext_maker + +from .all__sagemath_flint import * diff --git a/src/sage/rings/padics/all__sagemath_categories.py b/src/sage/rings/padics/all__sagemath_categories.py new file mode 100644 index 00000000000..c4e36e9c28b --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_categories.py @@ -0,0 +1 @@ +from .padic_generic import local_print_mode diff --git a/src/sage/rings/padics/all__sagemath_flint.py b/src/sage/rings/padics/all__sagemath_flint.py new file mode 100644 index 00000000000..d91f726d26f --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_flint.py @@ -0,0 +1,2 @@ + +from .all__sagemath_ntl import * diff --git a/src/sage/rings/padics/all__sagemath_ntl.py b/src/sage/rings/padics/all__sagemath_ntl.py new file mode 100644 index 00000000000..de062b61275 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_ntl.py @@ -0,0 +1,4 @@ + +from .all__sagemath_pari import * + +from .pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/padics/all__sagemath_pari.py b/src/sage/rings/padics/all__sagemath_pari.py new file mode 100644 index 00000000000..4833e7a7e99 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_pari.py @@ -0,0 +1,10 @@ + +from .all__sagemath_categories import * + +from .factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER +from .factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER +from .factory import pAdicExtension + +from .padic_printing import _printer_defaults as padic_printing + +from .pow_computer import PowComputer diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 853f422bdc7..36311c7c0b7 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -18,18 +18,8 @@ from sage.misc.lazy_import import lazy_import -# Quotient of polynomial ring -from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing -from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement - -# Univariate Polynomial Rings -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_ring import polygen, polygens -from sage.rings.polynomial.polynomial_element import Polynomial - -# Multivariate Polynomial Rings -from sage.rings.polynomial.term_order import TermOrder -from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function +from .all__sagemath_categories import * +from .all__sagemath_modules import * # Generic convolution from sage.rings.polynomial.convolution import convolution @@ -38,19 +28,8 @@ from sage.rings.polynomial.polynomial_ring_constructor import BooleanPolynomialRing_constructor as BooleanPolynomialRing # Laurent Polynomial Rings -from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing lazy_import('sage.rings.polynomial.omega', 'MacMahonOmega') -# Infinite Polynomial Rings -from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing - -# Ore Polynomial Rings -lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') -SkewPolynomialRing = OrePolynomialRing - -# Evaluation of cyclotomic polynomials -from sage.rings.polynomial.cyclotomic import cyclotomic_value - # Integer-valued Univariate Polynomial Ring lazy_import('sage.rings.polynomial.integer_valued_polynomials', 'IntegerValuedPolynomialRing') diff --git a/src/sage/rings/polynomial/all__sagemath_brial.py b/src/sage/rings/polynomial/all__sagemath_brial.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_categories.py b/src/sage/rings/polynomial/all__sagemath_categories.py new file mode 100644 index 00000000000..2b79da92a4c --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_categories.py @@ -0,0 +1,21 @@ +# Quotient of polynomial ring +from sage.rings.polynomial.polynomial_quotient_ring import PolynomialQuotientRing +from sage.rings.polynomial.polynomial_quotient_ring_element import PolynomialQuotientRingElement + +# Univariate Polynomial Rings +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.polynomial.polynomial_ring import polygen, polygens +from sage.rings.polynomial.polynomial_element import Polynomial + +# Multivariate Polynomial Rings +from sage.rings.polynomial.term_order import TermOrder +from sage.rings.polynomial.multi_polynomial_element import degree_lowest_rational_function + +# Infinite Polynomial Rings +from sage.rings.polynomial.infinite_polynomial_ring import InfinitePolynomialRing + +# Laurent Polynomial Rings +from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing + +# Evaluation of cyclotomic polynomials +from sage.rings.polynomial.cyclotomic import cyclotomic_value diff --git a/src/sage/rings/polynomial/all__sagemath_flint.py b/src/sage/rings/polynomial/all__sagemath_flint.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_linbox.py b/src/sage/rings/polynomial/all__sagemath_linbox.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_modules.py b/src/sage/rings/polynomial/all__sagemath_modules.py new file mode 100644 index 00000000000..8634f2004c5 --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_modules.py @@ -0,0 +1,6 @@ + +from sage.misc.lazy_import import lazy_import + +# Ore Polynomial Rings +lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') +SkewPolynomialRing = OrePolynomialRing diff --git a/src/sage/rings/polynomial/all__sagemath_ntl.py b/src/sage/rings/polynomial/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_pari.py b/src/sage/rings/polynomial/all__sagemath_pari.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_singular.py b/src/sage/rings/polynomial/all__sagemath_singular.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/polynomial/all__sagemath_symbolics.py b/src/sage/rings/polynomial/all__sagemath_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index 23858c6f0c8..9c70d129ed3 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -20,6 +20,8 @@ # http://www.gnu.org/licenses/ #***************************************************************************** +from .all__sagemath_categories import * + from .jacobians.all import * from .hyperelliptic_curves.all import * @@ -32,16 +34,6 @@ from .plane_quartics.all import * -from .generic.all import * - -from .toric.all import * - -from .affine.all import * - -from .projective.all import * - -from .product_projective.all import * - from .cyclic_covers.all import * from .berkovich.all import * diff --git a/src/sage/schemes/all__sagemath_categories.py b/src/sage/schemes/all__sagemath_categories.py new file mode 100644 index 00000000000..49d803c968b --- /dev/null +++ b/src/sage/schemes/all__sagemath_categories.py @@ -0,0 +1,4 @@ +from .generic.all import * +from .affine.all import * +from .projective.all import * +from .product_projective.all import * diff --git a/src/sage/schemes/all__sagemath_ntl.py b/src/sage/schemes/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/schemes/all__sagemath_polyhedra.py b/src/sage/schemes/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..2e641cf8c56 --- /dev/null +++ b/src/sage/schemes/all__sagemath_polyhedra.py @@ -0,0 +1 @@ +from .toric.all import * diff --git a/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py b/src/sage/schemes/hyperelliptic_curves/all__sagemath_ntl.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 3b4c8c4ff52..253735e46d7 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,11 +1,12 @@ -import sage.stats.distributions.catalog as distributions - -from .r import ttest from .basic_stats import (mean, mode, std, variance, median, moving_average) from .hmm import all as hmm +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.stats.r", "ttest") + # We lazy_import the following modules since they import numpy which # slows down sage startup -from sage.misc.lazy_import import lazy_import + lazy_import("sage.stats.time_series", ["TimeSeries", "autoregressive_fit"]) lazy_import("sage.stats.intlist", ["IntList"]) diff --git a/src/sage/symbolic/all__sagemath_categories.py b/src/sage/symbolic/all__sagemath_categories.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/symbolic/all__sagemath_standard_no_symbolics.py b/src/sage/symbolic/all__sagemath_standard_no_symbolics.py new file mode 100644 index 00000000000..e69de29bb2d From 2a71fe1418b3b46d7a5fbb4f9d78b60b73796b1a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 7 Nov 2023 22:52:09 -0800 Subject: [PATCH 03/27] relative to absolute imports (cd src && for d in $(find sage -name __pycache__ -prune -o -type d -print); do sed -i.bak "/from *[.].*import/s/from /from $(echo $d | sed 's,/,.,g')/;s/[.] import / import /;" $d/all*.py; done) --- src/sage/algebras/all.py | 12 +- src/sage/algebras/all__sagemath_combinat.py | 4 +- src/sage/algebras/all__sagemath_modules.py | 8 +- .../finite_dimensional_algebras/all.py | 2 +- src/sage/algebras/quatalg/all.py | 2 +- src/sage/all.py | 2 +- src/sage/all__sagemath_categories.py | 2 +- src/sage/all__sagemath_repl.py | 4 +- src/sage/arith/all.py | 91 +++--------- src/sage/calculus/all.py | 12 +- src/sage/calculus/all__sagemath_categories.py | 2 +- src/sage/calculus/all__sagemath_modules.py | 12 +- src/sage/calculus/transforms/all.py | 2 +- src/sage/categories/all.py | 4 +- src/sage/categories/all__sagemath_objects.py | 7 +- src/sage/coding/source_coding/all.py | 2 +- src/sage/combinat/all.py | 8 +- src/sage/combinat/all__sagemath_categories.py | 20 +-- src/sage/combinat/all__sagemath_combinat.py | 50 +++---- src/sage/combinat/all__sagemath_graphs.py | 14 +- src/sage/combinat/all__sagemath_modules.py | 8 +- src/sage/combinat/designs/all.py | 2 +- src/sage/combinat/matrices/all.py | 2 +- src/sage/combinat/posets/all.py | 6 +- src/sage/combinat/root_system/all.py | 8 +- src/sage/combinat/words/all.py | 14 +- src/sage/data_structures/all.py | 2 +- .../all__sagemath_categories.py | 2 +- src/sage/databases/all.py | 6 +- src/sage/dynamics/all.py | 4 +- src/sage/dynamics/arithmetic_dynamics/all.py | 16 +-- src/sage/functions/all.py | 36 ++--- src/sage/geometry/all.py | 6 +- src/sage/geometry/all__sagemath_polyhedra.py | 4 +- src/sage/geometry/triangulation/all.py | 2 +- src/sage/graphs/all.py | 8 +- src/sage/groups/abelian_gps/all.py | 4 +- .../groups/abelian_gps/all__sagemath_gap.py | 2 +- .../abelian_gps/all__sagemath_modules.py | 4 +- src/sage/groups/additive_abelian/all.py | 4 +- src/sage/groups/all.py | 8 +- src/sage/groups/all__sagemath_categories.py | 4 +- src/sage/groups/all__sagemath_gap.py | 4 +- src/sage/groups/all__sagemath_groups.py | 6 +- src/sage/groups/all__sagemath_modules.py | 8 +- src/sage/groups/matrix_gps/all.py | 2 +- src/sage/groups/perm_gps/all.py | 10 +- src/sage/homology/all.py | 2 +- src/sage/homology/all__sagemath_modules.py | 4 +- src/sage/interacts/all.py | 10 +- src/sage/interfaces/all.py | 16 +-- src/sage/libs/all.py | 14 +- src/sage/libs/all__sagemath_flint.py | 4 +- src/sage/libs/eclib/all.py | 8 +- src/sage/libs/mpmath/all.py | 4 +- src/sage/libs/pari/all.py | 2 +- src/sage/libs/symmetrica/all.py | 132 +++++++++--------- src/sage/logic/all.py | 4 +- src/sage/matrix/all.py | 4 +- src/sage/misc/all.py | 10 +- src/sage/misc/all__sagemath_categories.py | 22 +-- src/sage/misc/all__sagemath_modules.py | 14 +- src/sage/misc/all__sagemath_objects.py | 12 +- src/sage/misc/all__sagemath_repl.py | 14 +- src/sage/modular/abvar/all.py | 2 +- src/sage/modular/all.py | 30 ++-- src/sage/modular/arithgroup/all.py | 18 +-- src/sage/modular/btquotients/all.py | 2 +- src/sage/modular/hecke/all.py | 18 +-- src/sage/modular/local_comp/all.py | 2 +- src/sage/modular/modform/all.py | 16 +-- src/sage/modular/modform_hecketriangle/all.py | 10 +- src/sage/modular/modsym/all.py | 12 +- src/sage/modular/overconvergent/all.py | 6 +- src/sage/modular/pollack_stevens/all.py | 6 +- src/sage/modular/quasimodform/all.py | 2 +- src/sage/modular/quatalg/all.py | 2 +- src/sage/modules/all.py | 15 +- src/sage/monoids/all.py | 8 +- src/sage/numerical/all.py | 2 +- src/sage/parallel/all.py | 2 +- src/sage/plot/all.py | 48 +++---- src/sage/plot/plot3d/all.py | 16 +-- src/sage/probability/all.py | 4 +- src/sage/quadratic_forms/all.py | 4 +- .../quadratic_forms/all__sagemath_modules.py | 12 +- .../quadratic_forms/all__sagemath_pari.py | 4 +- src/sage/quadratic_forms/genera/all.py | 2 +- src/sage/repl/ipython_kernel/all_jupyter.py | 4 +- src/sage/rings/all.py | 12 +- src/sage/rings/all__sagemath_categories.py | 43 +++--- src/sage/rings/all__sagemath_combinat.py | 2 +- src/sage/rings/all__sagemath_flint.py | 16 +-- src/sage/rings/all__sagemath_modules.py | 20 +-- src/sage/rings/all__sagemath_ntl.py | 6 +- src/sage/rings/all__sagemath_pari.py | 8 +- src/sage/rings/all__sagemath_symbolics.py | 2 +- src/sage/rings/finite_rings/all.py | 2 +- .../finite_rings/all__sagemath_categories.py | 6 +- src/sage/rings/function_field/all.py | 4 +- .../all__sagemath_categories.py | 2 +- .../function_field/all__sagemath_modules.py | 2 +- .../function_field/all__sagemath_symbolics.py | 2 +- src/sage/rings/number_field/all.py | 8 +- src/sage/rings/padics/all.py | 2 +- .../rings/padics/all__sagemath_categories.py | 2 +- src/sage/rings/padics/all__sagemath_flint.py | 2 +- src/sage/rings/padics/all__sagemath_ntl.py | 4 +- src/sage/rings/padics/all__sagemath_pari.py | 12 +- src/sage/rings/polynomial/all.py | 4 +- src/sage/rings/semirings/all.py | 4 +- src/sage/schemes/affine/all.py | 4 +- src/sage/schemes/all.py | 18 +-- src/sage/schemes/all__sagemath_categories.py | 8 +- src/sage/schemes/all__sagemath_polyhedra.py | 2 +- src/sage/schemes/berkovich/all.py | 2 +- src/sage/schemes/curves/all.py | 4 +- src/sage/schemes/cyclic_covers/all.py | 2 +- src/sage/schemes/elliptic_curves/all.py | 14 +- src/sage/schemes/generic/all.py | 4 +- src/sage/schemes/hyperelliptic_curves/all.py | 49 ++++++- src/sage/schemes/plane_conics/all.py | 2 +- src/sage/schemes/plane_quartics/all.py | 2 +- src/sage/schemes/projective/all.py | 2 +- src/sage/sets/all.py | 24 ++-- src/sage/stats/all.py | 4 +- src/sage/structure/proof/all.py | 14 +- src/sage/symbolic/all.py | 12 +- src/sage/tensor/all.py | 2 +- src/sage/topology/all.py | 8 +- 130 files changed, 643 insertions(+), 664 deletions(-) diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index fe9737e57d8..1dfc1f89f56 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -17,10 +17,10 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from .all__sagemath_modules import * -from .all__sagemath_combinat import * +from sage.algebras.all__sagemath_modules import * +from sage.algebras.all__sagemath_combinat import * -from .quatalg.all import * -from .fusion_rings.all import * -from .lie_algebras.all import * -from .lie_conformal_algebras.all import * +from sage.algebras.quatalg.all import * +from sage.algebras.fusion_rings.all import * +from sage.algebras.lie_algebras.all import * +from sage.algebras.lie_conformal_algebras.all import * diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py index 23e1bd4217b..6cbe558cbdc 100644 --- a/src/sage/algebras/all__sagemath_combinat.py +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -5,8 +5,8 @@ lazy_import('sage.algebras.free_algebra', 'FreeAlgebra') lazy_import('sage.algebras.free_algebra_quotient', 'FreeAlgebraQuotient') -from .steenrod.all import * -from .quantum_groups.all import * +from sage.algebras.steenrod.all import * +from sage.algebras.quantum_groups.all import * lazy_import('sage.algebras.iwahori_hecke_algebra', 'IwahoriHeckeAlgebra') lazy_import('sage.algebras.affine_nil_temperley_lieb', diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py index d52f918d1a1..a88d884fd6b 100644 --- a/src/sage/algebras/all__sagemath_modules.py +++ b/src/sage/algebras/all__sagemath_modules.py @@ -2,10 +2,10 @@ lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') -from .algebra import Algebra -from .finite_dimensional_algebras.all import FiniteDimensionalAlgebra -from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra -from .weyl_algebra import DifferentialWeylAlgebra +from sage.algebras.algebra import Algebra +from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra +from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra +from sage.algebras.weyl_algebra import DifferentialWeylAlgebra lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') import sage.algebras.catalog as algebras diff --git a/src/sage/algebras/finite_dimensional_algebras/all.py b/src/sage/algebras/finite_dimensional_algebras/all.py index add5ff8ecd6..acf12b5758a 100644 --- a/src/sage/algebras/finite_dimensional_algebras/all.py +++ b/src/sage/algebras/finite_dimensional_algebras/all.py @@ -1 +1 @@ -from .finite_dimensional_algebra import FiniteDimensionalAlgebra +from sage.algebras.finite_dimensional_algebras.finite_dimensional_algebra import FiniteDimensionalAlgebra diff --git a/src/sage/algebras/quatalg/all.py b/src/sage/algebras/quatalg/all.py index 0f0d45c0217..23bd4edac89 100644 --- a/src/sage/algebras/quatalg/all.py +++ b/src/sage/algebras/quatalg/all.py @@ -1 +1 @@ -from .quaternion_algebra import QuaternionAlgebra +from sage.algebras.quatalg.quaternion_algebra import QuaternionAlgebra diff --git a/src/sage/all.py b/src/sage/all.py index b1f35e3a738..2b5c83a2c37 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -59,7 +59,7 @@ ################ end setup warnings ############################### -from .all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment +from sage.all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment ################################################################### diff --git a/src/sage/all__sagemath_categories.py b/src/sage/all__sagemath_categories.py index 4f438a77cbe..872e717af00 100644 --- a/src/sage/all__sagemath_categories.py +++ b/src/sage/all__sagemath_categories.py @@ -1,4 +1,4 @@ -from .all__sagemath_objects import * +from sage.all__sagemath_objects import * from sage.categories.all import * diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index d77919bc8bd..ca3403e382c 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -97,8 +97,8 @@ r"removed from itertools in Python 3.14.") -from .all__sagemath_objects import * -from .all__sagemath_environment import * +from sage.all__sagemath_objects import * +from sage.all__sagemath_environment import * from sage.doctest.all import * from sage.repl.all import * diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index 3446336de68..f50c45993a0 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -1,76 +1,23 @@ from sage.misc.lazy_import import lazy_import -from sage.arith.misc import ( - algdep, - bernoulli, - is_prime, - is_prime_power, - is_pseudoprime, - is_pseudoprime_power, - prime_powers, - primes_first_n, - eratosthenes, - primes, - next_prime_power, - next_probable_prime, - next_prime, - previous_prime, - previous_prime_power, - random_prime, - divisors, - sigma, - gcd, - GCD, - xlcm, - xgcd, - xkcd, - inverse_mod, - get_gcd, - get_inverse_mod, - power_mod, - rational_reconstruction, - mqrr_rational_reconstruction, - trial_division, - factor, - prime_divisors, - odd_part, - prime_to_m_part, - is_square, - is_squarefree, - euler_phi, - carmichael_lambda, - crt, - CRT, - CRT_list, - CRT_basis, - CRT_vectors, - multinomial, - multinomial_coefficients, - binomial, - factorial, - kronecker_symbol, - kronecker, - legendre_symbol, - primitive_root, - nth_prime, - quadratic_residues, - moebius, - continuant, - number_of_divisors, - hilbert_symbol, - hilbert_conductor, - hilbert_conductor_inverse, - falling_factorial, - rising_factorial, - integer_ceil, - integer_floor, - two_squares, - three_squares, - four_squares, - sum_of_k_squares, - subfactorial, - is_power_of_two, - differences, +from sage.arith.misc import (algdep, bernoulli, is_prime, is_prime_power, + is_pseudoprime, is_pseudoprime_power, + prime_powers, primes_first_n, eratosthenes, primes, + next_prime_power, next_probable_prime, next_prime, + previous_prime, previous_prime_power, random_prime, + divisors, sigma, gcd, GCD, xlcm, xgcd, xkcd, + inverse_mod, get_gcd, get_inverse_mod, power_mod, + rational_reconstruction, mqrr_rational_reconstruction, + trial_division, factor, prime_divisors, odd_part, prime_to_m_part, + is_square, is_squarefree, euler_phi, carmichael_lambda, crt, CRT, + CRT_list, CRT_basis, CRT_vectors, multinomial, multinomial_coefficients, + binomial, factorial, kronecker_symbol, kronecker, legendre_symbol, + primitive_root, nth_prime, quadratic_residues, moebius, + continuant, number_of_divisors, hilbert_symbol, hilbert_conductor, + hilbert_conductor_inverse, falling_factorial, rising_factorial, + integer_ceil, integer_floor, + two_squares, three_squares, four_squares, sum_of_k_squares, + subfactorial, is_power_of_two, differences, sort_complex_numbers_for_display, fundamental_discriminant, squarefree_divisors, @@ -87,10 +34,10 @@ from sage.arith.functions import lcm +from sage.arith.functions import lcm LCM = lcm from sage.arith.srange import xsrange, srange, ellipsis_iter, ellipsis_range - sxrange = xsrange σ = sigma diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index 7f77f5c8dd3..b9e92f597a0 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,17 +1,17 @@ -from .all__sagemath_modules import * +from sage.calculus.all__sagemath_modules import * from sage.misc.lazy_import import lazy_import -from .calculus import maxima as maxima_calculus -from .calculus import (laplace, inverse_laplace, +from sage.calculus.calculus import maxima as maxima_calculus +from sage.calculus.calculus import (laplace, inverse_laplace, limit, lim) -from .desolvers import (desolve, desolve_laplace, desolve_system, +from sage.calculus.desolvers import (desolve, desolve_laplace, desolve_system, eulers_method, eulers_method_2x2, eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, desolve_odeint, desolve_mintides, desolve_tides_mpfr) -from .var import (var, function, clear_vars) +from sage.calculus.var import (var, function, clear_vars) lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) lazy_import('sage.matrix.constructor', 'matrix') @@ -213,4 +213,4 @@ def symbolic_expression(x): return SR(x) -from . import desolvers +from sage.calculus import desolvers diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py index 63e6cb18214..cf9a7fbd0b2 100644 --- a/src/sage/calculus/all__sagemath_categories.py +++ b/src/sage/calculus/all__sagemath_categories.py @@ -1 +1 @@ -from .functional import diff, derivative, expand, simplify, taylor +from sage.calculus.functional import diff, derivative, expand, simplify, taylor diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py index cf51c475f98..f2658a16cd9 100644 --- a/src/sage/calculus/all__sagemath_modules.py +++ b/src/sage/calculus/all__sagemath_modules.py @@ -1,17 +1,17 @@ -from .all__sagemath_categories import * +from sage.calculus.all__sagemath_categories import * -from .integration import numerical_integral, monte_carlo_integral +from sage.calculus.integration import numerical_integral, monte_carlo_integral integral_numerical = numerical_integral -from .interpolation import spline, Spline +from sage.calculus.interpolation import spline, Spline -from .functions import wronskian, jacobian +from sage.calculus.functions import wronskian, jacobian -from .ode import ode_solver, ode_system +from sage.calculus.ode import ode_solver, ode_system # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import lazy_import("sage.calculus.riemann", ["Riemann_Map"]) lazy_import("sage.calculus.interpolators", ["polygon_spline","complex_cubic_spline"]) -from .transforms.all import * +from sage.calculus.transforms.all import * diff --git a/src/sage/calculus/transforms/all.py b/src/sage/calculus/transforms/all.py index 379b3b69c37..4eca64a4321 100644 --- a/src/sage/calculus/transforms/all.py +++ b/src/sage/calculus/transforms/all.py @@ -2,4 +2,4 @@ lazy_import("sage.calculus.transforms.fft", ["FastFourierTransform", "FFT"]) lazy_import("sage.calculus.transforms.dwt", ["WaveletTransform", "DWT"]) -from .dft import IndexedSequence +from sage.calculus.transforms.dft import IndexedSequence diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index a344ed2a296..9c2b8bd6518 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -81,7 +81,7 @@ RingModules = Modules from sage.categories.vector_spaces import VectorSpaces -# (Hopf) algebra structures +# (hopf) algebra structures from sage.categories.algebras import Algebras from sage.categories.commutative_algebras import CommutativeAlgebras from sage.categories.coalgebras import Coalgebras @@ -104,7 +104,7 @@ # schemes and varieties from sage.categories.modular_abelian_varieties import ModularAbelianVarieties -from sage.categories.schemes import Schemes, AbelianVarieties +from sage.categories.schemes import Schemes # * with basis from sage.categories.modules_with_basis import ModulesWithBasis diff --git a/src/sage/categories/all__sagemath_objects.py b/src/sage/categories/all__sagemath_objects.py index d87b4a1d20e..97b15d9a74d 100644 --- a/src/sage/categories/all__sagemath_objects.py +++ b/src/sage/categories/all__sagemath_objects.py @@ -17,9 +17,12 @@ from sage.categories.cartesian_product import cartesian_product -from sage.categories.functor import ForgetfulFunctor, IdentityFunctor +from sage.categories.functor import (ForgetfulFunctor, + IdentityFunctor) -from sage.categories.homset import Hom, hom, End, end, Homset, HomsetWithBase +from sage.categories.homset import (Hom, hom, + End, end, + Homset, HomsetWithBase) from sage.categories.morphism import Morphism diff --git a/src/sage/coding/source_coding/all.py b/src/sage/coding/source_coding/all.py index dc95b1fb9f3..119db02385e 100644 --- a/src/sage/coding/source_coding/all.py +++ b/src/sage/coding/source_coding/all.py @@ -1 +1 @@ -from .huffman import Huffman +from sage.coding.source_coding.huffman import Huffman diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index acef92816fe..243b27aaf45 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -50,12 +50,12 @@ install_doc(__package__, __doc__) # install modules quickref and tutorial to the containing package -from . import quickref, tutorial +from sage.combinat import quickref, tutorial install_dict(__package__, {'quickref': quickref, 'tutorial': tutorial}) del quickref, tutorial from sage.misc.lazy_import import lazy_import -from .all__sagemath_combinat import * -from .all__sagemath_modules import * -from .all__sagemath_graphs import * +from sage.combinat.all__sagemath_combinat import * +from sage.combinat.all__sagemath_modules import * +from sage.combinat.all__sagemath_graphs import * diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py index f259743f620..6fcf3d375aa 100644 --- a/src/sage/combinat/all__sagemath_categories.py +++ b/src/sage/combinat/all__sagemath_categories.py @@ -1,10 +1,10 @@ # Integer lists -from .matrices.all__sagemath_categories import * +from sage.combinat.matrices.all__sagemath_categories import * -from .integer_lists import IntegerListsLex -from .integer_vector import IntegerVectors +from sage.combinat.integer_lists import IntegerListsLex +from sage.combinat.integer_vector import IntegerVectors -from .combinat import (CombinatorialClass, CombinatorialObject, +from sage.combinat.combinat import (CombinatorialClass, CombinatorialObject, MapCombinatorialClass, bell_number, bell_polynomial, bernoulli_polynomial, catalan_number, euler_number, @@ -19,11 +19,11 @@ 'FilteredCombinatorialClass'), deprecation=(31545, 'this class is deprecated, do not use')) -from .combination import Combinations -from .composition import Composition, Compositions -from .permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition -from .subset import Subsets, subsets, powerset, uniq -from .tuple import Tuples, UnorderedTuples +from sage.combinat.combination import Combinations +from sage.combinat.composition import Composition, Compositions +from sage.combinat.permutation import Permutation, Permutations, Arrangements, CyclicPermutations, CyclicPermutationsOfPartition +from sage.combinat.subset import Subsets, subsets, powerset, uniq +from sage.combinat.tuple import Tuples, UnorderedTuples -from .dlx import DLXMatrix, AllExactCovers, OneExactCover +from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index 9e06eeb0c08..36a8fd061cf 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -1,15 +1,15 @@ -from .all__sagemath_categories import * +from sage.combinat.all__sagemath_categories import * from sage.misc.lazy_import import lazy_import -from .expnums import expnums +from sage.combinat.expnums import expnums from sage.combinat.chas.all import * from sage.combinat.crystals.all import * -from .rigged_configurations.all import * +from sage.combinat.rigged_configurations.all import * # Free modules and friends -from .debruijn_sequence import DeBruijnSequences +from sage.combinat.debruijn_sequence import DeBruijnSequences lazy_import('sage.combinat.schubert_polynomial', 'SchubertPolynomialRing') lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') @@ -21,23 +21,23 @@ lazy_import('sage.combinat.colored_permutations', ['ColoredPermutations', 'SignedPermutation', 'SignedPermutations']) -from .derangements import Derangements +from sage.combinat.derangements import Derangements lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) # RSK -from .rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules +from sage.combinat.rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules # HillmanGrassl lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) # PerfectMatchings -from .perfect_matching import PerfectMatching, PerfectMatchings +from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings # Compositions -from .composition_signed import SignedCompositions +from sage.combinat.composition_signed import SignedCompositions # Partitions -from .partition import (Partition, Partitions, PartitionsInBox, +from sage.combinat.partition import (Partition, Partitions, PartitionsInBox, OrderedPartitions, PartitionsGreatestLE, PartitionsGreatestEQ, number_of_partitions) @@ -69,21 +69,21 @@ 'SimilarityClassType', 'SimilarityClassTypes']) # Cores -from .core import Core, Cores +from sage.combinat.core import Core, Cores # Tableaux lazy_import('sage.combinat.tableau', ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) -from .skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux -from .ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux -from .ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux -from .composition_tableau import CompositionTableau, CompositionTableaux +from sage.combinat.skew_tableau import SkewTableau, SkewTableaux, StandardSkewTableaux, SemistandardSkewTableaux +from sage.combinat.ribbon_shaped_tableau import RibbonShapedTableau, RibbonShapedTableaux, StandardRibbonShapedTableaux +from sage.combinat.ribbon_tableau import RibbonTableaux, RibbonTableau, MultiSkewTableaux, MultiSkewTableau, SemistandardMultiSkewTableaux +from sage.combinat.composition_tableau import CompositionTableau, CompositionTableaux lazy_import('sage.combinat.tableau_tuple', ['TableauTuple', 'StandardTableauTuple', 'RowStandardTableauTuple', 'TableauTuples', 'StandardTableauTuples', 'RowStandardTableauTuples']) -from .k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux +from sage.combinat.k_tableau import WeakTableau, WeakTableaux, StrongTableau, StrongTableaux lazy_import('sage.combinat.lr_tableau', ['LittlewoodRichardsonTableau', 'LittlewoodRichardsonTableaux']) lazy_import('sage.combinat.shifted_primed_tableau', ['ShiftedPrimedTableaux', @@ -94,7 +94,7 @@ ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) # Words -from .words.all import * +from sage.combinat.words.all import * lazy_import('sage.combinat.subword', 'Subwords') @@ -119,33 +119,33 @@ lazy_import('sage.combinat.parking_functions', ['ParkingFunctions', 'ParkingFunction']) -from .set_partition import SetPartition, SetPartitions -from .set_partition_ordered import OrderedSetPartition, OrderedSetPartitions +from sage.combinat.set_partition import SetPartition, SetPartitions +from sage.combinat.set_partition_ordered import OrderedSetPartition, OrderedSetPartitions lazy_import('sage.combinat.multiset_partition_into_sets_ordered', ['OrderedMultisetPartitionIntoSets', 'OrderedMultisetPartitionsIntoSets']) -from .necklace import Necklaces +from sage.combinat.necklace import Necklaces lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) -from .sloane_functions import sloane +from sage.combinat.sloane_functions import sloane lazy_import('sage.combinat.superpartition', ('SuperPartition', 'SuperPartitions')) lazy_import('sage.combinat.parallelogram_polyomino', ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) -from .sf.all import * -from .ncsf_qsym.all import * -from .ncsym.all import * +from sage.combinat.sf.all import * +from sage.combinat.ncsf_qsym.all import * +from sage.combinat.ncsym.all import * lazy_import('sage.combinat.fqsym', 'FreeQuasisymmetricFunctions') -from .matrices.all import * +from sage.combinat.matrices.all import * lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors') lazy_import('sage.combinat.integer_vectors_mod_permgroup', 'IntegerVectorsModPermutationGroup') lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial']) -from .species.all import * +from sage.combinat.species.all import * lazy_import('sage.combinat.kazhdan_lusztig', 'KazhdanLusztigPolynomial') diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py index 2c022af4663..dc524200587 100644 --- a/src/sage/combinat/all__sagemath_graphs.py +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -1,28 +1,28 @@ -from .all__sagemath_categories import * +from sage.combinat.all__sagemath_categories import * from sage.misc.lazy_import import lazy_import # Posets -from .posets.all import * +from sage.combinat.posets.all import * # Trees and Tamari interval posets -from .ordered_tree import (OrderedTree, OrderedTrees, +from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, LabelledOrderedTree, LabelledOrderedTrees) -from .binary_tree import (BinaryTree, BinaryTrees, +from sage.combinat.binary_tree import (BinaryTree, BinaryTrees, LabelledBinaryTree, LabelledBinaryTrees) lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', 'LabelledRootedTree', 'LabelledRootedTrees')) lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) -from .graph_path import GraphPaths +from sage.combinat.graph_path import GraphPaths -from .yang_baxter_graph import YangBaxterGraph +from sage.combinat.yang_baxter_graph import YangBaxterGraph # block designs, etc from sage.combinat.designs.all import * # Cluster Algebras and Quivers -from .cluster_algebra_quiver.all import * +from sage.combinat.cluster_algebra_quiver.all import * # Finite State Machines (Automaton, Transducer) lazy_import('sage.combinat.finite_state_machine', diff --git a/src/sage/combinat/all__sagemath_modules.py b/src/sage/combinat/all__sagemath_modules.py index 540552d4473..a2459fcafc0 100644 --- a/src/sage/combinat/all__sagemath_modules.py +++ b/src/sage/combinat/all__sagemath_modules.py @@ -1,6 +1,6 @@ -from .all__sagemath_categories import * +from sage.combinat.all__sagemath_categories import * -from .free_module import CombinatorialFreeModule -from . import ranker +from sage.combinat.free_module import CombinatorialFreeModule +from sage.combinat import ranker -from .root_system.all import * +from sage.combinat.root_system.all import * diff --git a/src/sage/combinat/designs/all.py b/src/sage/combinat/designs/all.py index 0948c6fa281..22e600cd40c 100644 --- a/src/sage/combinat/designs/all.py +++ b/src/sage/combinat/designs/all.py @@ -51,4 +51,4 @@ lazy_import('sage.combinat.designs.covering_design', ['CoveringDesign', 'schonheim', 'trivial_covering_design']) -from . import design_catalog as designs +from sage.combinat.designs import design_catalog as designs diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index 45f3d0018f7..92df248b91b 100644 --- a/src/sage/combinat/matrices/all.py +++ b/src/sage/combinat/matrices/all.py @@ -10,7 +10,7 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from .all__sagemath_categories import * +from sage.combinat.matrices.all__sagemath_categories import * from sage.misc.lazy_import import lazy_import diff --git a/src/sage/combinat/posets/all.py b/src/sage/combinat/posets/all.py index f7f8bdcc7fc..3fd43f61938 100644 --- a/src/sage/combinat/posets/all.py +++ b/src/sage/combinat/posets/all.py @@ -36,8 +36,8 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from .posets import Poset +from sage.combinat.posets.posets import Poset -from .lattices import LatticePoset, MeetSemilattice, JoinSemilattice +from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice, JoinSemilattice -from .poset_examples import posets, Posets +from sage.combinat.posets.poset_examples import posets, Posets diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 95500f05cc6..9c91bc4b6fd 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -121,12 +121,12 @@ from sage.misc.lazy_import import lazy_import -from .cartan_type import CartanType +from sage.combinat.root_system.cartan_type import CartanType lazy_import('sage.combinat.root_system.dynkin_diagram', 'DynkinDiagram') lazy_import('sage.combinat.root_system.cartan_matrix', 'CartanMatrix') lazy_import('sage.combinat.root_system.coxeter_matrix', 'CoxeterMatrix') -from .coxeter_type import CoxeterType -from .root_system import RootSystem, WeylDim +from sage.combinat.root_system.coxeter_type import CoxeterType +from sage.combinat.root_system.root_system import RootSystem, WeylDim lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup', 'WeylGroupElement']) lazy_import('sage.combinat.root_system.reflection_group_real', @@ -136,7 +136,7 @@ lazy_import('sage.combinat.root_system.coxeter_group', 'CoxeterGroup') lazy_import('sage.combinat.root_system.weyl_characters', ['WeylCharacterRing', 'WeightRing']) -from .branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule +from sage.combinat.root_system.branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') diff --git a/src/sage/combinat/words/all.py b/src/sage/combinat/words/all.py index db32945a0f6..66a2fa38719 100644 --- a/src/sage/combinat/words/all.py +++ b/src/sage/combinat/words/all.py @@ -45,14 +45,14 @@ from sage.misc.lazy_import import lazy_import -from .alphabet import Alphabet, build_alphabet -from .morphism import WordMorphism +from sage.combinat.words.alphabet import Alphabet, build_alphabet +from sage.combinat.words.morphism import WordMorphism lazy_import('sage.combinat.words.paths', 'WordPaths') -from .word import Word -from .word_options import WordOptions -from .word_generators import words -from .words import Words, FiniteWords, InfiniteWords -from .lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords +from sage.combinat.words.word import Word +from sage.combinat.words.word_options import WordOptions +from sage.combinat.words.word_generators import words +from sage.combinat.words.words import Words, FiniteWords, InfiniteWords +from sage.combinat.words.lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords del install_doc del lazy_import diff --git a/src/sage/data_structures/all.py b/src/sage/data_structures/all.py index ae1d0ab8b43..7062ccf447e 100644 --- a/src/sage/data_structures/all.py +++ b/src/sage/data_structures/all.py @@ -1 +1 @@ -from .all__sagemath_categories import * +from sage.data_structures.all__sagemath_categories import * diff --git a/src/sage/data_structures/all__sagemath_categories.py b/src/sage/data_structures/all__sagemath_categories.py index 6140cf5b919..fe98668667d 100644 --- a/src/sage/data_structures/all__sagemath_categories.py +++ b/src/sage/data_structures/all__sagemath_categories.py @@ -1 +1 @@ -from .bitset import Bitset, FrozenBitset +from sage.data_structures.bitset import Bitset, FrozenBitset diff --git a/src/sage/databases/all.py b/src/sage/databases/all.py index a6571c7a5df..9fee768649b 100644 --- a/src/sage/databases/all.py +++ b/src/sage/databases/all.py @@ -48,7 +48,7 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from .sql_db import SQLQuery, SQLDatabase +from sage.databases.sql_db import SQLQuery, SQLDatabase lazy_import('sage.databases.conway', 'ConwayPolynomials') @@ -67,14 +67,14 @@ lazy_import('sage.databases.odlyzko', 'zeta_zeros') -from .db_modular_polynomials import \ +from sage.databases.db_modular_polynomials import \ ClassicalModularPolynomialDatabase, \ DedekindEtaModularPolynomialDatabase, \ DedekindEtaModularCorrespondenceDatabase, \ AtkinModularPolynomialDatabase, \ AtkinModularCorrespondenceDatabase -from .db_class_polynomials import \ +from sage.databases.db_class_polynomials import \ HilbertClassPolynomialDatabase lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors') diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index 1dbd9579e30..4d2af9a9dc2 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -20,10 +20,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from .all__sagemath_schemes import * +from sage.dynamics.all__sagemath_schemes import * try: - from .all__sagemath_symbolics import * + from sage.dynamics.all__sagemath_symbolics import * except ImportError: pass diff --git a/src/sage/dynamics/arithmetic_dynamics/all.py b/src/sage/dynamics/arithmetic_dynamics/all.py index f536734b5d9..8b32ff4cded 100644 --- a/src/sage/dynamics/arithmetic_dynamics/all.py +++ b/src/sage/dynamics/arithmetic_dynamics/all.py @@ -1,12 +1,12 @@ from sage.misc.lazy_import import lazy_import -from .generic_ds import DynamicalSystem -from .affine_ds import DynamicalSystem_affine -from .projective_ds import DynamicalSystem_projective -from .product_projective_ds import DynamicalSystem_product_projective -from .berkovich_ds import DynamicalSystem_Berkovich -from .dynamical_semigroup import DynamicalSemigroup -from .dynamical_semigroup import DynamicalSemigroup_affine -from .dynamical_semigroup import DynamicalSemigroup_projective +from sage.dynamics.arithmetic_dynamics.generic_ds import DynamicalSystem +from sage.dynamics.arithmetic_dynamics.affine_ds import DynamicalSystem_affine +from sage.dynamics.arithmetic_dynamics.projective_ds import DynamicalSystem_projective +from sage.dynamics.arithmetic_dynamics.product_projective_ds import DynamicalSystem_product_projective +from sage.dynamics.arithmetic_dynamics.berkovich_ds import DynamicalSystem_Berkovich +from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup +from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_affine +from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_projective lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'WehlerK3Surface') lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'random_WehlerK3Surface') diff --git a/src/sage/functions/all.py b/src/sage/functions/all.py index 4cf9005f7e3..afcf9e57ee1 100644 --- a/src/sage/functions/all.py +++ b/src/sage/functions/all.py @@ -5,41 +5,41 @@ lazy_import('sage.functions.error', ['erf', 'erfc', 'erfi', 'erfinv', 'fresnel_sin', 'fresnel_cos']) -from .trig import ( sin, cos, sec, csc, cot, tan, +from sage.functions.trig import ( sin, cos, sec, csc, cot, tan, asin, acos, atan, acot, acsc, asec, arcsin, arccos, arctan, arccot, arccsc, arcsec, arctan2, atan2) -from .hyperbolic import ( tanh, sinh, cosh, coth, sech, csch, +from sage.functions.hyperbolic import ( tanh, sinh, cosh, coth, sech, csch, asinh, acosh, atanh, acoth, asech, acsch, arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch ) reciprocal_trig_functions = {'sec': cos, 'csc': sin, 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh} -from .other import ( ceil, floor, abs_symbolic, sqrt, real_nth_root, +from sage.functions.other import ( ceil, floor, abs_symbolic, sqrt, real_nth_root, arg, real_part, real, frac, factorial, binomial, imag_part, imag, imaginary, conjugate, cases, complex_root_of) -from .log import (exp, exp_polar, log, ln, polylog, dilog, lambert_w, harmonic_number) +from sage.functions.log import (exp, exp_polar, log, ln, polylog, dilog, lambert_w, harmonic_number) -from .transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta, +from sage.functions.transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta, dickman_rho, stieltjes) -from .bessel import (bessel_I, bessel_J, bessel_K, bessel_Y, +from sage.functions.bessel import (bessel_I, bessel_J, bessel_K, bessel_Y, Bessel, struve_H, struve_L, hankel1, hankel2, spherical_bessel_J, spherical_bessel_Y, spherical_hankel1, spherical_hankel2) -from .special import (spherical_harmonic, elliptic_e, +from sage.functions.special import (spherical_harmonic, elliptic_e, elliptic_f, elliptic_ec, elliptic_eu, elliptic_kc, elliptic_pi, elliptic_j) -from .jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc, +from sage.functions.jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc, jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd, jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am, inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc, @@ -47,7 +47,7 @@ inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc, inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs) -from .orthogonal_polys import (chebyshev_T, +from sage.functions.orthogonal_polys import (chebyshev_T, chebyshev_U, gen_laguerre, gen_legendre_P, @@ -63,29 +63,29 @@ meixner, hahn) -from .spike_function import spike_function +from sage.functions.spike_function import spike_function -from .prime_pi import legendre_phi, partial_sieve_function, prime_pi +from sage.functions.prime_pi import legendre_phi, partial_sieve_function, prime_pi -from .wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, +from sage.functions.wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, wigner_9j, gaunt) -from .generalized import (dirac_delta, heaviside, unit_step, sgn, sign, +from sage.functions.generalized import (dirac_delta, heaviside, unit_step, sgn, sign, kronecker_delta) -from .min_max import max_symbolic, min_symbolic +from sage.functions.min_max import max_symbolic, min_symbolic -from .airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime +from sage.functions.airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime -from .exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, +from sage.functions.exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, log_integral_offset, sin_integral, cos_integral, Si, Ci, sinh_integral, cosh_integral, Shi, Chi, exponential_integral_1, Ei, exp_integral_ei) -from .hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U +from sage.functions.hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U -from .gamma import (gamma, psi, beta, log_gamma, +from sage.functions.gamma import (gamma, psi, beta, log_gamma, gamma_inc, gamma_inc_lower) Γ = gamma diff --git a/src/sage/geometry/all.py b/src/sage/geometry/all.py index e9f5e568a15..ebf0d36f808 100644 --- a/src/sage/geometry/all.py +++ b/src/sage/geometry/all.py @@ -1,12 +1,12 @@ -from .all__sagemath_polyhedra import * +from sage.geometry.all__sagemath_polyhedra import * try: - from .all__sagemath_symbolics import * + from sage.geometry.all__sagemath_symbolics import * except ImportError: pass try: - from .all__sagemath_gap import * + from sage.geometry.all__sagemath_gap import * except ImportError: pass diff --git a/src/sage/geometry/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py index 1bc471abd2e..d49257ff37d 100644 --- a/src/sage/geometry/all__sagemath_polyhedra.py +++ b/src/sage/geometry/all__sagemath_polyhedra.py @@ -1,6 +1,6 @@ -from .all__sagemath_modules import * +from sage.geometry.all__sagemath_modules import * -from .polyhedron.all import * +from sage.geometry.polyhedron.all import * from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.polyhedral_complex', 'PolyhedralComplex') diff --git a/src/sage/geometry/triangulation/all.py b/src/sage/geometry/triangulation/all.py index d40e50321f8..fa72ba05f83 100644 --- a/src/sage/geometry/triangulation/all.py +++ b/src/sage/geometry/triangulation/all.py @@ -1 +1 @@ -from .point_configuration import PointConfiguration +from sage.geometry.triangulation.point_configuration import PointConfiguration diff --git a/src/sage/graphs/all.py b/src/sage/graphs/all.py index 68529637000..4e700151f7a 100644 --- a/src/sage/graphs/all.py +++ b/src/sage/graphs/all.py @@ -5,13 +5,13 @@ lazy_import("sage.graphs.digraph_generators", "digraphs") lazy_import("sage.graphs.hypergraph_generators", "hypergraphs") lazy_import("sage.graphs.graph_database", ["GraphDatabase", "GenericGraphQuery", "GraphQuery"]) -from .graph import Graph -from .digraph import DiGraph -from .bipartite_graph import BipartiteGraph +from sage.graphs.graph import Graph +from sage.graphs.digraph import DiGraph +from sage.graphs.bipartite_graph import BipartiteGraph import sage.graphs.weakly_chordal import sage.graphs.lovasz_theta import sage.graphs.partial_cube -from . import graph_list as graphs_list +from sage.graphs import graph_list as graphs_list lazy_import("sage.graphs", "graph_coloring") lazy_import("sage.graphs.graph_database", "graph_db_info") lazy_import("sage.graphs.graph_editor", "graph_editor") diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 98374be35ea..3a4b55e7e43 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -20,5 +20,5 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .all__sagemath_modules import * -from .all__sagemath_gap import * +from sage.groups.abelian_gps.all__sagemath_modules import * +from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/abelian_gps/all__sagemath_gap.py b/src/sage/groups/abelian_gps/all__sagemath_gap.py index 0088c48b234..80c0bd46216 100644 --- a/src/sage/groups/abelian_gps/all__sagemath_gap.py +++ b/src/sage/groups/abelian_gps/all__sagemath_gap.py @@ -2,4 +2,4 @@ # TODO: # Implement group homset, conversion of generator images to morphism -from .abelian_group_morphism import AbelianGroupMorphism +from sage.groups.abelian_gps.abelian_group_morphism import AbelianGroupMorphism diff --git a/src/sage/groups/abelian_gps/all__sagemath_modules.py b/src/sage/groups/abelian_gps/all__sagemath_modules.py index 6ea25bb7085..b4d50cbaf28 100644 --- a/src/sage/groups/abelian_gps/all__sagemath_modules.py +++ b/src/sage/groups/abelian_gps/all__sagemath_modules.py @@ -1,4 +1,4 @@ #from dual_abelian_group import DualAbelianGroup -from .abelian_group import AbelianGroup, word_problem -from .values import AbelianGroupWithValues +from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem +from sage.groups.abelian_gps.values import AbelianGroupWithValues diff --git a/src/sage/groups/additive_abelian/all.py b/src/sage/groups/additive_abelian/all.py index 956cf00614e..e65582f51b2 100644 --- a/src/sage/groups/additive_abelian/all.py +++ b/src/sage/groups/additive_abelian/all.py @@ -1,3 +1,3 @@ -from .additive_abelian_group import AdditiveAbelianGroup -from .additive_abelian_wrapper import * +from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup +from sage.groups.additive_abelian.additive_abelian_wrapper import * diff --git a/src/sage/groups/all.py b/src/sage/groups/all.py index 05055ce1883..52a20cea495 100644 --- a/src/sage/groups/all.py +++ b/src/sage/groups/all.py @@ -1,4 +1,4 @@ -from .all__sagemath_modules import * -from .all__sagemath_gap import * -from .all__sagemath_pari import * -from .all__sagemath_groups import * +from sage.groups.all__sagemath_modules import * +from sage.groups.all__sagemath_gap import * +from sage.groups.all__sagemath_pari import * +from sage.groups.all__sagemath_groups import * diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py index 82406522b6f..960af07f9cc 100644 --- a/src/sage/groups/all__sagemath_categories.py +++ b/src/sage/groups/all__sagemath_categories.py @@ -1,6 +1,6 @@ -from .all__sagemath_objects import * +from sage.groups.all__sagemath_objects import * -from .generic import (discrete_log, discrete_log_rho, discrete_log_lambda, +from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, linear_relation, multiple, multiples) from sage.misc.lazy_import import lazy_import diff --git a/src/sage/groups/all__sagemath_gap.py b/src/sage/groups/all__sagemath_gap.py index fc243cb01df..15278ba12aa 100644 --- a/src/sage/groups/all__sagemath_gap.py +++ b/src/sage/groups/all__sagemath_gap.py @@ -1,3 +1,3 @@ -from .perm_gps.all import * -from .abelian_gps.all__sagemath_gap import * +from sage.groups.perm_gps.all import * +from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py index 396a558de4c..99d024f0f35 100644 --- a/src/sage/groups/all__sagemath_groups.py +++ b/src/sage/groups/all__sagemath_groups.py @@ -1,11 +1,11 @@ -from .all__sagemath_modules import * +from sage.groups.all__sagemath_modules import * try: - from .all__sagemath_pari import * + from sage.groups.all__sagemath_pari import * except ImportError: pass -from .all__sagemath_gap import * +from sage.groups.all__sagemath_gap import * from sage.misc.lazy_import import lazy_import diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py index 17aba8aa49d..bdd85f2a0c0 100644 --- a/src/sage/groups/all__sagemath_modules.py +++ b/src/sage/groups/all__sagemath_modules.py @@ -1,8 +1,8 @@ -from .all__sagemath_categories import * +from sage.groups.all__sagemath_categories import * -from .additive_abelian.all import * -from .abelian_gps.all__sagemath_modules import * -from .matrix_gps.all__sagemath_modules import * +from sage.groups.additive_abelian.all import * +from sage.groups.abelian_gps.all__sagemath_modules import * +from sage.groups.matrix_gps.all__sagemath_modules import * from sage.misc.lazy_import import lazy_import diff --git a/src/sage/groups/matrix_gps/all.py b/src/sage/groups/matrix_gps/all.py index bbdf725dc5e..08d8c04e6f7 100644 --- a/src/sage/groups/matrix_gps/all.py +++ b/src/sage/groups/matrix_gps/all.py @@ -1,3 +1,3 @@ -from .all__sagemath_modules import * +from sage.groups.matrix_gps.all__sagemath_modules import * import sage.groups.matrix_gps.pickling_overrides diff --git a/src/sage/groups/perm_gps/all.py b/src/sage/groups/perm_gps/all.py index ae405f298a2..b1622efb65a 100644 --- a/src/sage/groups/perm_gps/all.py +++ b/src/sage/groups/perm_gps/all.py @@ -1,4 +1,4 @@ -from .permgroup_named import (SymmetricGroup, AlternatingGroup, +from sage.groups.perm_gps.permgroup_named import (SymmetricGroup, AlternatingGroup, DihedralGroup, SplitMetacyclicGroup, SemidihedralGroup, CyclicPermutationGroup, DiCyclicGroup, TransitiveGroup, @@ -8,13 +8,13 @@ SuzukiGroup, TransitiveGroups, GeneralDihedralGroup, SmallPermutationGroup) -from .permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups +from sage.groups.perm_gps.permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups -from .constructor import PermutationGroupElement +from sage.groups.perm_gps.constructor import PermutationGroupElement -from .permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap, +from sage.groups.perm_gps.permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap, PermutationGroupMorphism_im_gens, PermutationGroupMorphism_id) PermutationGroupMorphism = PermutationGroupMorphism_im_gens -from .cubegroup import CubeGroup, RubiksCube +from sage.groups.perm_gps.cubegroup import CubeGroup, RubiksCube diff --git a/src/sage/homology/all.py b/src/sage/homology/all.py index 1334936c7a3..707eb9fb71d 100644 --- a/src/sage/homology/all.py +++ b/src/sage/homology/all.py @@ -1 +1 @@ -from .all__sagemath_modules import * +from sage.homology.all__sagemath_modules import * diff --git a/src/sage/homology/all__sagemath_modules.py b/src/sage/homology/all__sagemath_modules.py index d9306c19daa..21a95c6c4af 100644 --- a/src/sage/homology/all__sagemath_modules.py +++ b/src/sage/homology/all__sagemath_modules.py @@ -1,6 +1,6 @@ -from .chain_complex import ChainComplex +from sage.homology.chain_complex import ChainComplex -from .chain_complex_morphism import ChainComplexMorphism +from sage.homology.chain_complex_morphism import ChainComplexMorphism from sage.misc.lazy_import import lazy_import lazy_import('sage.homology.koszul_complex', 'KoszulComplex') diff --git a/src/sage/interacts/all.py b/src/sage/interacts/all.py index c53a1e11ecf..49517e8d76a 100644 --- a/src/sage/interacts/all.py +++ b/src/sage/interacts/all.py @@ -17,9 +17,9 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from . import calculus -from . import geometry -from . import statistics -from . import fractals -from . import algebra +from sage.interacts import calculus +from sage.interacts import geometry +from sage.interacts import statistics +from sage.interacts import fractals +from sage.interacts import algebra lazy_import('sage.interacts.library', 'demo') diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index ed71b662362..fa57d11c941 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -1,15 +1,15 @@ # interfaces to other interpreters -from .sage0 import sage0, sage0_version, Sage -from .gap import gap, gap_reset_workspace, Gap -from .gp import gp, gp_version, Gp +from sage.interfaces.sage0 import sage0, sage0_version, Sage +from sage.interfaces.gap import gap, gap_reset_workspace, Gap +from sage.interfaces.gp import gp, gp_version, Gp # import problems -# from maxima_lib import maxima_lib -from .maxima import maxima, Maxima -from .singular import singular, singular_version, Singular +#from maxima_lib import maxima_lib +from sage.interfaces.maxima import maxima, Maxima +from sage.interfaces.singular import singular, singular_version, Singular -from .magma import magma, Magma -from .polymake import polymake +from sage.interfaces.magma import magma, Magma +from sage.interfaces.polymake import polymake from sage.misc.lazy_import import lazy_import diff --git a/src/sage/libs/all.py b/src/sage/libs/all.py index 5a446f66548..7c6e14767cf 100644 --- a/src/sage/libs/all.py +++ b/src/sage/libs/all.py @@ -1,11 +1,11 @@ -from .all__sagemath_combinat import * -from .all__sagemath_gap import * -from .all__sagemath_flint import * -from .all__sagemath_ntl import * -from .all__sagemath_pari import * -from .all__sagemath_eclib import * +from sage.libs.all__sagemath_combinat import * +from sage.libs.all__sagemath_gap import * +from sage.libs.all__sagemath_flint import * +from sage.libs.all__sagemath_ntl import * +from sage.libs.all__sagemath_pari import * +from sage.libs.all__sagemath_eclib import * try: - from .all__sagemath_symbolics import * + from sage.libs.all__sagemath_symbolics import * except ImportError: pass diff --git a/src/sage/libs/all__sagemath_flint.py b/src/sage/libs/all__sagemath_flint.py index 796eb12104d..d4ee16d7779 100644 --- a/src/sage/libs/all__sagemath_flint.py +++ b/src/sage/libs/all__sagemath_flint.py @@ -1,11 +1,11 @@ try: - from .all__sagemath_pari import * + from sage.libs.all__sagemath_pari import * except ImportError: pass try: - from .all__sagemath_ntl import * + from sage.libs.all__sagemath_ntl import * except ImportError: pass diff --git a/src/sage/libs/eclib/all.py b/src/sage/libs/eclib/all.py index 717a66fae7b..500cdfd1192 100644 --- a/src/sage/libs/eclib/all.py +++ b/src/sage/libs/eclib/all.py @@ -1,4 +1,4 @@ -from .constructor import CremonaModularSymbols -from .interface import mwrank_EllipticCurve, mwrank_MordellWeil -from .mwrank import get_precision, set_precision -from .mwrank import initprimes as mwrank_initprimes +from sage.libs.eclib.constructor import CremonaModularSymbols +from sage.libs.eclib.interface import mwrank_EllipticCurve, mwrank_MordellWeil +from sage.libs.eclib.mwrank import get_precision, set_precision +from sage.libs.eclib.mwrank import initprimes as mwrank_initprimes diff --git a/src/sage/libs/mpmath/all.py b/src/sage/libs/mpmath/all.py index cae40f79314..63dd7c0e1fb 100644 --- a/src/sage/libs/mpmath/all.py +++ b/src/sage/libs/mpmath/all.py @@ -1,7 +1,7 @@ import mpmath # Patch mpmath to use Cythonized functions -from . import utils as _utils +from sage.libs.mpmath import utils as _utils # Also import internal functions from mpmath.libmp import * @@ -10,7 +10,7 @@ from mpmath import * # Utilities -from .utils import call, mpmath_to_sage, sage_to_mpmath +from sage.libs.mpmath.utils import call, mpmath_to_sage, sage_to_mpmath # Use mpmath internal functions for constants, to avoid unnecessary overhead _constants_funcs = { diff --git a/src/sage/libs/pari/all.py b/src/sage/libs/pari/all.py index 8bcf5d827df..6cef5978cc1 100644 --- a/src/sage/libs/pari/all.py +++ b/src/sage/libs/pari/all.py @@ -1,3 +1,3 @@ from cypari2.gen import Gen as pari_gen from cypari2 import PariError -from . import pari +from sage.libs.pari import pari diff --git a/src/sage/libs/symmetrica/all.py b/src/sage/libs/symmetrica/all.py index 7c5215f6444..b2914f4aab8 100644 --- a/src/sage/libs/symmetrica/all.py +++ b/src/sage/libs/symmetrica/all.py @@ -1,100 +1,100 @@ #from symmetrica import * -from .symmetrica import start +from sage.libs.symmetrica.symmetrica import start #kostka -from .symmetrica import kostka_number_symmetrica as kostka_number -from .symmetrica import kostka_tab_symmetrica as kostka_tab -from .symmetrica import kostka_tafel_symmetrica as kostka_tafel +from sage.libs.symmetrica.symmetrica import kostka_number_symmetrica as kostka_number +from sage.libs.symmetrica.symmetrica import kostka_tab_symmetrica as kostka_tab +from sage.libs.symmetrica.symmetrica import kostka_tafel_symmetrica as kostka_tafel #sab -from .symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization -from .symmetrica import bdg_symmetrica as bdg -from .symmetrica import sdg_symmetrica as sdg -from .symmetrica import odg_symmetrica as odg -from .symmetrica import specht_dg_symmetrica as specht_dg -from .symmetrica import ndg_symmetrica as ndg +from sage.libs.symmetrica.symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization +from sage.libs.symmetrica.symmetrica import bdg_symmetrica as bdg +from sage.libs.symmetrica.symmetrica import sdg_symmetrica as sdg +from sage.libs.symmetrica.symmetrica import odg_symmetrica as odg +from sage.libs.symmetrica.symmetrica import specht_dg_symmetrica as specht_dg +from sage.libs.symmetrica.symmetrica import ndg_symmetrica as ndg #from symmetrica import glmndg_symmetrica as glmndg #sc -from .symmetrica import chartafel_symmetrica as chartafel -from .symmetrica import charvalue_symmetrica as charvalue -from .symmetrica import kranztafel_symmetrica as kranztafel +from sage.libs.symmetrica.symmetrica import chartafel_symmetrica as chartafel +from sage.libs.symmetrica.symmetrica import charvalue_symmetrica as charvalue +from sage.libs.symmetrica.symmetrica import kranztafel_symmetrica as kranztafel #from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn #part -from .symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part -from .symmetrica import odd_to_strict_part_symmetrica as odd_to_strict -from .symmetrica import q_core_symmetrica as q_core -from .symmetrica import gupta_nm_symmetrica as gupta_nm -from .symmetrica import gupta_tafel_symmetrica as gupta_tafel -from .symmetrica import random_partition_symmetrica as random_partition +from sage.libs.symmetrica.symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part +from sage.libs.symmetrica.symmetrica import odd_to_strict_part_symmetrica as odd_to_strict +from sage.libs.symmetrica.symmetrica import q_core_symmetrica as q_core +from sage.libs.symmetrica.symmetrica import gupta_nm_symmetrica as gupta_nm +from sage.libs.symmetrica.symmetrica import gupta_tafel_symmetrica as gupta_tafel +from sage.libs.symmetrica.symmetrica import random_partition_symmetrica as random_partition #schur -from .symmetrica import outerproduct_schur_symmetrica as outerproduct_schur -from .symmetrica import dimension_schur_symmetrica as dimension_schur -from .symmetrica import part_part_skewschur_symmetrica as part_part_skewschur -from .symmetrica import newtrans_symmetrica as newtrans -from .symmetrica import compute_schur_with_alphabet_symmetrica as compute_schur_with_alphabet -from .symmetrica import compute_homsym_with_alphabet_symmetrica as compute_homsym_with_alphabet -from .symmetrica import compute_elmsym_with_alphabet_symmetrica as compute_elmsym_with_alphabet -from .symmetrica import compute_monomial_with_alphabet_symmetrica as compute_monomial_with_alphabet -from .symmetrica import compute_powsym_with_alphabet_symmetrica as compute_powsym_with_alphabet -from .symmetrica import compute_schur_with_alphabet_det_symmetrica as compute_schur_with_alphabet_det +from sage.libs.symmetrica.symmetrica import outerproduct_schur_symmetrica as outerproduct_schur +from sage.libs.symmetrica.symmetrica import dimension_schur_symmetrica as dimension_schur +from sage.libs.symmetrica.symmetrica import part_part_skewschur_symmetrica as part_part_skewschur +from sage.libs.symmetrica.symmetrica import newtrans_symmetrica as newtrans +from sage.libs.symmetrica.symmetrica import compute_schur_with_alphabet_symmetrica as compute_schur_with_alphabet +from sage.libs.symmetrica.symmetrica import compute_homsym_with_alphabet_symmetrica as compute_homsym_with_alphabet +from sage.libs.symmetrica.symmetrica import compute_elmsym_with_alphabet_symmetrica as compute_elmsym_with_alphabet +from sage.libs.symmetrica.symmetrica import compute_monomial_with_alphabet_symmetrica as compute_monomial_with_alphabet +from sage.libs.symmetrica.symmetrica import compute_powsym_with_alphabet_symmetrica as compute_powsym_with_alphabet +from sage.libs.symmetrica.symmetrica import compute_schur_with_alphabet_det_symmetrica as compute_schur_with_alphabet_det -from .symmetrica import t_SCHUR_MONOMIAL_symmetrica as t_SCHUR_MONOMIAL -from .symmetrica import t_SCHUR_HOMSYM_symmetrica as t_SCHUR_HOMSYM -from .symmetrica import t_SCHUR_POWSYM_symmetrica as t_SCHUR_POWSYM -from .symmetrica import t_SCHUR_ELMSYM_symmetrica as t_SCHUR_ELMSYM +from sage.libs.symmetrica.symmetrica import t_SCHUR_MONOMIAL_symmetrica as t_SCHUR_MONOMIAL +from sage.libs.symmetrica.symmetrica import t_SCHUR_HOMSYM_symmetrica as t_SCHUR_HOMSYM +from sage.libs.symmetrica.symmetrica import t_SCHUR_POWSYM_symmetrica as t_SCHUR_POWSYM +from sage.libs.symmetrica.symmetrica import t_SCHUR_ELMSYM_symmetrica as t_SCHUR_ELMSYM -from .symmetrica import t_MONOMIAL_SCHUR_symmetrica as t_MONOMIAL_SCHUR -from .symmetrica import t_MONOMIAL_HOMSYM_symmetrica as t_MONOMIAL_HOMSYM -from .symmetrica import t_MONOMIAL_POWSYM_symmetrica as t_MONOMIAL_POWSYM -from .symmetrica import t_MONOMIAL_ELMSYM_symmetrica as t_MONOMIAL_ELMSYM +from sage.libs.symmetrica.symmetrica import t_MONOMIAL_SCHUR_symmetrica as t_MONOMIAL_SCHUR +from sage.libs.symmetrica.symmetrica import t_MONOMIAL_HOMSYM_symmetrica as t_MONOMIAL_HOMSYM +from sage.libs.symmetrica.symmetrica import t_MONOMIAL_POWSYM_symmetrica as t_MONOMIAL_POWSYM +from sage.libs.symmetrica.symmetrica import t_MONOMIAL_ELMSYM_symmetrica as t_MONOMIAL_ELMSYM -from .symmetrica import t_ELMSYM_SCHUR_symmetrica as t_ELMSYM_SCHUR -from .symmetrica import t_ELMSYM_MONOMIAL_symmetrica as t_ELMSYM_MONOMIAL -from .symmetrica import t_ELMSYM_HOMSYM_symmetrica as t_ELMSYM_HOMSYM -from .symmetrica import t_ELMSYM_POWSYM_symmetrica as t_ELMSYM_POWSYM +from sage.libs.symmetrica.symmetrica import t_ELMSYM_SCHUR_symmetrica as t_ELMSYM_SCHUR +from sage.libs.symmetrica.symmetrica import t_ELMSYM_MONOMIAL_symmetrica as t_ELMSYM_MONOMIAL +from sage.libs.symmetrica.symmetrica import t_ELMSYM_HOMSYM_symmetrica as t_ELMSYM_HOMSYM +from sage.libs.symmetrica.symmetrica import t_ELMSYM_POWSYM_symmetrica as t_ELMSYM_POWSYM -from .symmetrica import t_HOMSYM_SCHUR_symmetrica as t_HOMSYM_SCHUR -from .symmetrica import t_HOMSYM_MONOMIAL_symmetrica as t_HOMSYM_MONOMIAL -from .symmetrica import t_HOMSYM_POWSYM_symmetrica as t_HOMSYM_POWSYM -from .symmetrica import t_HOMSYM_ELMSYM_symmetrica as t_HOMSYM_ELMSYM +from sage.libs.symmetrica.symmetrica import t_HOMSYM_SCHUR_symmetrica as t_HOMSYM_SCHUR +from sage.libs.symmetrica.symmetrica import t_HOMSYM_MONOMIAL_symmetrica as t_HOMSYM_MONOMIAL +from sage.libs.symmetrica.symmetrica import t_HOMSYM_POWSYM_symmetrica as t_HOMSYM_POWSYM +from sage.libs.symmetrica.symmetrica import t_HOMSYM_ELMSYM_symmetrica as t_HOMSYM_ELMSYM -from .symmetrica import t_POWSYM_SCHUR_symmetrica as t_POWSYM_SCHUR -from .symmetrica import t_POWSYM_HOMSYM_symmetrica as t_POWSYM_HOMSYM -from .symmetrica import t_POWSYM_ELMSYM_symmetrica as t_POWSYM_ELMSYM -from .symmetrica import t_POWSYM_MONOMIAL_symmetrica as t_POWSYM_MONOMIAL +from sage.libs.symmetrica.symmetrica import t_POWSYM_SCHUR_symmetrica as t_POWSYM_SCHUR +from sage.libs.symmetrica.symmetrica import t_POWSYM_HOMSYM_symmetrica as t_POWSYM_HOMSYM +from sage.libs.symmetrica.symmetrica import t_POWSYM_ELMSYM_symmetrica as t_POWSYM_ELMSYM +from sage.libs.symmetrica.symmetrica import t_POWSYM_MONOMIAL_symmetrica as t_POWSYM_MONOMIAL -from .symmetrica import mult_schur_schur_symmetrica as mult_schur_schur -from .symmetrica import mult_monomial_monomial_symmetrica as mult_monomial_monomial +from sage.libs.symmetrica.symmetrica import mult_schur_schur_symmetrica as mult_schur_schur +from sage.libs.symmetrica.symmetrica import mult_monomial_monomial_symmetrica as mult_monomial_monomial -from .symmetrica import hall_littlewood_symmetrica as hall_littlewood +from sage.libs.symmetrica.symmetrica import hall_littlewood_symmetrica as hall_littlewood -from .symmetrica import t_POLYNOM_POWER_symmetrica as t_POLYNOM_POWER -from .symmetrica import t_POLYNOM_SCHUR_symmetrica as t_POLYNOM_SCHUR -from .symmetrica import t_POLYNOM_ELMSYM_symmetrica as t_POLYNOM_ELMSYM -from .symmetrica import t_POLYNOM_MONOMIAL_symmetrica as t_POLYNOM_MONOMIAL +from sage.libs.symmetrica.symmetrica import t_POLYNOM_POWER_symmetrica as t_POLYNOM_POWER +from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUR_symmetrica as t_POLYNOM_SCHUR +from sage.libs.symmetrica.symmetrica import t_POLYNOM_ELMSYM_symmetrica as t_POLYNOM_ELMSYM +from sage.libs.symmetrica.symmetrica import t_POLYNOM_MONOMIAL_symmetrica as t_POLYNOM_MONOMIAL -from .symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur +from sage.libs.symmetrica.symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur #plet -from .symmetrica import plethysm_symmetrica as plethysm -from .symmetrica import schur_schur_plet_symmetrica as schur_schur_plet +from sage.libs.symmetrica.symmetrica import plethysm_symmetrica as plethysm +from sage.libs.symmetrica.symmetrica import schur_schur_plet_symmetrica as schur_schur_plet #sb -from .symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert -from .symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM -from .symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT -from .symmetrica import mult_schubert_variable_symmetrica as mult_schubert_variable -from .symmetrica import divdiff_perm_schubert_symmetrica as divdiff_perm_schubert -from .symmetrica import scalarproduct_schubert_symmetrica as scalarproduct_schubert -from .symmetrica import divdiff_schubert_symmetrica as divdiff_schubert +from sage.libs.symmetrica.symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert +from sage.libs.symmetrica.symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM +from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT +from sage.libs.symmetrica.symmetrica import mult_schubert_variable_symmetrica as mult_schubert_variable +from sage.libs.symmetrica.symmetrica import divdiff_perm_schubert_symmetrica as divdiff_perm_schubert +from sage.libs.symmetrica.symmetrica import scalarproduct_schubert_symmetrica as scalarproduct_schubert +from sage.libs.symmetrica.symmetrica import divdiff_schubert_symmetrica as divdiff_schubert start() diff --git a/src/sage/logic/all.py b/src/sage/logic/all.py index c8604a624e8..6fe860ea538 100644 --- a/src/sage/logic/all.py +++ b/src/sage/logic/all.py @@ -1,3 +1,3 @@ -from .logic import SymbolicLogic +from sage.logic.logic import SymbolicLogic -from . import propcalc +from sage.logic import propcalc diff --git a/src/sage/matrix/all.py b/src/sage/matrix/all.py index 041624f3853..47d2737bb53 100644 --- a/src/sage/matrix/all.py +++ b/src/sage/matrix/all.py @@ -1,6 +1,6 @@ from sage.misc.lazy_import import lazy_import -from .matrix_space import MatrixSpace -from .constructor import (matrix, Matrix, column_matrix, random_matrix, +from sage.matrix.matrix_space import MatrixSpace +from sage.matrix.constructor import (matrix, Matrix, column_matrix, random_matrix, diagonal_matrix, identity_matrix, block_matrix, block_diagonal_matrix, jordan_block, zero_matrix, ones_matrix, elementary_matrix, companion_matrix) diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index c562b5c1e23..005f730cd7b 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,9 +1,9 @@ -#from .all__sagemath_objects import * -from .all__sagemath_environment import * -from .all__sagemath_modules import * -from .all__sagemath_repl import * +#from sage.misc.all__sagemath_objects import * +from sage.misc.all__sagemath_environment import * +from sage.misc.all__sagemath_modules import * +from sage.misc.all__sagemath_repl import * -from .remote_file import get_remote_file +from sage.misc.remote_file import get_remote_file lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py index c64c3f97701..8145d387ae4 100644 --- a/src/sage/misc/all__sagemath_categories.py +++ b/src/sage/misc/all__sagemath_categories.py @@ -1,21 +1,21 @@ -from .all__sagemath_objects import * +from sage.misc.all__sagemath_objects import * -from .html import html, pretty_print_default +from sage.misc.html import html, pretty_print_default -from .mathml import mathml +from sage.misc.mathml import mathml -from .table import table +from sage.misc.table import table -from .map_threaded import map_threaded +from sage.misc.map_threaded import map_threaded -from .mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator +from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator -from .defaults import (set_default_variable_name, +from sage.misc.defaults import (set_default_variable_name, series_precision, set_series_precision) -from .functional import (additive_order, +from sage.misc.functional import (additive_order, base_ring, base_field, basis, @@ -73,8 +73,8 @@ symbolic_prod as product, transpose) -from .latex import LatexExpr, latex, view +from sage.misc.latex import LatexExpr, latex, view -from .fpickle import pickle_function, unpickle_function +from sage.misc.fpickle import pickle_function, unpickle_function -from .persist import unpickle_global +from sage.misc.persist import unpickle_global diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py index 3b30aaeca19..e854b10a0be 100644 --- a/src/sage/misc/all__sagemath_modules.py +++ b/src/sage/misc/all__sagemath_modules.py @@ -1,12 +1,12 @@ # All of sage.misc.all except for development tools, session management, # and deprecated functionality -from .lazy_attribute import lazy_attribute, lazy_class_attribute -from .lazy_import import lazy_import +from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute +from sage.misc.lazy_import import lazy_import -from .all__sagemath_categories import * +from sage.misc.all__sagemath_categories import * -from .misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module +from sage.misc.misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module exists, forall, is_iterator, random_sublist, pad_zeros, @@ -14,8 +14,8 @@ newton_method_sizes, compose, nest) -from .temporary_file import tmp_dir, tmp_filename # Depends on sage.env +from sage.misc.temporary_file import tmp_dir, tmp_filename # Depends on sage.env -from .mathml import mathml +from sage.misc.mathml import mathml -from .func_persist import func_persist +from sage.misc.func_persist import func_persist diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index b06bfeaa78a..efdf3f1eb7c 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -33,13 +33,13 @@ from sage.misc.abstract_method import abstract_method -from .randstate import seed, set_random_seed, initial_seed, current_randstate +from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate -from .prandom import * +from sage.misc.prandom import * -from .timing import walltime, cputime +from sage.misc.timing import walltime, cputime -from .sage_timeit_class import timeit +from sage.misc.sage_timeit_class import timeit -from .session import load_session, save_session, show_identifiers -from .reset import reset, restore +from sage.misc.session import load_session, save_session, show_identifiers +from sage.misc.reset import reset, restore diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index c3216265b45..d33895f25f0 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,10 +1,10 @@ -from .all__sagemath_objects import * +from sage.misc.all__sagemath_objects import * -from .sage_eval import sage_eval, sageobj +from sage.misc.sage_eval import sage_eval, sageobj -from .sage_input import sage_input +from sage.misc.sage_input import sage_input -from .banner import version +from sage.misc.banner import version lazy_import('sage.misc.banner', 'banner', deprecation=34259) @@ -15,17 +15,17 @@ lazy_import('pydoc', 'help', 'python_help') -from .explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends +from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends lazy_import('sage.misc.trace', 'trace', deprecation=34259) lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) -from .dev_tools import import_statements +from sage.misc.dev_tools import import_statements lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) -from .edit_module import edit +from sage.misc.edit_module import edit lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) diff --git a/src/sage/modular/abvar/all.py b/src/sage/modular/abvar/all.py index f0971bc0b42..fa744caa894 100644 --- a/src/sage/modular/abvar/all.py +++ b/src/sage/modular/abvar/all.py @@ -4,4 +4,4 @@ # http://www.gnu.org/licenses/ # ########################################################################### -from .constructor import J0, J1, JH, AbelianVariety +from sage.modular.abvar.constructor import J0, J1, JH, AbelianVariety diff --git a/src/sage/modular/all.py b/src/sage/modular/all.py index cfccb18e65f..1bfa60068bf 100644 --- a/src/sage/modular/all.py +++ b/src/sage/modular/all.py @@ -1,24 +1,24 @@ from sage.misc.lazy_import import lazy_import -from .quatalg.all import * +from sage.modular.quatalg.all import * -from .modsym.all import * +from sage.modular.modsym.all import * -from .modform.all import * +from sage.modular.modform.all import * -from .ssmod.all import * +from sage.modular.ssmod.all import * -from .abvar.all import * +from sage.modular.abvar.all import * -from .dirichlet import (DirichletGroup, +from sage.modular.dirichlet import (DirichletGroup, kronecker_character, kronecker_character_upside_down, trivial_character) -from .arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, +from sage.modular.arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, ArithmeticSubgroup_Permutation, CongruenceSubgroup, FareySymbol) -from .cusps import Cusp, Cusps +from sage.modular.cusps import Cusp, Cusps lazy_import('sage.modular.dims', ('dimension_cusp_forms', 'dimension_new_cusp_forms', @@ -27,19 +27,19 @@ 'sturm_bound'), deprecation=(32647, 'removed from main namespace')) -from .etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, +from sage.modular.etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, AllCusps, CuspFamily) lazy_import('sage.modular.multiple_zeta', ['Multizeta', 'Multizetas']) -from .overconvergent.all import * +from sage.modular.overconvergent.all import * -from .local_comp.all import * +from sage.modular.local_comp.all import * -from .cusps_nf import NFCusp, NFCusps, Gamma0_NFCusps +from sage.modular.cusps_nf import NFCusp, NFCusps, Gamma0_NFCusps -from .btquotients.all import * +from sage.modular.btquotients.all import * -from .pollack_stevens.all import * +from sage.modular.pollack_stevens.all import * -from .quasimodform.all import * +from sage.modular.quasimodform.all import * diff --git a/src/sage/modular/arithgroup/all.py b/src/sage/modular/arithgroup/all.py index d4fb241d1f9..7e9f6df38e4 100644 --- a/src/sage/modular/arithgroup/all.py +++ b/src/sage/modular/arithgroup/all.py @@ -1,18 +1,18 @@ # Note: the is_xxx functions are imported to here, but not from here up to sage.modular.all, so # they are invisible to the user but easy to import all in one go by other code that needs them. -from .arithgroup_generic import is_ArithmeticSubgroup -from .congroup_generic import is_CongruenceSubgroup, CongruenceSubgroup_constructor as CongruenceSubgroup -from .congroup_gammaH import GammaH_constructor as GammaH, is_GammaH -from .congroup_gamma1 import Gamma1_constructor as Gamma1, is_Gamma1 -from .congroup_gamma0 import Gamma0_constructor as Gamma0, is_Gamma0 -from .congroup_gamma import Gamma_constructor as Gamma, is_Gamma -from .congroup_sl2z import SL2Z, is_SL2Z +from sage.modular.arithgroup.arithgroup_generic import is_ArithmeticSubgroup +from sage.modular.arithgroup.congroup_generic import is_CongruenceSubgroup, CongruenceSubgroup_constructor as CongruenceSubgroup +from sage.modular.arithgroup.congroup_gammaH import GammaH_constructor as GammaH, is_GammaH +from sage.modular.arithgroup.congroup_gamma1 import Gamma1_constructor as Gamma1, is_Gamma1 +from sage.modular.arithgroup.congroup_gamma0 import Gamma0_constructor as Gamma0, is_Gamma0 +from sage.modular.arithgroup.congroup_gamma import Gamma_constructor as Gamma, is_Gamma +from sage.modular.arithgroup.congroup_sl2z import SL2Z, is_SL2Z from sage.misc.lazy_import import lazy_import lazy_import('sage.modular.arithgroup.arithgroup_perm', 'ArithmeticSubgroup_Permutation') -from .congroup import (degeneracy_coset_representatives_gamma0, +from sage.modular.arithgroup.congroup import (degeneracy_coset_representatives_gamma0, degeneracy_coset_representatives_gamma1) -from .farey_symbol import Farey as FareySymbol +from sage.modular.arithgroup.farey_symbol import Farey as FareySymbol diff --git a/src/sage/modular/btquotients/all.py b/src/sage/modular/btquotients/all.py index 3807442da70..5d11aed1020 100644 --- a/src/sage/modular/btquotients/all.py +++ b/src/sage/modular/btquotients/all.py @@ -1,3 +1,3 @@ -from .btquotient import BruhatTitsQuotient +from sage.modular.btquotients.btquotient import BruhatTitsQuotient #from pautomorphicform import pAdicAutomorphicForms #from pautomorphicform import BruhatTitsHarmonicCocycles diff --git a/src/sage/modular/hecke/all.py b/src/sage/modular/hecke/all.py index 0aaa2232773..bd5bb292c43 100644 --- a/src/sage/modular/hecke/all.py +++ b/src/sage/modular/hecke/all.py @@ -1,19 +1,19 @@ -from .homspace import HeckeModuleHomspace, is_HeckeModuleHomspace +from sage.modular.hecke.homspace import HeckeModuleHomspace, is_HeckeModuleHomspace -from .module import HeckeModule_free_module, HeckeModule_generic, is_HeckeModule +from sage.modular.hecke.module import HeckeModule_free_module, HeckeModule_generic, is_HeckeModule -from .hecke_operator import HeckeOperator, is_HeckeOperator +from sage.modular.hecke.hecke_operator import HeckeOperator, is_HeckeOperator -from .degenmap import DegeneracyMap +from sage.modular.hecke.degenmap import DegeneracyMap -from .algebra import HeckeAlgebra, is_HeckeAlgebra +from sage.modular.hecke.algebra import HeckeAlgebra, is_HeckeAlgebra -from .morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, +from sage.modular.hecke.morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, is_HeckeModuleMorphism, is_HeckeModuleMorphism_matrix) -from .element import HeckeModuleElement, is_HeckeModuleElement +from sage.modular.hecke.element import HeckeModuleElement, is_HeckeModuleElement -from .submodule import HeckeSubmodule, is_HeckeSubmodule +from sage.modular.hecke.submodule import HeckeSubmodule, is_HeckeSubmodule -from .ambient_module import AmbientHeckeModule, is_AmbientHeckeModule +from sage.modular.hecke.ambient_module import AmbientHeckeModule, is_AmbientHeckeModule diff --git a/src/sage/modular/local_comp/all.py b/src/sage/modular/local_comp/all.py index 1df1ec59fd6..1177acd9b7e 100644 --- a/src/sage/modular/local_comp/all.py +++ b/src/sage/modular/local_comp/all.py @@ -1 +1 @@ -from .local_comp import LocalComponent +from sage.modular.local_comp.local_comp import LocalComponent diff --git a/src/sage/modular/modform/all.py b/src/sage/modular/modform/all.py index feb1521d3ca..92d91fc34c5 100644 --- a/src/sage/modular/modform/all.py +++ b/src/sage/modular/modform/all.py @@ -6,23 +6,23 @@ # http://www.gnu.org/licenses/ ######################################################################### -from .constructor import ModularForms, CuspForms, EisensteinForms, Newforms, Newform +from sage.modular.modform.constructor import ModularForms, CuspForms, EisensteinForms, Newforms, Newform -from .eis_series import eisenstein_series_qexp, eisenstein_series_lseries +from sage.modular.modform.eis_series import eisenstein_series_qexp, eisenstein_series_lseries -from .half_integral import half_integral_weight_modform_basis +from sage.modular.modform.half_integral import half_integral_weight_modform_basis -from .theta import theta_qexp, theta2_qexp +from sage.modular.modform.theta import theta_qexp, theta2_qexp from sage.misc.lazy_import import lazy_import lazy_import('sage.modular.modform.j_invariant', 'j_invariant_qexp') lazy_import('sage.modular.modform.vm_basis', ['victor_miller_basis', 'delta_qexp']) -from .hecke_operator_on_qexp import hecke_operator_on_qexp, hecke_operator_on_basis +from sage.modular.modform.hecke_operator_on_qexp import hecke_operator_on_qexp, hecke_operator_on_basis -from .numerical import NumericalEigenforms as numerical_eigenforms +from sage.modular.modform.numerical import NumericalEigenforms as numerical_eigenforms -from .element import delta_lseries +from sage.modular.modform.element import delta_lseries -from .ring import ModularFormsRing +from sage.modular.modform.ring import ModularFormsRing diff --git a/src/sage/modular/modform_hecketriangle/all.py b/src/sage/modular/modform_hecketriangle/all.py index cd236efc334..1d3ad5aa289 100644 --- a/src/sage/modular/modform_hecketriangle/all.py +++ b/src/sage/modular/modform_hecketriangle/all.py @@ -11,19 +11,19 @@ # the License, or (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from .hecke_triangle_groups import HeckeTriangleGroup +from sage.modular.modform_hecketriangle.hecke_triangle_groups import HeckeTriangleGroup -from .series_constructor import MFSeriesConstructor +from sage.modular.modform_hecketriangle.series_constructor import MFSeriesConstructor -from .graded_ring import (QuasiMeromorphicModularFormsRing, +from sage.modular.modform_hecketriangle.graded_ring import (QuasiMeromorphicModularFormsRing, QuasiWeakModularFormsRing, QuasiModularFormsRing, QuasiCuspFormsRing, MeromorphicModularFormsRing, WeakModularFormsRing, ModularFormsRing, CuspFormsRing) -from .space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, +from sage.modular.modform_hecketriangle.space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, QuasiModularForms, QuasiCuspForms, MeromorphicModularForms, WeakModularForms, ModularForms, CuspForms, ZeroForm) -from .subspace import ModularFormsSubSpace +from sage.modular.modform_hecketriangle.subspace import ModularFormsSubSpace diff --git a/src/sage/modular/modsym/all.py b/src/sage/modular/modsym/all.py index 798a4a7d55f..da5fd374c8b 100644 --- a/src/sage/modular/modsym/all.py +++ b/src/sage/modular/modsym/all.py @@ -1,15 +1,15 @@ from sage.misc.lazy_import import lazy_import -from .element import set_modsym_print_mode +from sage.modular.modsym.element import set_modsym_print_mode -from .modsym import ModularSymbols, ModularSymbols_clear_cache +from sage.modular.modsym.modsym import ModularSymbols, ModularSymbols_clear_cache lazy_import('sage.modular.modsym.heilbronn', ['HeilbronnCremona', 'HeilbronnMerel']) -from .p1list import P1List, lift_to_sl2z +from sage.modular.modsym.p1list import P1List, lift_to_sl2z -from .p1list_nf import P1NFList, MSymbol +from sage.modular.modsym.p1list_nf import P1NFList, MSymbol -from .ghlist import GHlist +from sage.modular.modsym.ghlist import GHlist -from .g1list import G1list +from sage.modular.modsym.g1list import G1list diff --git a/src/sage/modular/overconvergent/all.py b/src/sage/modular/overconvergent/all.py index 11e23071854..ed9c2310568 100644 --- a/src/sage/modular/overconvergent/all.py +++ b/src/sage/modular/overconvergent/all.py @@ -1,5 +1,5 @@ -from .weightspace import WeightSpace_constructor as pAdicWeightSpace +from sage.modular.overconvergent.weightspace import WeightSpace_constructor as pAdicWeightSpace -from .genus0 import OverconvergentModularForms +from sage.modular.overconvergent.genus0 import OverconvergentModularForms -from .hecke_series import hecke_series +from sage.modular.overconvergent.hecke_series import hecke_series diff --git a/src/sage/modular/pollack_stevens/all.py b/src/sage/modular/pollack_stevens/all.py index a51787d6fd2..981c5028543 100644 --- a/src/sage/modular/pollack_stevens/all.py +++ b/src/sage/modular/pollack_stevens/all.py @@ -1,3 +1,3 @@ -from .space import PollackStevensModularSymbols -from .distributions import Symk -from .distributions import OverconvergentDistributions +from sage.modular.pollack_stevens.space import PollackStevensModularSymbols +from sage.modular.pollack_stevens.distributions import Symk +from sage.modular.pollack_stevens.distributions import OverconvergentDistributions diff --git a/src/sage/modular/quasimodform/all.py b/src/sage/modular/quasimodform/all.py index 114783b2e37..f7e4444785d 100644 --- a/src/sage/modular/quasimodform/all.py +++ b/src/sage/modular/quasimodform/all.py @@ -1,2 +1,2 @@ # Quasimodular forms rings -from .ring import QuasiModularForms +from sage.modular.quasimodform.ring import QuasiModularForms diff --git a/src/sage/modular/quatalg/all.py b/src/sage/modular/quatalg/all.py index e554527d96c..53103006057 100644 --- a/src/sage/modular/quatalg/all.py +++ b/src/sage/modular/quatalg/all.py @@ -1,2 +1,2 @@ -from .brandt import BrandtModule +from sage.modular.quatalg.brandt import BrandtModule diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index 929d16b79d0..8ad50bd01c5 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -15,18 +15,11 @@ from sage.modules.free_module import FreeModule, VectorSpace, span -from sage.modules.free_quadratic_module import ( - FreeQuadraticModule, - QuadraticSpace, - InnerProductSpace, -) +from sage.modules.free_quadratic_module import (FreeQuadraticModule, QuadraticSpace, + InnerProductSpace) -from sage.modules.free_module_element import ( - vector, - free_module_element, - zero_vector, - random_vector, -) +from sage.modules.free_module_element import (vector, free_module_element, zero_vector, + random_vector) from sage.modules.vector_space_morphism import linear_transformation diff --git a/src/sage/monoids/all.py b/src/sage/monoids/all.py index cd2812c89f1..a08f8df0f43 100644 --- a/src/sage/monoids/all.py +++ b/src/sage/monoids/all.py @@ -1,11 +1,11 @@ -from .free_monoid import FreeMonoid -from .string_monoid import (BinaryStrings, OctalStrings, HexadecimalStrings, +from sage.monoids.free_monoid import FreeMonoid +from sage.monoids.string_monoid import (BinaryStrings, OctalStrings, HexadecimalStrings, Radix64Strings, AlphabeticStrings) -from .free_abelian_monoid import FreeAbelianMonoid +from sage.monoids.free_abelian_monoid import FreeAbelianMonoid -from .string_ops import ( +from sage.monoids.string_ops import ( strip_encoding, frequency_distribution, coincidence_index, diff --git a/src/sage/numerical/all.py b/src/sage/numerical/all.py index a4f65cf44b5..6e73790f9dc 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -1,4 +1,4 @@ -from .all__sagemath_modules import * +from sage.numerical.all__sagemath_modules import * from sage.misc.lazy_import import lazy_import diff --git a/src/sage/parallel/all.py b/src/sage/parallel/all.py index 85f69c86165..17d397c39f7 100644 --- a/src/sage/parallel/all.py +++ b/src/sage/parallel/all.py @@ -1,4 +1,4 @@ -from .decorate import parallel, fork +from sage.parallel.decorate import parallel, fork from sage.misc.lazy_import import lazy_import lazy_import('sage.parallel.parallelism', 'Parallelism') diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 2db3c52821d..ec9a9027e87 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -1,38 +1,38 @@ -from .graphics import Graphics -from .plot import (plot, graphics_array, multi_graphics, list_plot, +from sage.plot.graphics import Graphics +from sage.plot.plot import (plot, graphics_array, multi_graphics, list_plot, parametric_plot, polar_plot, plot_loglog, plot_semilogx, plot_semilogy, list_plot_loglog, list_plot_semilogx, list_plot_semilogy) -from .line import line, line2d -from .arrow import arrow, arrow2d -from .bar_chart import bar_chart -from .histogram import histogram -from .bezier_path import bezier_path -from .scatter_plot import scatter_plot -from .disk import disk -from .point import point, points, point2d -from .matrix_plot import matrix_plot -from .plot_field import plot_vector_field, plot_slope_field -from .text import text -from .polygon import polygon, polygon2d -from .circle import circle -from .ellipse import ellipse -from .contour_plot import contour_plot, implicit_plot, region_plot -from .density_plot import density_plot -from .streamline_plot import streamline_plot +from sage.plot.line import line, line2d +from sage.plot.arrow import arrow, arrow2d +from sage.plot.bar_chart import bar_chart +from sage.plot.histogram import histogram +from sage.plot.bezier_path import bezier_path +from sage.plot.scatter_plot import scatter_plot +from sage.plot.disk import disk +from sage.plot.point import point, points, point2d +from sage.plot.matrix_plot import matrix_plot +from sage.plot.plot_field import plot_vector_field, plot_slope_field +from sage.plot.text import text +from sage.plot.polygon import polygon, polygon2d +from sage.plot.circle import circle +from sage.plot.ellipse import ellipse +from sage.plot.contour_plot import contour_plot, implicit_plot, region_plot +from sage.plot.density_plot import density_plot +from sage.plot.streamline_plot import streamline_plot from sage.misc.lazy_import import lazy_import lazy_import("sage.plot.complex_plot",["complex_plot"]) -from .arc import arc +from sage.plot.arc import arc -from .animate import animate +from sage.plot.animate import animate -from .plot3d.tachyon import Tachyon +from sage.plot.plot3d.tachyon import Tachyon -from .colors import Color, hue, rainbow, colors, colormaps +from sage.plot.colors import Color, hue, rainbow, colors, colormaps -from .step import plot_step_function +from sage.plot.step import plot_step_function lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") lazy_import("sage.plot.hyperbolic_polygon", ["hyperbolic_triangle", "hyperbolic_polygon"]) diff --git a/src/sage/plot/plot3d/all.py b/src/sage/plot/plot3d/all.py index 16c647c6b50..914261d9ead 100644 --- a/src/sage/plot/plot3d/all.py +++ b/src/sage/plot/plot3d/all.py @@ -1,20 +1,20 @@ -from .plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical -from .parametric_plot3d import parametric_plot3d -from .plot_field3d import plot_vector_field3d +from sage.plot.plot3d.plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical +from sage.plot.plot3d.parametric_plot3d import parametric_plot3d +from sage.plot.plot3d.plot_field3d import plot_vector_field3d # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import lazy_import("sage.plot.plot3d.implicit_plot3d",["implicit_plot3d"]) -from .list_plot3d import list_plot3d -from .revolution_plot3d import revolution_plot3d +from sage.plot.plot3d.list_plot3d import list_plot3d +from sage.plot.plot3d.revolution_plot3d import revolution_plot3d -from .platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron +from sage.plot.plot3d.platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron -from .shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d +from sage.plot.plot3d.shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d -from .shapes import arrow3d +from sage.plot.plot3d.shapes import arrow3d #from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D #from parametric_surface import ParametricSurface, MoebiusStrip diff --git a/src/sage/probability/all.py b/src/sage/probability/all.py index 689ee7a7934..6ac09a72160 100644 --- a/src/sage/probability/all.py +++ b/src/sage/probability/all.py @@ -1,9 +1,9 @@ -from .random_variable import ( +from sage.probability.random_variable import ( DiscreteRandomVariable, DiscreteProbabilitySpace ) -from .probability_distribution import ( +from sage.probability.probability_distribution import ( RealDistribution, SphericalDistribution, GeneralDiscreteDistribution ) diff --git a/src/sage/quadratic_forms/all.py b/src/sage/quadratic_forms/all.py index fbb7f2fdccb..e9e818af865 100644 --- a/src/sage/quadratic_forms/all.py +++ b/src/sage/quadratic_forms/all.py @@ -1,3 +1,3 @@ -from .all__sagemath_modules import * -from .all__sagemath_pari import * +from sage.quadratic_forms.all__sagemath_modules import * +from sage.quadratic_forms.all__sagemath_pari import * diff --git a/src/sage/quadratic_forms/all__sagemath_modules.py b/src/sage/quadratic_forms/all__sagemath_modules.py index e27f1eb15a9..a5430b77a9c 100644 --- a/src/sage/quadratic_forms/all__sagemath_modules.py +++ b/src/sage/quadratic_forms/all__sagemath_modules.py @@ -1,12 +1,12 @@ -from .binary_qf import BinaryQF, BinaryQF_reduced_representatives +from sage.quadratic_forms.binary_qf import BinaryQF, BinaryQF_reduced_representatives -from .ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc +from sage.quadratic_forms.ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc -from .quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants +from sage.quadratic_forms.quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants -from .random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, +from sage.quadratic_forms.random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, random_ternaryqf, random_ternaryqf_with_conditions) -from .extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number +from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number -from .constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form +from sage.quadratic_forms.constructions import BezoutianQuadraticForm, HyperbolicPlane_quadratic_form diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py index 874de9d4f0b..eddc562392c 100644 --- a/src/sage/quadratic_forms/all__sagemath_pari.py +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -1,5 +1,5 @@ -from .special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, +from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, quadratic_L_function__exact, quadratic_L_function__numerical) -from .genera.genus import Genus +from sage.quadratic_forms.genera.genus import Genus diff --git a/src/sage/quadratic_forms/genera/all.py b/src/sage/quadratic_forms/genera/all.py index b1f48b5b8f6..e92279814dd 100644 --- a/src/sage/quadratic_forms/genera/all.py +++ b/src/sage/quadratic_forms/genera/all.py @@ -5,4 +5,4 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from .genus import Genus, LocalGenusSymbol, is_GlobalGenus +from sage.quadratic_forms.genera.genus import Genus, LocalGenusSymbol, is_GlobalGenus diff --git a/src/sage/repl/ipython_kernel/all_jupyter.py b/src/sage/repl/ipython_kernel/all_jupyter.py index 37899e1c080..69bf0549da1 100644 --- a/src/sage/repl/ipython_kernel/all_jupyter.py +++ b/src/sage/repl/ipython_kernel/all_jupyter.py @@ -4,6 +4,6 @@ from sage.all_cmdline import * -from .widgets_sagenb import (input_box, text_control, slider, +from sage.repl.ipython_kernel.widgets_sagenb import (input_box, text_control, slider, range_slider, checkbox, selector, input_grid, color_selector) -from .interact import interact +from sage.repl.ipython_kernel.interact import interact diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index 35f6838ba8a..4cffc119a67 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -12,12 +12,12 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from .all__sagemath_combinat import * -from .all__sagemath_flint import * -from .all__sagemath_modules import * +from sage.rings.all__sagemath_combinat import * +from sage.rings.all__sagemath_flint import * +from sage.rings.all__sagemath_modules import * try: - from .all__sagemath_symbolics import * + from sage.rings.all__sagemath_symbolics import * except ImportError: pass @@ -33,10 +33,10 @@ # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences -from .fast_arith import prime_range +from sage.rings.fast_arith import prime_range # asymptotic ring -#from .asymptotic.all import * +#from sage.rings.asymptotic.all import * lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 07bde5d1f89..ac3c996e2d2 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,5 +1,5 @@ # Ring base classes -from .ring import (Ring, Field, CommutativeRing, IntegralDomain, +from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, DedekindDomain, PrincipalIdealDomain, EuclideanDomain) # Ring element base classes @@ -9,13 +9,13 @@ EuclideanDomainElement, FieldElement) # Rational numbers -from .rational import Rational -from .rational_field import RationalField, QQ +from sage.rings.rational import Rational +from sage.rings.rational_field import RationalField, QQ Rationals = RationalField # Rational integers. -from .integer_ring import IntegerRing, ZZ, crt_basis -from .integer import Integer +from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis +from sage.rings.integer import Integer # Integers modulo n. from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod @@ -23,56 +23,55 @@ Integers = IntegerModRing # Infinities -from .infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing +from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing oo = infinity # Quotient -from .quotient_ring import QuotientRing +from sage.rings.quotient_ring import QuotientRing # Localization -from .localization import Localization +from sage.rings.localization import Localization # Fraction field -from .fraction_field import FractionField +from sage.rings.fraction_field import FractionField Frac = FractionField # Function field -from .function_field.all__sagemath_categories import * +from sage.rings.function_field.all__sagemath_categories import * # Double precision floating point numbers -from .real_double import RealDoubleField, RDF, RealDoubleElement +from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement # Ideals from sage.rings.ideal import Ideal - ideal = Ideal # Semirings -from .semirings.all import * +from sage.rings.semirings.all import * -from .finite_rings.all__sagemath_categories import * -from .number_field.all__sagemath_categories import * -from .padics.all__sagemath_categories import * -from .polynomial.all__sagemath_categories import * +from sage.rings.finite_rings.all__sagemath_categories import * +from sage.rings.number_field.all__sagemath_categories import * +from sage.rings.padics.all__sagemath_categories import * +from sage.rings.polynomial.all__sagemath_categories import * # Power series rings -from .power_series_ring import PowerSeriesRing +from sage.rings.power_series_ring import PowerSeriesRing # Laurent series ring in one variable -from .laurent_series_ring import LaurentSeriesRing +from sage.rings.laurent_series_ring import LaurentSeriesRing # Puiseux series ring -from .puiseux_series_ring import PuiseuxSeriesRing +from sage.rings.puiseux_series_ring import PuiseuxSeriesRing # Big-oh notation -from .big_oh import O +from sage.rings.big_oh import O # continued fractions from sage.rings.continued_fraction import (continued_fraction, continued_fraction_list) # Lazy reals -from .real_lazy import RealLazyField, RLF, ComplexLazyField, CLF +from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF # Preliminary version of real numbers for doctesting without sage.rings.real_mpfr. # sage.rings.all redefines it. diff --git a/src/sage/rings/all__sagemath_combinat.py b/src/sage/rings/all__sagemath_combinat.py index 73acfce9257..3e054b1da0b 100644 --- a/src/sage/rings/all__sagemath_combinat.py +++ b/src/sage/rings/all__sagemath_combinat.py @@ -1,4 +1,4 @@ -from .all__sagemath_categories import * +from sage.rings.all__sagemath_categories import * from sage.misc.lazy_import import lazy_import diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py index 61ca5667c9e..47e6dfc5c45 100644 --- a/src/sage/rings/all__sagemath_flint.py +++ b/src/sage/rings/all__sagemath_flint.py @@ -1,5 +1,5 @@ -from .all__sagemath_ntl import * +from sage.rings.all__sagemath_ntl import * # Real numbers from sage.rings.real_arb import RealBallField, RBF @@ -7,28 +7,28 @@ from sage.rings.complex_arb import ComplexBallField, CBF # Number field -from .number_field.all import * +from sage.rings.number_field.all import * -from .monomials import monomials +from sage.rings.monomials import monomials # Algebraic numbers -from .qqbar import (AlgebraicRealField, AA, +from sage.rings.qqbar import (AlgebraicRealField, AA, AlgebraicReal, AlgebraicField, QQbar, AlgebraicNumber, number_field_elements_from_algebraics) # Intervals -from .real_mpfi import (RealIntervalField, +from sage.rings.real_mpfi import (RealIntervalField, RIF, RealInterval) # Complex numbers -from .complex_interval_field import ComplexIntervalField -from .complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) +from sage.rings.complex_interval_field import ComplexIntervalField +from sage.rings.complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) from sage.misc.lazy_import import lazy_import lazy_import("sage.rings.imaginary_unit", "I") -from .cif import CIF +from sage.rings.cif import CIF diff --git a/src/sage/rings/all__sagemath_modules.py b/src/sage/rings/all__sagemath_modules.py index 86c622842f9..3096135b7e0 100644 --- a/src/sage/rings/all__sagemath_modules.py +++ b/src/sage/rings/all__sagemath_modules.py @@ -1,24 +1,24 @@ -from .all__sagemath_categories import * +from sage.rings.all__sagemath_categories import * -from .function_field.all__sagemath_modules import * -from .polynomial.all__sagemath_modules import * +from sage.rings.function_field.all__sagemath_modules import * +from sage.rings.polynomial.all__sagemath_modules import * # Real numbers -from .real_mpfr import (RealField, RR, +from sage.rings.real_mpfr import (RealField, RR, create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. Reals = RealField # Complex numbers -from .complex_mpfr import ComplexField -from .complex_mpfr import create_ComplexNumber as ComplexNumber +from sage.rings.complex_mpfr import ComplexField +from sage.rings.complex_mpfr import create_ComplexNumber as ComplexNumber Complexes = ComplexField -from .complex_double import ComplexDoubleField, ComplexDoubleElement, CDF +from sage.rings.complex_double import ComplexDoubleField, ComplexDoubleElement, CDF -from .cc import CC +from sage.rings.cc import CC -from .complex_mpc import MPComplexField +from sage.rings.complex_mpc import MPComplexField # invariant theory -from .invariants.all import * +from sage.rings.invariants.all import * diff --git a/src/sage/rings/all__sagemath_ntl.py b/src/sage/rings/all__sagemath_ntl.py index 2e4a22cd324..c64b779350c 100644 --- a/src/sage/rings/all__sagemath_ntl.py +++ b/src/sage/rings/all__sagemath_ntl.py @@ -1,6 +1,6 @@ -from .all__sagemath_pari import * +from sage.rings.all__sagemath_pari import * -from .padics.all__sagemath_ntl import * +from sage.rings.padics.all__sagemath_ntl import * -from .bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single +from sage.rings.bernoulli_mod_p import bernoulli_mod_p, bernoulli_mod_p_single diff --git a/src/sage/rings/all__sagemath_pari.py b/src/sage/rings/all__sagemath_pari.py index cdb2f220cf9..73f3230790e 100644 --- a/src/sage/rings/all__sagemath_pari.py +++ b/src/sage/rings/all__sagemath_pari.py @@ -1,12 +1,12 @@ # Pseudo-ring of PARI objects. -from .pari_ring import PariRing, Pari +from sage.rings.pari_ring import PariRing, Pari # p-adic field -from .padics.all__sagemath_pari import * +from sage.rings.padics.all__sagemath_pari import * # valuations -from .valuation.all import * +from sage.rings.valuation.all import * # Tate algebras -from .tate_algebra import TateAlgebra +from sage.rings.tate_algebra import TateAlgebra diff --git a/src/sage/rings/all__sagemath_symbolics.py b/src/sage/rings/all__sagemath_symbolics.py index 1334936c7a3..be07e478a77 100644 --- a/src/sage/rings/all__sagemath_symbolics.py +++ b/src/sage/rings/all__sagemath_symbolics.py @@ -1 +1 @@ -from .all__sagemath_modules import * +from sage.rings.all__sagemath_modules import * diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 5e7e652e861..92c168e2623 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -18,4 +18,4 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .all__sagemath_categories import * +from sage.rings.finite_rings.all__sagemath_categories import * diff --git a/src/sage/rings/finite_rings/all__sagemath_categories.py b/src/sage/rings/finite_rings/all__sagemath_categories.py index 00710ed2fe7..a2330a07fe4 100644 --- a/src/sage/rings/finite_rings/all__sagemath_categories.py +++ b/src/sage/rings/finite_rings/all__sagemath_categories.py @@ -1,8 +1,8 @@ -from .finite_field_constructor import FiniteField +from sage.rings.finite_rings.finite_field_constructor import FiniteField GF = FiniteField -from .conway_polynomials import conway_polynomial, exists_conway_polynomial +from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial # Finite residue fields -from .residue_field import ResidueField +from sage.rings.finite_rings.residue_field import ResidueField diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 8922ed8d173..2cd27c3894d 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,7 +1,7 @@ -from .all__sagemath_modules import * +from sage.rings.function_field.all__sagemath_modules import * try: - from .all__sagemath_symbolics import * + from sage.rings.function_field.all__sagemath_symbolics import * except ImportError: pass diff --git a/src/sage/rings/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py index b6bba3369c3..1cc1f1b8b2f 100644 --- a/src/sage/rings/function_field/all__sagemath_categories.py +++ b/src/sage/rings/function_field/all__sagemath_categories.py @@ -1 +1 @@ -from .constructor import FunctionField +from sage.rings.function_field.constructor import FunctionField diff --git a/src/sage/rings/function_field/all__sagemath_modules.py b/src/sage/rings/function_field/all__sagemath_modules.py index ae1d0ab8b43..f1bd876653e 100644 --- a/src/sage/rings/function_field/all__sagemath_modules.py +++ b/src/sage/rings/function_field/all__sagemath_modules.py @@ -1 +1 @@ -from .all__sagemath_categories import * +from sage.rings.function_field.all__sagemath_categories import * diff --git a/src/sage/rings/function_field/all__sagemath_symbolics.py b/src/sage/rings/function_field/all__sagemath_symbolics.py index 1334936c7a3..7c97e664309 100644 --- a/src/sage/rings/function_field/all__sagemath_symbolics.py +++ b/src/sage/rings/function_field/all__sagemath_symbolics.py @@ -1 +1 @@ -from .all__sagemath_modules import * +from sage.rings.function_field.all__sagemath_modules import * diff --git a/src/sage/rings/number_field/all.py b/src/sage/rings/number_field/all.py index 5c56f8cff58..ada4ee855c5 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -1,9 +1,9 @@ -from .number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, +from sage.rings.number_field.number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, is_fundamental_discriminant, is_real_place) -from .number_field_element import NumberFieldElement +from sage.rings.number_field.number_field_element import NumberFieldElement -from .order import EquationOrder, GaussianIntegers, EisensteinIntegers +from sage.rings.number_field.order import EquationOrder, GaussianIntegers, EisensteinIntegers from sage.misc.lazy_import import lazy_import as _lazy_import @@ -12,4 +12,4 @@ _lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_all') _lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') -from .unit_group import UnitGroup +from sage.rings.number_field.unit_group import UnitGroup diff --git a/src/sage/rings/padics/all.py b/src/sage/rings/padics/all.py index 016d922fd8a..457e8611c55 100644 --- a/src/sage/rings/padics/all.py +++ b/src/sage/rings/padics/all.py @@ -1,2 +1,2 @@ -from .all__sagemath_flint import * +from sage.rings.padics.all__sagemath_flint import * diff --git a/src/sage/rings/padics/all__sagemath_categories.py b/src/sage/rings/padics/all__sagemath_categories.py index c4e36e9c28b..fec72979f02 100644 --- a/src/sage/rings/padics/all__sagemath_categories.py +++ b/src/sage/rings/padics/all__sagemath_categories.py @@ -1 +1 @@ -from .padic_generic import local_print_mode +from sage.rings.padics.padic_generic import local_print_mode diff --git a/src/sage/rings/padics/all__sagemath_flint.py b/src/sage/rings/padics/all__sagemath_flint.py index d91f726d26f..6362a8551f0 100644 --- a/src/sage/rings/padics/all__sagemath_flint.py +++ b/src/sage/rings/padics/all__sagemath_flint.py @@ -1,2 +1,2 @@ -from .all__sagemath_ntl import * +from sage.rings.padics.all__sagemath_ntl import * diff --git a/src/sage/rings/padics/all__sagemath_ntl.py b/src/sage/rings/padics/all__sagemath_ntl.py index de062b61275..dfa31e55f90 100644 --- a/src/sage/rings/padics/all__sagemath_ntl.py +++ b/src/sage/rings/padics/all__sagemath_ntl.py @@ -1,4 +1,4 @@ -from .all__sagemath_pari import * +from sage.rings.padics.all__sagemath_pari import * -from .pow_computer_ext import PowComputer_ext_maker +from sage.rings.padics.pow_computer_ext import PowComputer_ext_maker diff --git a/src/sage/rings/padics/all__sagemath_pari.py b/src/sage/rings/padics/all__sagemath_pari.py index 4833e7a7e99..5072418e856 100644 --- a/src/sage/rings/padics/all__sagemath_pari.py +++ b/src/sage/rings/padics/all__sagemath_pari.py @@ -1,10 +1,10 @@ -from .all__sagemath_categories import * +from sage.rings.padics.all__sagemath_categories import * -from .factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER -from .factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER -from .factory import pAdicExtension +from sage.rings.padics.factory import Zp, Zq, Zp as pAdicRing, ZpCR, ZpCA, ZpFM, ZpFP, ZpLC, ZpLF, ZqCR, ZqCA, ZqFM, ZqFP, ZpER +from sage.rings.padics.factory import Qp, Qq, Qp as pAdicField, QpCR, QpFP, QpLC, QpLF, QqCR, QqFP, QpER +from sage.rings.padics.factory import pAdicExtension -from .padic_printing import _printer_defaults as padic_printing +from sage.rings.padics.padic_printing import _printer_defaults as padic_printing -from .pow_computer import PowComputer +from sage.rings.padics.pow_computer import PowComputer diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 36311c7c0b7..73e2e09aed7 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -18,8 +18,8 @@ from sage.misc.lazy_import import lazy_import -from .all__sagemath_categories import * -from .all__sagemath_modules import * +from sage.rings.polynomial.all__sagemath_categories import * +from sage.rings.polynomial.all__sagemath_modules import * # Generic convolution from sage.rings.polynomial.convolution import convolution diff --git a/src/sage/rings/semirings/all.py b/src/sage/rings/semirings/all.py index b14da38328a..55e69042077 100644 --- a/src/sage/rings/semirings/all.py +++ b/src/sage/rings/semirings/all.py @@ -1,2 +1,2 @@ -from .non_negative_integer_semiring import NonNegativeIntegerSemiring, NN -from .tropical_semiring import TropicalSemiring +from sage.rings.semirings.non_negative_integer_semiring import NonNegativeIntegerSemiring, NN +from sage.rings.semirings.tropical_semiring import TropicalSemiring diff --git a/src/sage/schemes/affine/all.py b/src/sage/schemes/affine/all.py index 68a540a9f1f..31edc39276b 100644 --- a/src/sage/schemes/affine/all.py +++ b/src/sage/schemes/affine/all.py @@ -20,5 +20,5 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .affine_space import AffineSpace -from .affine_rational_point import enum_affine_rational_field, enum_affine_finite_field +from sage.schemes.affine.affine_space import AffineSpace +from sage.schemes.affine.affine_rational_point import enum_affine_rational_field, enum_affine_finite_field diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index 9c70d129ed3..a40a19b9af4 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -20,20 +20,20 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .all__sagemath_categories import * +from sage.schemes.all__sagemath_categories import * -from .jacobians.all import * +from sage.schemes.jacobians.all import * -from .hyperelliptic_curves.all import * +from sage.schemes.hyperelliptic_curves.all import * -from .curves.all import * +from sage.schemes.curves.all import * -from .plane_conics.all import * +from sage.schemes.plane_conics.all import * -from .elliptic_curves.all import * +from sage.schemes.elliptic_curves.all import * -from .plane_quartics.all import * +from sage.schemes.plane_quartics.all import * -from .cyclic_covers.all import * +from sage.schemes.cyclic_covers.all import * -from .berkovich.all import * +from sage.schemes.berkovich.all import * diff --git a/src/sage/schemes/all__sagemath_categories.py b/src/sage/schemes/all__sagemath_categories.py index 49d803c968b..02c6722874e 100644 --- a/src/sage/schemes/all__sagemath_categories.py +++ b/src/sage/schemes/all__sagemath_categories.py @@ -1,4 +1,4 @@ -from .generic.all import * -from .affine.all import * -from .projective.all import * -from .product_projective.all import * +from sage.schemes.generic.all import * +from sage.schemes.affine.all import * +from sage.schemes.projective.all import * +from sage.schemes.product_projective.all import * diff --git a/src/sage/schemes/all__sagemath_polyhedra.py b/src/sage/schemes/all__sagemath_polyhedra.py index 2e641cf8c56..2dc39d42014 100644 --- a/src/sage/schemes/all__sagemath_polyhedra.py +++ b/src/sage/schemes/all__sagemath_polyhedra.py @@ -1 +1 @@ -from .toric.all import * +from sage.schemes.toric.all import * diff --git a/src/sage/schemes/berkovich/all.py b/src/sage/schemes/berkovich/all.py index cc7af01a057..18b4254e4a8 100644 --- a/src/sage/schemes/berkovich/all.py +++ b/src/sage/schemes/berkovich/all.py @@ -2,4 +2,4 @@ all.py -- export of Berkovich spaces to all of Sage """ -from .berkovich_space import Berkovich_Cp_Affine, Berkovich_Cp_Projective +from sage.schemes.berkovich.berkovich_space import Berkovich_Cp_Affine, Berkovich_Cp_Projective diff --git a/src/sage/schemes/curves/all.py b/src/sage/schemes/curves/all.py index 147c2e1e6fe..ec0af61d2f7 100644 --- a/src/sage/schemes/curves/all.py +++ b/src/sage/schemes/curves/all.py @@ -20,6 +20,6 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .constructor import Curve +from sage.schemes.curves.constructor import Curve -from .projective_curve import Hasse_bounds +from sage.schemes.curves.projective_curve import Hasse_bounds diff --git a/src/sage/schemes/cyclic_covers/all.py b/src/sage/schemes/cyclic_covers/all.py index b1fcd806e7a..88b3d6b3f04 100644 --- a/src/sage/schemes/cyclic_covers/all.py +++ b/src/sage/schemes/cyclic_covers/all.py @@ -1 +1 @@ -from .constructor import CyclicCover +from sage.schemes.cyclic_covers.constructor import CyclicCover diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index f4abce51a62..144f6a88df9 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -17,7 +17,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .constructor import (EllipticCurve, +from sage.schemes.elliptic_curves.constructor import (EllipticCurve, EllipticCurve_from_c4c6, EllipticCurve_from_j, EllipticCurve_from_cubic, @@ -29,19 +29,15 @@ lazy_import('sage.schemes.elliptic_curves.ell_rational_field', ['cremona_curves', 'cremona_optimal_curves']) -lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve') - -from .cm import ( cm_orders, +from sage.schemes.elliptic_curves.cm import ( cm_orders, cm_j_invariants, cm_j_invariants_and_orders, hilbert_class_polynomial ) lazy_import('sage.schemes.elliptic_curves.ec_database', 'elliptic_curves') -from .kodaira_symbol import KodairaSymbol - -from .ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel +from sage.schemes.elliptic_curves.kodaira_symbol import KodairaSymbol -lazy_import('sage.schemes.elliptic_curves.mod_poly', 'classical_modular_polynomial') +from sage.schemes.elliptic_curves.ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel -from .heegner import heegner_points, heegner_point +from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point diff --git a/src/sage/schemes/generic/all.py b/src/sage/schemes/generic/all.py index b8ba9585bfa..a58cc24efd2 100644 --- a/src/sage/schemes/generic/all.py +++ b/src/sage/schemes/generic/all.py @@ -1,4 +1,4 @@ # code exports -from .spec import Spec -from .hypersurface import ProjectiveHypersurface, AffineHypersurface +from sage.schemes.generic.spec import Spec +from sage.schemes.generic.hypersurface import ProjectiveHypersurface, AffineHypersurface diff --git a/src/sage/schemes/hyperelliptic_curves/all.py b/src/sage/schemes/hyperelliptic_curves/all.py index 88733235129..298e40671fd 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -1,4 +1,45 @@ -from .constructor import HyperellipticCurve -from .kummer_surface import KummerSurface -from .mestre import (Mestre_conic, HyperellipticCurve_from_invariants) -from . import monsky_washnitzer +""" +Tests for deprecations of imports in global namespace from :trac:`28064`:: + + sage: igusa_clebsch_invariants + doctest:warning...: + DeprecationWarning: + Importing igusa_clebsch_invariants from here is deprecated; + please use "from sage.schemes.hyperelliptic_curves.invariants import igusa_clebsch_invariants" instead. + See https://github.com/sagemath/sage/issues/28064 for details. + ... + + sage: absolute_igusa_invariants_kohel + doctest:warning...: + DeprecationWarning: + Importing absolute_igusa_invariants_kohel from here is deprecated; + please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_kohel" instead. + See https://github.com/sagemath/sage/issues/28064 for details. + ... + + sage: absolute_igusa_invariants_wamelen + doctest:warning...: + DeprecationWarning: + Importing absolute_igusa_invariants_wamelen from here is deprecated; + please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_wamelen" instead. + See https://github.com/sagemath/sage/issues/28064 for details. + ... + + sage: clebsch_invariants + doctest:warning...: + DeprecationWarning: + Importing clebsch_invariants from here is deprecated; + please use "from sage.schemes.hyperelliptic_curves.invariants import clebsch_invariants" instead. + See https://github.com/sagemath/sage/issues/28064 for details. + ... +""" +from sage.misc.lazy_import import lazy_import + +from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve +from sage.schemes.hyperelliptic_curves.kummer_surface import KummerSurface +lazy_import('sage.schemes.hyperelliptic_curves.invariants', + ['igusa_clebsch_invariants', 'absolute_igusa_invariants_kohel', + 'absolute_igusa_invariants_wamelen', 'clebsch_invariants'], + deprecation=28064) +from sage.schemes.hyperelliptic_curves.mestre import (Mestre_conic, HyperellipticCurve_from_invariants) +from sage.schemes.hyperelliptic_curves import monsky_washnitzer diff --git a/src/sage/schemes/plane_conics/all.py b/src/sage/schemes/plane_conics/all.py index b0237ba2e7c..0ac534ebe27 100644 --- a/src/sage/schemes/plane_conics/all.py +++ b/src/sage/schemes/plane_conics/all.py @@ -18,4 +18,4 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from .constructor import Conic +from sage.schemes.plane_conics.constructor import Conic diff --git a/src/sage/schemes/plane_quartics/all.py b/src/sage/schemes/plane_quartics/all.py index 6986f1ec1fa..1f60d332efe 100644 --- a/src/sage/schemes/plane_quartics/all.py +++ b/src/sage/schemes/plane_quartics/all.py @@ -1 +1 @@ -from .quartic_constructor import QuarticCurve +from sage.schemes.plane_quartics.quartic_constructor import QuarticCurve diff --git a/src/sage/schemes/projective/all.py b/src/sage/schemes/projective/all.py index 44e92ee5f23..91c821115d1 100644 --- a/src/sage/schemes/projective/all.py +++ b/src/sage/schemes/projective/all.py @@ -20,4 +20,4 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from .projective_space import ProjectiveSpace, is_ProjectiveSpace +from sage.schemes.projective.projective_space import ProjectiveSpace, is_ProjectiveSpace diff --git a/src/sage/sets/all.py b/src/sage/sets/all.py index 1c1a69e57a7..4ad89651388 100644 --- a/src/sage/sets/all.py +++ b/src/sage/sets/all.py @@ -1,15 +1,15 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.sets.real_set', 'RealSet') -from .set import Set -from .integer_range import IntegerRange -from .non_negative_integers import NonNegativeIntegers -from .positive_integers import PositiveIntegers -from .finite_enumerated_set import FiniteEnumeratedSet +from sage.sets.set import Set +from sage.sets.integer_range import IntegerRange +from sage.sets.non_negative_integers import NonNegativeIntegers +from sage.sets.positive_integers import PositiveIntegers +from sage.sets.finite_enumerated_set import FiniteEnumeratedSet lazy_import('sage.sets.recursively_enumerated_set','RecursivelyEnumeratedSet') -from .totally_ordered_finite_set import TotallyOrderedFiniteSet -from .disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets -from .primes import Primes -from .family import Family -from .disjoint_set import DisjointSet -from .condition_set import ConditionSet -from .finite_set_maps import FiniteSetMaps +from sage.sets.totally_ordered_finite_set import TotallyOrderedFiniteSet +from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets +from sage.sets.primes import Primes +from sage.sets.family import Family +from sage.sets.disjoint_set import DisjointSet +from sage.sets.condition_set import ConditionSet +from sage.sets.finite_set_maps import FiniteSetMaps diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 253735e46d7..63c3cb9c668 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,5 +1,5 @@ -from .basic_stats import (mean, mode, std, variance, median, moving_average) -from .hmm import all as hmm +from sage.stats.basic_stats import (mean, mode, std, variance, median, moving_average) +from sage.stats.hmm import all as hmm from sage.misc.lazy_import import lazy_import diff --git a/src/sage/structure/proof/all.py b/src/sage/structure/proof/all.py index c006c56c36d..06295f79e80 100644 --- a/src/sage/structure/proof/all.py +++ b/src/sage/structure/proof/all.py @@ -35,7 +35,7 @@ def arithmetic(t=None): sage: proof.arithmetic() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs return _proof_prefs.arithmetic(t) @@ -73,7 +73,7 @@ def elliptic_curve(t=None): sage: proof.elliptic_curve() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs return _proof_prefs.elliptic_curve(t) @@ -111,7 +111,7 @@ def linear_algebra(t=None): sage: proof.linear_algebra() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs return _proof_prefs.linear_algebra(t) @@ -148,7 +148,7 @@ def number_field(t=None): sage: proof.number_field() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs return _proof_prefs.number_field(t) @@ -185,7 +185,7 @@ def polynomial(t=None): sage: proof.polynomial() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs return _proof_prefs.polynomial(t) @@ -234,11 +234,11 @@ def all(t=None): sage: proof.number_field() True """ - from .proof import _proof_prefs + from sage.structure.proof.proof import _proof_prefs if t is None: return _proof_prefs._require_proof.copy() for s in _proof_prefs._require_proof: _proof_prefs._require_proof[s] = bool(t) -from .proof import WithProof +from sage.structure.proof.proof import WithProof diff --git a/src/sage/symbolic/all.py b/src/sage/symbolic/all.py index b5a0883d202..742f49146ca 100644 --- a/src/sage/symbolic/all.py +++ b/src/sage/symbolic/all.py @@ -1,14 +1,14 @@ -from .ring import SR -from .constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, +from sage.symbolic.ring import SR +from sage.symbolic.constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, khinchin, twinprime, mertens, glaisher) -from .expression import Expression, solve_diophantine, hold -from .callable import CallableSymbolicExpressionRing +from sage.symbolic.expression import Expression, solve_diophantine, hold +from sage.symbolic.callable import CallableSymbolicExpressionRing from sage.symbolic.relation import solve, solve_mod, solve_ineq from sage.symbolic.assumptions import assume, forget, assumptions, assuming -from .units import units +from sage.symbolic.units import units π = pi -from .operators import D +from sage.symbolic.operators import D diff --git a/src/sage/tensor/all.py b/src/sage/tensor/all.py index dc52f0b09ed..e73549851e5 100644 --- a/src/sage/tensor/all.py +++ b/src/sage/tensor/all.py @@ -1 +1 @@ -from .modules.all import * +from sage.tensor.modules.all import * diff --git a/src/sage/topology/all.py b/src/sage/topology/all.py index 53b89564daa..32339d70cfa 100644 --- a/src/sage/topology/all.py +++ b/src/sage/topology/all.py @@ -1,11 +1,11 @@ # sage.doctest: needs sage.graphs -from .simplicial_complex import SimplicialComplex, Simplex +from sage.topology.simplicial_complex import SimplicialComplex, Simplex -from .simplicial_complex_morphism import SimplicialComplexMorphism +from sage.topology.simplicial_complex_morphism import SimplicialComplexMorphism -from .delta_complex import DeltaComplex, delta_complexes +from sage.topology.delta_complex import DeltaComplex, delta_complexes -from .cubical_complex import CubicalComplex, cubical_complexes +from sage.topology.cubical_complex import CubicalComplex, cubical_complexes from sage.misc.lazy_import import lazy_import lazy_import('sage.topology.filtered_simplicial_complex', 'FilteredSimplicialComplex') From 0b7f892db47f4bd141b26c2dae7a0ca6446efea3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 08:02:05 -0800 Subject: [PATCH 04/27] Fixups in .all* --- src/sage/libs/all__sagemath_gap.py | 2 ++ src/sage/rings/all.py | 1 + src/sage/schemes/all.py | 1 + 3 files changed, 4 insertions(+) diff --git a/src/sage/libs/all__sagemath_gap.py b/src/sage/libs/all__sagemath_gap.py index e69de29bb2d..05f57227606 100644 --- a/src/sage/libs/all__sagemath_gap.py +++ b/src/sage/libs/all__sagemath_gap.py @@ -0,0 +1,2 @@ +from sage.misc.lazy_import import lazy_import +lazy_import('sage.libs.gap.libgap', 'libgap') diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index 4cffc119a67..d66dcf2dad7 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -14,6 +14,7 @@ from sage.rings.all__sagemath_combinat import * from sage.rings.all__sagemath_flint import * +from sage.rings.all__sagemath_gap import * from sage.rings.all__sagemath_modules import * try: diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index a40a19b9af4..bc5b7441628 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -21,6 +21,7 @@ #***************************************************************************** from sage.schemes.all__sagemath_categories import * +from sage.schemes.all__sagemath_polyhedra import * from sage.schemes.jacobians.all import * From 6a8f404a6f185e4ff9e3ce9a3f3d693c1630e6d8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 12:09:39 -0800 Subject: [PATCH 05/27] Reverts --- src/sage/algebras/all__sagemath_combinat.py | 4 ++-- src/sage/combinat/all__sagemath_combinat.py | 4 +--- src/sage/combinat/sf/all.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py index 6cbe558cbdc..57e5006e1d4 100644 --- a/src/sage/algebras/all__sagemath_combinat.py +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -2,8 +2,8 @@ # Algebra base classes -lazy_import('sage.algebras.free_algebra', 'FreeAlgebra') -lazy_import('sage.algebras.free_algebra_quotient', 'FreeAlgebraQuotient') +from sage.algebras.free_algebra import FreeAlgebra +from sage.algebras.free_algebra_quotient import FreeAlgebraQuotient from sage.algebras.steenrod.all import * from sage.algebras.quantum_groups.all import * diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index 36a8fd061cf..d7ea5dcc442 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -46,9 +46,7 @@ lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) # Partition algebra -lazy_import('sage.combinat.partition_algebra', ['SetPartitionsAk', 'SetPartitionsPk', 'SetPartitionsTk', - 'SetPartitionsIk', 'SetPartitionsBk', 'SetPartitionsSk', - 'SetPartitionsRk', 'SetPartitionsPRk']) +from .partition_algebra import SetPartitionsAk, SetPartitionsPk, SetPartitionsTk, SetPartitionsIk, SetPartitionsBk, SetPartitionsSk, SetPartitionsRk, SetPartitionsPRk # Raising operators lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') diff --git a/src/sage/combinat/sf/all.py b/src/sage/combinat/sf/all.py index 00f8e4f2bdf..e4601264e83 100644 --- a/src/sage/combinat/sf/all.py +++ b/src/sage/combinat/sf/all.py @@ -36,7 +36,7 @@ # In the long run, this will be the single entry point # Nothing else will be exported -lazy_import('sage.combinat.sf.sf', 'SymmetricFunctions') +from sage.combinat.sf.sf import SymmetricFunctions # Advanced stuff: From c791f781a8364e025d3d6af2d50b034868b7571f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 12:12:23 -0800 Subject: [PATCH 06/27] Restores --- src/sage/misc/all.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 005f730cd7b..8f1d920cec6 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -3,6 +3,16 @@ from sage.misc.all__sagemath_modules import * from sage.misc.all__sagemath_repl import * +from sage.misc.misc import (BackslashOperator, + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) +lazy_import('sage.misc.misc', 'union', + deprecation=32096) + from sage.misc.remote_file import get_remote_file lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) From 366035ef0431d61c79e1ba15724b713369c31c5a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 8 Nov 2023 18:53:21 -0800 Subject: [PATCH 07/27] src/sage/misc/dev_tools.py: Update doctest output --- src/sage/misc/dev_tools.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/misc/dev_tools.py b/src/sage/misc/dev_tools.py index 8a4420f2314..eebdee757c8 100644 --- a/src/sage/misc/dev_tools.py +++ b/src/sage/misc/dev_tools.py @@ -148,6 +148,7 @@ def load_submodules(module=None, exclude_pattern=None): EXAMPLES:: sage: sage.misc.dev_tools.load_submodules(sage.combinat) + load sage.combinat.affine_permutation... succeeded load sage.combinat.algebraic_combinatorics... succeeded ... load sage.combinat.words.suffix_trees... succeeded From a96f5708ded6f89b9405302f8d5332b5224dfb31 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 9 Nov 2023 13:09:16 -0800 Subject: [PATCH 08/27] src/sage/misc/sageinspect.py: Update doctests for increased use of lazy imports --- src/sage/misc/sageinspect.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index f79aeafb937..c69635ddf34 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -1308,6 +1308,7 @@ def sage_getfile(obj): sage: from sage.misc.sageinspect import sage_getfile sage: sage_getfile(sage.rings.rational) '...sage/rings/rational.pyx' + sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules sage: sage_getfile(Sq) # needs sage.combinat sage.modules '...sage/algebras/steenrod/steenrod_algebra.py' sage: sage_getfile(x) # needs sage.symbolic @@ -1386,6 +1387,7 @@ def sage_getfile_relative(obj): sage: from sage.misc.sageinspect import sage_getfile_relative sage: sage_getfile_relative(sage.rings.rational) 'sage/rings/rational.pyx' + sage: from sage.algebras.steenrod.steenrod_algebra import Sq # needs sage.combinat sage.modules sage: sage_getfile_relative(Sq) # needs sage.combinat sage.modules 'sage/algebras/steenrod/steenrod_algebra.py' sage: sage_getfile_relative(x) # needs sage.symbolic @@ -2265,9 +2267,8 @@ def sage_getsourcelines(obj): EXAMPLES:: sage: from sage.misc.sageinspect import sage_getsourcelines - - sage: # needs sage.modules - sage: sage_getsourcelines(matrix)[1] + sage: from sage.matrix.constructor import matrix # needs sage.modules + sage: sage_getsourcelines(matrix)[1] # needs sage.modules 21 sage: sage_getsourcelines(matrix)[0][0] 'def matrix(*args, **kwds):\n' From c749f35cfb9c8e6cc61b42a50febc57ceddc913d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 9 Nov 2023 15:54:58 -0800 Subject: [PATCH 09/27] Defer some changes to all__sagemath_{objects,categories} until #36566 --- src/sage/misc/all.py | 7 +++ src/sage/misc/all__sagemath_objects.py | 9 --- src/sage/rings/all.py | 69 ++++++++++++++++++++++ src/sage/rings/all__sagemath_categories.py | 69 ++-------------------- 4 files changed, 82 insertions(+), 72 deletions(-) diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 8f1d920cec6..2d1d66315ef 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -20,3 +20,10 @@ from sage.misc.classgraph import class_graph lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) + +# Following will go to all__sagemath_objects.py in #36566 +from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate +from sage.misc.prandom import * +from sage.misc.sage_timeit_class import timeit +from sage.misc.session import load_session, save_session, show_identifiers +from sage.misc.reset import reset, restore diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index efdf3f1eb7c..30a76f38fab 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -33,13 +33,4 @@ from sage.misc.abstract_method import abstract_method -from sage.misc.randstate import seed, set_random_seed, initial_seed, current_randstate - -from sage.misc.prandom import * - from sage.misc.timing import walltime, cputime - -from sage.misc.sage_timeit_class import timeit - -from sage.misc.session import load_session, save_session, show_identifiers -from sage.misc.reset import reset, restore diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index d66dcf2dad7..e920a6f363d 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -22,20 +22,89 @@ except ImportError: pass +### Following will go to all__sagemath_categories.py in #36566 + +# Quotient +from sage.rings.quotient_ring import QuotientRing + +# Infinities +from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing +oo = infinity + +# Rational integers. +from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis +from sage.rings.integer import Integer + +# Rational numbers +from sage.rings.rational import Rational +from sage.rings.rational_field import RationalField, QQ +Rationals = RationalField + +# Integers modulo n. +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod +from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod +Integers = IntegerModRing + +### up to here (#36566) + # Finite fields from sage.rings.finite_rings.all import * # Function field from sage.rings.function_field.all import * +### Following will go to all__sagemath_categories.py in #36566 + +# Semirings +from sage.rings.semirings.all import * + +# Double precision floating point numbers +from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement + +# Lazy reals +from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF + +### up to here (#36566) + # Polynomial Rings and Polynomial Quotient Rings from sage.rings.polynomial.all import * +### Following will go to all__sagemath_categories.py in #36566 + +# Power series rings +from sage.rings.power_series_ring import PowerSeriesRing + +# Laurent series ring in one variable +from sage.rings.laurent_series_ring import LaurentSeriesRing + +# Puiseux series ring +from sage.rings.puiseux_series_ring import PuiseuxSeriesRing + +# Big-oh notation +from sage.rings.big_oh import O + +# Fraction field +from sage.rings.fraction_field import FractionField +Frac = FractionField + +# Localization +from sage.rings.localization import Localization + +### up to here (#36566) + # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences from sage.rings.fast_arith import prime_range +### Following will go to all__sagemath_categories.py in #36566 + +# continued fractions +from sage.rings.continued_fraction import (continued_fraction, + continued_fraction_list) + +### up to here (#36566) + # asymptotic ring #from sage.rings.asymptotic.all import * lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index ac3c996e2d2..04e818c55b0 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -8,71 +8,14 @@ DedekindDomainElement, PrincipalIdealDomainElement, EuclideanDomainElement, FieldElement) -# Rational numbers -from sage.rings.rational import Rational -from sage.rings.rational_field import RationalField, QQ -Rationals = RationalField - -# Rational integers. -from sage.rings.integer_ring import IntegerRing, ZZ, crt_basis -from sage.rings.integer import Integer - -# Integers modulo n. -from sage.rings.finite_rings.integer_mod_ring import IntegerModRing, Zmod -from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod -Integers = IntegerModRing - -# Infinities -from sage.rings.infinity import infinity, Infinity, InfinityRing, unsigned_infinity, UnsignedInfinityRing -oo = infinity - -# Quotient -from sage.rings.quotient_ring import QuotientRing - -# Localization -from sage.rings.localization import Localization - -# Fraction field -from sage.rings.fraction_field import FractionField -Frac = FractionField - -# Function field -from sage.rings.function_field.all__sagemath_categories import * - -# Double precision floating point numbers -from sage.rings.real_double import RealDoubleField, RDF, RealDoubleElement - # Ideals from sage.rings.ideal import Ideal ideal = Ideal -# Semirings -from sage.rings.semirings.all import * - -from sage.rings.finite_rings.all__sagemath_categories import * -from sage.rings.number_field.all__sagemath_categories import * -from sage.rings.padics.all__sagemath_categories import * -from sage.rings.polynomial.all__sagemath_categories import * - -# Power series rings -from sage.rings.power_series_ring import PowerSeriesRing - -# Laurent series ring in one variable -from sage.rings.laurent_series_ring import LaurentSeriesRing - -# Puiseux series ring -from sage.rings.puiseux_series_ring import PuiseuxSeriesRing - -# Big-oh notation -from sage.rings.big_oh import O - -# continued fractions -from sage.rings.continued_fraction import (continued_fraction, - continued_fraction_list) - -# Lazy reals -from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF +### To be added in #36566: -# Preliminary version of real numbers for doctesting without sage.rings.real_mpfr. -# sage.rings.all redefines it. -RealNumber = RR = RDF # used by the preparser to wrap real literals +#from sage.rings.finite_rings.all__sagemath_categories import * +#from sage.rings.function_field.all__sagemath_categories import * +#from sage.rings.number_field.all__sagemath_categories import * +#from sage.rings.padics.all__sagemath_categories import * +#from sage.rings.polynomial.all__sagemath_categories import * From 563a3f2705a207c20cba8012e31f3d67a28947ef Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 9 Nov 2023 18:04:53 -0800 Subject: [PATCH 10/27] sage -fixdoctests --no-test --distribution sagemath_categories --update-known-test-failures --- .../known-test-failures.json | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index ddae185a7d9..3f7973d7fee 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -26,7 +26,7 @@ "ntests": 28 }, "sage.categories.affine_weyl_groups": { - "ntests": 14 + "ntests": 15 }, "sage.categories.algebra_ideals": { "failed": true, @@ -148,7 +148,7 @@ }, "sage.categories.coxeter_groups": { "failed": true, - "ntests": 362 + "ntests": 363 }, "sage.categories.cw_complexes": { "failed": true, @@ -301,7 +301,7 @@ }, "sage.categories.finite_complex_reflection_groups": { "failed": true, - "ntests": 178 + "ntests": 199 }, "sage.categories.finite_coxeter_groups": { "ntests": 6 @@ -493,10 +493,6 @@ "failed": true, "ntests": 13 }, - "sage.categories.inner_product_spaces": { - "failed": true, - "ntests": 9 - }, "sage.categories.integral_domains": { "failed": true, "ntests": 22 @@ -783,7 +779,7 @@ }, "sage.cpython.debug": { "failed": true, - "ntests": 14 + "ntests": 13 }, "sage.cpython.dict_del_by_value": { "failed": true, @@ -826,7 +822,6 @@ "ntests": 321 }, "sage.doctest.reporting": { - "failed": true, "ntests": 124 }, "sage.doctest.sources": { @@ -1091,7 +1086,7 @@ }, "sage.misc.sageinspect": { "failed": true, - "ntests": 329 + "ntests": 332 }, "sage.misc.superseded": { "failed": true, @@ -1124,6 +1119,7 @@ "ntests": 128 }, "sage.repl.configuration": { + "failed": true, "ntests": 22 }, "sage.repl.display.fancy_repr": { @@ -1149,6 +1145,7 @@ "ntests": 42 }, "sage.repl.inputhook": { + "failed": true, "ntests": 7 }, "sage.repl.interface_magic": { @@ -1157,7 +1154,7 @@ }, "sage.repl.interpreter": { "failed": true, - "ntests": 118 + "ntests": 114 }, "sage.repl.ipython_extension": { "failed": true, @@ -1188,7 +1185,7 @@ }, "sage.repl.load": { "failed": true, - "ntests": 42 + "ntests": 38 }, "sage.repl.preparse": { "failed": true, @@ -1315,9 +1312,6 @@ "sage.structure.global_options": { "ntests": 145 }, - "sage.structure.graphics_file": { - "ntests": 8 - }, "sage.structure.indexed_generators": { "failed": true, "ntests": 90 From 22395ae4af7e47743f1d85ee6716e6ecb283be4f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 9 Nov 2023 18:24:32 -0800 Subject: [PATCH 11/27] Defer some changes to all__sagemath_repl until #36566 --- src/sage/misc/all.py | 25 ++++++++++++++++++++++++- src/sage/misc/all__sagemath_repl.py | 29 ----------------------------- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 2d1d66315ef..e22f9c60cda 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -13,12 +13,35 @@ lazy_import('sage.misc.misc', 'union', deprecation=32096) +from sage.misc.dev_tools import import_statements + +from sage.misc.edit_module import edit + from sage.misc.remote_file import get_remote_file -lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) +lazy_import('sage.misc.pager', 'pager') from sage.misc.classgraph import class_graph +lazy_import("sage.misc.cython", "cython_lambda") +lazy_import("sage.misc.cython", "cython_compile", "cython") + +# Following will go to all__sagemath_repl.py in #36566 +from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends + +lazy_import('sage.misc.inline_fortran', 'fortran') + +lazy_import('sage.misc.banner', 'banner', deprecation=34259) +lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) +lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) +lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) +lazy_import('sage.misc.dist', 'install_scripts', deprecation=34259) +lazy_import('sage.misc.trace', 'trace', deprecation=34259) +lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', + 'standard_packages', 'optional_packages', + 'experimental_packages', 'package_versions'), + deprecation=34259) +lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) lazy_import('sage.repl.interpreter', 'logstr', deprecation=34259) # Following will go to all__sagemath_objects.py in #36566 diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index d33895f25f0..15074e16be1 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -6,38 +6,9 @@ from sage.misc.banner import version -lazy_import('sage.misc.banner', 'banner', deprecation=34259) - lazy_import('sage.misc.sagedoc', ['browse_sage_doc', 'search_src', 'search_def', 'search_doc', 'tutorial', 'reference', 'manual', 'developer', 'constructions', 'help']) lazy_import('pydoc', 'help', 'python_help') - -from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends - -lazy_import('sage.misc.trace', 'trace', deprecation=34259) - -lazy_import('sage.misc.profiler', 'Profiler', deprecation=34259) - -from sage.misc.dev_tools import import_statements - -lazy_import('sage.misc.dev_tools', 'runsnake', deprecation=34259) - -from sage.misc.edit_module import edit - -lazy_import('sage.misc.edit_module', 'set_edit_template', deprecation=34259) - -lazy_import('sage.misc.pager', 'pager') - - -lazy_import("sage.misc.cython", "cython_lambda") -lazy_import("sage.misc.cython", "cython_compile", "cython") -lazy_import('sage.misc.inline_fortran', 'fortran') - -lazy_import('sage.misc.package', ('installed_packages', 'is_package_installed', - 'standard_packages', 'optional_packages', - 'experimental_packages', 'package_versions')) - -lazy_import('sage.misc.benchmark', 'benchmark', deprecation=34259) From 7de8387be899d0062ea74e900656c4bce64d0dee Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 10 Nov 2023 13:48:46 -0800 Subject: [PATCH 12/27] src/sage/calculus/all.py: Move 'symbolic_expression' to new module .expr --- src/doc/en/reference/calculus/index.rst | 1 + src/sage/calculus/all.py | 207 +----------------------- src/sage/calculus/expr.py | 204 +++++++++++++++++++++++ 3 files changed, 207 insertions(+), 205 deletions(-) create mode 100644 src/sage/calculus/expr.py diff --git a/src/doc/en/reference/calculus/index.rst b/src/doc/en/reference/calculus/index.rst index c9a5158e522..89174c4a062 100644 --- a/src/doc/en/reference/calculus/index.rst +++ b/src/doc/en/reference/calculus/index.rst @@ -23,6 +23,7 @@ Using calculus - :doc:`More about symbolic variables and functions ` - :doc:`Main operations on symbolic expressions ` +- :doc:`sage/calculus/expr` - :doc:`Assumptions about symbols and functions ` - :doc:`sage/symbolic/relation` - :doc:`sage/symbolic/integration/integral` diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index b9e92f597a0..b597a15684b 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,7 +1,6 @@ from sage.calculus.all__sagemath_modules import * -from sage.misc.lazy_import import lazy_import - +from sage.calculus import desolvers from sage.calculus.calculus import maxima as maxima_calculus from sage.calculus.calculus import (laplace, inverse_laplace, limit, lim) @@ -10,207 +9,5 @@ eulers_method, eulers_method_2x2, eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, desolve_odeint, desolve_mintides, desolve_tides_mpfr) - +from sage.calculus.expr import symbolic_expression from sage.calculus.var import (var, function, clear_vars) - -lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) -lazy_import('sage.matrix.constructor', 'matrix') - - -def symbolic_expression(x): - """ - Create a symbolic expression or vector of symbolic expressions from x. - - INPUT: - - - ``x`` - an object - - OUTPUT: - - - a symbolic expression. - - EXAMPLES:: - - sage: a = symbolic_expression(3/2); a - 3/2 - sage: type(a) - - sage: R. = QQ[]; type(x) - - sage: a = symbolic_expression(2*x^2 + 3); a - 2*x^2 + 3 - sage: type(a) - - sage: from sage.structure.element import Expression - sage: isinstance(a, Expression) - True - sage: a in SR - True - sage: a.parent() - Symbolic Ring - - Note that equations exist in the symbolic ring:: - - sage: # needs sage.schemes - sage: E = EllipticCurve('15a'); E - Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field - sage: symbolic_expression(E) - x*y + y^2 + y == x^3 + x^2 - 10*x - 10 - sage: symbolic_expression(E) in SR - True - - If ``x`` is a list or tuple, create a vector of symbolic expressions:: - - sage: v = symbolic_expression([x,1]); v - (x, 1) - sage: v.base_ring() - Symbolic Ring - sage: v = symbolic_expression((x,1)); v - (x, 1) - sage: v.base_ring() - Symbolic Ring - sage: v = symbolic_expression((3,1)); v - (3, 1) - sage: v.base_ring() - Symbolic Ring - sage: E = EllipticCurve('15a'); E - Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field - sage: v = symbolic_expression([E,E]); v - (x*y + y^2 + y == x^3 + x^2 - 10*x - 10, x*y + y^2 + y == x^3 + x^2 - 10*x - 10) - sage: v.base_ring() - Symbolic Ring - - Likewise, if ``x`` is a vector, create a vector of symbolic expressions:: - - sage: u = vector([1, 2, 3]) - sage: v = symbolic_expression(u); v - (1, 2, 3) - sage: v.parent() - Vector space of dimension 3 over Symbolic Ring - - If ``x`` is a list or tuple of lists/tuples/vectors, create a matrix of symbolic expressions:: - - sage: M = symbolic_expression([[1, x, x^2], (x, x^2, x^3), vector([x^2, x^3, x^4])]); M - [ 1 x x^2] - [ x x^2 x^3] - [x^2 x^3 x^4] - sage: M.parent() - Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring - - If ``x`` is a matrix, create a matrix of symbolic expressions:: - - sage: A = matrix([[1, 2, 3], [4, 5, 6]]) - sage: B = symbolic_expression(A); B - [1 2 3] - [4 5 6] - sage: B.parent() - Full MatrixSpace of 2 by 3 dense matrices over Symbolic Ring - - If ``x`` is a function, for example defined by a ``lambda`` expression, create a - symbolic function:: - - sage: f = symbolic_expression(lambda z: z^2 + 1); f - z |--> z^2 + 1 - sage: f.parent() - Callable function ring with argument z - sage: f(7) - 50 - - If ``x`` is a list or tuple of functions, or if ``x`` is a function that returns a list - or tuple, create a callable symbolic vector:: - - sage: symbolic_expression([lambda mu, nu: mu^2 + nu^2, lambda mu, nu: mu^2 - nu^2]) - (mu, nu) |--> (mu^2 + nu^2, mu^2 - nu^2) - sage: f = symbolic_expression(lambda uwu: [1, uwu, uwu^2]); f - uwu |--> (1, uwu, uwu^2) - sage: f.parent() - Vector space of dimension 3 over Callable function ring with argument uwu - sage: f(5) - (1, 5, 25) - sage: f(5).parent() - Vector space of dimension 3 over Symbolic Ring - - TESTS: - - Lists, tuples, and vectors of length 0 become vectors over a symbolic ring:: - - sage: symbolic_expression([]).parent() - Vector space of dimension 0 over Symbolic Ring - sage: symbolic_expression(()).parent() - Vector space of dimension 0 over Symbolic Ring - sage: symbolic_expression(vector(QQ, 0)).parent() - Vector space of dimension 0 over Symbolic Ring - - If a matrix has dimension 0, the result is still a matrix over a symbolic ring:: - - sage: symbolic_expression(matrix(QQ, 2, 0)).parent() - Full MatrixSpace of 2 by 0 dense matrices over Symbolic Ring - sage: symbolic_expression(matrix(QQ, 0, 3)).parent() - Full MatrixSpace of 0 by 3 dense matrices over Symbolic Ring - - Also functions defined using ``def`` can be used, but we do not advertise it as a use case:: - - sage: def sos(x, y): - ....: return x^2 + y^2 - sage: symbolic_expression(sos) - (x, y) |--> x^2 + y^2 - - Functions that take a varying number of arguments or keyword-only arguments are not accepted:: - - sage: def variadic(x, *y): - ....: return x - sage: symbolic_expression(variadic) - Traceback (most recent call last): - ... - TypeError: unable to convert to a symbolic expression - - sage: def function_with_keyword_only_arg(x, *, sign=1): - ....: return sign * x - sage: symbolic_expression(function_with_keyword_only_arg) - Traceback (most recent call last): - ... - TypeError: unable to convert - to a symbolic expression - """ - from sage.structure.element import is_Matrix - from sage.symbolic.expression import Expression - from sage.symbolic.ring import SR - - if isinstance(x, Expression): - return x - elif hasattr(x, '_symbolic_'): - return x._symbolic_(SR) - elif isinstance(x, (tuple, list, FreeModuleElement)): - expressions = [symbolic_expression(item) for item in x] - if not expressions: - # Make sure it is symbolic also when length is 0 - return vector(SR, 0) - if isinstance(expressions[0], FreeModuleElement): - return matrix(expressions) - return vector(expressions) - elif is_Matrix(x): - if not x.nrows() or not x.ncols(): - # Make sure it is symbolic and of correct dimensions - # also when a matrix dimension is 0 - return matrix(SR, x.nrows(), x.ncols()) - rows = [symbolic_expression(row) for row in x.rows()] - return matrix(rows) - elif callable(x): - from inspect import signature, Parameter - try: - s = signature(x) - except ValueError: - pass - else: - if all(param.kind in (Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD) - for param in s.parameters.values()): - vars = [SR.var(name) for name in s.parameters.keys()] - result = x(*vars) - if isinstance(result, (tuple, list)): - return vector(SR, result).function(*vars) - else: - return SR(result).function(*vars) - return SR(x) - - -from sage.calculus import desolvers diff --git a/src/sage/calculus/expr.py b/src/sage/calculus/expr.py new file mode 100644 index 00000000000..236b46a94d9 --- /dev/null +++ b/src/sage/calculus/expr.py @@ -0,0 +1,204 @@ +r""" +Constructor for symbolic expressions +""" + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) +lazy_import('sage.matrix.constructor', 'matrix') + + +def symbolic_expression(x): + """ + Create a symbolic expression or vector of symbolic expressions from x. + + INPUT: + + - ``x`` - an object + + OUTPUT: + + - a symbolic expression. + + EXAMPLES:: + + sage: a = symbolic_expression(3/2); a + 3/2 + sage: type(a) + + sage: R. = QQ[]; type(x) + + sage: a = symbolic_expression(2*x^2 + 3); a + 2*x^2 + 3 + sage: type(a) + + sage: from sage.structure.element import Expression + sage: isinstance(a, Expression) + True + sage: a in SR + True + sage: a.parent() + Symbolic Ring + + Note that equations exist in the symbolic ring:: + + sage: # needs sage.schemes + sage: E = EllipticCurve('15a'); E + Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field + sage: symbolic_expression(E) + x*y + y^2 + y == x^3 + x^2 - 10*x - 10 + sage: symbolic_expression(E) in SR + True + + If ``x`` is a list or tuple, create a vector of symbolic expressions:: + + sage: v = symbolic_expression([x,1]); v + (x, 1) + sage: v.base_ring() + Symbolic Ring + sage: v = symbolic_expression((x,1)); v + (x, 1) + sage: v.base_ring() + Symbolic Ring + sage: v = symbolic_expression((3,1)); v + (3, 1) + sage: v.base_ring() + Symbolic Ring + sage: E = EllipticCurve('15a'); E + Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field + sage: v = symbolic_expression([E,E]); v + (x*y + y^2 + y == x^3 + x^2 - 10*x - 10, x*y + y^2 + y == x^3 + x^2 - 10*x - 10) + sage: v.base_ring() + Symbolic Ring + + Likewise, if ``x`` is a vector, create a vector of symbolic expressions:: + + sage: u = vector([1, 2, 3]) + sage: v = symbolic_expression(u); v + (1, 2, 3) + sage: v.parent() + Vector space of dimension 3 over Symbolic Ring + + If ``x`` is a list or tuple of lists/tuples/vectors, create a matrix of symbolic expressions:: + + sage: M = symbolic_expression([[1, x, x^2], (x, x^2, x^3), vector([x^2, x^3, x^4])]); M + [ 1 x x^2] + [ x x^2 x^3] + [x^2 x^3 x^4] + sage: M.parent() + Full MatrixSpace of 3 by 3 dense matrices over Symbolic Ring + + If ``x`` is a matrix, create a matrix of symbolic expressions:: + + sage: A = matrix([[1, 2, 3], [4, 5, 6]]) + sage: B = symbolic_expression(A); B + [1 2 3] + [4 5 6] + sage: B.parent() + Full MatrixSpace of 2 by 3 dense matrices over Symbolic Ring + + If ``x`` is a function, for example defined by a ``lambda`` expression, create a + symbolic function:: + + sage: f = symbolic_expression(lambda z: z^2 + 1); f + z |--> z^2 + 1 + sage: f.parent() + Callable function ring with argument z + sage: f(7) + 50 + + If ``x`` is a list or tuple of functions, or if ``x`` is a function that returns a list + or tuple, create a callable symbolic vector:: + + sage: symbolic_expression([lambda mu, nu: mu^2 + nu^2, lambda mu, nu: mu^2 - nu^2]) + (mu, nu) |--> (mu^2 + nu^2, mu^2 - nu^2) + sage: f = symbolic_expression(lambda uwu: [1, uwu, uwu^2]); f + uwu |--> (1, uwu, uwu^2) + sage: f.parent() + Vector space of dimension 3 over Callable function ring with argument uwu + sage: f(5) + (1, 5, 25) + sage: f(5).parent() + Vector space of dimension 3 over Symbolic Ring + + TESTS: + + Lists, tuples, and vectors of length 0 become vectors over a symbolic ring:: + + sage: symbolic_expression([]).parent() + Vector space of dimension 0 over Symbolic Ring + sage: symbolic_expression(()).parent() + Vector space of dimension 0 over Symbolic Ring + sage: symbolic_expression(vector(QQ, 0)).parent() + Vector space of dimension 0 over Symbolic Ring + + If a matrix has dimension 0, the result is still a matrix over a symbolic ring:: + + sage: symbolic_expression(matrix(QQ, 2, 0)).parent() + Full MatrixSpace of 2 by 0 dense matrices over Symbolic Ring + sage: symbolic_expression(matrix(QQ, 0, 3)).parent() + Full MatrixSpace of 0 by 3 dense matrices over Symbolic Ring + + Also functions defined using ``def`` can be used, but we do not advertise it as a use case:: + + sage: def sos(x, y): + ....: return x^2 + y^2 + sage: symbolic_expression(sos) + (x, y) |--> x^2 + y^2 + + Functions that take a varying number of arguments or keyword-only arguments are not accepted:: + + sage: def variadic(x, *y): + ....: return x + sage: symbolic_expression(variadic) + Traceback (most recent call last): + ... + TypeError: unable to convert to a symbolic expression + + sage: def function_with_keyword_only_arg(x, *, sign=1): + ....: return sign * x + sage: symbolic_expression(function_with_keyword_only_arg) + Traceback (most recent call last): + ... + TypeError: unable to convert + to a symbolic expression + """ + from sage.structure.element import is_Matrix + from sage.symbolic.expression import Expression + from sage.symbolic.ring import SR + + if isinstance(x, Expression): + return x + elif hasattr(x, '_symbolic_'): + return x._symbolic_(SR) + elif isinstance(x, (tuple, list, FreeModuleElement)): + expressions = [symbolic_expression(item) for item in x] + if not expressions: + # Make sure it is symbolic also when length is 0 + return vector(SR, 0) + if isinstance(expressions[0], FreeModuleElement): + return matrix(expressions) + return vector(expressions) + elif is_Matrix(x): + if not x.nrows() or not x.ncols(): + # Make sure it is symbolic and of correct dimensions + # also when a matrix dimension is 0 + return matrix(SR, x.nrows(), x.ncols()) + rows = [symbolic_expression(row) for row in x.rows()] + return matrix(rows) + elif callable(x): + from inspect import signature, Parameter + try: + s = signature(x) + except ValueError: + pass + else: + if all(param.kind in (Parameter.POSITIONAL_ONLY, Parameter.POSITIONAL_OR_KEYWORD) + for param in s.parameters.values()): + vars = [SR.var(name) for name in s.parameters.keys()] + result = x(*vars) + if isinstance(result, (tuple, list)): + return vector(SR, result).function(*vars) + else: + return SR(result).function(*vars) + return SR(x) From e4111187fbb6a62e88f2d5d9eee500b6cb7652e4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Nov 2023 10:21:33 -0800 Subject: [PATCH 13/27] for a in $(git --no-pager grep -l lazy_import src/sage/**/all*.py); do if ! grep -q 'del lazy_import' $a; then echo 'del lazy_import' >> $a; fi; done --- src/sage/algebras/all.py | 1 + src/sage/algebras/all__sagemath_combinat.py | 2 ++ src/sage/algebras/all__sagemath_modules.py | 1 + src/sage/algebras/fusion_rings/all.py | 1 + src/sage/algebras/hecke_algebras/all.py | 1 + src/sage/algebras/lie_algebras/all.py | 1 + src/sage/algebras/lie_conformal_algebras/all.py | 1 + src/sage/algebras/quantum_groups/all.py | 1 + src/sage/algebras/steenrod/all.py | 1 + src/sage/all.py | 1 + src/sage/all_cmdline.py | 1 + src/sage/arith/all.py | 1 + src/sage/calculus/all__sagemath_modules.py | 1 + src/sage/calculus/transforms/all.py | 1 + src/sage/categories/all.py | 1 + src/sage/categories/all__sagemath_objects.py | 1 + src/sage/coding/all.py | 1 + src/sage/combinat/all.py | 1 + src/sage/combinat/all__sagemath_categories.py | 1 + src/sage/combinat/all__sagemath_combinat.py | 1 + src/sage/combinat/all__sagemath_graphs.py | 1 + src/sage/combinat/chas/all.py | 1 + src/sage/combinat/crystals/all.py | 1 + src/sage/combinat/designs/all.py | 1 + src/sage/combinat/matrices/all__sagemath_categories.py | 1 + src/sage/combinat/rigged_configurations/all.py | 1 + src/sage/combinat/root_system/all.py | 1 + src/sage/combinat/sf/all.py | 1 + src/sage/crypto/all.py | 1 + src/sage/crypto/block_cipher/all.py | 1 + src/sage/crypto/public_key/all.py | 1 + src/sage/databases/all.py | 1 + src/sage/doctest/all.py | 1 + src/sage/dynamics/all.py | 1 + src/sage/dynamics/all__sagemath_symbolics.py | 1 + src/sage/dynamics/arithmetic_dynamics/all.py | 1 + src/sage/dynamics/cellular_automata/all.py | 1 + src/sage/dynamics/complex_dynamics/all.py | 1 + src/sage/functions/all.py | 1 + src/sage/game_theory/all.py | 1 + src/sage/games/all.py | 1 + src/sage/geometry/all__sagemath_gap.py | 1 + src/sage/geometry/all__sagemath_modules.py | 1 + src/sage/geometry/hyperbolic_space/all.py | 1 + src/sage/geometry/polyhedron/all.py | 1 + src/sage/geometry/riemannian_manifolds/all.py | 1 + src/sage/graphs/all.py | 1 + src/sage/groups/all__sagemath_groups.py | 1 + src/sage/groups/all__sagemath_modules.py | 1 + src/sage/groups/matrix_gps/all__sagemath_modules.py | 1 + src/sage/homology/all__sagemath_modules.py | 1 + src/sage/interacts/all.py | 1 + src/sage/interfaces/all.py | 1 + src/sage/knots/all.py | 4 +++- src/sage/lfunctions/all.py | 1 + src/sage/libs/all__sagemath_gap.py | 1 + src/sage/libs/all__sagemath_symbolics.py | 1 + src/sage/manifolds/all.py | 1 + src/sage/matrix/all.py | 1 + src/sage/matroids/all.py | 1 + src/sage/misc/all.py | 1 + src/sage/misc/all__sagemath_modules.py | 1 + src/sage/misc/all__sagemath_objects.py | 1 + src/sage/misc/all__sagemath_repl.py | 1 + src/sage/modular/all.py | 1 + src/sage/modular/arithgroup/all.py | 1 + src/sage/modular/modform/all.py | 1 + src/sage/modular/modsym/all.py | 1 + src/sage/modular/ssmod/all.py | 1 + src/sage/modules/all.py | 1 + src/sage/numerical/all.py | 1 + src/sage/numerical/all__sagemath_modules.py | 1 + src/sage/numerical/all__sagemath_polyhedra.py | 1 + src/sage/parallel/all.py | 1 + src/sage/plot/all.py | 1 + src/sage/plot/plot3d/all.py | 1 + src/sage/repl/all.py | 1 + src/sage/rings/all.py | 1 + src/sage/rings/all__sagemath_flint.py | 1 + src/sage/rings/asymptotic/all.py | 1 + src/sage/rings/function_field/all.py | 1 + src/sage/rings/invariants/all.py | 1 + src/sage/rings/number_field/all.py | 1 + src/sage/rings/polynomial/all.py | 1 + src/sage/rings/polynomial/all__sagemath_modules.py | 1 + src/sage/rings/polynomial/weil/all.py | 1 + src/sage/rings/valuation/all.py | 1 + src/sage/sandpiles/all.py | 1 + src/sage/sat/all.py | 1 + src/sage/schemes/elliptic_curves/all.py | 1 + src/sage/schemes/hyperelliptic_curves/all.py | 1 + src/sage/schemes/product_projective/all.py | 1 + src/sage/schemes/toric/all.py | 1 + src/sage/sets/all.py | 1 + src/sage/stats/all.py | 1 + src/sage/stats/hmm/all.py | 1 + src/sage/tensor/modules/all.py | 1 + src/sage/topology/all.py | 1 + src/sage/typeset/all.py | 1 + 99 files changed, 102 insertions(+), 1 deletion(-) diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index 1dfc1f89f56..51846acb2d4 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -24,3 +24,4 @@ from sage.algebras.fusion_rings.all import * from sage.algebras.lie_algebras.all import * from sage.algebras.lie_conformal_algebras.all import * +del lazy_import diff --git a/src/sage/algebras/all__sagemath_combinat.py b/src/sage/algebras/all__sagemath_combinat.py index 57e5006e1d4..eb86573ec54 100644 --- a/src/sage/algebras/all__sagemath_combinat.py +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -33,3 +33,5 @@ lazy_import('sage.algebras.cluster_algebra', 'ClusterAlgebra') lazy_import('sage.algebras.yangian', 'Yangian') + +del lazy_import diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py index a88d884fd6b..3917d3c2fff 100644 --- a/src/sage/algebras/all__sagemath_modules.py +++ b/src/sage/algebras/all__sagemath_modules.py @@ -9,3 +9,4 @@ lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') import sage.algebras.catalog as algebras +del lazy_import diff --git a/src/sage/algebras/fusion_rings/all.py b/src/sage/algebras/fusion_rings/all.py index bf9c016510f..44484309add 100644 --- a/src/sage/algebras/fusion_rings/all.py +++ b/src/sage/algebras/fusion_rings/all.py @@ -15,3 +15,4 @@ lazy_import('sage.algebras.fusion_rings.fusion_ring', ['FusionRing']) lazy_import('sage.algebras.fusion_rings.fusion_double', ['FusionDouble']) +del lazy_import diff --git a/src/sage/algebras/hecke_algebras/all.py b/src/sage/algebras/hecke_algebras/all.py index 20f53ea58fe..fe5d6d3892f 100644 --- a/src/sage/algebras/hecke_algebras/all.py +++ b/src/sage/algebras/hecke_algebras/all.py @@ -2,3 +2,4 @@ Hecke Algebras """ #from sage.misc.lazy_import import lazy_import +del lazy_import diff --git a/src/sage/algebras/lie_algebras/all.py b/src/sage/algebras/lie_algebras/all.py index 73ea8361ff1..dd90b695923 100644 --- a/src/sage/algebras/lie_algebras/all.py +++ b/src/sage/algebras/lie_algebras/all.py @@ -21,3 +21,4 @@ lazy_import('sage.algebras.lie_algebras.lie_algebra', 'LieAlgebra') #from kac_moody import KacMoodyAlgebra lazy_import('sage.algebras.lie_algebras', 'examples', 'lie_algebras') +del lazy_import diff --git a/src/sage/algebras/lie_conformal_algebras/all.py b/src/sage/algebras/lie_conformal_algebras/all.py index 7d78e0a260c..f8cbbcf7fa4 100644 --- a/src/sage/algebras/lie_conformal_algebras/all.py +++ b/src/sage/algebras/lie_conformal_algebras/all.py @@ -12,3 +12,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra','LieConformalAlgebra') lazy_import('sage.algebras.lie_conformal_algebras', 'examples', 'lie_conformal_algebras') +del lazy_import diff --git a/src/sage/algebras/quantum_groups/all.py b/src/sage/algebras/quantum_groups/all.py index 9d249f02100..33ff442e7b4 100644 --- a/src/sage/algebras/quantum_groups/all.py +++ b/src/sage/algebras/quantum_groups/all.py @@ -5,3 +5,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.algebras.quantum_groups.fock_space', 'FockSpace') lazy_import('sage.algebras.quantum_groups.quantum_group_gap', 'QuantumGroup') +del lazy_import diff --git a/src/sage/algebras/steenrod/all.py b/src/sage/algebras/steenrod/all.py index 387a88ec6e1..7b35a79d6d5 100644 --- a/src/sage/algebras/steenrod/all.py +++ b/src/sage/algebras/steenrod/all.py @@ -6,3 +6,4 @@ lazy_import('sage.algebras.steenrod.steenrod_algebra_bases', 'steenrod_algebra_basis', deprecation=(32647, 'removed from namespace')) +del lazy_import diff --git a/src/sage/all.py b/src/sage/all.py index 2b5c83a2c37..f351c217c4e 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -263,3 +263,4 @@ def sage_globals(): False """ return globals() +del lazy_import diff --git a/src/sage/all_cmdline.py b/src/sage/all_cmdline.py index 197d34ebc90..946ff48c379 100644 --- a/src/sage/all_cmdline.py +++ b/src/sage/all_cmdline.py @@ -30,3 +30,4 @@ lazy_import('sage.interfaces.maxima_abstract', 'maxima_console') sage.misc.session.init() +del lazy_import diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index f50c45993a0..fd97c3ce890 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -41,3 +41,4 @@ sxrange = xsrange σ = sigma +del lazy_import diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py index f2658a16cd9..cab2bf3629f 100644 --- a/src/sage/calculus/all__sagemath_modules.py +++ b/src/sage/calculus/all__sagemath_modules.py @@ -15,3 +15,4 @@ lazy_import("sage.calculus.interpolators", ["polygon_spline","complex_cubic_spline"]) from sage.calculus.transforms.all import * +del lazy_import diff --git a/src/sage/calculus/transforms/all.py b/src/sage/calculus/transforms/all.py index 4eca64a4321..c42ae401653 100644 --- a/src/sage/calculus/transforms/all.py +++ b/src/sage/calculus/transforms/all.py @@ -3,3 +3,4 @@ lazy_import("sage.calculus.transforms.fft", ["FastFourierTransform", "FFT"]) lazy_import("sage.calculus.transforms.dwt", ["WaveletTransform", "DWT"]) from sage.calculus.transforms.dft import IndexedSequence +del lazy_import diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index 9c2b8bd6518..00ddc1240d6 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -155,3 +155,4 @@ # lie conformal algebras lazy_import('sage.categories.lie_conformal_algebras', 'LieConformalAlgebras') +del lazy_import diff --git a/src/sage/categories/all__sagemath_objects.py b/src/sage/categories/all__sagemath_objects.py index 97b15d9a74d..afa4257532e 100644 --- a/src/sage/categories/all__sagemath_objects.py +++ b/src/sage/categories/all__sagemath_objects.py @@ -29,3 +29,4 @@ from sage.categories.realizations import Realizations from sage.categories.sets_with_partial_maps import SetsWithPartialMaps +del lazy_import diff --git a/src/sage/coding/all.py b/src/sage/coding/all.py index e5ff88308b7..dff56d4c58c 100644 --- a/src/sage/coding/all.py +++ b/src/sage/coding/all.py @@ -10,3 +10,4 @@ _lazy_import('sage.coding', 'codes_catalog', 'codes') _lazy_import('sage.coding', 'channels_catalog', 'channels') +del lazy_import diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index 243b27aaf45..dcd327b4d1d 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -59,3 +59,4 @@ from sage.combinat.all__sagemath_combinat import * from sage.combinat.all__sagemath_modules import * from sage.combinat.all__sagemath_graphs import * +del lazy_import diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py index 6fcf3d375aa..b7f96441daa 100644 --- a/src/sage/combinat/all__sagemath_categories.py +++ b/src/sage/combinat/all__sagemath_categories.py @@ -27,3 +27,4 @@ from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover +del lazy_import diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index d7ea5dcc442..2ee40367c12 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -193,3 +193,4 @@ # Bijectionist lazy_import('sage.combinat.bijectionist', 'Bijectionist') +del lazy_import diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py index dc524200587..1fe628586f8 100644 --- a/src/sage/combinat/all__sagemath_graphs.py +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -29,3 +29,4 @@ ['Automaton', 'Transducer', 'FiniteStateMachine']) lazy_import('sage.combinat.finite_state_machine_generators', ['automata', 'transducers']) +del lazy_import diff --git a/src/sage/combinat/chas/all.py b/src/sage/combinat/chas/all.py index 5833abbe49c..f92d84aeffb 100644 --- a/src/sage/combinat/chas/all.py +++ b/src/sage/combinat/chas/all.py @@ -18,3 +18,4 @@ lazy_import('sage.combinat.chas.fsym', ['FreeSymmetricFunctions']) lazy_import('sage.combinat.chas.wqsym', ['WordQuasiSymmetricFunctions']) +del lazy_import diff --git a/src/sage/combinat/crystals/all.py b/src/sage/combinat/crystals/all.py index 397639405c9..bfe319bd10c 100644 --- a/src/sage/combinat/crystals/all.py +++ b/src/sage/combinat/crystals/all.py @@ -28,3 +28,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.crystals', 'catalog', 'crystals') +del lazy_import diff --git a/src/sage/combinat/designs/all.py b/src/sage/combinat/designs/all.py index 22e600cd40c..fea919db24e 100644 --- a/src/sage/combinat/designs/all.py +++ b/src/sage/combinat/designs/all.py @@ -52,3 +52,4 @@ ['CoveringDesign', 'schonheim', 'trivial_covering_design']) from sage.combinat.designs import design_catalog as designs +del lazy_import diff --git a/src/sage/combinat/matrices/all__sagemath_categories.py b/src/sage/combinat/matrices/all__sagemath_categories.py index a27a2bb4ecb..b168b0b1127 100644 --- a/src/sage/combinat/matrices/all__sagemath_categories.py +++ b/src/sage/combinat/matrices/all__sagemath_categories.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.combinat.matrices.dlxcpp', 'DLXCPP') +del lazy_import diff --git a/src/sage/combinat/rigged_configurations/all.py b/src/sage/combinat/rigged_configurations/all.py index 36a10774a89..f56543510b1 100644 --- a/src/sage/combinat/rigged_configurations/all.py +++ b/src/sage/combinat/rigged_configurations/all.py @@ -41,3 +41,4 @@ lazy_import('sage.combinat.rigged_configurations.rigged_configurations', 'RiggedConfigurations') +del lazy_import diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 9c91bc4b6fd..5a6aef8d2e8 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -140,3 +140,4 @@ lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') +del lazy_import diff --git a/src/sage/combinat/sf/all.py b/src/sage/combinat/sf/all.py index e4601264e83..b693ae74ee8 100644 --- a/src/sage/combinat/sf/all.py +++ b/src/sage/combinat/sf/all.py @@ -45,3 +45,4 @@ lazy_import('sage.combinat.sf.ns_macdonald', ['NonattackingFillings', 'AugmentedLatticeDiagramFilling', 'LatticeDiagram']) +del lazy_import diff --git a/src/sage/crypto/all.py b/src/sage/crypto/all.py index 1ea6c8f20a7..3645d45acea 100644 --- a/src/sage/crypto/all.py +++ b/src/sage/crypto/all.py @@ -20,3 +20,4 @@ 'lfsr_autocorrelation', 'lfsr_connection_polynomial', ]) +del lazy_import diff --git a/src/sage/crypto/block_cipher/all.py b/src/sage/crypto/block_cipher/all.py index 0a5ec657f5d..66ce4ca0a59 100644 --- a/src/sage/crypto/block_cipher/all.py +++ b/src/sage/crypto/block_cipher/all.py @@ -3,3 +3,4 @@ lazy_import('sage.crypto.block_cipher.miniaes', 'MiniAES') lazy_import('sage.crypto.block_cipher.sdes', 'SimplifiedDES') lazy_import('sage.crypto.block_cipher.present', 'PRESENT') +del lazy_import diff --git a/src/sage/crypto/public_key/all.py b/src/sage/crypto/public_key/all.py index 56416dd76b5..984a36108ca 100644 --- a/src/sage/crypto/public_key/all.py +++ b/src/sage/crypto/public_key/all.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.crypto.public_key.blum_goldwasser', 'BlumGoldwasser') +del lazy_import diff --git a/src/sage/databases/all.py b/src/sage/databases/all.py index 9fee768649b..3fa6005c162 100644 --- a/src/sage/databases/all.py +++ b/src/sage/databases/all.py @@ -80,3 +80,4 @@ lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors') lazy_import('sage.databases.findstat', ['findstat', 'findmap']) +del lazy_import diff --git a/src/sage/doctest/all.py b/src/sage/doctest/all.py index bc363e7830c..136452e0c28 100644 --- a/src/sage/doctest/all.py +++ b/src/sage/doctest/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.doctest.control', 'run_doctests') +del lazy_import diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index 4d2af9a9dc2..2502baaec8a 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -36,3 +36,4 @@ ['DiscreteDynamicalSystem']) lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', 'finite_dynamical_systems') +del lazy_import diff --git a/src/sage/dynamics/all__sagemath_symbolics.py b/src/sage/dynamics/all__sagemath_symbolics.py index cd94b937f2f..1bffe1dffa6 100644 --- a/src/sage/dynamics/all__sagemath_symbolics.py +++ b/src/sage/dynamics/all__sagemath_symbolics.py @@ -2,3 +2,4 @@ lazy_import('sage.dynamics.complex_dynamics.mandel_julia', ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) +del lazy_import diff --git a/src/sage/dynamics/arithmetic_dynamics/all.py b/src/sage/dynamics/arithmetic_dynamics/all.py index 8b32ff4cded..66773e29d76 100644 --- a/src/sage/dynamics/arithmetic_dynamics/all.py +++ b/src/sage/dynamics/arithmetic_dynamics/all.py @@ -10,3 +10,4 @@ from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_projective lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'WehlerK3Surface') lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'random_WehlerK3Surface') +del lazy_import diff --git a/src/sage/dynamics/cellular_automata/all.py b/src/sage/dynamics/cellular_automata/all.py index 9f13ad1c13a..ff4151c0588 100644 --- a/src/sage/dynamics/cellular_automata/all.py +++ b/src/sage/dynamics/cellular_automata/all.py @@ -3,3 +3,4 @@ from sage.misc.lazy_import import lazy_import lazy_import("sage.dynamics.cellular_automata.solitons", ["SolitonCellularAutomata", "PeriodicSolitonCellularAutomata"]) +del lazy_import diff --git a/src/sage/dynamics/complex_dynamics/all.py b/src/sage/dynamics/complex_dynamics/all.py index a4f82d614e5..0d8c4797497 100644 --- a/src/sage/dynamics/complex_dynamics/all.py +++ b/src/sage/dynamics/complex_dynamics/all.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import("sage.dynamics.complex_dynamics.mandel_julia", ["mandelbrot_plot", "external_ray", "kneading_sequence", "julia_plot"]) +del lazy_import diff --git a/src/sage/functions/all.py b/src/sage/functions/all.py index afcf9e57ee1..78faebe29e2 100644 --- a/src/sage/functions/all.py +++ b/src/sage/functions/all.py @@ -91,3 +91,4 @@ Γ = gamma ψ = psi ζ = zeta +del lazy_import diff --git a/src/sage/game_theory/all.py b/src/sage/game_theory/all.py index 4658885c3ab..30fa5c52f2e 100644 --- a/src/sage/game_theory/all.py +++ b/src/sage/game_theory/all.py @@ -4,3 +4,4 @@ lazy_import('sage.game_theory.cooperative_game', 'CooperativeGame') lazy_import('sage.game_theory.normal_form_game', 'NormalFormGame') lazy_import('sage.game_theory.matching_game', 'MatchingGame') +del lazy_import diff --git a/src/sage/games/all.py b/src/sage/games/all.py index 6cf915addde..976d6cce6aa 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -2,3 +2,4 @@ lazy_import('sage.games.sudoku', ['Sudoku', 'sudoku']) lazy_import('sage.games.hexad', ['Minimog']) +del lazy_import diff --git a/src/sage/geometry/all__sagemath_gap.py b/src/sage/geometry/all__sagemath_gap.py index 411a7c76d9a..34dc2709543 100644 --- a/src/sage/geometry/all__sagemath_gap.py +++ b/src/sage/geometry/all__sagemath_gap.py @@ -2,3 +2,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.ribbon_graph', 'RibbonGraph') +del lazy_import diff --git a/src/sage/geometry/all__sagemath_modules.py b/src/sage/geometry/all__sagemath_modules.py index 9490f68a162..4ea1510f4ab 100644 --- a/src/sage/geometry/all__sagemath_modules.py +++ b/src/sage/geometry/all__sagemath_modules.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.toric_lattice', 'ToricLattice') +del lazy_import diff --git a/src/sage/geometry/hyperbolic_space/all.py b/src/sage/geometry/hyperbolic_space/all.py index d1b2a930e04..3a2f359a125 100644 --- a/src/sage/geometry/hyperbolic_space/all.py +++ b/src/sage/geometry/hyperbolic_space/all.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') +del lazy_import diff --git a/src/sage/geometry/polyhedron/all.py b/src/sage/geometry/polyhedron/all.py index 3668a0b8b50..dac1e2e5d0e 100644 --- a/src/sage/geometry/polyhedron/all.py +++ b/src/sage/geometry/polyhedron/all.py @@ -3,3 +3,4 @@ lazy_import('sage.geometry.polyhedron.constructor', 'Polyhedron') lazy_import('sage.geometry.polyhedron.library', 'polytopes') lazy_import('sage.geometry.polyhedron.combinatorial_polyhedron.base' , 'CombinatorialPolyhedron') +del lazy_import diff --git a/src/sage/geometry/riemannian_manifolds/all.py b/src/sage/geometry/riemannian_manifolds/all.py index b375f473546..705438b39c0 100644 --- a/src/sage/geometry/riemannian_manifolds/all.py +++ b/src/sage/geometry/riemannian_manifolds/all.py @@ -3,3 +3,4 @@ 'ParametrizedSurface3D') lazy_import('sage.geometry.riemannian_manifolds.surface3d_generators', 'surfaces') +del lazy_import diff --git a/src/sage/graphs/all.py b/src/sage/graphs/all.py index 4e700151f7a..471e742fed7 100644 --- a/src/sage/graphs/all.py +++ b/src/sage/graphs/all.py @@ -37,3 +37,4 @@ ... NameError: name 'clique_number' is not defined """ +del lazy_import diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py index 99d024f0f35..5f149199669 100644 --- a/src/sage/groups/all__sagemath_groups.py +++ b/src/sage/groups/all__sagemath_groups.py @@ -27,3 +27,4 @@ lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) +del lazy_import diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py index bdd85f2a0c0..6a3eb638a9b 100644 --- a/src/sage/groups/all__sagemath_modules.py +++ b/src/sage/groups/all__sagemath_modules.py @@ -8,3 +8,4 @@ lazy_import('sage.groups.affine_gps.affine_group', 'AffineGroup') lazy_import('sage.groups.affine_gps.euclidean_group', 'EuclideanGroup') +del lazy_import diff --git a/src/sage/groups/matrix_gps/all__sagemath_modules.py b/src/sage/groups/matrix_gps/all__sagemath_modules.py index 99cdea05871..e8ff9cf4fa6 100644 --- a/src/sage/groups/matrix_gps/all__sagemath_modules.py +++ b/src/sage/groups/matrix_gps/all__sagemath_modules.py @@ -9,3 +9,4 @@ lazy_import('sage.groups.matrix_gps.orthogonal', 'SO') lazy_import('sage.groups.matrix_gps.finitely_generated', 'MatrixGroup') lazy_import('sage.groups.matrix_gps.finitely_generated', 'QuaternionMatrixGroupGF3') +del lazy_import diff --git a/src/sage/homology/all__sagemath_modules.py b/src/sage/homology/all__sagemath_modules.py index 21a95c6c4af..5ebb7604432 100644 --- a/src/sage/homology/all__sagemath_modules.py +++ b/src/sage/homology/all__sagemath_modules.py @@ -4,3 +4,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.homology.koszul_complex', 'KoszulComplex') +del lazy_import diff --git a/src/sage/interacts/all.py b/src/sage/interacts/all.py index 49517e8d76a..87d00072798 100644 --- a/src/sage/interacts/all.py +++ b/src/sage/interacts/all.py @@ -23,3 +23,4 @@ from sage.interacts import fractals from sage.interacts import algebra lazy_import('sage.interacts.library', 'demo') +del lazy_import diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index fa57d11c941..fcd8b15731b 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -48,3 +48,4 @@ 'kash', 'magma', 'macaulay2', 'maple', 'maxima', 'mathematica', 'mwrank', 'octave', 'r', 'singular', 'sage0', 'sage'] +del lazy_import diff --git a/src/sage/knots/all.py b/src/sage/knots/all.py index d25acbda1a3..db3eb42aa2f 100644 --- a/src/sage/knots/all.py +++ b/src/sage/knots/all.py @@ -3,4 +3,6 @@ lazy_import('sage.knots.knot', ['Knot', 'Knots']) lazy_import('sage.knots.link', 'Link') -lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries']) +if DatabaseKnotInfo().is_present(): + lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries']) +del lazy_import diff --git a/src/sage/lfunctions/all.py b/src/sage/lfunctions/all.py index 9281f97ebbe..9f0cc052fed 100644 --- a/src/sage/lfunctions/all.py +++ b/src/sage/lfunctions/all.py @@ -4,3 +4,4 @@ _lazy_import_("sage.lfunctions.sympow", "sympow") _lazy_import_("sage.lfunctions.zero_sums", "LFunctionZeroSum") _lazy_import_("sage.lfunctions.lcalc", "lcalc") +del lazy_import diff --git a/src/sage/libs/all__sagemath_gap.py b/src/sage/libs/all__sagemath_gap.py index 05f57227606..e4b82d9deb5 100644 --- a/src/sage/libs/all__sagemath_gap.py +++ b/src/sage/libs/all__sagemath_gap.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.libs.gap.libgap', 'libgap') +del lazy_import diff --git a/src/sage/libs/all__sagemath_symbolics.py b/src/sage/libs/all__sagemath_symbolics.py index 18cbb5d7ca1..9c096062eb5 100644 --- a/src/sage/libs/all__sagemath_symbolics.py +++ b/src/sage/libs/all__sagemath_symbolics.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.libs.giac.giac', 'libgiac') +del lazy_import diff --git a/src/sage/manifolds/all.py b/src/sage/manifolds/all.py index 68a489d08d0..33ee90bc9d9 100644 --- a/src/sage/manifolds/all.py +++ b/src/sage/manifolds/all.py @@ -4,3 +4,4 @@ deprecation=31881) lazy_import('sage.manifolds.differentiable.examples.euclidean', 'EuclideanSpace') lazy_import('sage.manifolds', 'catalog', 'manifolds') +del lazy_import diff --git a/src/sage/matrix/all.py b/src/sage/matrix/all.py index 47d2737bb53..698b5f3c7c2 100644 --- a/src/sage/matrix/all.py +++ b/src/sage/matrix/all.py @@ -5,3 +5,4 @@ block_diagonal_matrix, jordan_block, zero_matrix, ones_matrix, elementary_matrix, companion_matrix) Mat = MatrixSpace +del lazy_import diff --git a/src/sage/matroids/all.py b/src/sage/matroids/all.py index e647629c988..6907ccfba8d 100644 --- a/src/sage/matroids/all.py +++ b/src/sage/matroids/all.py @@ -10,3 +10,4 @@ # import matroids_catalog as matroids lazy_import('sage.matroids.constructor', 'Matroid') lazy_import('sage.matroids', 'matroids_catalog', 'matroids') +del lazy_import diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index e22f9c60cda..76392a9ebc6 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -50,3 +50,4 @@ from sage.misc.sage_timeit_class import timeit from sage.misc.session import load_session, save_session, show_identifiers from sage.misc.reset import reset, restore +del lazy_import diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py index e854b10a0be..3f65decdeff 100644 --- a/src/sage/misc/all__sagemath_modules.py +++ b/src/sage/misc/all__sagemath_modules.py @@ -19,3 +19,4 @@ from sage.misc.mathml import mathml from sage.misc.func_persist import func_persist +del lazy_import diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 30a76f38fab..7f5c99d193f 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -34,3 +34,4 @@ from sage.misc.abstract_method import abstract_method from sage.misc.timing import walltime, cputime +del lazy_import diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 15074e16be1..6cb1f34d1ef 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -12,3 +12,4 @@ 'constructions', 'help']) lazy_import('pydoc', 'help', 'python_help') +del lazy_import diff --git a/src/sage/modular/all.py b/src/sage/modular/all.py index 1bfa60068bf..75aa498109e 100644 --- a/src/sage/modular/all.py +++ b/src/sage/modular/all.py @@ -43,3 +43,4 @@ from sage.modular.pollack_stevens.all import * from sage.modular.quasimodform.all import * +del lazy_import diff --git a/src/sage/modular/arithgroup/all.py b/src/sage/modular/arithgroup/all.py index 7e9f6df38e4..3e189a658c9 100644 --- a/src/sage/modular/arithgroup/all.py +++ b/src/sage/modular/arithgroup/all.py @@ -16,3 +16,4 @@ degeneracy_coset_representatives_gamma1) from sage.modular.arithgroup.farey_symbol import Farey as FareySymbol +del lazy_import diff --git a/src/sage/modular/modform/all.py b/src/sage/modular/modform/all.py index 92d91fc34c5..5a108fce80d 100644 --- a/src/sage/modular/modform/all.py +++ b/src/sage/modular/modform/all.py @@ -26,3 +26,4 @@ from sage.modular.modform.element import delta_lseries from sage.modular.modform.ring import ModularFormsRing +del lazy_import diff --git a/src/sage/modular/modsym/all.py b/src/sage/modular/modsym/all.py index da5fd374c8b..f398a735a1e 100644 --- a/src/sage/modular/modsym/all.py +++ b/src/sage/modular/modsym/all.py @@ -13,3 +13,4 @@ from sage.modular.modsym.ghlist import GHlist from sage.modular.modsym.g1list import G1list +del lazy_import diff --git a/src/sage/modular/ssmod/all.py b/src/sage/modular/ssmod/all.py index 1257c107a99..62e371a3c25 100644 --- a/src/sage/modular/ssmod/all.py +++ b/src/sage/modular/ssmod/all.py @@ -4,3 +4,4 @@ 'supersingular_j', 'SupersingularModule', 'supersingular_D']) +del lazy_import diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index 8ad50bd01c5..a75814718b6 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -31,3 +31,4 @@ lazy_import("sage.modules.multi_filtered_vector_space", "MultiFilteredVectorSpace") lazy_import("sage.modules.free_quadratic_module_integer_symmetric", "IntegralLattice") lazy_import("sage.modules.torsion_quadratic_module", "TorsionQuadraticForm") +del lazy_import diff --git a/src/sage/numerical/all.py b/src/sage/numerical/all.py index 6e73790f9dc..751ec929b7c 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -9,3 +9,4 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) +del lazy_import diff --git a/src/sage/numerical/all__sagemath_modules.py b/src/sage/numerical/all__sagemath_modules.py index b1f25aedd4f..7a2c2778373 100644 --- a/src/sage/numerical/all__sagemath_modules.py +++ b/src/sage/numerical/all__sagemath_modules.py @@ -2,3 +2,4 @@ lazy_import("sage.numerical.optimize", ["find_fit", "find_local_maximum", "find_local_minimum", "find_root", "minimize", "minimize_constrained"]) +del lazy_import diff --git a/src/sage/numerical/all__sagemath_polyhedra.py b/src/sage/numerical/all__sagemath_polyhedra.py index 6de2a9af502..df27ac0d1ec 100644 --- a/src/sage/numerical/all__sagemath_polyhedra.py +++ b/src/sage/numerical/all__sagemath_polyhedra.py @@ -7,3 +7,4 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) +del lazy_import diff --git a/src/sage/parallel/all.py b/src/sage/parallel/all.py index 17d397c39f7..dbb6ba2c851 100644 --- a/src/sage/parallel/all.py +++ b/src/sage/parallel/all.py @@ -2,3 +2,4 @@ from sage.parallel.decorate import parallel, fork from sage.misc.lazy_import import lazy_import lazy_import('sage.parallel.parallelism', 'Parallelism') +del lazy_import diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index ec9a9027e87..6d10496e11c 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -37,3 +37,4 @@ lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") lazy_import("sage.plot.hyperbolic_polygon", ["hyperbolic_triangle", "hyperbolic_polygon"]) lazy_import("sage.plot.hyperbolic_regular_polygon", "hyperbolic_regular_polygon") +del lazy_import diff --git a/src/sage/plot/plot3d/all.py b/src/sage/plot/plot3d/all.py index 914261d9ead..4838f73c016 100644 --- a/src/sage/plot/plot3d/all.py +++ b/src/sage/plot/plot3d/all.py @@ -19,3 +19,4 @@ #from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D #from parametric_surface import ParametricSurface, MoebiusStrip #from plot3d import plot3d, axes as axes3d +del lazy_import diff --git a/src/sage/repl/all.py b/src/sage/repl/all.py index 96fd6de5f6d..0b0ef116059 100644 --- a/src/sage/repl/all.py +++ b/src/sage/repl/all.py @@ -11,3 +11,4 @@ from sage.repl.rich_output.display_manager import get_display_manager from sage.repl.rich_output.pretty_print import pretty_print, show +del lazy_import diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index e920a6f363d..eb6fb48849f 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -112,3 +112,4 @@ # Register classes in numbers abc from sage.rings import numbers_abc +del lazy_import diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py index 47e6dfc5c45..95373001294 100644 --- a/src/sage/rings/all__sagemath_flint.py +++ b/src/sage/rings/all__sagemath_flint.py @@ -32,3 +32,4 @@ lazy_import("sage.rings.imaginary_unit", "I") from sage.rings.cif import CIF +del lazy_import diff --git a/src/sage/rings/asymptotic/all.py b/src/sage/rings/asymptotic/all.py index 9353f267624..ba428ed2240 100644 --- a/src/sage/rings/asymptotic/all.py +++ b/src/sage/rings/asymptotic/all.py @@ -1,3 +1,4 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') +del lazy_import diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 2cd27c3894d..e74571b211d 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -8,3 +8,4 @@ from sage.misc.lazy_import import lazy_import lazy_import("sage.rings.function_field.drinfeld_modules.drinfeld_module", "DrinfeldModule") +del lazy_import diff --git a/src/sage/rings/invariants/all.py b/src/sage/rings/invariants/all.py index eb0cce3175f..d852ae19f3b 100644 --- a/src/sage/rings/invariants/all.py +++ b/src/sage/rings/invariants/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.invariants.invariant_theory', 'invariant_theory') +del lazy_import diff --git a/src/sage/rings/number_field/all.py b/src/sage/rings/number_field/all.py index ada4ee855c5..3da44c157f9 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -13,3 +13,4 @@ _lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') from sage.rings.number_field.unit_group import UnitGroup +del lazy_import diff --git a/src/sage/rings/polynomial/all.py b/src/sage/rings/polynomial/all.py index 73e2e09aed7..78e29ac0bb9 100644 --- a/src/sage/rings/polynomial/all.py +++ b/src/sage/rings/polynomial/all.py @@ -33,3 +33,4 @@ # Integer-valued Univariate Polynomial Ring lazy_import('sage.rings.polynomial.integer_valued_polynomials', 'IntegerValuedPolynomialRing') +del lazy_import diff --git a/src/sage/rings/polynomial/all__sagemath_modules.py b/src/sage/rings/polynomial/all__sagemath_modules.py index 8634f2004c5..647d682eb84 100644 --- a/src/sage/rings/polynomial/all__sagemath_modules.py +++ b/src/sage/rings/polynomial/all__sagemath_modules.py @@ -4,3 +4,4 @@ # Ore Polynomial Rings lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') SkewPolynomialRing = OrePolynomialRing +del lazy_import diff --git a/src/sage/rings/polynomial/weil/all.py b/src/sage/rings/polynomial/weil/all.py index 6b00c9bee88..bb0a807c3da 100644 --- a/src/sage/rings/polynomial/weil/all.py +++ b/src/sage/rings/polynomial/weil/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.polynomial.weil.weil_polynomials', 'WeilPolynomials') +del lazy_import diff --git a/src/sage/rings/valuation/all.py b/src/sage/rings/valuation/all.py index 3f90ef9daa0..ebebe8f7a1f 100644 --- a/src/sage/rings/valuation/all.py +++ b/src/sage/rings/valuation/all.py @@ -3,3 +3,4 @@ lazy_import('sage.rings.valuation.gauss_valuation', 'GaussValuation') lazy_import('sage.rings.valuation', 'valuations_catalog', 'valuations') lazy_import('sage.rings.valuation.value_group', 'DiscreteValueGroup') +del lazy_import diff --git a/src/sage/sandpiles/all.py b/src/sage/sandpiles/all.py index 7ddccbf3869..8d26966aa38 100644 --- a/src/sage/sandpiles/all.py +++ b/src/sage/sandpiles/all.py @@ -9,3 +9,4 @@ lazy_import('sage.sandpiles.sandpile', 'triangle_sandpile') lazy_import('sage.sandpiles.examples', 'sandpiles') +del lazy_import diff --git a/src/sage/sat/all.py b/src/sage/sat/all.py index d4beeb2a9a1..ad1a0ec2c14 100644 --- a/src/sage/sat/all.py +++ b/src/sage/sat/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.sat.solvers.satsolver', 'SAT') +del lazy_import diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index 144f6a88df9..0b79dee7dc8 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -41,3 +41,4 @@ from sage.schemes.elliptic_curves.ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point +del lazy_import diff --git a/src/sage/schemes/hyperelliptic_curves/all.py b/src/sage/schemes/hyperelliptic_curves/all.py index 298e40671fd..e314dceb1e0 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -43,3 +43,4 @@ deprecation=28064) from sage.schemes.hyperelliptic_curves.mestre import (Mestre_conic, HyperellipticCurve_from_invariants) from sage.schemes.hyperelliptic_curves import monsky_washnitzer +del lazy_import diff --git a/src/sage/schemes/product_projective/all.py b/src/sage/schemes/product_projective/all.py index c9ee0d6b51f..e529331007b 100644 --- a/src/sage/schemes/product_projective/all.py +++ b/src/sage/schemes/product_projective/all.py @@ -2,3 +2,4 @@ lazy_import('sage.schemes.product_projective.space', 'ProductProjectiveSpaces') lazy_import('sage.schemes.product_projective.space', 'is_ProductProjectiveSpaces') +del lazy_import diff --git a/src/sage/schemes/toric/all.py b/src/sage/schemes/toric/all.py index 71ad52ef5c6..17965d2899c 100644 --- a/src/sage/schemes/toric/all.py +++ b/src/sage/schemes/toric/all.py @@ -6,3 +6,4 @@ lazy_import('sage.schemes.toric.library', 'toric_varieties') lazy_import('sage.schemes.toric.fano_variety', 'CPRFanoToricVariety') lazy_import('sage.schemes.toric.ideal', 'ToricIdeal') +del lazy_import diff --git a/src/sage/sets/all.py b/src/sage/sets/all.py index 4ad89651388..328fcfa96ac 100644 --- a/src/sage/sets/all.py +++ b/src/sage/sets/all.py @@ -13,3 +13,4 @@ from sage.sets.disjoint_set import DisjointSet from sage.sets.condition_set import ConditionSet from sage.sets.finite_set_maps import FiniteSetMaps +del lazy_import diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 63c3cb9c668..450991bd576 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -10,3 +10,4 @@ lazy_import("sage.stats.time_series", ["TimeSeries", "autoregressive_fit"]) lazy_import("sage.stats.intlist", ["IntList"]) +del lazy_import diff --git a/src/sage/stats/hmm/all.py b/src/sage/stats/hmm/all.py index 2e1bcacd23d..d331f45b41c 100644 --- a/src/sage/stats/hmm/all.py +++ b/src/sage/stats/hmm/all.py @@ -10,3 +10,4 @@ lazy_import("sage.stats.hmm.hmm", ["DiscreteHiddenMarkovModel"]) lazy_import("sage.stats.hmm.chmm", ["GaussianHiddenMarkovModel","GaussianMixtureHiddenMarkovModel"]) lazy_import("sage.stats.hmm.distributions", ["GaussianMixtureDistribution"]) +del lazy_import diff --git a/src/sage/tensor/modules/all.py b/src/sage/tensor/modules/all.py index 92b555136b4..4571a720ea5 100644 --- a/src/sage/tensor/modules/all.py +++ b/src/sage/tensor/modules/all.py @@ -4,3 +4,4 @@ # NB: in Sage 8.8.beta2, the lazy import of FiniteRankFreeModule is necessary # to avoid some import order issue when Chart is imported in # free_module_tensor, see comments 12 to 18 in :issue:`27655`. +del lazy_import diff --git a/src/sage/topology/all.py b/src/sage/topology/all.py index 32339d70cfa..18b553e873d 100644 --- a/src/sage/topology/all.py +++ b/src/sage/topology/all.py @@ -18,3 +18,4 @@ # # For taking care of old pickles # from sage.misc.persist import register_unpickle_override # register_unpickle_override('sage.topology.simplicial_complex_examples', 'SimplicialSurface', SimplicialComplex) +del lazy_import diff --git a/src/sage/typeset/all.py b/src/sage/typeset/all.py index f2327dfdb20..b8e1a5f547c 100644 --- a/src/sage/typeset/all.py +++ b/src/sage/typeset/all.py @@ -2,3 +2,4 @@ lazy_import('sage.typeset.ascii_art', 'ascii_art') lazy_import('sage.typeset.unicode_art', 'unicode_art') +del lazy_import From 7a07f69a1cc078f492633d14e70f2319fa3eb6c5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Nov 2023 10:45:37 -0800 Subject: [PATCH 14/27] Manual fixes re 'del lazy_import' --- src/sage/algebras/all.py | 1 - src/sage/algebras/hecke_algebras/all.py | 2 -- src/sage/all.py | 1 - src/sage/all_cmdline.py | 1 - src/sage/coding/all.py | 13 +++++++------ src/sage/combinat/all__sagemath_categories.py | 5 ++++- src/sage/lfunctions/all.py | 11 ++++++----- src/sage/misc/all.py | 1 - src/sage/misc/all__sagemath_modules.py | 2 -- src/sage/misc/all__sagemath_objects.py | 1 - src/sage/misc/all__sagemath_repl.py | 1 - src/sage/rings/number_field/all.py | 11 ++++++----- 12 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index 51846acb2d4..1dfc1f89f56 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -24,4 +24,3 @@ from sage.algebras.fusion_rings.all import * from sage.algebras.lie_algebras.all import * from sage.algebras.lie_conformal_algebras.all import * -del lazy_import diff --git a/src/sage/algebras/hecke_algebras/all.py b/src/sage/algebras/hecke_algebras/all.py index fe5d6d3892f..052c816e1e5 100644 --- a/src/sage/algebras/hecke_algebras/all.py +++ b/src/sage/algebras/hecke_algebras/all.py @@ -1,5 +1,3 @@ """ Hecke Algebras """ -#from sage.misc.lazy_import import lazy_import -del lazy_import diff --git a/src/sage/all.py b/src/sage/all.py index f351c217c4e..2b5c83a2c37 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -263,4 +263,3 @@ def sage_globals(): False """ return globals() -del lazy_import diff --git a/src/sage/all_cmdline.py b/src/sage/all_cmdline.py index 946ff48c379..197d34ebc90 100644 --- a/src/sage/all_cmdline.py +++ b/src/sage/all_cmdline.py @@ -30,4 +30,3 @@ lazy_import('sage.interfaces.maxima_abstract', 'maxima_console') sage.misc.session.init() -del lazy_import diff --git a/src/sage/coding/all.py b/src/sage/coding/all.py index dff56d4c58c..3d7b19900c1 100644 --- a/src/sage/coding/all.py +++ b/src/sage/coding/all.py @@ -1,13 +1,14 @@ -from sage.misc.lazy_import import lazy_import as _lazy_import +from sage.misc.lazy_import import lazy_import -_lazy_import("sage.coding.code_constructions", ["permutation_action", - "walsh_matrix"]) +lazy_import("sage.coding.code_constructions", ["permutation_action", + "walsh_matrix"]) -_lazy_import("sage.coding.linear_code", "LinearCode") +lazy_import("sage.coding.linear_code", "LinearCode") # Functions removed from the global namespace -_lazy_import('sage.coding', 'codes_catalog', 'codes') -_lazy_import('sage.coding', 'channels_catalog', 'channels') +lazy_import('sage.coding', 'codes_catalog', 'codes') +lazy_import('sage.coding', 'channels_catalog', 'channels') + del lazy_import diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py index b7f96441daa..99c58eb881a 100644 --- a/src/sage/combinat/all__sagemath_categories.py +++ b/src/sage/combinat/all__sagemath_categories.py @@ -1,6 +1,8 @@ -# Integer lists from sage.combinat.matrices.all__sagemath_categories import * +from sage.misc.lazy_import import lazy_import + +# Integer lists from sage.combinat.integer_lists import IntegerListsLex from sage.combinat.integer_vector import IntegerVectors @@ -27,4 +29,5 @@ from sage.combinat.dlx import DLXMatrix, AllExactCovers, OneExactCover + del lazy_import diff --git a/src/sage/lfunctions/all.py b/src/sage/lfunctions/all.py index 9f0cc052fed..80b30c2ec6e 100644 --- a/src/sage/lfunctions/all.py +++ b/src/sage/lfunctions/all.py @@ -1,7 +1,8 @@ -from sage.misc.lazy_import import lazy_import as _lazy_import_ +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.lfunctions.dokchitser", "Dokchitser") +lazy_import("sage.lfunctions.sympow", "sympow") +lazy_import("sage.lfunctions.zero_sums", "LFunctionZeroSum") +lazy_import("sage.lfunctions.lcalc", "lcalc") -_lazy_import_("sage.lfunctions.dokchitser", "Dokchitser") -_lazy_import_("sage.lfunctions.sympow", "sympow") -_lazy_import_("sage.lfunctions.zero_sums", "LFunctionZeroSum") -_lazy_import_("sage.lfunctions.lcalc", "lcalc") del lazy_import diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 76392a9ebc6..e22f9c60cda 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -50,4 +50,3 @@ from sage.misc.sage_timeit_class import timeit from sage.misc.session import load_session, save_session, show_identifiers from sage.misc.reset import reset, restore -del lazy_import diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py index 3f65decdeff..158f41ed686 100644 --- a/src/sage/misc/all__sagemath_modules.py +++ b/src/sage/misc/all__sagemath_modules.py @@ -2,7 +2,6 @@ # and deprecated functionality from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute -from sage.misc.lazy_import import lazy_import from sage.misc.all__sagemath_categories import * @@ -19,4 +18,3 @@ from sage.misc.mathml import mathml from sage.misc.func_persist import func_persist -del lazy_import diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 7f5c99d193f..30a76f38fab 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -34,4 +34,3 @@ from sage.misc.abstract_method import abstract_method from sage.misc.timing import walltime, cputime -del lazy_import diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 6cb1f34d1ef..15074e16be1 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -12,4 +12,3 @@ 'constructions', 'help']) lazy_import('pydoc', 'help', 'python_help') -del lazy_import diff --git a/src/sage/rings/number_field/all.py b/src/sage/rings/number_field/all.py index 3da44c157f9..72e0d56d1a0 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -5,12 +5,13 @@ from sage.rings.number_field.order import EquationOrder, GaussianIntegers, EisensteinIntegers -from sage.misc.lazy_import import lazy_import as _lazy_import +from sage.misc.lazy_import import lazy_import -_lazy_import('sage.rings.number_field.totallyreal', 'enumerate_totallyreal_fields_prim') -_lazy_import('sage.rings.number_field.totallyreal_data', 'hermite_constant') -_lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_all') -_lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') +lazy_import('sage.rings.number_field.totallyreal', 'enumerate_totallyreal_fields_prim') +lazy_import('sage.rings.number_field.totallyreal_data', 'hermite_constant') +lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_all') +lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') from sage.rings.number_field.unit_group import UnitGroup + del lazy_import From dfc6ccaea318f28d1bafdc0c3f37e40ef2d0f475 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Nov 2023 11:04:34 -0800 Subject: [PATCH 15/27] autopep8 --in-place --ignore E402 --max-line-length=88 src/sage/**/all*.py --- src/sage/algebras/all.py | 1 - src/sage/algebras/lie_algebras/all.py | 6 +- .../algebras/lie_conformal_algebras/all.py | 10 +- src/sage/all.py | 115 ++++++++++-------- src/sage/all__sagemath_objects.py | 12 +- src/sage/all__sagemath_repl.py | 31 ++--- src/sage/all_cmdline.py | 2 +- src/sage/arith/all.py | 50 ++++---- src/sage/arith/all__sagemath_objects.py | 2 +- src/sage/calculus/all.py | 8 +- src/sage/calculus/all__sagemath_modules.py | 2 +- src/sage/categories/all.py | 32 ++--- src/sage/categories/all__sagemath_objects.py | 10 +- src/sage/combinat/all__sagemath_categories.py | 16 +-- src/sage/combinat/all__sagemath_combinat.py | 16 ++- src/sage/combinat/all__sagemath_graphs.py | 9 +- .../combinat/cluster_algebra_quiver/all.py | 3 +- src/sage/combinat/designs/all.py | 3 +- src/sage/combinat/root_system/all.py | 6 +- src/sage/crypto/all.py | 6 +- src/sage/databases/all.py | 12 +- src/sage/dynamics/all.py | 3 +- src/sage/ext/all__sagemath_categories.py | 4 +- src/sage/functions/all.py | 98 +++++++-------- src/sage/geometry/all__sagemath_polyhedra.py | 3 +- src/sage/geometry/all__sagemath_symbolics.py | 2 +- src/sage/geometry/polyhedron/all.py | 3 +- src/sage/graphs/all.py | 3 +- src/sage/groups/abelian_gps/all.py | 4 +- .../abelian_gps/all__sagemath_modules.py | 2 +- src/sage/groups/all__sagemath_categories.py | 2 +- src/sage/groups/all__sagemath_groups.py | 6 +- src/sage/groups/perm_gps/all.py | 20 +-- src/sage/interfaces/all.py | 2 +- src/sage/libs/mpmath/all.py | 9 +- src/sage/libs/ntl/all.py | 8 +- src/sage/libs/symmetrica/all.py | 20 +-- src/sage/matrix/all.py | 6 +- src/sage/misc/all.py | 2 +- src/sage/misc/all__sagemath_categories.py | 114 ++++++++--------- src/sage/misc/all__sagemath_modules.py | 12 +- src/sage/misc/all__sagemath_objects.py | 2 +- src/sage/misc/all__sagemath_repl.py | 6 +- src/sage/modular/all.py | 10 +- src/sage/modular/arithgroup/all.py | 2 +- src/sage/modular/btquotients/all.py | 4 +- src/sage/modular/hecke/all.py | 4 +- src/sage/modular/modform_hecketriangle/all.py | 14 +-- src/sage/monoids/all.py | 2 +- src/sage/plot/all.py | 11 +- src/sage/plot/plot3d/all.py | 20 +-- src/sage/probability/all.py | 6 +- .../quadratic_forms/all__sagemath_modules.py | 2 +- .../quadratic_forms/all__sagemath_pari.py | 2 +- src/sage/repl/all.py | 4 +- src/sage/repl/ipython_kernel/all_jupyter.py | 2 +- src/sage/rings/all.py | 21 ++-- src/sage/rings/all__sagemath_categories.py | 20 +-- src/sage/rings/all__sagemath_flint.py | 15 +-- src/sage/rings/all__sagemath_modules.py | 2 +- src/sage/rings/asymptotic/all.py | 3 +- src/sage/rings/finite_rings/all.py | 4 +- src/sage/rings/number_field/all.py | 8 +- src/sage/schemes/affine/all.py | 4 +- src/sage/schemes/all.py | 4 +- src/sage/schemes/curves/all.py | 4 +- src/sage/schemes/elliptic_curves/all.py | 20 +-- src/sage/schemes/hyperelliptic_curves/all.py | 3 +- src/sage/schemes/jacobians/all.py | 2 +- src/sage/schemes/projective/all.py | 4 +- src/sage/sets/all.py | 2 +- src/sage/stats/hmm/all.py | 3 +- src/sage/structure/all.py | 2 +- src/sage/symbolic/all.py | 2 +- 74 files changed, 459 insertions(+), 430 deletions(-) diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index 1dfc1f89f56..e27ec576cc2 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -15,7 +15,6 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.misc.lazy_import import lazy_import from sage.algebras.all__sagemath_modules import * from sage.algebras.all__sagemath_combinat import * diff --git a/src/sage/algebras/lie_algebras/all.py b/src/sage/algebras/lie_algebras/all.py index dd90b695923..510bcb23f24 100644 --- a/src/sage/algebras/lie_algebras/all.py +++ b/src/sage/algebras/lie_algebras/all.py @@ -2,7 +2,7 @@ Lie Algebras """ -#***************************************************************************** +# ***************************************************************************** # Copyright (C) 2013 Travis Scrimshaw # # Distributed under the terms of the GNU General Public License (GPL) @@ -15,10 +15,10 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.misc.lazy_import import lazy_import lazy_import('sage.algebras.lie_algebras.lie_algebra', 'LieAlgebra') -#from kac_moody import KacMoodyAlgebra +# from kac_moody import KacMoodyAlgebra lazy_import('sage.algebras.lie_algebras', 'examples', 'lie_algebras') del lazy_import diff --git a/src/sage/algebras/lie_conformal_algebras/all.py b/src/sage/algebras/lie_conformal_algebras/all.py index f8cbbcf7fa4..14925d4ac08 100644 --- a/src/sage/algebras/lie_conformal_algebras/all.py +++ b/src/sage/algebras/lie_conformal_algebras/all.py @@ -1,4 +1,4 @@ -#****************************************************************************** +# ****************************************************************************** # Copyright (C) 2020 Reimundo Heluani # # This program is free software: you can redistribute it and/or modify @@ -6,10 +6,12 @@ # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.misc.lazy_import import lazy_import -lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra','LieConformalAlgebra') -lazy_import('sage.algebras.lie_conformal_algebras', 'examples', 'lie_conformal_algebras') +lazy_import('sage.algebras.lie_conformal_algebras.lie_conformal_algebra', + 'LieConformalAlgebra') +lazy_import('sage.algebras.lie_conformal_algebras', + 'examples', 'lie_conformal_algebras') del lazy_import diff --git a/src/sage/all.py b/src/sage/all.py index 2b5c83a2c37..75893d7edba 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -59,96 +59,97 @@ ################ end setup warnings ############################### -from sage.all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment +# includes .all__sagemath_objects, .all__sagemath_environment +from sage.all__sagemath_repl import * ################################################################### # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep from functools import reduce # in order to keep reduce in python3 import sage.misc.lazy_import -from sage.misc.all import * # takes a while -from sage.typeset.all import * +from sage.misc.all import * # takes a while +from sage.typeset.all import * from sage.misc.sh import sh -from sage.libs.all import * +from sage.libs.all import * from sage.data_structures.all import * -from sage.structure.all import * -from sage.rings.all import * -from sage.arith.all import * -from sage.matrix.all import * - -from sage.symbolic.all import * -from sage.modules.all import * -from sage.monoids.all import * -from sage.algebras.all import * -from sage.modular.all import * -from sage.sat.all import * -from sage.schemes.all import * -from sage.graphs.all import * -from sage.groups.all import * -from sage.arith.power import generic_power as power -from sage.databases.all import * +from sage.structure.all import * +from sage.rings.all import * +from sage.arith.all import * +from sage.matrix.all import * + +from sage.symbolic.all import * +from sage.modules.all import * +from sage.monoids.all import * +from sage.algebras.all import * +from sage.modular.all import * +from sage.sat.all import * +from sage.schemes.all import * +from sage.graphs.all import * +from sage.groups.all import * +from sage.arith.power import generic_power as power +from sage.databases.all import * from sage.categories.all import * -from sage.sets.all import * +from sage.sets.all import * from sage.probability.all import * from sage.interfaces.all import * -from sage.functions.all import * -from sage.calculus.all import * +from sage.functions.all import * +from sage.calculus.all import * lazy_import('sage.tests', 'all', as_='tests', deprecation=27337) -from sage.cpython.all import * +from sage.cpython.all import * -from sage.crypto.all import * +from sage.crypto.all import * import sage.crypto.mq as mq -from sage.plot.all import * -from sage.plot.plot3d.all import * +from sage.plot.all import * +from sage.plot.plot3d.all import * -from sage.coding.all import * -from sage.combinat.all import * +from sage.coding.all import * +from sage.combinat.all import * from sage.lfunctions.all import * -from sage.geometry.all import * -from sage.geometry.triangulation.all import * -from sage.geometry.riemannian_manifolds.all import * +from sage.geometry.all import * +from sage.geometry.triangulation.all import * +from sage.geometry.riemannian_manifolds.all import * -from sage.dynamics.all import * +from sage.dynamics.all import * -from sage.homology.all import * +from sage.homology.all import * -from sage.topology.all import * +from sage.topology.all import * from sage.quadratic_forms.all import * -from sage.games.all import * +from sage.games.all import * -from sage.logic.all import * +from sage.logic.all import * -from sage.numerical.all import * +from sage.numerical.all import * -from sage.stats.all import * +from sage.stats.all import * import sage.stats.all as stats -from sage.parallel.all import * +from sage.parallel.all import * -from sage.ext.fast_callable import fast_callable -from sage.ext.fast_eval import fast_float +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float from sage.sandpiles.all import * -from sage.tensor.all import * +from sage.tensor.all import * -from sage.matroids.all import * +from sage.matroids.all import * from sage.game_theory.all import * @@ -168,7 +169,7 @@ _init_qqbar() ########################################################### -#### WARNING: +# WARNING: # DO *not* import numpy / matplotlib / networkx here!! # Each takes a surprisingly long time to initialize, # and that initialization should be done more on-the-fly @@ -190,31 +191,37 @@ copying = license copyright = license + def quit_sage(verbose=True): """ Does nothing. Code that needs cleanup should register its own handler using the atexit module. """ from sage.misc.superseded import deprecation - deprecation(8784, 'quit_sage is deprecated and now does nothing; please simply delete it') + deprecation( + 8784, 'quit_sage is deprecated and now does nothing; please simply delete it') from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.categories.category', 'Sets', Sets) -register_unpickle_override('sage.categories.category_types', 'HeckeModules', HeckeModules) +register_unpickle_override('sage.categories.category_types', + 'HeckeModules', HeckeModules) register_unpickle_override('sage.categories.category_types', 'Objects', Objects) register_unpickle_override('sage.categories.category_types', 'Rings', Rings) register_unpickle_override('sage.categories.category_types', 'Fields', Fields) -register_unpickle_override('sage.categories.category_types', 'VectorSpaces', VectorSpaces) -register_unpickle_override('sage.categories.category_types', 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) -register_unpickle_override('sage.categories.category_types', 'ModularAbelianVarieties', ModularAbelianVarieties) +register_unpickle_override('sage.categories.category_types', + 'VectorSpaces', VectorSpaces) +register_unpickle_override('sage.categories.category_types', + 'Schemes_over_base', sage.categories.schemes.Schemes_over_base) +register_unpickle_override('sage.categories.category_types', + 'ModularAbelianVarieties', ModularAbelianVarieties) register_unpickle_override('sage.libs.pari.gen_py', 'pari', pari) # Cache the contents of star imports. sage.misc.lazy_import.save_cache_file() -### Debugging for Singular, see trac #10903 +# Debugging for Singular, see trac #10903 # from sage.libs.singular.ring import poison_currRing # sys.settrace(poison_currRing) @@ -241,7 +248,7 @@ def quit_sage(verbose=True): sage.misc.lazy_import.finish_startup() -### Python broke large ints; see trac #34506 +# Python broke large ints; see trac #34506 if hasattr(sys, "set_int_max_str_digits"): sys.set_int_max_str_digits(0) diff --git a/src/sage/all__sagemath_objects.py b/src/sage/all__sagemath_objects.py index 7780f245aae..36a12b3f339 100644 --- a/src/sage/all__sagemath_objects.py +++ b/src/sage/all__sagemath_objects.py @@ -9,16 +9,16 @@ # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep -from sage.misc.all__sagemath_objects import * -from sage.structure.all import * -from sage.arith.power import generic_power as power +from sage.misc.all__sagemath_objects import * +from sage.structure.all import * +from sage.arith.power import generic_power as power from sage.categories.all__sagemath_objects import * -from sage.cpython.all import * +from sage.cpython.all import * from cysignals.alarm import alarm, cancel_alarm diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index ca3403e382c..110b2cda84f 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -2,7 +2,8 @@ import sys import warnings -__with_pydebug = hasattr(sys, 'gettotalrefcount') # This is a Python debug build (--with-pydebug) +# This is a Python debug build (--with-pydebug) +__with_pydebug = hasattr(sys, 'gettotalrefcount') if __with_pydebug: # a debug build does not install the default warning filters. Sadly, this breaks doctests so we # have to re-add them: @@ -16,38 +17,38 @@ # Ignore all deprecations from IPython etc. warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') + module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') # scipy 1.18 introduced reprecation warnings on a number of things they are moving to # numpy, e.g. DeprecationWarning: scipy.array is deprecated # and will be removed in SciPy 2.0.0, use numpy.array instead # This affects networkx 2.2 up and including 2.4 (cf. :issue:29766) warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(scipy|networkx)') + module='(scipy|networkx)') # However, be sure to keep OUR deprecation warnings warnings.filterwarnings('default', category=DeprecationWarning, - message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') + message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') # Ignore Python 3.9 deprecation warnings warnings.filterwarnings('ignore', category=DeprecationWarning, - module='ast') + module='ast') # Ignore packaging 20.5 deprecation warnings warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(.*[.]_vendor[.])?packaging') + module='(.*[.]_vendor[.])?packaging') # Ignore a few warnings triggered by pythran 0.12.1 warnings.filterwarnings('ignore', category=DeprecationWarning, - message='\n\n `numpy.distutils` is deprecated since NumPy 1.23.0', - module='pythran.dist') + message='\n\n `numpy.distutils` is deprecated since NumPy 1.23.0', + module='pythran.dist') warnings.filterwarnings('ignore', category=DeprecationWarning, - message='pkg_resources is deprecated as an API|' - 'Deprecated call to `pkg_resources.declare_namespace(.*)`', - module='pkg_resources|setuptools.sandbox') + message='pkg_resources is deprecated as an API|' + 'Deprecated call to `pkg_resources.declare_namespace(.*)`', + module='pkg_resources|setuptools.sandbox') warnings.filterwarnings('ignore', category=DeprecationWarning, - message='msvccompiler is deprecated and slated to be removed', - module='distutils.msvccompiler') + message='msvccompiler is deprecated and slated to be removed', + module='distutils.msvccompiler') warnings.filterwarnings('ignore', category=DeprecationWarning, message='The distutils(.sysconfig module| package) is deprecated', @@ -100,8 +101,8 @@ from sage.all__sagemath_objects import * from sage.all__sagemath_environment import * -from sage.doctest.all import * -from sage.repl.all import * +from sage.doctest.all import * +from sage.repl.all import * from sage.misc.all__sagemath_repl import * # For doctesting. These are overwritten later diff --git a/src/sage/all_cmdline.py b/src/sage/all_cmdline.py index 197d34ebc90..33d0712c996 100644 --- a/src/sage/all_cmdline.py +++ b/src/sage/all_cmdline.py @@ -19,7 +19,7 @@ from sage.misc.lazy_import import lazy_import -for pkg in ['axiom', 'fricas', 'gap' , 'gap3', 'giac', 'gp', +for pkg in ['axiom', 'fricas', 'gap', 'gap3', 'giac', 'gp', 'gnuplot', 'kash', 'magma', 'macaulay2', 'maple', 'mathematica', 'mathics', 'matlab', 'mupad', 'mwrank', 'octave', 'qepcad', 'singular', diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index fd97c3ce890..7bc6ccec7f6 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -1,34 +1,28 @@ from sage.misc.lazy_import import lazy_import from sage.arith.misc import (algdep, bernoulli, is_prime, is_prime_power, - is_pseudoprime, is_pseudoprime_power, - prime_powers, primes_first_n, eratosthenes, primes, - next_prime_power, next_probable_prime, next_prime, - previous_prime, previous_prime_power, random_prime, - divisors, sigma, gcd, GCD, xlcm, xgcd, xkcd, - inverse_mod, get_gcd, get_inverse_mod, power_mod, - rational_reconstruction, mqrr_rational_reconstruction, - trial_division, factor, prime_divisors, odd_part, prime_to_m_part, - is_square, is_squarefree, euler_phi, carmichael_lambda, crt, CRT, - CRT_list, CRT_basis, CRT_vectors, multinomial, multinomial_coefficients, - binomial, factorial, kronecker_symbol, kronecker, legendre_symbol, - primitive_root, nth_prime, quadratic_residues, moebius, - continuant, number_of_divisors, hilbert_symbol, hilbert_conductor, - hilbert_conductor_inverse, falling_factorial, rising_factorial, - integer_ceil, integer_floor, - two_squares, three_squares, four_squares, sum_of_k_squares, - subfactorial, is_power_of_two, differences, - sort_complex_numbers_for_display, - fundamental_discriminant, - squarefree_divisors, - radical, - binomial_coefficients, - jacobi_symbol, - dedekind_sum, - prime_factors, - prime_range, - valuation, -) + is_pseudoprime, is_pseudoprime_power, + prime_powers, primes_first_n, eratosthenes, primes, + next_prime_power, next_probable_prime, next_prime, + previous_prime, previous_prime_power, random_prime, + divisors, sigma, gcd, GCD, xlcm, xgcd, xkcd, + inverse_mod, get_gcd, get_inverse_mod, power_mod, + rational_reconstruction, mqrr_rational_reconstruction, + trial_division, factor, prime_divisors, odd_part, prime_to_m_part, + is_square, is_squarefree, euler_phi, carmichael_lambda, crt, CRT, + CRT_list, CRT_basis, CRT_vectors, multinomial, multinomial_coefficients, + binomial, factorial, kronecker_symbol, kronecker, legendre_symbol, + primitive_root, nth_prime, quadratic_residues, moebius, + continuant, number_of_divisors, hilbert_symbol, hilbert_conductor, + hilbert_conductor_inverse, falling_factorial, rising_factorial, + integer_ceil, integer_floor, + two_squares, three_squares, four_squares, sum_of_k_squares, + subfactorial, is_power_of_two, differences, + sort_complex_numbers_for_display, + fundamental_discriminant, squarefree_divisors, + radical, binomial_coefficients, jacobi_symbol, + dedekind_sum, + prime_factors, prime_range, valuation) lazy_import("sage.arith.misc", ("Sigma", "Moebius", "Euler_Phi"), deprecation=30322) diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index ccd64831912..f1a05b60932 100644 --- a/src/sage/arith/all__sagemath_objects.py +++ b/src/sage/arith/all__sagemath_objects.py @@ -1,4 +1,4 @@ # The presence of this file ensures that sage_setup for sagemath-objects # considers this directory as a namespace package -from sage.arith.power import generic_power as power +from sage.arith.power import generic_power as power diff --git a/src/sage/calculus/all.py b/src/sage/calculus/all.py index b597a15684b..e9e26918527 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -3,11 +3,11 @@ from sage.calculus import desolvers from sage.calculus.calculus import maxima as maxima_calculus from sage.calculus.calculus import (laplace, inverse_laplace, - limit, lim) + limit, lim) from sage.calculus.desolvers import (desolve, desolve_laplace, desolve_system, - eulers_method, eulers_method_2x2, - eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, - desolve_odeint, desolve_mintides, desolve_tides_mpfr) + eulers_method, eulers_method_2x2, + eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4, + desolve_odeint, desolve_mintides, desolve_tides_mpfr) from sage.calculus.expr import symbolic_expression from sage.calculus.var import (var, function, clear_vars) diff --git a/src/sage/calculus/all__sagemath_modules.py b/src/sage/calculus/all__sagemath_modules.py index cab2bf3629f..f12d63a3b7f 100644 --- a/src/sage/calculus/all__sagemath_modules.py +++ b/src/sage/calculus/all__sagemath_modules.py @@ -12,7 +12,7 @@ # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import lazy_import("sage.calculus.riemann", ["Riemann_Map"]) -lazy_import("sage.calculus.interpolators", ["polygon_spline","complex_cubic_spline"]) +lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"]) from sage.calculus.transforms.all import * del lazy_import diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index 00ddc1240d6..9904917ac0a 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -109,31 +109,31 @@ # * with basis from sage.categories.modules_with_basis import ModulesWithBasis FreeModules = ModulesWithBasis -from sage.categories.hecke_modules import HeckeModules -from sage.categories.algebras_with_basis import AlgebrasWithBasis -from sage.categories.coalgebras_with_basis import CoalgebrasWithBasis -from sage.categories.bialgebras_with_basis import BialgebrasWithBasis +from sage.categories.hecke_modules import HeckeModules +from sage.categories.algebras_with_basis import AlgebrasWithBasis +from sage.categories.coalgebras_with_basis import CoalgebrasWithBasis +from sage.categories.bialgebras_with_basis import BialgebrasWithBasis from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis # finite dimensional * with basis -from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis -from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis -from sage.categories.finite_dimensional_coalgebras_with_basis import FiniteDimensionalCoalgebrasWithBasis -from sage.categories.finite_dimensional_bialgebras_with_basis import FiniteDimensionalBialgebrasWithBasis +from sage.categories.finite_dimensional_modules_with_basis import FiniteDimensionalModulesWithBasis +from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis +from sage.categories.finite_dimensional_coalgebras_with_basis import FiniteDimensionalCoalgebrasWithBasis +from sage.categories.finite_dimensional_bialgebras_with_basis import FiniteDimensionalBialgebrasWithBasis from sage.categories.finite_dimensional_hopf_algebras_with_basis import FiniteDimensionalHopfAlgebrasWithBasis # graded * -from sage.categories.graded_modules import GradedModules -from sage.categories.graded_algebras import GradedAlgebras -from sage.categories.graded_coalgebras import GradedCoalgebras -from sage.categories.graded_bialgebras import GradedBialgebras +from sage.categories.graded_modules import GradedModules +from sage.categories.graded_algebras import GradedAlgebras +from sage.categories.graded_coalgebras import GradedCoalgebras +from sage.categories.graded_bialgebras import GradedBialgebras from sage.categories.graded_hopf_algebras import GradedHopfAlgebras # graded * with basis -from sage.categories.graded_modules_with_basis import GradedModulesWithBasis -from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis -from sage.categories.graded_coalgebras_with_basis import GradedCoalgebrasWithBasis -from sage.categories.graded_bialgebras_with_basis import GradedBialgebrasWithBasis +from sage.categories.graded_modules_with_basis import GradedModulesWithBasis +from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis +from sage.categories.graded_coalgebras_with_basis import GradedCoalgebrasWithBasis +from sage.categories.graded_bialgebras_with_basis import GradedBialgebrasWithBasis from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis # Coxeter groups diff --git a/src/sage/categories/all__sagemath_objects.py b/src/sage/categories/all__sagemath_objects.py index afa4257532e..95cf6a7b5fb 100644 --- a/src/sage/categories/all__sagemath_objects.py +++ b/src/sage/categories/all__sagemath_objects.py @@ -17,12 +17,12 @@ from sage.categories.cartesian_product import cartesian_product -from sage.categories.functor import (ForgetfulFunctor, - IdentityFunctor) +from sage.categories.functor import (ForgetfulFunctor, + IdentityFunctor) -from sage.categories.homset import (Hom, hom, - End, end, - Homset, HomsetWithBase) +from sage.categories.homset import (Hom, hom, + End, end, + Homset, HomsetWithBase) from sage.categories.morphism import Morphism diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py index 99c58eb881a..854cf866f40 100644 --- a/src/sage/combinat/all__sagemath_categories.py +++ b/src/sage/combinat/all__sagemath_categories.py @@ -7,14 +7,14 @@ from sage.combinat.integer_vector import IntegerVectors from sage.combinat.combinat import (CombinatorialClass, CombinatorialObject, - MapCombinatorialClass, - bell_number, bell_polynomial, bernoulli_polynomial, - catalan_number, euler_number, - fibonacci, fibonacci_sequence, fibonacci_xrange, - lucas_number1, lucas_number2, - number_of_tuples, number_of_unordered_tuples, - polygonal_number, stirling_number1, stirling_number2, - tuples, unordered_tuples) + MapCombinatorialClass, + bell_number, bell_polynomial, bernoulli_polynomial, + catalan_number, euler_number, + fibonacci, fibonacci_sequence, fibonacci_xrange, + lucas_number1, lucas_number2, + number_of_tuples, number_of_unordered_tuples, + polygonal_number, stirling_number1, stirling_number2, + tuples, unordered_tuples) lazy_import('sage.combinat.combinat', ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index 2ee40367c12..b9e28c82ef1 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -13,8 +13,10 @@ lazy_import('sage.combinat.schubert_polynomial', 'SchubertPolynomialRing') lazy_import('sage.combinat.key_polynomial', 'KeyPolynomialBasis', as_='KeyPolynomials') -lazy_import('sage.combinat.symmetric_group_algebra', ['SymmetricGroupAlgebra', 'HeckeAlgebraSymmetricGroupT']) -lazy_import('sage.combinat.symmetric_group_representations', ['SymmetricGroupRepresentation', 'SymmetricGroupRepresentations']) +lazy_import('sage.combinat.symmetric_group_algebra', [ + 'SymmetricGroupAlgebra', 'HeckeAlgebraSymmetricGroupT']) +lazy_import('sage.combinat.symmetric_group_representations', [ + 'SymmetricGroupRepresentation', 'SymmetricGroupRepresentations']) # Permutations lazy_import('sage.combinat.affine_permutation', 'AffinePermutationGroup') @@ -28,7 +30,8 @@ from sage.combinat.rsk import RSK, RSK_inverse, robinson_schensted_knuth, robinson_schensted_knuth_inverse, InsertionRules # HillmanGrassl -lazy_import("sage.combinat.hillman_grassl", ["WeakReversePlanePartition", "WeakReversePlanePartitions"]) +lazy_import("sage.combinat.hillman_grassl", [ + "WeakReversePlanePartition", "WeakReversePlanePartitions"]) # PerfectMatchings from sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings @@ -38,8 +41,8 @@ # Partitions from sage.combinat.partition import (Partition, Partitions, PartitionsInBox, - OrderedPartitions, PartitionsGreatestLE, - PartitionsGreatestEQ, number_of_partitions) + OrderedPartitions, PartitionsGreatestLE, + PartitionsGreatestEQ, number_of_partitions) lazy_import('sage.combinat.partition_tuple', ['PartitionTuple', 'PartitionTuples']) lazy_import('sage.combinat.partition_kleshchev', ['KleshchevPartitions']) @@ -139,7 +142,8 @@ from sage.combinat.matrices.all import * lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors') -lazy_import('sage.combinat.integer_vectors_mod_permgroup', 'IntegerVectorsModPermutationGroup') +lazy_import('sage.combinat.integer_vectors_mod_permgroup', + 'IntegerVectorsModPermutationGroup') lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial']) diff --git a/src/sage/combinat/all__sagemath_graphs.py b/src/sage/combinat/all__sagemath_graphs.py index 1fe628586f8..d789b89078b 100644 --- a/src/sage/combinat/all__sagemath_graphs.py +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -7,12 +7,13 @@ # Trees and Tamari interval posets from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, - LabelledOrderedTree, LabelledOrderedTrees) + LabelledOrderedTree, LabelledOrderedTrees) from sage.combinat.binary_tree import (BinaryTree, BinaryTrees, - LabelledBinaryTree, LabelledBinaryTrees) + LabelledBinaryTree, LabelledBinaryTrees) lazy_import('sage.combinat.rooted_tree', ('RootedTree', 'RootedTrees', - 'LabelledRootedTree', 'LabelledRootedTrees')) -lazy_import('sage.combinat.interval_posets', ['TamariIntervalPoset', 'TamariIntervalPosets']) + 'LabelledRootedTree', 'LabelledRootedTrees')) +lazy_import('sage.combinat.interval_posets', [ + 'TamariIntervalPoset', 'TamariIntervalPosets']) from sage.combinat.graph_path import GraphPaths diff --git a/src/sage/combinat/cluster_algebra_quiver/all.py b/src/sage/combinat/cluster_algebra_quiver/all.py index 5b28d09d1c6..9659105e91a 100644 --- a/src/sage/combinat/cluster_algebra_quiver/all.py +++ b/src/sage/combinat/cluster_algebra_quiver/all.py @@ -12,7 +12,8 @@ install_doc(__package__, __doc__) from sage.misc.lazy_import import lazy_import -lazy_import("sage.combinat.cluster_algebra_quiver.quiver_mutation_type", "QuiverMutationType") +lazy_import("sage.combinat.cluster_algebra_quiver.quiver_mutation_type", + "QuiverMutationType") lazy_import("sage.combinat.cluster_algebra_quiver.quiver", "ClusterQuiver") lazy_import("sage.combinat.cluster_algebra_quiver.cluster_seed", "ClusterSeed") diff --git a/src/sage/combinat/designs/all.py b/src/sage/combinat/designs/all.py index fea919db24e..d27679a09a1 100644 --- a/src/sage/combinat/designs/all.py +++ b/src/sage/combinat/designs/all.py @@ -43,7 +43,8 @@ lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure') -lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure', 'BlockDesign') +lazy_import('sage.combinat.designs.incidence_structures', + 'IncidenceStructure', 'BlockDesign') lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure', as_='Hypergraph') diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 5a6aef8d2e8..935e6ad73cc 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -138,6 +138,8 @@ 'WeightRing']) from sage.combinat.root_system.branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule -lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') -lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') +lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', + 'NonSymmetricMacdonaldPolynomials') +lazy_import('sage.combinat.root_system.integrable_representations', + 'IntegrableRepresentation') del lazy_import diff --git a/src/sage/crypto/all.py b/src/sage/crypto/all.py index 3645d45acea..811ee2c6a78 100644 --- a/src/sage/crypto/all.py +++ b/src/sage/crypto/all.py @@ -10,14 +10,14 @@ 'ShiftCryptosystem', 'TranspositionCryptosystem', 'VigenereCryptosystem', - ]) + ]) lazy_import('sage.crypto.stream', ['LFSRCryptosystem', 'ShrinkingGeneratorCryptosystem', - ]) + ]) lazy_import('sage.crypto.lfsr', ['lfsr_sequence', 'lfsr_autocorrelation', 'lfsr_connection_polynomial', - ]) + ]) del lazy_import diff --git a/src/sage/databases/all.py b/src/sage/databases/all.py index 3fa6005c162..a88ecc40f4d 100644 --- a/src/sage/databases/all.py +++ b/src/sage/databases/all.py @@ -68,14 +68,14 @@ lazy_import('sage.databases.odlyzko', 'zeta_zeros') from sage.databases.db_modular_polynomials import \ - ClassicalModularPolynomialDatabase, \ - DedekindEtaModularPolynomialDatabase, \ - DedekindEtaModularCorrespondenceDatabase, \ - AtkinModularPolynomialDatabase, \ - AtkinModularCorrespondenceDatabase + ClassicalModularPolynomialDatabase, \ + DedekindEtaModularPolynomialDatabase, \ + DedekindEtaModularCorrespondenceDatabase, \ + AtkinModularPolynomialDatabase, \ + AtkinModularCorrespondenceDatabase from sage.databases.db_class_polynomials import \ - HilbertClassPolynomialDatabase + HilbertClassPolynomialDatabase lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors') diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index 2502baaec8a..21b0bd54f9f 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -35,5 +35,6 @@ lazy_import('sage.dynamics.finite_dynamical_system', ['DiscreteDynamicalSystem']) -lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', 'finite_dynamical_systems') +lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', + 'finite_dynamical_systems') del lazy_import diff --git a/src/sage/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py index 6210c1c60cb..ec13d6e405f 100644 --- a/src/sage/ext/all__sagemath_categories.py +++ b/src/sage/ext/all__sagemath_categories.py @@ -1,2 +1,2 @@ -from sage.ext.fast_callable import fast_callable -from sage.ext.fast_eval import fast_float +from sage.ext.fast_callable import fast_callable +from sage.ext.fast_eval import fast_float diff --git a/src/sage/functions/all.py b/src/sage/functions/all.py index 78faebe29e2..4e4c092bc0f 100644 --- a/src/sage/functions/all.py +++ b/src/sage/functions/all.py @@ -3,90 +3,92 @@ lazy_import('sage.functions.piecewise', 'piecewise') lazy_import('sage.functions.error', ['erf', 'erfc', 'erfi', 'erfinv', - 'fresnel_sin', 'fresnel_cos']) + 'fresnel_sin', 'fresnel_cos']) -from sage.functions.trig import ( sin, cos, sec, csc, cot, tan, - asin, acos, atan, - acot, acsc, asec, - arcsin, arccos, arctan, - arccot, arccsc, arcsec, - arctan2, atan2) +from sage.functions.trig import (sin, cos, sec, csc, cot, tan, + asin, acos, atan, + acot, acsc, asec, + arcsin, arccos, arctan, + arccot, arccsc, arcsec, + arctan2, atan2) -from sage.functions.hyperbolic import ( tanh, sinh, cosh, coth, sech, csch, - asinh, acosh, atanh, acoth, asech, acsch, - arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch ) +from sage.functions.hyperbolic import (tanh, sinh, cosh, coth, sech, csch, + asinh, acosh, atanh, acoth, asech, acsch, + arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch) -reciprocal_trig_functions = {'sec': cos, 'csc': sin, 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh} +reciprocal_trig_functions = {'sec': cos, 'csc': sin, + 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh} -from sage.functions.other import ( ceil, floor, abs_symbolic, sqrt, real_nth_root, - arg, real_part, real, frac, - factorial, binomial, - imag_part, imag, imaginary, conjugate, cases, - complex_root_of) +from sage.functions.other import (ceil, floor, abs_symbolic, sqrt, real_nth_root, + arg, real_part, real, frac, + factorial, binomial, + imag_part, imag, imaginary, conjugate, cases, + complex_root_of) -from sage.functions.log import (exp, exp_polar, log, ln, polylog, dilog, lambert_w, harmonic_number) +from sage.functions.log import (exp, exp_polar, log, ln, + polylog, dilog, lambert_w, harmonic_number) from sage.functions.transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta, - dickman_rho, stieltjes) + dickman_rho, stieltjes) from sage.functions.bessel import (bessel_I, bessel_J, bessel_K, bessel_Y, - Bessel, struve_H, struve_L, hankel1, hankel2, + Bessel, struve_H, struve_L, hankel1, hankel2, spherical_bessel_J, spherical_bessel_Y, spherical_hankel1, spherical_hankel2) from sage.functions.special import (spherical_harmonic, elliptic_e, - elliptic_f, elliptic_ec, elliptic_eu, - elliptic_kc, elliptic_pi, elliptic_j) + elliptic_f, elliptic_ec, elliptic_eu, + elliptic_kc, elliptic_pi, elliptic_j) from sage.functions.jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc, - jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd, - jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am, - inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc, - inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc, - inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc, - inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs) + jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd, + jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am, + inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc, + inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc, + inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc, + inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs) from sage.functions.orthogonal_polys import (chebyshev_T, - chebyshev_U, - gen_laguerre, - gen_legendre_P, - gen_legendre_Q, - hermite, - jacobi_P, - laguerre, - legendre_P, - legendre_Q, - ultraspherical, - gegenbauer, - krawtchouk, - meixner, - hahn) + chebyshev_U, + gen_laguerre, + gen_legendre_P, + gen_legendre_Q, + hermite, + jacobi_P, + laguerre, + legendre_P, + legendre_Q, + ultraspherical, + gegenbauer, + krawtchouk, + meixner, + hahn) from sage.functions.spike_function import spike_function from sage.functions.prime_pi import legendre_phi, partial_sieve_function, prime_pi from sage.functions.wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j, - wigner_9j, gaunt) + wigner_9j, gaunt) from sage.functions.generalized import (dirac_delta, heaviside, unit_step, sgn, sign, - kronecker_delta) + kronecker_delta) from sage.functions.min_max import max_symbolic, min_symbolic from sage.functions.airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime from sage.functions.exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li, - log_integral_offset, - sin_integral, cos_integral, Si, Ci, - sinh_integral, cosh_integral, Shi, Chi, - exponential_integral_1, Ei, exp_integral_ei) + log_integral_offset, + sin_integral, cos_integral, Si, Ci, + sinh_integral, cosh_integral, Shi, Chi, + exponential_integral_1, Ei, exp_integral_ei) from sage.functions.hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U from sage.functions.gamma import (gamma, psi, beta, log_gamma, - gamma_inc, gamma_inc_lower) + gamma_inc, gamma_inc_lower) Γ = gamma ψ = psi diff --git a/src/sage/geometry/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py index d49257ff37d..0b1852de7a5 100644 --- a/src/sage/geometry/all__sagemath_polyhedra.py +++ b/src/sage/geometry/all__sagemath_polyhedra.py @@ -14,6 +14,7 @@ lazy_import('sage.geometry', 'lattice_polytope') lazy_import('sage.geometry', 'toric_plotter') lazy_import('sage.geometry.voronoi_diagram', 'VoronoiDiagram') -lazy_import('sage.geometry.hyperplane_arrangement.arrangement', 'HyperplaneArrangements') +lazy_import('sage.geometry.hyperplane_arrangement.arrangement', + 'HyperplaneArrangements') lazy_import('sage.geometry.hyperplane_arrangement.library', 'hyperplane_arrangements') del lazy_import diff --git a/src/sage/geometry/all__sagemath_symbolics.py b/src/sage/geometry/all__sagemath_symbolics.py index fb2ddf22675..fb690c97312 100644 --- a/src/sage/geometry/all__sagemath_symbolics.py +++ b/src/sage/geometry/all__sagemath_symbolics.py @@ -2,6 +2,6 @@ lazy_import('sage.geometry.hyperbolic_space.hyperbolic_interface', 'HyperbolicPlane') -from sage.geometry.riemannian_manifolds.all import * +from sage.geometry.riemannian_manifolds.all import * del lazy_import diff --git a/src/sage/geometry/polyhedron/all.py b/src/sage/geometry/polyhedron/all.py index dac1e2e5d0e..cda722f4d6b 100644 --- a/src/sage/geometry/polyhedron/all.py +++ b/src/sage/geometry/polyhedron/all.py @@ -2,5 +2,6 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.geometry.polyhedron.constructor', 'Polyhedron') lazy_import('sage.geometry.polyhedron.library', 'polytopes') -lazy_import('sage.geometry.polyhedron.combinatorial_polyhedron.base' , 'CombinatorialPolyhedron') +lazy_import('sage.geometry.polyhedron.combinatorial_polyhedron.base', + 'CombinatorialPolyhedron') del lazy_import diff --git a/src/sage/graphs/all.py b/src/sage/graphs/all.py index 471e742fed7..a3142e83e22 100644 --- a/src/sage/graphs/all.py +++ b/src/sage/graphs/all.py @@ -4,7 +4,8 @@ lazy_import("sage.graphs.graph_generators", "graphs") lazy_import("sage.graphs.digraph_generators", "digraphs") lazy_import("sage.graphs.hypergraph_generators", "hypergraphs") -lazy_import("sage.graphs.graph_database", ["GraphDatabase", "GenericGraphQuery", "GraphQuery"]) +lazy_import("sage.graphs.graph_database", [ + "GraphDatabase", "GenericGraphQuery", "GraphQuery"]) from sage.graphs.graph import Graph from sage.graphs.digraph import DiGraph from sage.graphs.bipartite_graph import BipartiteGraph diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 3a4b55e7e43..7efc7473356 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -2,7 +2,7 @@ all.py -- export of abelian groups to Sage """ -#***************************************************************************** +# ***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,7 +18,7 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.groups.abelian_gps.all__sagemath_modules import * from sage.groups.abelian_gps.all__sagemath_gap import * diff --git a/src/sage/groups/abelian_gps/all__sagemath_modules.py b/src/sage/groups/abelian_gps/all__sagemath_modules.py index b4d50cbaf28..32a1f65f720 100644 --- a/src/sage/groups/abelian_gps/all__sagemath_modules.py +++ b/src/sage/groups/abelian_gps/all__sagemath_modules.py @@ -1,4 +1,4 @@ -#from dual_abelian_group import DualAbelianGroup +# from dual_abelian_group import DualAbelianGroup from sage.groups.abelian_gps.abelian_group import AbelianGroup, word_problem from sage.groups.abelian_gps.values import AbelianGroupWithValues diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py index 960af07f9cc..18f110bd599 100644 --- a/src/sage/groups/all__sagemath_categories.py +++ b/src/sage/groups/all__sagemath_categories.py @@ -1,7 +1,7 @@ from sage.groups.all__sagemath_objects import * from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples) + linear_relation, multiple, multiples) from sage.misc.lazy_import import lazy_import diff --git a/src/sage/groups/all__sagemath_groups.py b/src/sage/groups/all__sagemath_groups.py index 5f149199669..c27a9ca05c5 100644 --- a/src/sage/groups/all__sagemath_groups.py +++ b/src/sage/groups/all__sagemath_groups.py @@ -22,9 +22,11 @@ lazy_import('sage.groups.artin', 'ArtinGroup') lazy_import('sage.groups.raag', 'RightAngledArtinGroup') -lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', 'SemimonomialTransformationGroup') +lazy_import('sage.groups.semimonomial_transformations.semimonomial_transformation_group', + 'SemimonomialTransformationGroup') lazy_import('sage.groups.group_exp', ['GroupExp', 'GroupExp_Class', 'GroupExpElement']) -lazy_import('sage.groups.group_semidirect_product', ['GroupSemidirectProduct', 'GroupSemidirectProductElement']) +lazy_import('sage.groups.group_semidirect_product', [ + 'GroupSemidirectProduct', 'GroupSemidirectProductElement']) del lazy_import diff --git a/src/sage/groups/perm_gps/all.py b/src/sage/groups/perm_gps/all.py index b1622efb65a..2cda7602d8c 100644 --- a/src/sage/groups/perm_gps/all.py +++ b/src/sage/groups/perm_gps/all.py @@ -1,20 +1,20 @@ from sage.groups.perm_gps.permgroup_named import (SymmetricGroup, AlternatingGroup, - DihedralGroup, SplitMetacyclicGroup, - SemidihedralGroup, CyclicPermutationGroup, - DiCyclicGroup, TransitiveGroup, - PGL, PSL, PSp, PSU, PGU, - MathieuGroup, KleinFourGroup, QuaternionGroup, - PrimitiveGroup, PrimitiveGroups, - SuzukiGroup, TransitiveGroups, - GeneralDihedralGroup, SmallPermutationGroup) + DihedralGroup, SplitMetacyclicGroup, + SemidihedralGroup, CyclicPermutationGroup, + DiCyclicGroup, TransitiveGroup, + PGL, PSL, PSp, PSU, PGU, + MathieuGroup, KleinFourGroup, QuaternionGroup, + PrimitiveGroup, PrimitiveGroups, + SuzukiGroup, TransitiveGroups, + GeneralDihedralGroup, SmallPermutationGroup) from sage.groups.perm_gps.permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups from sage.groups.perm_gps.constructor import PermutationGroupElement from sage.groups.perm_gps.permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap, - PermutationGroupMorphism_im_gens, - PermutationGroupMorphism_id) + PermutationGroupMorphism_im_gens, + PermutationGroupMorphism_id) PermutationGroupMorphism = PermutationGroupMorphism_im_gens from sage.groups.perm_gps.cubegroup import CubeGroup, RubiksCube diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index fcd8b15731b..83100b2c3de 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -4,7 +4,7 @@ from sage.interfaces.gap import gap, gap_reset_workspace, Gap from sage.interfaces.gp import gp, gp_version, Gp # import problems -#from maxima_lib import maxima_lib +# from maxima_lib import maxima_lib from sage.interfaces.maxima import maxima, Maxima from sage.interfaces.singular import singular, singular_version, Singular diff --git a/src/sage/libs/mpmath/all.py b/src/sage/libs/mpmath/all.py index 63dd7c0e1fb..ea35faeb721 100644 --- a/src/sage/libs/mpmath/all.py +++ b/src/sage/libs/mpmath/all.py @@ -14,12 +14,13 @@ # Use mpmath internal functions for constants, to avoid unnecessary overhead _constants_funcs = { - 'glaisher': glaisher_fixed, - 'khinchin': khinchin_fixed, - 'twinprime': twinprime_fixed, - 'mertens': mertens_fixed + 'glaisher': glaisher_fixed, + 'khinchin': khinchin_fixed, + 'twinprime': twinprime_fixed, + 'mertens': mertens_fixed } + def eval_constant(name, ring): prec = ring.precision() + 20 return ring(_constants_funcs[name](prec)) >> prec diff --git a/src/sage/libs/ntl/all.py b/src/sage/libs/ntl/all.py index e9d4271879a..752ddf03899 100644 --- a/src/sage/libs/ntl/all.py +++ b/src/sage/libs/ntl/all.py @@ -29,12 +29,12 @@ from sage.libs.ntl.ntl_ZZ_pContext import ntl_ZZ_pContext as ZZ_pContext from sage.libs.ntl.ntl_ZZ_p import ( - ntl_ZZ_p as ZZ_p, - ntl_ZZ_p_random_element as ZZ_p_random ) + ntl_ZZ_p as ZZ_p, + ntl_ZZ_p_random_element as ZZ_p_random) from sage.libs.ntl.ntl_ZZX import ( - ntl_ZZX as ZZX, - zero_ZZX, one_ZZX ) + ntl_ZZX as ZZX, + zero_ZZX, one_ZZX) from sage.libs.ntl.ntl_ZZ_pX import ntl_ZZ_pX as ZZ_pX diff --git a/src/sage/libs/symmetrica/all.py b/src/sage/libs/symmetrica/all.py index b2914f4aab8..f69490654af 100644 --- a/src/sage/libs/symmetrica/all.py +++ b/src/sage/libs/symmetrica/all.py @@ -1,30 +1,30 @@ -#from symmetrica import * +# from symmetrica import * from sage.libs.symmetrica.symmetrica import start -#kostka +# kostka from sage.libs.symmetrica.symmetrica import kostka_number_symmetrica as kostka_number from sage.libs.symmetrica.symmetrica import kostka_tab_symmetrica as kostka_tab from sage.libs.symmetrica.symmetrica import kostka_tafel_symmetrica as kostka_tafel -#sab +# sab from sage.libs.symmetrica.symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization from sage.libs.symmetrica.symmetrica import bdg_symmetrica as bdg from sage.libs.symmetrica.symmetrica import sdg_symmetrica as sdg from sage.libs.symmetrica.symmetrica import odg_symmetrica as odg from sage.libs.symmetrica.symmetrica import specht_dg_symmetrica as specht_dg from sage.libs.symmetrica.symmetrica import ndg_symmetrica as ndg -#from symmetrica import glmndg_symmetrica as glmndg +# from symmetrica import glmndg_symmetrica as glmndg -#sc +# sc from sage.libs.symmetrica.symmetrica import chartafel_symmetrica as chartafel from sage.libs.symmetrica.symmetrica import charvalue_symmetrica as charvalue from sage.libs.symmetrica.symmetrica import kranztafel_symmetrica as kranztafel -#from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn +# from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn -#part +# part from sage.libs.symmetrica.symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part from sage.libs.symmetrica.symmetrica import odd_to_strict_part_symmetrica as odd_to_strict from sage.libs.symmetrica.symmetrica import q_core_symmetrica as q_core @@ -33,7 +33,7 @@ from sage.libs.symmetrica.symmetrica import random_partition_symmetrica as random_partition -#schur +# schur from sage.libs.symmetrica.symmetrica import outerproduct_schur_symmetrica as outerproduct_schur from sage.libs.symmetrica.symmetrica import dimension_schur_symmetrica as dimension_schur from sage.libs.symmetrica.symmetrica import part_part_skewschur_symmetrica as part_part_skewschur @@ -84,11 +84,11 @@ from sage.libs.symmetrica.symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur -#plet +# plet from sage.libs.symmetrica.symmetrica import plethysm_symmetrica as plethysm from sage.libs.symmetrica.symmetrica import schur_schur_plet_symmetrica as schur_schur_plet -#sb +# sb from sage.libs.symmetrica.symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert from sage.libs.symmetrica.symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT diff --git a/src/sage/matrix/all.py b/src/sage/matrix/all.py index 698b5f3c7c2..0902e081afb 100644 --- a/src/sage/matrix/all.py +++ b/src/sage/matrix/all.py @@ -1,8 +1,8 @@ from sage.misc.lazy_import import lazy_import from sage.matrix.matrix_space import MatrixSpace from sage.matrix.constructor import (matrix, Matrix, column_matrix, random_matrix, - diagonal_matrix, identity_matrix, block_matrix, - block_diagonal_matrix, jordan_block, zero_matrix, - ones_matrix, elementary_matrix, companion_matrix) + diagonal_matrix, identity_matrix, block_matrix, + block_diagonal_matrix, jordan_block, zero_matrix, + ones_matrix, elementary_matrix, companion_matrix) Mat = MatrixSpace del lazy_import diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index e22f9c60cda..c74ffe9727a 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,4 +1,4 @@ -#from sage.misc.all__sagemath_objects import * +# from sage.misc.all__sagemath_objects import * from sage.misc.all__sagemath_environment import * from sage.misc.all__sagemath_modules import * from sage.misc.all__sagemath_repl import * diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py index 8145d387ae4..46be65b787c 100644 --- a/src/sage/misc/all__sagemath_categories.py +++ b/src/sage/misc/all__sagemath_categories.py @@ -12,66 +12,66 @@ from sage.misc.mrange import xmrange, mrange, xmrange_iter, mrange_iter, cartesian_product_iterator from sage.misc.defaults import (set_default_variable_name, - series_precision, set_series_precision) + series_precision, set_series_precision) from sage.misc.functional import (additive_order, - base_ring, - base_field, - basis, - category, - charpoly, - characteristic_polynomial, - coerce, - cyclotomic_polynomial, - decomposition, - denominator, - det, - dimension, - dim, - discriminant, - disc, - eta, - fcp, - gen, - gens, - hecke_operator, - image, - integral, integrate, - integral_closure, - interval, - xinterval, - is_commutative, - is_even, - is_integrally_closed, - is_field, - is_odd, - kernel, - krull_dimension, - lift, - log as log_b, - minimal_polynomial, - minpoly, - multiplicative_order, - ngens, - norm, - numerator, - numerical_approx, - n, N, - objgens, - objgen, - order, - rank, - regulator, - round, - quotient, - quo, - isqrt, - squarefree_part, - sqrt, - symbolic_sum as sum, - symbolic_prod as product, - transpose) + base_ring, + base_field, + basis, + category, + charpoly, + characteristic_polynomial, + coerce, + cyclotomic_polynomial, + decomposition, + denominator, + det, + dimension, + dim, + discriminant, + disc, + eta, + fcp, + gen, + gens, + hecke_operator, + image, + integral, integrate, + integral_closure, + interval, + xinterval, + is_commutative, + is_even, + is_integrally_closed, + is_field, + is_odd, + kernel, + krull_dimension, + lift, + log as log_b, + minimal_polynomial, + minpoly, + multiplicative_order, + ngens, + norm, + numerator, + numerical_approx, + n, N, + objgens, + objgen, + order, + rank, + regulator, + round, + quotient, + quo, + isqrt, + squarefree_part, + sqrt, + symbolic_sum as sum, + symbolic_prod as product, + transpose) from sage.misc.latex import LatexExpr, latex, view diff --git a/src/sage/misc/all__sagemath_modules.py b/src/sage/misc/all__sagemath_modules.py index 158f41ed686..8111aee2a29 100644 --- a/src/sage/misc/all__sagemath_modules.py +++ b/src/sage/misc/all__sagemath_modules.py @@ -6,12 +6,12 @@ from sage.misc.all__sagemath_categories import * from sage.misc.misc import (BackslashOperator, # Depends on sage.env -- can lower to sagemath-objects after splitting this module - exists, forall, is_iterator, - random_sublist, - pad_zeros, - SAGE_DB, - newton_method_sizes, compose, - nest) + exists, forall, is_iterator, + random_sublist, + pad_zeros, + SAGE_DB, + newton_method_sizes, compose, + nest) from sage.misc.temporary_file import tmp_dir, tmp_filename # Depends on sage.env diff --git a/src/sage/misc/all__sagemath_objects.py b/src/sage/misc/all__sagemath_objects.py index 30a76f38fab..2ae6508a5ea 100644 --- a/src/sage/misc/all__sagemath_objects.py +++ b/src/sage/misc/all__sagemath_objects.py @@ -6,7 +6,7 @@ from sage.misc.lazy_import import lazy_import from sage.misc.verbose import (set_verbose, set_verbose_files, - get_verbose_files, unset_verbose_files, get_verbose) + get_verbose_files, unset_verbose_files, get_verbose) lazy_import('sage.misc.verbose', 'verbose', deprecation=17815) from sage.misc.call import attrcall diff --git a/src/sage/misc/all__sagemath_repl.py b/src/sage/misc/all__sagemath_repl.py index 15074e16be1..2f638230b42 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -7,8 +7,8 @@ from sage.misc.banner import version lazy_import('sage.misc.sagedoc', ['browse_sage_doc', - 'search_src', 'search_def', 'search_doc', - 'tutorial', 'reference', 'manual', 'developer', - 'constructions', 'help']) + 'search_src', 'search_def', 'search_doc', + 'tutorial', 'reference', 'manual', 'developer', + 'constructions', 'help']) lazy_import('pydoc', 'help', 'python_help') diff --git a/src/sage/modular/all.py b/src/sage/modular/all.py index 75aa498109e..73048018c69 100644 --- a/src/sage/modular/all.py +++ b/src/sage/modular/all.py @@ -11,12 +11,12 @@ from sage.modular.abvar.all import * from sage.modular.dirichlet import (DirichletGroup, - kronecker_character, kronecker_character_upside_down, - trivial_character) + kronecker_character, kronecker_character_upside_down, + trivial_character) from sage.modular.arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, - ArithmeticSubgroup_Permutation, - CongruenceSubgroup, FareySymbol) + ArithmeticSubgroup_Permutation, + CongruenceSubgroup, FareySymbol) from sage.modular.cusps import Cusp, Cusps @@ -28,7 +28,7 @@ deprecation=(32647, 'removed from main namespace')) from sage.modular.etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, - AllCusps, CuspFamily) + AllCusps, CuspFamily) lazy_import('sage.modular.multiple_zeta', ['Multizeta', 'Multizetas']) diff --git a/src/sage/modular/arithgroup/all.py b/src/sage/modular/arithgroup/all.py index 3e189a658c9..2915566b73c 100644 --- a/src/sage/modular/arithgroup/all.py +++ b/src/sage/modular/arithgroup/all.py @@ -13,7 +13,7 @@ lazy_import('sage.modular.arithgroup.arithgroup_perm', 'ArithmeticSubgroup_Permutation') from sage.modular.arithgroup.congroup import (degeneracy_coset_representatives_gamma0, - degeneracy_coset_representatives_gamma1) + degeneracy_coset_representatives_gamma1) from sage.modular.arithgroup.farey_symbol import Farey as FareySymbol del lazy_import diff --git a/src/sage/modular/btquotients/all.py b/src/sage/modular/btquotients/all.py index 5d11aed1020..1e96b2db99b 100644 --- a/src/sage/modular/btquotients/all.py +++ b/src/sage/modular/btquotients/all.py @@ -1,3 +1,3 @@ from sage.modular.btquotients.btquotient import BruhatTitsQuotient -#from pautomorphicform import pAdicAutomorphicForms -#from pautomorphicform import BruhatTitsHarmonicCocycles +# from pautomorphicform import pAdicAutomorphicForms +# from pautomorphicform import BruhatTitsHarmonicCocycles diff --git a/src/sage/modular/hecke/all.py b/src/sage/modular/hecke/all.py index bd5bb292c43..3c9230a2520 100644 --- a/src/sage/modular/hecke/all.py +++ b/src/sage/modular/hecke/all.py @@ -9,8 +9,8 @@ from sage.modular.hecke.algebra import HeckeAlgebra, is_HeckeAlgebra from sage.modular.hecke.morphism import (HeckeModuleMorphism, HeckeModuleMorphism_matrix, - is_HeckeModuleMorphism, - is_HeckeModuleMorphism_matrix) + is_HeckeModuleMorphism, + is_HeckeModuleMorphism_matrix) from sage.modular.hecke.element import HeckeModuleElement, is_HeckeModuleElement diff --git a/src/sage/modular/modform_hecketriangle/all.py b/src/sage/modular/modform_hecketriangle/all.py index 1d3ad5aa289..1c2bfeccdc6 100644 --- a/src/sage/modular/modform_hecketriangle/all.py +++ b/src/sage/modular/modform_hecketriangle/all.py @@ -16,14 +16,14 @@ from sage.modular.modform_hecketriangle.series_constructor import MFSeriesConstructor from sage.modular.modform_hecketriangle.graded_ring import (QuasiMeromorphicModularFormsRing, - QuasiWeakModularFormsRing, QuasiModularFormsRing, - QuasiCuspFormsRing, MeromorphicModularFormsRing, - WeakModularFormsRing, - ModularFormsRing, CuspFormsRing) + QuasiWeakModularFormsRing, QuasiModularFormsRing, + QuasiCuspFormsRing, MeromorphicModularFormsRing, + WeakModularFormsRing, + ModularFormsRing, CuspFormsRing) from sage.modular.modform_hecketriangle.space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, - QuasiModularForms, QuasiCuspForms, - MeromorphicModularForms, WeakModularForms, ModularForms, - CuspForms, ZeroForm) + QuasiModularForms, QuasiCuspForms, + MeromorphicModularForms, WeakModularForms, ModularForms, + CuspForms, ZeroForm) from sage.modular.modform_hecketriangle.subspace import ModularFormsSubSpace diff --git a/src/sage/monoids/all.py b/src/sage/monoids/all.py index a08f8df0f43..7b4543dd34c 100644 --- a/src/sage/monoids/all.py +++ b/src/sage/monoids/all.py @@ -1,7 +1,7 @@ from sage.monoids.free_monoid import FreeMonoid from sage.monoids.string_monoid import (BinaryStrings, OctalStrings, HexadecimalStrings, - Radix64Strings, AlphabeticStrings) + Radix64Strings, AlphabeticStrings) from sage.monoids.free_abelian_monoid import FreeAbelianMonoid diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 6d10496e11c..4d7d65ecf62 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -1,8 +1,8 @@ from sage.plot.graphics import Graphics from sage.plot.plot import (plot, graphics_array, multi_graphics, list_plot, - parametric_plot, polar_plot, plot_loglog, plot_semilogx, - plot_semilogy, list_plot_loglog, list_plot_semilogx, - list_plot_semilogy) + parametric_plot, polar_plot, plot_loglog, plot_semilogx, + plot_semilogy, list_plot_loglog, list_plot_semilogx, + list_plot_semilogy) from sage.plot.line import line, line2d from sage.plot.arrow import arrow, arrow2d from sage.plot.bar_chart import bar_chart @@ -22,7 +22,7 @@ from sage.plot.streamline_plot import streamline_plot from sage.misc.lazy_import import lazy_import -lazy_import("sage.plot.complex_plot",["complex_plot"]) +lazy_import("sage.plot.complex_plot", ["complex_plot"]) from sage.plot.arc import arc @@ -35,6 +35,7 @@ from sage.plot.step import plot_step_function lazy_import("sage.plot.hyperbolic_arc", "hyperbolic_arc") -lazy_import("sage.plot.hyperbolic_polygon", ["hyperbolic_triangle", "hyperbolic_polygon"]) +lazy_import("sage.plot.hyperbolic_polygon", [ + "hyperbolic_triangle", "hyperbolic_polygon"]) lazy_import("sage.plot.hyperbolic_regular_polygon", "hyperbolic_regular_polygon") del lazy_import diff --git a/src/sage/plot/plot3d/all.py b/src/sage/plot/plot3d/all.py index 4838f73c016..1fc801284f5 100644 --- a/src/sage/plot/plot3d/all.py +++ b/src/sage/plot/plot3d/all.py @@ -1,22 +1,22 @@ -from sage.plot.plot3d.plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical +from sage.plot.plot3d.plot3d import plot3d, cylindrical_plot3d, spherical_plot3d, Spherical, SphericalElevation, Cylindrical from sage.plot.plot3d.parametric_plot3d import parametric_plot3d -from sage.plot.plot3d.plot_field3d import plot_vector_field3d +from sage.plot.plot3d.plot_field3d import plot_vector_field3d # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import -lazy_import("sage.plot.plot3d.implicit_plot3d",["implicit_plot3d"]) +lazy_import("sage.plot.plot3d.implicit_plot3d", ["implicit_plot3d"]) -from sage.plot.plot3d.list_plot3d import list_plot3d +from sage.plot.plot3d.list_plot3d import list_plot3d from sage.plot.plot3d.revolution_plot3d import revolution_plot3d -from sage.plot.plot3d.platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron +from sage.plot.plot3d.platonic import tetrahedron, cube, octahedron, dodecahedron, icosahedron -from sage.plot.plot3d.shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d +from sage.plot.plot3d.shapes2 import sphere, line3d, polygon3d, polygons3d, point3d, text3d, bezier3d -from sage.plot.plot3d.shapes import arrow3d +from sage.plot.plot3d.shapes import arrow3d -#from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D -#from parametric_surface import ParametricSurface, MoebiusStrip -#from plot3d import plot3d, axes as axes3d +# from shapes import Box, ColorCube, Cone, Cylinder, LineSegment, Arrow, Sphere, Torus, Text as Text3D +# from parametric_surface import ParametricSurface, MoebiusStrip +# from plot3d import plot3d, axes as axes3d del lazy_import diff --git a/src/sage/probability/all.py b/src/sage/probability/all.py index 6ac09a72160..646f3d5a2ad 100644 --- a/src/sage/probability/all.py +++ b/src/sage/probability/all.py @@ -1,9 +1,9 @@ from sage.probability.random_variable import ( - DiscreteRandomVariable, - DiscreteProbabilitySpace ) + DiscreteRandomVariable, + DiscreteProbabilitySpace) from sage.probability.probability_distribution import ( RealDistribution, SphericalDistribution, - GeneralDiscreteDistribution ) + GeneralDiscreteDistribution) diff --git a/src/sage/quadratic_forms/all__sagemath_modules.py b/src/sage/quadratic_forms/all__sagemath_modules.py index a5430b77a9c..62516aead2a 100644 --- a/src/sage/quadratic_forms/all__sagemath_modules.py +++ b/src/sage/quadratic_forms/all__sagemath_modules.py @@ -5,7 +5,7 @@ from sage.quadratic_forms.quadratic_form import QuadraticForm, DiagonalQuadraticForm, quadratic_form_from_invariants from sage.quadratic_forms.random_quadraticform import (random_quadraticform, random_quadraticform_with_conditions, - random_ternaryqf, random_ternaryqf_with_conditions) + random_ternaryqf, random_ternaryqf_with_conditions) from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py index eddc562392c..3217ed8cd0a 100644 --- a/src/sage/quadratic_forms/all__sagemath_pari.py +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -1,5 +1,5 @@ from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, - quadratic_L_function__exact, quadratic_L_function__numerical) + quadratic_L_function__exact, quadratic_L_function__numerical) from sage.quadratic_forms.genera.genus import Genus diff --git a/src/sage/repl/all.py b/src/sage/repl/all.py index 0b0ef116059..809cea7d7e5 100644 --- a/src/sage/repl/all.py +++ b/src/sage/repl/all.py @@ -5,8 +5,8 @@ lazy_import('sage.repl.interpreter', 'preparser') lazy_import('sage.repl.attach', [ - 'attach', 'detach', 'attached_files', 'load_attach_path', - 'reset_load_attach_path', 'load_attach_mode']) + 'attach', 'detach', 'attached_files', 'load_attach_path', + 'reset_load_attach_path', 'load_attach_mode']) from sage.repl.rich_output.display_manager import get_display_manager diff --git a/src/sage/repl/ipython_kernel/all_jupyter.py b/src/sage/repl/ipython_kernel/all_jupyter.py index 69bf0549da1..3e6eca3e004 100644 --- a/src/sage/repl/ipython_kernel/all_jupyter.py +++ b/src/sage/repl/ipython_kernel/all_jupyter.py @@ -5,5 +5,5 @@ from sage.all_cmdline import * from sage.repl.ipython_kernel.widgets_sagenb import (input_box, text_control, slider, - range_slider, checkbox, selector, input_grid, color_selector) + range_slider, checkbox, selector, input_grid, color_selector) from sage.repl.ipython_kernel.interact import interact diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index eb6fb48849f..1e3eecdb5e5 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -22,7 +22,7 @@ except ImportError: pass -### Following will go to all__sagemath_categories.py in #36566 +# Following will go to all__sagemath_categories.py in #36566 # Quotient from sage.rings.quotient_ring import QuotientRing @@ -45,7 +45,7 @@ from sage.rings.finite_rings.integer_mod import IntegerMod, Mod, mod Integers = IntegerModRing -### up to here (#36566) +# up to here (#36566) # Finite fields from sage.rings.finite_rings.all import * @@ -53,7 +53,7 @@ # Function field from sage.rings.function_field.all import * -### Following will go to all__sagemath_categories.py in #36566 +# Following will go to all__sagemath_categories.py in #36566 # Semirings from sage.rings.semirings.all import * @@ -64,12 +64,12 @@ # Lazy reals from sage.rings.real_lazy import RealLazyField, RLF, ComplexLazyField, CLF -### up to here (#36566) +# up to here (#36566) # Polynomial Rings and Polynomial Quotient Rings from sage.rings.polynomial.all import * -### Following will go to all__sagemath_categories.py in #36566 +# Following will go to all__sagemath_categories.py in #36566 # Power series rings from sage.rings.power_series_ring import PowerSeriesRing @@ -90,25 +90,26 @@ # Localization from sage.rings.localization import Localization -### up to here (#36566) +# up to here (#36566) # c-finite sequences from sage.rings.cfinite_sequence import CFiniteSequence, CFiniteSequences from sage.rings.fast_arith import prime_range -### Following will go to all__sagemath_categories.py in #36566 +# Following will go to all__sagemath_categories.py in #36566 # continued fractions from sage.rings.continued_fraction import (continued_fraction, continued_fraction_list) -### up to here (#36566) +# up to here (#36566) # asymptotic ring -#from sage.rings.asymptotic.all import * +# from sage.rings.asymptotic.all import * lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') -lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') +lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', + 'asymptotic_expansions') # Register classes in numbers abc from sage.rings import numbers_abc diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 04e818c55b0..7c69f137275 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,21 +1,21 @@ # Ring base classes from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - DedekindDomain, PrincipalIdealDomain, EuclideanDomain) + DedekindDomain, PrincipalIdealDomain, EuclideanDomain) # Ring element base classes from sage.structure.element import (CommutativeAlgebraElement, - RingElement, CommutativeRingElement, IntegralDomainElement, - DedekindDomainElement, PrincipalIdealDomainElement, - EuclideanDomainElement, FieldElement) + RingElement, CommutativeRingElement, IntegralDomainElement, + DedekindDomainElement, PrincipalIdealDomainElement, + EuclideanDomainElement, FieldElement) # Ideals from sage.rings.ideal import Ideal ideal = Ideal -### To be added in #36566: +# To be added in #36566: -#from sage.rings.finite_rings.all__sagemath_categories import * -#from sage.rings.function_field.all__sagemath_categories import * -#from sage.rings.number_field.all__sagemath_categories import * -#from sage.rings.padics.all__sagemath_categories import * -#from sage.rings.polynomial.all__sagemath_categories import * +# from sage.rings.finite_rings.all__sagemath_categories import * +# from sage.rings.function_field.all__sagemath_categories import * +# from sage.rings.number_field.all__sagemath_categories import * +# from sage.rings.padics.all__sagemath_categories import * +# from sage.rings.polynomial.all__sagemath_categories import * diff --git a/src/sage/rings/all__sagemath_flint.py b/src/sage/rings/all__sagemath_flint.py index 95373001294..098426b0e9b 100644 --- a/src/sage/rings/all__sagemath_flint.py +++ b/src/sage/rings/all__sagemath_flint.py @@ -13,19 +13,20 @@ # Algebraic numbers from sage.rings.qqbar import (AlgebraicRealField, AA, - AlgebraicReal, - AlgebraicField, QQbar, - AlgebraicNumber, - number_field_elements_from_algebraics) + AlgebraicReal, + AlgebraicField, QQbar, + AlgebraicNumber, + number_field_elements_from_algebraics) # Intervals from sage.rings.real_mpfi import (RealIntervalField, - RIF, - RealInterval) + RIF, + RealInterval) # Complex numbers from sage.rings.complex_interval_field import ComplexIntervalField -from sage.rings.complex_interval import (create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) +from sage.rings.complex_interval import ( + create_ComplexIntervalFieldElement as ComplexIntervalFieldElement) from sage.misc.lazy_import import lazy_import diff --git a/src/sage/rings/all__sagemath_modules.py b/src/sage/rings/all__sagemath_modules.py index 3096135b7e0..c82909b5984 100644 --- a/src/sage/rings/all__sagemath_modules.py +++ b/src/sage/rings/all__sagemath_modules.py @@ -5,7 +5,7 @@ # Real numbers from sage.rings.real_mpfr import (RealField, RR, - create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. + create_RealNumber as RealNumber) # this is used by the preparser to wrap real literals -- very important. Reals = RealField # Complex numbers diff --git a/src/sage/rings/asymptotic/all.py b/src/sage/rings/asymptotic/all.py index ba428ed2240..27e4d289212 100644 --- a/src/sage/rings/asymptotic/all.py +++ b/src/sage/rings/asymptotic/all.py @@ -1,4 +1,5 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.asymptotic.asymptotic_ring', 'AsymptoticRing') -lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', 'asymptotic_expansions') +lazy_import('sage.rings.asymptotic.asymptotic_expansion_generators', + 'asymptotic_expansions') del lazy_import diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 92c168e2623..06187529bd6 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -2,7 +2,7 @@ Finite Fields """ -#***************************************************************************** +# ***************************************************************************** # Copyright (C) 2010 David Roe # William Stein # @@ -16,6 +16,6 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.rings.finite_rings.all__sagemath_categories import * diff --git a/src/sage/rings/number_field/all.py b/src/sage/rings/number_field/all.py index 72e0d56d1a0..73cf7750d43 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -1,6 +1,6 @@ from sage.rings.number_field.number_field import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, - is_fundamental_discriminant, is_real_place) + is_fundamental_discriminant, is_real_place) from sage.rings.number_field.number_field_element import NumberFieldElement from sage.rings.number_field.order import EquationOrder, GaussianIntegers, EisensteinIntegers @@ -9,8 +9,10 @@ lazy_import('sage.rings.number_field.totallyreal', 'enumerate_totallyreal_fields_prim') lazy_import('sage.rings.number_field.totallyreal_data', 'hermite_constant') -lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_all') -lazy_import('sage.rings.number_field.totallyreal_rel', 'enumerate_totallyreal_fields_rel') +lazy_import('sage.rings.number_field.totallyreal_rel', + 'enumerate_totallyreal_fields_all') +lazy_import('sage.rings.number_field.totallyreal_rel', + 'enumerate_totallyreal_fields_rel') from sage.rings.number_field.unit_group import UnitGroup diff --git a/src/sage/schemes/affine/all.py b/src/sage/schemes/affine/all.py index 31edc39276b..bae2e970277 100644 --- a/src/sage/schemes/affine/all.py +++ b/src/sage/schemes/affine/all.py @@ -2,7 +2,7 @@ all.py -- export of affine to Sage """ -#***************************************************************************** +# ***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,7 +18,7 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.schemes.affine.affine_space import AffineSpace from sage.schemes.affine.affine_rational_point import enum_affine_rational_field, enum_affine_finite_field diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index bc5b7441628..ce3c29058fd 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -2,7 +2,7 @@ all.py -- export of schemes to Sage """ -#***************************************************************************** +# ***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,7 +18,7 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.schemes.all__sagemath_categories import * from sage.schemes.all__sagemath_polyhedra import * diff --git a/src/sage/schemes/curves/all.py b/src/sage/schemes/curves/all.py index ec0af61d2f7..67f19a5dbbe 100644 --- a/src/sage/schemes/curves/all.py +++ b/src/sage/schemes/curves/all.py @@ -2,7 +2,7 @@ Plane curves """ -#***************************************************************************** +# ***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,7 +18,7 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.schemes.curves.constructor import Curve diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index 0b79dee7dc8..35e49ae4806 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -2,7 +2,7 @@ Exported elliptic curves functionality """ -#***************************************************************************** +# ***************************************************************************** # Copyright (C) 2005 William Stein # # Distributed under the terms of the GNU General Public License (GPL) @@ -15,13 +15,13 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.schemes.elliptic_curves.constructor import (EllipticCurve, - EllipticCurve_from_c4c6, - EllipticCurve_from_j, - EllipticCurve_from_cubic, - EllipticCurves_with_good_reduction_outside_S) + EllipticCurve_from_c4c6, + EllipticCurve_from_j, + EllipticCurve_from_cubic, + EllipticCurves_with_good_reduction_outside_S) from sage.misc.lazy_import import lazy_import lazy_import('sage.schemes.elliptic_curves.jacobian', 'Jacobian') @@ -29,10 +29,10 @@ lazy_import('sage.schemes.elliptic_curves.ell_rational_field', ['cremona_curves', 'cremona_optimal_curves']) -from sage.schemes.elliptic_curves.cm import ( cm_orders, - cm_j_invariants, - cm_j_invariants_and_orders, - hilbert_class_polynomial ) +from sage.schemes.elliptic_curves.cm import (cm_orders, + cm_j_invariants, + cm_j_invariants_and_orders, + hilbert_class_polynomial) lazy_import('sage.schemes.elliptic_curves.ec_database', 'elliptic_curves') diff --git a/src/sage/schemes/hyperelliptic_curves/all.py b/src/sage/schemes/hyperelliptic_curves/all.py index e314dceb1e0..40c8b58e823 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -41,6 +41,7 @@ ['igusa_clebsch_invariants', 'absolute_igusa_invariants_kohel', 'absolute_igusa_invariants_wamelen', 'clebsch_invariants'], deprecation=28064) -from sage.schemes.hyperelliptic_curves.mestre import (Mestre_conic, HyperellipticCurve_from_invariants) +from sage.schemes.hyperelliptic_curves.mestre import ( + Mestre_conic, HyperellipticCurve_from_invariants) from sage.schemes.hyperelliptic_curves import monsky_washnitzer del lazy_import diff --git a/src/sage/schemes/jacobians/all.py b/src/sage/schemes/jacobians/all.py index ec769450947..f087d853e90 100644 --- a/src/sage/schemes/jacobians/all.py +++ b/src/sage/schemes/jacobians/all.py @@ -1 +1 @@ -#from abstract_jacobian import is_Jacobian, Jacobian +# from abstract_jacobian import is_Jacobian, Jacobian diff --git a/src/sage/schemes/projective/all.py b/src/sage/schemes/projective/all.py index 91c821115d1..665f57da9ee 100644 --- a/src/sage/schemes/projective/all.py +++ b/src/sage/schemes/projective/all.py @@ -2,7 +2,7 @@ all.py -- export of projective schemes to Sage """ -#***************************************************************************** +# ***************************************************************************** # # Sage: Open Source Mathematical Software # @@ -18,6 +18,6 @@ # The full text of the GPL is available at: # # http://www.gnu.org/licenses/ -#***************************************************************************** +# ***************************************************************************** from sage.schemes.projective.projective_space import ProjectiveSpace, is_ProjectiveSpace diff --git a/src/sage/sets/all.py b/src/sage/sets/all.py index 328fcfa96ac..8cdd85ed269 100644 --- a/src/sage/sets/all.py +++ b/src/sage/sets/all.py @@ -5,7 +5,7 @@ from sage.sets.non_negative_integers import NonNegativeIntegers from sage.sets.positive_integers import PositiveIntegers from sage.sets.finite_enumerated_set import FiniteEnumeratedSet -lazy_import('sage.sets.recursively_enumerated_set','RecursivelyEnumeratedSet') +lazy_import('sage.sets.recursively_enumerated_set', 'RecursivelyEnumeratedSet') from sage.sets.totally_ordered_finite_set import TotallyOrderedFiniteSet from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets from sage.sets.primes import Primes diff --git a/src/sage/stats/hmm/all.py b/src/sage/stats/hmm/all.py index d331f45b41c..e2880a402dc 100644 --- a/src/sage/stats/hmm/all.py +++ b/src/sage/stats/hmm/all.py @@ -8,6 +8,7 @@ # We lazy_import the following modules since they import numpy which slows down sage startup from sage.misc.lazy_import import lazy_import lazy_import("sage.stats.hmm.hmm", ["DiscreteHiddenMarkovModel"]) -lazy_import("sage.stats.hmm.chmm", ["GaussianHiddenMarkovModel","GaussianMixtureHiddenMarkovModel"]) +lazy_import("sage.stats.hmm.chmm", [ + "GaussianHiddenMarkovModel", "GaussianMixtureHiddenMarkovModel"]) lazy_import("sage.stats.hmm.distributions", ["GaussianMixtureDistribution"]) del lazy_import diff --git a/src/sage/structure/all.py b/src/sage/structure/all.py index df0114c8382..673a6488625 100644 --- a/src/sage/structure/all.py +++ b/src/sage/structure/all.py @@ -12,7 +12,7 @@ get_coercion_model, coercion_traceback, parent - ) +) from sage.structure.parent import Parent diff --git a/src/sage/symbolic/all.py b/src/sage/symbolic/all.py index 742f49146ca..8e1c9600409 100644 --- a/src/sage/symbolic/all.py +++ b/src/sage/symbolic/all.py @@ -1,6 +1,6 @@ from sage.symbolic.ring import SR from sage.symbolic.constants import (pi, e, NaN, golden_ratio, log2, euler_gamma, catalan, - khinchin, twinprime, mertens, glaisher) + khinchin, twinprime, mertens, glaisher) from sage.symbolic.expression import Expression, solve_diophantine, hold from sage.symbolic.callable import CallableSymbolicExpressionRing From a7fdfc9352b208672a9fb6705f3a413f69973935 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Nov 2023 11:09:46 -0800 Subject: [PATCH 16/27] sed -i.bak 's,http:,https:,g' src/sage/**/all*.py --- src/sage/algebras/lie_algebras/all.py | 2 +- src/sage/algebras/lie_conformal_algebras/all.py | 2 +- src/sage/databases/all.py | 2 +- src/sage/groups/abelian_gps/all.py | 2 +- src/sage/modular/abvar/all.py | 2 +- src/sage/modular/modform/all.py | 2 +- src/sage/rings/finite_rings/all.py | 2 +- src/sage/schemes/affine/all.py | 2 +- src/sage/schemes/all.py | 2 +- src/sage/schemes/curves/all.py | 2 +- src/sage/schemes/elliptic_curves/all.py | 2 +- src/sage/schemes/projective/all.py | 2 +- src/sage/stats/hmm/all.py | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sage/algebras/lie_algebras/all.py b/src/sage/algebras/lie_algebras/all.py index 510bcb23f24..cf2fd88ac76 100644 --- a/src/sage/algebras/lie_algebras/all.py +++ b/src/sage/algebras/lie_algebras/all.py @@ -14,7 +14,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.misc.lazy_import import lazy_import diff --git a/src/sage/algebras/lie_conformal_algebras/all.py b/src/sage/algebras/lie_conformal_algebras/all.py index 14925d4ac08..17a13f01371 100644 --- a/src/sage/algebras/lie_conformal_algebras/all.py +++ b/src/sage/algebras/lie_conformal_algebras/all.py @@ -5,7 +5,7 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** diff --git a/src/sage/databases/all.py b/src/sage/databases/all.py index a88ecc40f4d..1f1e9ace1d8 100644 --- a/src/sage/databases/all.py +++ b/src/sage/databases/all.py @@ -5,7 +5,7 @@ * CremonaDatabase() - Cremona's tables of elliptic curves and related data. - * findstat -- The FindStat database (http://www.findstat.org/). + * findstat -- The FindStat database (https://www.findstat.org/). * JonesDatabase() -- returns the John Jones table of number fields with bounded ramification and degree <= 6. diff --git a/src/sage/groups/abelian_gps/all.py b/src/sage/groups/abelian_gps/all.py index 7efc7473356..a6c6c72899a 100644 --- a/src/sage/groups/abelian_gps/all.py +++ b/src/sage/groups/abelian_gps/all.py @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.groups.abelian_gps.all__sagemath_modules import * diff --git a/src/sage/modular/abvar/all.py b/src/sage/modular/abvar/all.py index fa744caa894..6ba2c77225d 100644 --- a/src/sage/modular/abvar/all.py +++ b/src/sage/modular/abvar/all.py @@ -1,7 +1,7 @@ ########################################################################### # Copyright (C) 2007 William Stein # # Distributed under the terms of the GNU General Public License (GPL) # -# http://www.gnu.org/licenses/ # +# https://www.gnu.org/licenses/ # ########################################################################### from sage.modular.abvar.constructor import J0, J1, JH, AbelianVariety diff --git a/src/sage/modular/modform/all.py b/src/sage/modular/modform/all.py index 5a108fce80d..6461e3c7083 100644 --- a/src/sage/modular/modform/all.py +++ b/src/sage/modular/modform/all.py @@ -3,7 +3,7 @@ # # Distributed under the terms of the GNU General Public License (GPL) # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ ######################################################################### from sage.modular.modform.constructor import ModularForms, CuspForms, EisensteinForms, Newforms, Newform diff --git a/src/sage/rings/finite_rings/all.py b/src/sage/rings/finite_rings/all.py index 06187529bd6..a3dbfe5764f 100644 --- a/src/sage/rings/finite_rings/all.py +++ b/src/sage/rings/finite_rings/all.py @@ -15,7 +15,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.rings.finite_rings.all__sagemath_categories import * diff --git a/src/sage/schemes/affine/all.py b/src/sage/schemes/affine/all.py index bae2e970277..e761ce307c9 100644 --- a/src/sage/schemes/affine/all.py +++ b/src/sage/schemes/affine/all.py @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.schemes.affine.affine_space import AffineSpace diff --git a/src/sage/schemes/all.py b/src/sage/schemes/all.py index ce3c29058fd..2aa1a51d1ab 100644 --- a/src/sage/schemes/all.py +++ b/src/sage/schemes/all.py @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.schemes.all__sagemath_categories import * diff --git a/src/sage/schemes/curves/all.py b/src/sage/schemes/curves/all.py index 67f19a5dbbe..49bea579013 100644 --- a/src/sage/schemes/curves/all.py +++ b/src/sage/schemes/curves/all.py @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.schemes.curves.constructor import Curve diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index 35e49ae4806..0701ab54a00 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -14,7 +14,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.schemes.elliptic_curves.constructor import (EllipticCurve, diff --git a/src/sage/schemes/projective/all.py b/src/sage/schemes/projective/all.py index 665f57da9ee..b9e210c8ae0 100644 --- a/src/sage/schemes/projective/all.py +++ b/src/sage/schemes/projective/all.py @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ # ***************************************************************************** from sage.schemes.projective.projective_space import ProjectiveSpace, is_ProjectiveSpace diff --git a/src/sage/stats/hmm/all.py b/src/sage/stats/hmm/all.py index e2880a402dc..4666e022fac 100644 --- a/src/sage/stats/hmm/all.py +++ b/src/sage/stats/hmm/all.py @@ -2,7 +2,7 @@ # Copyright (C) 2010 William Stein # Distributed under the terms of the GNU General Public License (GPL), v2+. # The full text of the GPL is available at: -# http://www.gnu.org/licenses/ +# https://www.gnu.org/licenses/ ############################################################################# # We lazy_import the following modules since they import numpy which slows down sage startup From e630e9009803a32373566efc195f160f1e82a8c6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Nov 2023 11:33:40 -0800 Subject: [PATCH 17/27] Fix errors from 'sage -tox -e pycodestyle -- --ignore E402 src/sage/**/all*.py' --- src/sage/all.py | 4 ---- src/sage/all__sagemath_repl.py | 3 ++- src/sage/combinat/all__sagemath_combinat.py | 5 ++++- src/sage/misc/all.py | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/sage/all.py b/src/sage/all.py index 75893d7edba..2bf07cdfb79 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -57,13 +57,9 @@ import operator import math -################ end setup warnings ############################### - # includes .all__sagemath_objects, .all__sagemath_environment from sage.all__sagemath_repl import * -################################################################### - # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, sig_on_reset as sig_on_count) diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index 110b2cda84f..b5d085338e4 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -1,4 +1,5 @@ -############ setup warning filters before importing Sage stuff #### +# Set up warning filters before importing Sage stuff + import sys import warnings diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index b9e28c82ef1..82936a0c106 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -49,7 +49,10 @@ lazy_import('sage.combinat.skew_partition', ['SkewPartition', 'SkewPartitions']) # Partition algebra -from .partition_algebra import SetPartitionsAk, SetPartitionsPk, SetPartitionsTk, SetPartitionsIk, SetPartitionsBk, SetPartitionsSk, SetPartitionsRk, SetPartitionsPRk +from sage.combinat.partition_algebra import (SetPartitionsAk, SetPartitionsPk, + SetPartitionsTk, SetPartitionsIk, + SetPartitionsBk, SetPartitionsSk, + SetPartitionsRk, SetPartitionsPRk) # Raising operators lazy_import('sage.combinat.partition_shifting_algebras', 'ShiftingOperatorAlgebra') diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index c74ffe9727a..dfa47c89ca6 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -27,7 +27,9 @@ lazy_import("sage.misc.cython", "cython_compile", "cython") # Following will go to all__sagemath_repl.py in #36566 -from sage.misc.explain_pickle import explain_pickle, unpickle_newobj, unpickle_build, unpickle_instantiate, unpickle_persistent, unpickle_extension, unpickle_appends +from sage.misc.explain_pickle import (explain_pickle, unpickle_newobj, unpickle_build, + unpickle_instantiate, unpickle_persistent, + unpickle_extension, unpickle_appends) lazy_import('sage.misc.inline_fortran', 'fortran') From bcc7137818bd4676fc723a41e00e4c5926e07287 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Nov 2023 19:57:33 -0800 Subject: [PATCH 18/27] src/doc/en/reference/calculus/index.rst: Add sage.calculus.expr to toctree --- src/doc/en/reference/calculus/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/src/doc/en/reference/calculus/index.rst b/src/doc/en/reference/calculus/index.rst index 89174c4a062..0f451a50613 100644 --- a/src/doc/en/reference/calculus/index.rst +++ b/src/doc/en/reference/calculus/index.rst @@ -66,6 +66,7 @@ Internal functionality supporting calculus sage/symbolic/expression sage/symbolic/callable + sage/calculus/expr sage/symbolic/assumptions sage/symbolic/relation sage/calculus/calculus From 80d33ee7d4876a64063811533bc77b64f0996ea3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Nov 2023 14:51:11 -0800 Subject: [PATCH 19/27] src/sage/calculus/expr.py: Move imports from method to module --- src/sage/calculus/expr.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sage/calculus/expr.py b/src/sage/calculus/expr.py index 236b46a94d9..0aa62851d24 100644 --- a/src/sage/calculus/expr.py +++ b/src/sage/calculus/expr.py @@ -3,6 +3,9 @@ """ from sage.misc.lazy_import import lazy_import +from sage.structure.element import is_Matrix +from sage.symbolic.expression import Expression +from sage.symbolic.ring import SR lazy_import('sage.modules.free_module_element', ['vector', 'FreeModuleElement']) lazy_import('sage.matrix.constructor', 'matrix') @@ -163,10 +166,6 @@ def symbolic_expression(x): TypeError: unable to convert to a symbolic expression """ - from sage.structure.element import is_Matrix - from sage.symbolic.expression import Expression - from sage.symbolic.ring import SR - if isinstance(x, Expression): return x elif hasattr(x, '_symbolic_'): From 49a508d40d334fee7db5385f329a03a062ae4ea8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Nov 2023 14:53:54 -0800 Subject: [PATCH 20/27] for a in $(git --no-pager grep -l install_doc src/sage/**/all*.py); do if ! grep -q 'del install_doc' $a; then echo 'del install_doc' >> $a; fi; done --- src/sage/categories/all.py | 1 + src/sage/combinat/all.py | 1 + src/sage/combinat/chas/all.py | 1 + src/sage/combinat/crystals/all.py | 1 + src/sage/combinat/designs/all.py | 1 + src/sage/combinat/path_tableaux/all.py | 1 + src/sage/combinat/posets/all.py | 2 ++ src/sage/combinat/rigged_configurations/all.py | 1 + src/sage/combinat/root_system/all.py | 1 + src/sage/combinat/sf/all.py | 1 + src/sage/combinat/species/all.py | 1 + src/sage/dynamics/all.py | 1 + src/sage/matroids/all.py | 1 + src/sage/modules/with_basis/all.py | 1 + 14 files changed, 15 insertions(+) diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index 9904917ac0a..a0e1ce94577 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -156,3 +156,4 @@ # lie conformal algebras lazy_import('sage.categories.lie_conformal_algebras', 'LieConformalAlgebras') del lazy_import +del install_doc diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index dcd327b4d1d..54c18fa88b4 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -60,3 +60,4 @@ from sage.combinat.all__sagemath_modules import * from sage.combinat.all__sagemath_graphs import * del lazy_import +del install_doc diff --git a/src/sage/combinat/chas/all.py b/src/sage/combinat/chas/all.py index f92d84aeffb..cc4da145e9a 100644 --- a/src/sage/combinat/chas/all.py +++ b/src/sage/combinat/chas/all.py @@ -19,3 +19,4 @@ lazy_import('sage.combinat.chas.fsym', ['FreeSymmetricFunctions']) lazy_import('sage.combinat.chas.wqsym', ['WordQuasiSymmetricFunctions']) del lazy_import +del install_doc diff --git a/src/sage/combinat/crystals/all.py b/src/sage/combinat/crystals/all.py index bfe319bd10c..be8576c0e02 100644 --- a/src/sage/combinat/crystals/all.py +++ b/src/sage/combinat/crystals/all.py @@ -29,3 +29,4 @@ lazy_import('sage.combinat.crystals', 'catalog', 'crystals') del lazy_import +del install_doc diff --git a/src/sage/combinat/designs/all.py b/src/sage/combinat/designs/all.py index d27679a09a1..bf00b490c3b 100644 --- a/src/sage/combinat/designs/all.py +++ b/src/sage/combinat/designs/all.py @@ -54,3 +54,4 @@ from sage.combinat.designs import design_catalog as designs del lazy_import +del install_doc diff --git a/src/sage/combinat/path_tableaux/all.py b/src/sage/combinat/path_tableaux/all.py index 42a2e8ca4a5..e0dcaf67bf7 100644 --- a/src/sage/combinat/path_tableaux/all.py +++ b/src/sage/combinat/path_tableaux/all.py @@ -10,3 +10,4 @@ # install the docstring of this module to the containing package from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +del install_doc diff --git a/src/sage/combinat/posets/all.py b/src/sage/combinat/posets/all.py index 3fd43f61938..b608b0094d1 100644 --- a/src/sage/combinat/posets/all.py +++ b/src/sage/combinat/posets/all.py @@ -41,3 +41,5 @@ from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice, JoinSemilattice from sage.combinat.posets.poset_examples import posets, Posets + +del install_doc diff --git a/src/sage/combinat/rigged_configurations/all.py b/src/sage/combinat/rigged_configurations/all.py index f56543510b1..e068cb4aed6 100644 --- a/src/sage/combinat/rigged_configurations/all.py +++ b/src/sage/combinat/rigged_configurations/all.py @@ -42,3 +42,4 @@ lazy_import('sage.combinat.rigged_configurations.rigged_configurations', 'RiggedConfigurations') del lazy_import +del install_doc diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 935e6ad73cc..bb55e491b44 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -143,3 +143,4 @@ lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') del lazy_import +del install_doc diff --git a/src/sage/combinat/sf/all.py b/src/sage/combinat/sf/all.py index b693ae74ee8..daa673af502 100644 --- a/src/sage/combinat/sf/all.py +++ b/src/sage/combinat/sf/all.py @@ -46,3 +46,4 @@ 'AugmentedLatticeDiagramFilling', 'LatticeDiagram']) del lazy_import +del install_doc diff --git a/src/sage/combinat/species/all.py b/src/sage/combinat/species/all.py index 6bda0eab5db..58bfc1a756f 100644 --- a/src/sage/combinat/species/all.py +++ b/src/sage/combinat/species/all.py @@ -48,3 +48,4 @@ lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies") lazy_import("sage.combinat.species", "library", as_="species") del lazy_import +del install_doc diff --git a/src/sage/dynamics/all.py b/src/sage/dynamics/all.py index 21b0bd54f9f..fddc4e83a98 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -38,3 +38,4 @@ lazy_import('sage.dynamics', 'finite_dynamical_system_catalog', 'finite_dynamical_systems') del lazy_import +del install_doc diff --git a/src/sage/matroids/all.py b/src/sage/matroids/all.py index 6907ccfba8d..5a9a4805e41 100644 --- a/src/sage/matroids/all.py +++ b/src/sage/matroids/all.py @@ -11,3 +11,4 @@ lazy_import('sage.matroids.constructor', 'Matroid') lazy_import('sage.matroids', 'matroids_catalog', 'matroids') del lazy_import +del install_doc diff --git a/src/sage/modules/with_basis/all.py b/src/sage/modules/with_basis/all.py index 1f352bcc768..6bfc5d5f6d1 100644 --- a/src/sage/modules/with_basis/all.py +++ b/src/sage/modules/with_basis/all.py @@ -11,3 +11,4 @@ # install the docstring of this module to the containing package from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +del install_doc From 91ad68fdf10f29721484d0dcda1d5b98b29444ed Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Nov 2023 15:17:39 -0800 Subject: [PATCH 21/27] src/sage/combinat/all.py: Also del install_dict --- src/sage/combinat/all.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index 54c18fa88b4..4bdd5a6bad0 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -60,4 +60,5 @@ from sage.combinat.all__sagemath_modules import * from sage.combinat.all__sagemath_graphs import * del lazy_import +del install_dict del install_doc From e9f86a0a02fea4ea5bc2f73395fca9732bfc226b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 14 Mar 2024 16:12:55 -0700 Subject: [PATCH 22/27] src/sage/rings/all__sagemath_categories.py: Add import of lazy_import --- src/sage/rings/all__sagemath_categories.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index 7c69f137275..cd8b9cf6f01 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,3 +1,5 @@ +from sage.misc.lazy_import import lazy_import + # Ring base classes from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, DedekindDomain, PrincipalIdealDomain, EuclideanDomain) @@ -19,3 +21,5 @@ # from sage.rings.number_field.all__sagemath_categories import * # from sage.rings.padics.all__sagemath_categories import * # from sage.rings.polynomial.all__sagemath_categories import * + +del lazy_import From 2c6dd8318bf7583fb8186c9ac1ba207e15661fe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20R=C3=BCth?= Date: Sun, 14 Apr 2024 22:38:09 +0300 Subject: [PATCH 23/27] Fixup changes to reestablish #36676 The chain of immediate ancestors of this commit was created by cherry-picking the relevant commits that comprise #36676. Replaying all these commits (and the necessary conflict resolution) still leaves a non-empty diff when comparing 10.4.beta2 to the previous #36676 and 10.4.beta3 to that cherry-picked branch. This commit makes sure that the diff is trivial. The changes introduced here were likely introduced in conflict resolution when merging develop into #36676. I did not replay these conflict resolutions, so I do this here manually. --- src/sage/algebras/all.py | 2 +- src/sage/algebras/all__sagemath_modules.py | 4 +- src/sage/all__sage_categories.py | 5 --- src/sage/arith/all.py | 2 - src/sage/categories/all.py | 4 +- src/sage/combinat/all__sagemath_combinat.py | 4 +- src/sage/groups/all__sagemath_categories.py | 2 +- src/sage/knots/all.py | 4 +- src/sage/libs/all__sagemath_flint.py | 2 +- src/sage/misc/all__sagemath_categories.py | 3 -- src/sage/misc/sageinspect.py | 6 ++- src/sage/modules/all.py | 15 +++++-- .../quadratic_forms/all__sagemath_pari.py | 1 + src/sage/rings/all.py | 20 +++++---- src/sage/rings/all__sage_categories.py | 6 --- src/sage/rings/all__sagemath_categories.py | 4 +- src/sage/rings/ideal.py | 4 +- src/sage/schemes/elliptic_curves/all.py | 4 ++ src/sage/schemes/hyperelliptic_curves/all.py | 42 ------------------- src/sage/stats/all.py | 1 + 20 files changed, 47 insertions(+), 88 deletions(-) delete mode 100644 src/sage/all__sage_categories.py delete mode 100644 src/sage/rings/all__sage_categories.py diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index e27ec576cc2..ebeec786100 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -14,7 +14,7 @@ # The full text of the GPL is available at: # # https://www.gnu.org/licenses/ -# **************************************************************************** +# ***************************************************************************** from sage.algebras.all__sagemath_modules import * from sage.algebras.all__sagemath_combinat import * diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py index 3917d3c2fff..fc74dabe241 100644 --- a/src/sage/algebras/all__sagemath_modules.py +++ b/src/sage/algebras/all__sagemath_modules.py @@ -2,7 +2,9 @@ lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') -from sage.algebras.algebra import Algebra +# old-style class for associative algebras, use Parent instead +from sage.rings.ring import Algebra + from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra from sage.algebras.weyl_algebra import DifferentialWeylAlgebra diff --git a/src/sage/all__sage_categories.py b/src/sage/all__sage_categories.py deleted file mode 100644 index 9aba871b139..00000000000 --- a/src/sage/all__sage_categories.py +++ /dev/null @@ -1,5 +0,0 @@ -from .all__sage_objects import * - -from sage.categories.all import * - -from sage.rings.all__sage_categories import * diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index 7bc6ccec7f6..c7bcd7224f6 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -26,8 +26,6 @@ lazy_import("sage.arith.misc", ("Sigma", "Moebius", "Euler_Phi"), deprecation=30322) -from sage.arith.functions import lcm - from sage.arith.functions import lcm LCM = lcm diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index a0e1ce94577..09933cca7c2 100644 --- a/src/sage/categories/all.py +++ b/src/sage/categories/all.py @@ -81,7 +81,7 @@ RingModules = Modules from sage.categories.vector_spaces import VectorSpaces -# (hopf) algebra structures +# (Hopf) algebra structures from sage.categories.algebras import Algebras from sage.categories.commutative_algebras import CommutativeAlgebras from sage.categories.coalgebras import Coalgebras @@ -104,7 +104,7 @@ # schemes and varieties from sage.categories.modular_abelian_varieties import ModularAbelianVarieties -from sage.categories.schemes import Schemes +from sage.categories.schemes import Schemes, AbelianVarieties # * with basis from sage.categories.modules_with_basis import ModulesWithBasis diff --git a/src/sage/combinat/all__sagemath_combinat.py b/src/sage/combinat/all__sagemath_combinat.py index 82936a0c106..7968f3fde4a 100644 --- a/src/sage/combinat/all__sagemath_combinat.py +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -148,7 +148,7 @@ lazy_import('sage.combinat.integer_vectors_mod_permgroup', 'IntegerVectorsModPermutationGroup') -lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial']) +lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials']) from sage.combinat.species.all import * @@ -174,8 +174,6 @@ lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace') lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing') - - # Six Vertex Model lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel') diff --git a/src/sage/groups/all__sagemath_categories.py b/src/sage/groups/all__sagemath_categories.py index 18f110bd599..cf28b7d6bff 100644 --- a/src/sage/groups/all__sagemath_categories.py +++ b/src/sage/groups/all__sagemath_categories.py @@ -1,7 +1,7 @@ from sage.groups.all__sagemath_objects import * from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, - linear_relation, multiple, multiples) + linear_relation, multiple, multiples, order_from_multiple) from sage.misc.lazy_import import lazy_import diff --git a/src/sage/knots/all.py b/src/sage/knots/all.py index db3eb42aa2f..d25acbda1a3 100644 --- a/src/sage/knots/all.py +++ b/src/sage/knots/all.py @@ -3,6 +3,4 @@ lazy_import('sage.knots.knot', ['Knot', 'Knots']) lazy_import('sage.knots.link', 'Link') -if DatabaseKnotInfo().is_present(): - lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries']) -del lazy_import +lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries']) diff --git a/src/sage/libs/all__sagemath_flint.py b/src/sage/libs/all__sagemath_flint.py index d4ee16d7779..b5e330d8329 100644 --- a/src/sage/libs/all__sagemath_flint.py +++ b/src/sage/libs/all__sagemath_flint.py @@ -11,6 +11,6 @@ from sage.misc.lazy_import import lazy_import -lazy_import('sage.libs.flint.qsieve', 'qsieve') +lazy_import('sage.libs.flint.qsieve_sage', 'qsieve') del lazy_import diff --git a/src/sage/misc/all__sagemath_categories.py b/src/sage/misc/all__sagemath_categories.py index 46be65b787c..0806bdf7aec 100644 --- a/src/sage/misc/all__sagemath_categories.py +++ b/src/sage/misc/all__sagemath_categories.py @@ -41,10 +41,7 @@ integral_closure, interval, xinterval, - is_commutative, is_even, - is_integrally_closed, - is_field, is_odd, kernel, krull_dimension, diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index c69635ddf34..7b1e8e1db18 100644 --- a/src/sage/misc/sageinspect.py +++ b/src/sage/misc/sageinspect.py @@ -2267,8 +2267,10 @@ def sage_getsourcelines(obj): EXAMPLES:: sage: from sage.misc.sageinspect import sage_getsourcelines - sage: from sage.matrix.constructor import matrix # needs sage.modules - sage: sage_getsourcelines(matrix)[1] # needs sage.modules + + sage: # needs sage.modules + sage: from sage.matrix.constructor import matrix + sage: sage_getsourcelines(matrix)[1] 21 sage: sage_getsourcelines(matrix)[0][0] 'def matrix(*args, **kwds):\n' diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index a75814718b6..955a2c72d4c 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -15,11 +15,18 @@ from sage.modules.free_module import FreeModule, VectorSpace, span -from sage.modules.free_quadratic_module import (FreeQuadraticModule, QuadraticSpace, - InnerProductSpace) +from sage.modules.free_quadratic_module import ( + FreeQuadraticModule, + QuadraticSpace, + InnerProductSpace, +) -from sage.modules.free_module_element import (vector, free_module_element, zero_vector, - random_vector) +from sage.modules.free_module_element import ( + vector, + free_module_element, + zero_vector, + random_vector, +) from sage.modules.vector_space_morphism import linear_transformation diff --git a/src/sage/quadratic_forms/all__sagemath_pari.py b/src/sage/quadratic_forms/all__sagemath_pari.py index 3217ed8cd0a..f6235960f54 100644 --- a/src/sage/quadratic_forms/all__sagemath_pari.py +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -1,3 +1,4 @@ +from sage.quadratic_forms.bqf_class_group import BQFClassGroup from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber, quadratic_L_function__exact, quadratic_L_function__numerical) diff --git a/src/sage/rings/all.py b/src/sage/rings/all.py index 1e3eecdb5e5..965f83d02f6 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -12,15 +12,7 @@ # **************************************************************************** from sage.misc.lazy_import import lazy_import -from sage.rings.all__sagemath_combinat import * -from sage.rings.all__sagemath_flint import * -from sage.rings.all__sagemath_gap import * -from sage.rings.all__sagemath_modules import * - -try: - from sage.rings.all__sagemath_symbolics import * -except ImportError: - pass +from sage.rings.all__sagemath_categories import * # Following will go to all__sagemath_categories.py in #36566 @@ -50,6 +42,16 @@ # Finite fields from sage.rings.finite_rings.all import * +from sage.rings.all__sagemath_combinat import * +from sage.rings.all__sagemath_flint import * +from sage.rings.all__sagemath_gap import * +from sage.rings.all__sagemath_modules import * + +try: + from sage.rings.all__sagemath_symbolics import * +except ImportError: + pass + # Function field from sage.rings.function_field.all import * diff --git a/src/sage/rings/all__sage_categories.py b/src/sage/rings/all__sage_categories.py deleted file mode 100644 index 8d14e7afcda..00000000000 --- a/src/sage/rings/all__sage_categories.py +++ /dev/null @@ -1,6 +0,0 @@ -# Ring base classes -from .ring import Ring - -# Ideals -from .ideal import Ideal -ideal = Ideal diff --git a/src/sage/rings/all__sagemath_categories.py b/src/sage/rings/all__sagemath_categories.py index cd8b9cf6f01..d2fa0062d68 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -2,7 +2,9 @@ # Ring base classes from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain, - DedekindDomain, PrincipalIdealDomain, EuclideanDomain) + PrincipalIdealDomain) + +lazy_import("sage.rings.ring", "DedekindDomain") # Ring element base classes from sage.structure.element import (CommutativeAlgebraElement, diff --git a/src/sage/rings/ideal.py b/src/sage/rings/ideal.py index a656aa309b7..4dba8ec9d42 100644 --- a/src/sage/rings/ideal.py +++ b/src/sage/rings/ideal.py @@ -28,7 +28,8 @@ from types import GeneratorType -import sage.rings.ring +from sage.categories.rings import Rings +from sage.categories.fields import Fields from sage.structure.element import MonoidElement from sage.structure.richcmp import rich_to_bool, richcmp from sage.structure.sequence import Sequence @@ -1862,7 +1863,6 @@ def FieldIdeal(R): over Finite Field in alpha of size 2^4 """ q = R.base_ring().order() - import sage.rings.infinity if q is sage.rings.infinity.infinity: raise TypeError("Cannot construct field ideal for R.base_ring().order()==infinity") diff --git a/src/sage/schemes/elliptic_curves/all.py b/src/sage/schemes/elliptic_curves/all.py index 0701ab54a00..84f7b0d5a50 100644 --- a/src/sage/schemes/elliptic_curves/all.py +++ b/src/sage/schemes/elliptic_curves/all.py @@ -26,6 +26,8 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.schemes.elliptic_curves.jacobian', 'Jacobian') +lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve') + lazy_import('sage.schemes.elliptic_curves.ell_rational_field', ['cremona_curves', 'cremona_optimal_curves']) @@ -40,5 +42,7 @@ from sage.schemes.elliptic_curves.ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel +lazy_import('sage.schemes.elliptic_curves.mod_poly', 'classical_modular_polynomial') + from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point del lazy_import diff --git a/src/sage/schemes/hyperelliptic_curves/all.py b/src/sage/schemes/hyperelliptic_curves/all.py index 40c8b58e823..044c97cd498 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -1,47 +1,5 @@ -""" -Tests for deprecations of imports in global namespace from :trac:`28064`:: - - sage: igusa_clebsch_invariants - doctest:warning...: - DeprecationWarning: - Importing igusa_clebsch_invariants from here is deprecated; - please use "from sage.schemes.hyperelliptic_curves.invariants import igusa_clebsch_invariants" instead. - See https://github.com/sagemath/sage/issues/28064 for details. - ... - - sage: absolute_igusa_invariants_kohel - doctest:warning...: - DeprecationWarning: - Importing absolute_igusa_invariants_kohel from here is deprecated; - please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_kohel" instead. - See https://github.com/sagemath/sage/issues/28064 for details. - ... - - sage: absolute_igusa_invariants_wamelen - doctest:warning...: - DeprecationWarning: - Importing absolute_igusa_invariants_wamelen from here is deprecated; - please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_wamelen" instead. - See https://github.com/sagemath/sage/issues/28064 for details. - ... - - sage: clebsch_invariants - doctest:warning...: - DeprecationWarning: - Importing clebsch_invariants from here is deprecated; - please use "from sage.schemes.hyperelliptic_curves.invariants import clebsch_invariants" instead. - See https://github.com/sagemath/sage/issues/28064 for details. - ... -""" -from sage.misc.lazy_import import lazy_import - from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve from sage.schemes.hyperelliptic_curves.kummer_surface import KummerSurface -lazy_import('sage.schemes.hyperelliptic_curves.invariants', - ['igusa_clebsch_invariants', 'absolute_igusa_invariants_kohel', - 'absolute_igusa_invariants_wamelen', 'clebsch_invariants'], - deprecation=28064) from sage.schemes.hyperelliptic_curves.mestre import ( Mestre_conic, HyperellipticCurve_from_invariants) from sage.schemes.hyperelliptic_curves import monsky_washnitzer -del lazy_import diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 450991bd576..56d9f2eb1e8 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,5 +1,6 @@ from sage.stats.basic_stats import (mean, mode, std, variance, median, moving_average) from sage.stats.hmm import all as hmm +import sage.stats.distributions.catalog as distributions from sage.misc.lazy_import import lazy_import From 20e6cdaf1ea3da7bd4153b6177295a59c2b5f2e7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 26 May 2024 17:41:58 -0700 Subject: [PATCH 24/27] sage.combinat, sage.games: Use more lazy_import in all.py files --- src/sage/combinat/ncsf_qsym/all.py | 9 +++++++-- src/sage/combinat/ncsym/all.py | 9 +++++++-- src/sage/combinat/root_system/all.py | 14 +++++++++----- src/sage/combinat/words/all.py | 7 ++++++- src/sage/games/all.py | 8 ++++++-- 5 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/sage/combinat/ncsf_qsym/all.py b/src/sage/combinat/ncsf_qsym/all.py index fee9641a1ee..4d09a08bbe9 100644 --- a/src/sage/combinat/ncsf_qsym/all.py +++ b/src/sage/combinat/ncsf_qsym/all.py @@ -12,5 +12,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.ncsf_qsym.qsym import QuasiSymmetricFunctions -from sage.combinat.ncsf_qsym.ncsf import NonCommutativeSymmetricFunctions +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsf_qsym.qsym', 'QuasiSymmetricFunctions') +lazy_import('sage.combinat.ncsf_qsym.ncsf', 'NonCommutativeSymmetricFunctions') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/ncsym/all.py b/src/sage/combinat/ncsym/all.py index cdeeec1ae41..864a6ac6960 100644 --- a/src/sage/combinat/ncsym/all.py +++ b/src/sage/combinat/ncsym/all.py @@ -11,5 +11,10 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) -from sage.combinat.ncsym.ncsym import SymmetricFunctionsNonCommutingVariables -from sage.combinat.ncsym.dual import SymmetricFunctionsNonCommutingVariablesDual +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.combinat.ncsym.ncsym', 'SymmetricFunctionsNonCommutingVariables') +lazy_import('sage.combinat.ncsym.dual', 'SymmetricFunctionsNonCommutingVariablesDual') + +del install_doc +del lazy_import diff --git a/src/sage/combinat/root_system/all.py b/src/sage/combinat/root_system/all.py index 9c50eb57af1..bb55e491b44 100644 --- a/src/sage/combinat/root_system/all.py +++ b/src/sage/combinat/root_system/all.py @@ -122,9 +122,9 @@ from sage.misc.lazy_import import lazy_import from sage.combinat.root_system.cartan_type import CartanType -from sage.combinat.root_system.dynkin_diagram import DynkinDiagram -from sage.combinat.root_system.cartan_matrix import CartanMatrix -from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix +lazy_import('sage.combinat.root_system.dynkin_diagram', 'DynkinDiagram') +lazy_import('sage.combinat.root_system.cartan_matrix', 'CartanMatrix') +lazy_import('sage.combinat.root_system.coxeter_matrix', 'CoxeterMatrix') from sage.combinat.root_system.coxeter_type import CoxeterType from sage.combinat.root_system.root_system import RootSystem, WeylDim lazy_import('sage.combinat.root_system.weyl_group', ['WeylGroup', @@ -138,5 +138,9 @@ 'WeightRing']) from sage.combinat.root_system.branching_rules import BranchingRule, branching_rule_from_plethysm, branching_rule -lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') -lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') +lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', + 'NonSymmetricMacdonaldPolynomials') +lazy_import('sage.combinat.root_system.integrable_representations', + 'IntegrableRepresentation') +del lazy_import +del install_doc diff --git a/src/sage/combinat/words/all.py b/src/sage/combinat/words/all.py index 8d5798c549c..66a2fa38719 100644 --- a/src/sage/combinat/words/all.py +++ b/src/sage/combinat/words/all.py @@ -43,11 +43,16 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.misc.lazy_import import lazy_import + from sage.combinat.words.alphabet import Alphabet, build_alphabet from sage.combinat.words.morphism import WordMorphism -from sage.combinat.words.paths import WordPaths +lazy_import('sage.combinat.words.paths', 'WordPaths') from sage.combinat.words.word import Word from sage.combinat.words.word_options import WordOptions from sage.combinat.words.word_generators import words from sage.combinat.words.words import Words, FiniteWords, InfiniteWords from sage.combinat.words.lyndon_word import LyndonWord, LyndonWords, StandardBracketedLyndonWords + +del install_doc +del lazy_import diff --git a/src/sage/games/all.py b/src/sage/games/all.py index be1a1f2cbfc..d2b0648440e 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -1,2 +1,6 @@ -from sage.games.sudoku import Sudoku, sudoku -from sage.games.hexad import Minimog + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.games.sudoku', ['Sudoku', 'sudoku']) +lazy_import('sage.games.hexad', ['Minimog']) +del lazy_import From a34bd711a3a216c36232929fb2b47604f538ad37 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 26 May 2024 19:44:26 -0700 Subject: [PATCH 25/27] src/sage/structure/parent.pyx: In doctest, use SymmetricFunctions from global bindings --- src/sage/structure/parent.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/structure/parent.pyx b/src/sage/structure/parent.pyx index a37be0c35c8..15bbd590c40 100644 --- a/src/sage/structure/parent.pyx +++ b/src/sage/structure/parent.pyx @@ -2142,7 +2142,7 @@ cdef class Parent(sage.structure.category_object.CategoryObject): sage: # needs sage.combinat sage.modules sage: R = QQ['q,t'].fraction_field() - sage: Sym = sage.combinat.sf.sf.SymmetricFunctions(R) + sage: Sym = SymmetricFunctions(R) sage: H = Sym.macdonald().H() sage: P = Sym.macdonald().P() sage: m = Sym.monomial() @@ -2179,7 +2179,7 @@ cdef class Parent(sage.structure.category_object.CategoryObject): sage: # needs sage.combinat sage.modules sage: R = QQ['q,t'].fraction_field() - sage: Sym = sage.combinat.sf.sf.SymmetricFunctions(R) + sage: Sym = SymmetricFunctions(R) sage: P = Sym.macdonald().P() sage: Ht = Sym.macdonald().Ht() sage: Ht._internal_coerce_map_from(P) From 327fb5c800e2d4cef8d987c0d78d362ad7778d08 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 26 May 2024 21:01:33 -0700 Subject: [PATCH 26/27] src/sage/categories/weyl_groups.py: Fix import --- src/sage/categories/weyl_groups.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index f45dc240280..3825e46ff8f 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -571,9 +571,10 @@ def stanley_symmetric_function(self): - [Pon2010]_ """ - import sage.combinat.sf from sage.rings.rational_field import QQ - m = sage.combinat.sf.sf.SymmetricFunctions(QQ).monomial() + from sage.combinat.sf.sf import SymmetricFunctions + + m = SymmetricFunctions(QQ).monomial() return m.from_polynomial_exp(self.stanley_symmetric_function_as_polynomial()) @cached_in_parent_method From 8865085e6c26e92b3038fb42d65535541a86315c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 9 Jun 2024 16:45:51 -0700 Subject: [PATCH 27/27] src/sage/matrix/args.pyx: late-import MatrixSpace in all code paths --- src/sage/matrix/args.pyx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sage/matrix/args.pyx b/src/sage/matrix/args.pyx index 4f578440df6..242fd3938ef 100644 --- a/src/sage/matrix/args.pyx +++ b/src/sage/matrix/args.pyx @@ -750,6 +750,9 @@ cdef class MatrixArgs: break else: space = self.space + global MatrixSpace + if MatrixSpace is None: + from sage.matrix.matrix_space import MatrixSpace if not isinstance(space, MatrixSpace): space = space.zero().matrix(side='left').parent() M = space(self, coerce=convert) @@ -806,6 +809,9 @@ cdef class MatrixArgs: cdef Matrix M = self.matrix(convert=True) if immutable: M.set_immutable() + global MatrixSpace + if MatrixSpace is None: + from sage.matrix.matrix_space import MatrixSpace if isinstance(self.space, MatrixSpace): return M return self.space(matrix=M, side='left')