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 diff --git a/src/doc/en/reference/calculus/index.rst b/src/doc/en/reference/calculus/index.rst index c9a5158e522..0f451a50613 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` @@ -65,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 diff --git a/src/sage/algebras/all.py b/src/sage/algebras/all.py index a98f5284eca..ebeec786100 100644 --- a/src/sage/algebras/all.py +++ b/src/sage/algebras/all.py @@ -14,56 +14,12 @@ # The full text of the GPL is available at: # # https://www.gnu.org/licenses/ -# **************************************************************************** -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 .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') +from sage.algebras.all__sagemath_modules import * +from sage.algebras.all__sagemath_combinat import * -lazy_import('sage.algebras.yangian', 'Yangian') +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 new file mode 100644 index 00000000000..eb86573ec54 --- /dev/null +++ b/src/sage/algebras/all__sagemath_combinat.py @@ -0,0 +1,37 @@ +from sage.misc.lazy_import import lazy_import + + +# Algebra base classes +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 * + +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') + +del lazy_import diff --git a/src/sage/algebras/all__sagemath_modules.py b/src/sage/algebras/all__sagemath_modules.py new file mode 100644 index 00000000000..fc74dabe241 --- /dev/null +++ b/src/sage/algebras/all__sagemath_modules.py @@ -0,0 +1,14 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.algebras.group_algebra', 'GroupAlgebra') + +# 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 +lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra') + +import sage.algebras.catalog as algebras +del lazy_import 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/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/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..052c816e1e5 100644 --- a/src/sage/algebras/hecke_algebras/all.py +++ b/src/sage/algebras/hecke_algebras/all.py @@ -1,4 +1,3 @@ """ Hecke Algebras """ -#from sage.misc.lazy_import import lazy_import diff --git a/src/sage/algebras/lie_algebras/all.py b/src/sage/algebras/lie_algebras/all.py index 73ea8361ff1..cf2fd88ac76 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) @@ -14,10 +14,11 @@ # # 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 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_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/lie_conformal_algebras/all.py b/src/sage/algebras/lie_conformal_algebras/all.py index 7d78e0a260c..17a13f01371 100644 --- a/src/sage/algebras/lie_conformal_algebras/all.py +++ b/src/sage/algebras/lie_conformal_algebras/all.py @@ -1,14 +1,17 @@ -#****************************************************************************** +# ****************************************************************************** # Copyright (C) 2020 Reimundo Heluani # # This program is free software: you can redistribute it and/or modify # 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/ +# ***************************************************************************** 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/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/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/algebras/steenrod/all.py b/src/sage/algebras/steenrod/all.py index 134b2b032cf..7b35a79d6d5 100644 --- a/src/sage/algebras/steenrod/all.py +++ b/src/sage/algebras/steenrod/all.py @@ -1,8 +1,9 @@ """ 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')) +del lazy_import diff --git a/src/sage/all.py b/src/sage/all.py index b1f35e3a738..2bf07cdfb79 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -57,98 +57,95 @@ import operator import math -################ end setup warnings ############################### - -from .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 +165,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 +187,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 +244,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_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_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 d77919bc8bd..b5d085338e4 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -1,8 +1,10 @@ -############ setup warning filters before importing Sage stuff #### +# Set up warning filters before importing Sage stuff + 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 +18,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', @@ -97,11 +99,11 @@ 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 * +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 3446336de68..c7bcd7224f6 100644 --- a/src/sage/arith/all.py +++ b/src/sage/arith/all.py @@ -1,96 +1,36 @@ 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, -) +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) lazy_import("sage.arith.misc", ("Sigma", "Moebius", "Euler_Phi"), deprecation=30322) from sage.arith.functions import lcm - LCM = lcm from sage.arith.srange import xsrange, srange, ellipsis_iter, ellipsis_range - sxrange = xsrange σ = sigma +del lazy_import diff --git a/src/sage/arith/all__sagemath_objects.py b/src/sage/arith/all__sagemath_objects.py index 38e44245ad3..f1a05b60932 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..e9e26918527 100644 --- a/src/sage/calculus/all.py +++ b/src/sage/calculus/all.py @@ -1,233 +1,13 @@ - -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, - desolve_odeint, desolve_mintides, desolve_tides_mpfr) - -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 - - -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: 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.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): - 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]): - 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 . import desolvers +from sage.calculus.all__sagemath_modules 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) + +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 sage.calculus.expr import symbolic_expression +from sage.calculus.var import (var, function, clear_vars) diff --git a/src/sage/calculus/all__sagemath_categories.py b/src/sage/calculus/all__sagemath_categories.py new file mode 100644 index 00000000000..cf9a7fbd0b2 --- /dev/null +++ b/src/sage/calculus/all__sagemath_categories.py @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..f12d63a3b7f --- /dev/null +++ b/src/sage/calculus/all__sagemath_modules.py @@ -0,0 +1,18 @@ +from sage.calculus.all__sagemath_categories import * + +from sage.calculus.integration import numerical_integral, monte_carlo_integral +integral_numerical = numerical_integral + +from sage.calculus.interpolation import spline, Spline + +from sage.calculus.functions import wronskian, jacobian + +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 sage.calculus.transforms.all import * +del lazy_import diff --git a/src/sage/calculus/expr.py b/src/sage/calculus/expr.py new file mode 100644 index 00000000000..0aa62851d24 --- /dev/null +++ b/src/sage/calculus/expr.py @@ -0,0 +1,203 @@ +r""" +Constructor for symbolic expressions +""" + +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') + + +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 + """ + 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) diff --git a/src/sage/calculus/transforms/all.py b/src/sage/calculus/transforms/all.py index 379b3b69c37..c42ae401653 100644 --- a/src/sage/calculus/transforms/all.py +++ b/src/sage/calculus/transforms/all.py @@ -2,4 +2,5 @@ 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 +del lazy_import diff --git a/src/sage/categories/all.py b/src/sage/categories/all.py index a344ed2a296..09933cca7c2 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 @@ -155,3 +155,5 @@ # lie conformal algebras lazy_import('sage.categories.lie_conformal_algebras', 'LieConformalAlgebras') +del lazy_import +del install_doc diff --git a/src/sage/categories/all__sagemath_objects.py b/src/sage/categories/all__sagemath_objects.py index d87b4a1d20e..95cf6a7b5fb 100644 --- a/src/sage/categories/all__sagemath_objects.py +++ b/src/sage/categories/all__sagemath_objects.py @@ -17,12 +17,16 @@ 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 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..3d7b19900c1 100644 --- a/src/sage/coding/all.py +++ b/src/sage/coding/all.py @@ -1,12 +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/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/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 d1f391013e2..4bdd5a6bad0 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -50,256 +50,15 @@ 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 .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 sage.combinat.all__sagemath_combinat import * +from sage.combinat.all__sagemath_modules import * +from sage.combinat.all__sagemath_graphs import * +del lazy_import +del install_dict +del install_doc diff --git a/src/sage/combinat/all__sagemath_categories.py b/src/sage/combinat/all__sagemath_categories.py new file mode 100644 index 00000000000..854cf866f40 --- /dev/null +++ b/src/sage/combinat/all__sagemath_categories.py @@ -0,0 +1,33 @@ +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 + +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) + +lazy_import('sage.combinat.combinat', + ('InfiniteAbstractCombinatorialClass', 'UnionCombinatorialClass', + 'FilteredCombinatorialClass'), + deprecation=(31545, 'this class is deprecated, do not use')) + +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 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 new file mode 100644 index 00000000000..7968f3fde4a --- /dev/null +++ b/src/sage/combinat/all__sagemath_combinat.py @@ -0,0 +1,201 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +from sage.combinat.expnums import expnums + +from sage.combinat.chas.all import * +from sage.combinat.crystals.all import * +from sage.combinat.rigged_configurations.all import * + +# Free modules and friends +from sage.combinat.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 sage.combinat.derangements import Derangements +lazy_import('sage.combinat.baxter_permutations', ['BaxterPermutations']) + +# RSK +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 sage.combinat.perfect_matching import PerfectMatching, PerfectMatchings + +# Compositions +from sage.combinat.composition_signed import SignedCompositions + +# Partitions +from sage.combinat.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 sage.combinat.partition_algebra import (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 sage.combinat.core import Core, Cores + +# Tableaux +lazy_import('sage.combinat.tableau', + ["Tableau", "SemistandardTableau", "StandardTableau", "RowStandardTableau", "IncreasingTableau", + "Tableaux", "SemistandardTableaux", "StandardTableaux", "RowStandardTableaux", "IncreasingTableaux"]) +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 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', + 'ShiftedPrimedTableau']) + +# SuperTableaux +lazy_import('sage.combinat.super_tableau', + ["StandardSuperTableau", "SemistandardSuperTableau", "StandardSuperTableaux", "SemistandardSuperTableaux"]) + +# Words +from sage.combinat.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 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 sage.combinat.necklace import Necklaces +lazy_import('sage.combinat.dyck_word', ('DyckWords', 'DyckWord')) +lazy_import('sage.combinat.nu_dyck_word', ('NuDyckWords', 'NuDyckWord')) +from sage.combinat.sloane_functions import sloane +lazy_import('sage.combinat.superpartition', ('SuperPartition', + 'SuperPartitions')) + +lazy_import('sage.combinat.parallelogram_polyomino', + ['ParallelogramPolyomino', 'ParallelogramPolyominoes']) + +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 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', 'number_of_irreducible_polynomials']) + +from sage.combinat.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') +del lazy_import 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..d789b89078b --- /dev/null +++ b/src/sage/combinat/all__sagemath_graphs.py @@ -0,0 +1,33 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.misc.lazy_import import lazy_import + +# Posets +from sage.combinat.posets.all import * + +# Trees and Tamari interval posets +from sage.combinat.ordered_tree import (OrderedTree, OrderedTrees, + LabelledOrderedTree, LabelledOrderedTrees) +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 sage.combinat.graph_path import GraphPaths + +from sage.combinat.yang_baxter_graph import YangBaxterGraph + +# block designs, etc +from sage.combinat.designs.all import * + +# Cluster Algebras and Quivers +from sage.combinat.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']) +del lazy_import diff --git a/src/sage/combinat/all__sagemath_modules.py b/src/sage/combinat/all__sagemath_modules.py new file mode 100644 index 00000000000..a2459fcafc0 --- /dev/null +++ b/src/sage/combinat/all__sagemath_modules.py @@ -0,0 +1,6 @@ +from sage.combinat.all__sagemath_categories import * + +from sage.combinat.free_module import CombinatorialFreeModule +from sage.combinat import ranker + +from sage.combinat.root_system.all import * diff --git a/src/sage/combinat/chas/all.py b/src/sage/combinat/chas/all.py index 5833abbe49c..cc4da145e9a 100644 --- a/src/sage/combinat/chas/all.py +++ b/src/sage/combinat/chas/all.py @@ -18,3 +18,5 @@ 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/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/crystals/all.py b/src/sage/combinat/crystals/all.py index 397639405c9..be8576c0e02 100644 --- a/src/sage/combinat/crystals/all.py +++ b/src/sage/combinat/crystals/all.py @@ -28,3 +28,5 @@ from sage.misc.lazy_import import lazy_import 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 0948c6fa281..bf00b490c3b 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') @@ -51,4 +52,6 @@ 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 +del lazy_import +del install_doc diff --git a/src/sage/combinat/matrices/all.py b/src/sage/combinat/matrices/all.py index 0f6adbb5355..92df248b91b 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 sage.combinat.matrices.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..b168b0b1127 --- /dev/null +++ b/src/sage/combinat/matrices/all__sagemath_categories.py @@ -0,0 +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/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/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 f7f8bdcc7fc..b608b0094d1 100644 --- a/src/sage/combinat/posets/all.py +++ b/src/sage/combinat/posets/all.py @@ -36,8 +36,10 @@ 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 + +del install_doc 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/rigged_configurations/all.py b/src/sage/combinat/rigged_configurations/all.py index 36a10774a89..e068cb4aed6 100644 --- a/src/sage/combinat/rigged_configurations/all.py +++ b/src/sage/combinat/rigged_configurations/all.py @@ -41,3 +41,5 @@ 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 263a4d916d2..bb55e491b44 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 .dynkin_diagram import DynkinDiagram -from .cartan_matrix import CartanMatrix -from .coxeter_matrix import CoxeterMatrix -from .coxeter_type import CoxeterType -from .root_system import RootSystem, WeylDim +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 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,11 @@ 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 - -lazy_import('sage.combinat.root_system.non_symmetric_macdonald_polynomials', 'NonSymmetricMacdonaldPolynomials') -lazy_import('sage.combinat.root_system.integrable_representations', 'IntegrableRepresentation') +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') +del lazy_import +del install_doc 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/sf/all.py b/src/sage/combinat/sf/all.py index 00f8e4f2bdf..daa673af502 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: @@ -45,3 +45,5 @@ lazy_import('sage.combinat.sf.ns_macdonald', ['NonattackingFillings', '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/combinat/words/all.py b/src/sage/combinat/words/all.py index 687b572c8e5..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 .alphabet import Alphabet, build_alphabet -from .morphism import WordMorphism -from .paths import 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.misc.lazy_import import lazy_import + +from sage.combinat.words.alphabet import Alphabet, build_alphabet +from sage.combinat.words.morphism import WordMorphism +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/crypto/all.py b/src/sage/crypto/all.py index 1ea6c8f20a7..811ee2c6a78 100644 --- a/src/sage/crypto/all.py +++ b/src/sage/crypto/all.py @@ -10,13 +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/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/data_structures/all.py b/src/sage/data_structures/all.py index eac1b4b8931..7062ccf447e 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 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 new file mode 100644 index 00000000000..fe98668667d --- /dev/null +++ b/src/sage/data_structures/all__sagemath_categories.py @@ -0,0 +1 @@ +from sage.data_structures.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.py b/src/sage/databases/all.py index a6571c7a5df..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. @@ -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,16 +67,17 @@ lazy_import('sage.databases.odlyzko', 'zeta_zeros') -from .db_modular_polynomials import \ - ClassicalModularPolynomialDatabase, \ - DedekindEtaModularPolynomialDatabase, \ - DedekindEtaModularCorrespondenceDatabase, \ - AtkinModularPolynomialDatabase, \ - AtkinModularCorrespondenceDatabase +from sage.databases.db_modular_polynomials import \ + ClassicalModularPolynomialDatabase, \ + DedekindEtaModularPolynomialDatabase, \ + DedekindEtaModularCorrespondenceDatabase, \ + AtkinModularPolynomialDatabase, \ + AtkinModularCorrespondenceDatabase -from .db_class_polynomials import \ - HilbertClassPolynomialDatabase +from sage.databases.db_class_polynomials import \ + HilbertClassPolynomialDatabase lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors') lazy_import('sage.databases.findstat', ['findstat', 'findmap']) +del lazy_import 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/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 e5c553a3d54..fddc4e83a98 100644 --- a/src/sage/dynamics/all.py +++ b/src/sage/dynamics/all.py @@ -20,14 +20,22 @@ from sage.misc.namespace_package import install_doc install_doc(__package__, __doc__) +from sage.dynamics.all__sagemath_schemes import * + +try: + from sage.dynamics.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 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 +del install_doc 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..1bffe1dffa6 --- /dev/null +++ b/src/sage/dynamics/all__sagemath_symbolics.py @@ -0,0 +1,5 @@ +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/dynamics/arithmetic_dynamics/all.py b/src/sage/dynamics/arithmetic_dynamics/all.py index f536734b5d9..66773e29d76 100644 --- a/src/sage/dynamics/arithmetic_dynamics/all.py +++ b/src/sage/dynamics/arithmetic_dynamics/all.py @@ -1,12 +1,13 @@ 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') +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/ext/all__sagemath_categories.py b/src/sage/ext/all__sagemath_categories.py new file mode 100644 index 00000000000..ec13d6e405f --- /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/functions/all.py b/src/sage/functions/all.py index 4cf9005f7e3..4e4c092bc0f 100644 --- a/src/sage/functions/all.py +++ b/src/sage/functions/all.py @@ -3,91 +3,94 @@ lazy_import('sage.functions.piecewise', 'piecewise') lazy_import('sage.functions.error', ['erf', 'erfc', 'erfi', 'erfinv', - 'fresnel_sin', 'fresnel_cos']) + 'fresnel_sin', 'fresnel_cos']) -from .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 .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 .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 .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, - dickman_rho, stieltjes) +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, - Bessel, struve_H, struve_L, hankel1, hankel2, +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, - elliptic_f, elliptic_ec, elliptic_eu, - elliptic_kc, elliptic_pi, elliptic_j) +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, - 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.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) -from .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) +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) -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, - wigner_9j, gaunt) +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, - kronecker_delta) +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, - 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.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, - gamma_inc, gamma_inc_lower) +from sage.functions.gamma import (gamma, psi, beta, log_gamma, + gamma_inc, gamma_inc_lower) Γ = 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 e3e31bcf03e..976d6cce6aa 100644 --- a/src/sage/games/all.py +++ b/src/sage/games/all.py @@ -1,2 +1,5 @@ -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']) +del lazy_import diff --git a/src/sage/geometry/all.py b/src/sage/geometry/all.py index 3b7dcf756d8..ebf0d36f808 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 sage.geometry.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 sage.geometry.all__sagemath_symbolics import * +except ImportError: + pass + + +try: + from sage.geometry.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..34dc2709543 --- /dev/null +++ b/src/sage/geometry/all__sagemath_gap.py @@ -0,0 +1,5 @@ + +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_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..4ea1510f4ab --- /dev/null +++ b/src/sage/geometry/all__sagemath_modules.py @@ -0,0 +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/all__sagemath_polyhedra.py b/src/sage/geometry/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..0b1852de7a5 --- /dev/null +++ b/src/sage/geometry/all__sagemath_polyhedra.py @@ -0,0 +1,20 @@ +from sage.geometry.all__sagemath_modules import * + +from sage.geometry.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..fb690c97312 --- /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/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..cda722f4d6b 100644 --- a/src/sage/geometry/polyhedron/all.py +++ b/src/sage/geometry/polyhedron/all.py @@ -2,4 +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/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/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..a3142e83e22 100644 --- a/src/sage/graphs/all.py +++ b/src/sage/graphs/all.py @@ -4,14 +4,15 @@ 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"]) -from .graph import Graph -from .digraph import DiGraph -from .bipartite_graph import BipartiteGraph +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 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") @@ -37,3 +38,4 @@ ... NameError: name 'clique_number' is not defined """ +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..a6c6c72899a 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 # @@ -17,13 +17,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://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 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 new file mode 100644 index 00000000000..80c0bd46216 --- /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 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 new file mode 100644 index 00000000000..32a1f65f720 --- /dev/null +++ b/src/sage/groups/abelian_gps/all__sagemath_modules.py @@ -0,0 +1,4 @@ + +# 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/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 5fa9ccfac39..52a20cea495 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 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 new file mode 100644 index 00000000000..cf28b7d6bff --- /dev/null +++ b/src/sage/groups/all__sagemath_categories.py @@ -0,0 +1,10 @@ +from sage.groups.all__sagemath_objects import * + +from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda, + linear_relation, multiple, multiples, order_from_multiple) + +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..15278ba12aa --- /dev/null +++ b/src/sage/groups/all__sagemath_gap.py @@ -0,0 +1,3 @@ + +from sage.groups.perm_gps.all import * +from sage.groups.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..c27a9ca05c5 --- /dev/null +++ b/src/sage/groups/all__sagemath_groups.py @@ -0,0 +1,32 @@ +from sage.groups.all__sagemath_modules import * + +try: + from sage.groups.all__sagemath_pari import * +except ImportError: + pass + +from sage.groups.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']) +del lazy_import diff --git a/src/sage/groups/all__sagemath_modules.py b/src/sage/groups/all__sagemath_modules.py new file mode 100644 index 00000000000..6a3eb638a9b --- /dev/null +++ b/src/sage/groups/all__sagemath_modules.py @@ -0,0 +1,11 @@ +from sage.groups.all__sagemath_categories 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 + +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/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..08d8c04e6f7 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 sage.groups.matrix_gps.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..e8ff9cf4fa6 --- /dev/null +++ b/src/sage/groups/matrix_gps/all__sagemath_modules.py @@ -0,0 +1,12 @@ +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') +del lazy_import diff --git a/src/sage/groups/perm_gps/all.py b/src/sage/groups/perm_gps/all.py index ae405f298a2..2cda7602d8c 100644 --- a/src/sage/groups/perm_gps/all.py +++ b/src/sage/groups/perm_gps/all.py @@ -1,20 +1,20 @@ -from .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) +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) -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, - PermutationGroupMorphism_im_gens, - PermutationGroupMorphism_id) +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/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..707eb9fb71d 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 sage.homology.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..5ebb7604432 --- /dev/null +++ b/src/sage/homology/all__sagemath_modules.py @@ -0,0 +1,7 @@ +from sage.homology.chain_complex import ChainComplex + +from sage.homology.chain_complex_morphism import ChainComplexMorphism + +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 c53a1e11ecf..87d00072798 100644 --- a/src/sage/interacts/all.py +++ b/src/sage/interacts/all.py @@ -17,9 +17,10 @@ # **************************************************************************** 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') +del lazy_import diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index ed71b662362..83100b2c3de 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 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 @@ -48,3 +48,4 @@ 'kash', 'magma', 'macaulay2', 'maple', 'maxima', 'mathematica', 'mwrank', 'octave', 'r', 'singular', 'sage0', 'sage'] +del lazy_import 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.py b/src/sage/lfunctions/all.py index 9281f97ebbe..80b30c2ec6e 100644 --- a/src/sage/lfunctions/all.py +++ b/src/sage/lfunctions/all.py @@ -1,6 +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/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..7c6e14767cf 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 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 sage.libs.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..b5e330d8329 --- /dev/null +++ b/src/sage/libs/all__sagemath_flint.py @@ -0,0 +1,16 @@ + +try: + from sage.libs.all__sagemath_pari import * +except ImportError: + pass + +try: + from sage.libs.all__sagemath_ntl import * +except ImportError: + pass + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.libs.flint.qsieve_sage', '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..e4b82d9deb5 --- /dev/null +++ b/src/sage/libs/all__sagemath_gap.py @@ -0,0 +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_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..9c096062eb5 --- /dev/null +++ b/src/sage/libs/all__sagemath_symbolics.py @@ -0,0 +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/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..ea35faeb721 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,16 +10,17 @@ 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 = { - '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/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/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/libs/symmetrica/all.py b/src/sage/libs/symmetrica/all.py index 7c5215f6444..f69490654af 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 - -#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 - - -#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 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 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 - - -#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 .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 .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 .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 .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 .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 .symmetrica import mult_schur_schur_symmetrica as mult_schur_schur -from .symmetrica import mult_monomial_monomial_symmetrica as mult_monomial_monomial - - -from .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 .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 - -#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 symmetrica import * + +from sage.libs.symmetrica.symmetrica import start + +# 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 +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 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 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 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 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 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 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 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 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 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 sage.libs.symmetrica.symmetrica import hall_littlewood_symmetrica as hall_littlewood + +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 sage.libs.symmetrica.symmetrica import scalarproduct_schur_symmetrica as scalarproduct_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 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/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 041624f3853..0902e081afb 100644 --- a/src/sage/matrix/all.py +++ b/src/sage/matrix/all.py @@ -1,7 +1,8 @@ from sage.misc.lazy_import import lazy_import -from .matrix_space import MatrixSpace -from .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) +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) Mat = MatrixSpace +del lazy_import 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/matroids/all.py b/src/sage/matroids/all.py index e647629c988..5a9a4805e41 100644 --- a/src/sage/matroids/all.py +++ b/src/sage/matroids/all.py @@ -10,3 +10,5 @@ # import matroids_catalog as matroids lazy_import('sage.matroids.constructor', 'Matroid') lazy_import('sage.matroids', 'matroids_catalog', 'matroids') +del lazy_import +del install_doc diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py index 8aee092368c..dfa47c89ca6 100644 --- a/src/sage/misc/all.py +++ b/src/sage/misc/all.py @@ -1,129 +1,35 @@ -from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute -from sage.misc.lazy_import import lazy_import - -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 * from sage.misc.misc import (BackslashOperator, - 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) 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') - 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 +# 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') @@ -139,3 +45,10 @@ 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 +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_categories.py b/src/sage/misc/all__sagemath_categories.py new file mode 100644 index 00000000000..0806bdf7aec --- /dev/null +++ b/src/sage/misc/all__sagemath_categories.py @@ -0,0 +1,77 @@ + +from sage.misc.all__sagemath_objects import * + +from sage.misc.html import html, pretty_print_default + +from sage.misc.mathml import mathml + +from sage.misc.table import table + +from sage.misc.map_threaded import map_threaded + +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) + + +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.fpickle import pickle_function, unpickle_function + +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 new file mode 100644 index 00000000000..8111aee2a29 --- /dev/null +++ b/src/sage/misc/all__sagemath_modules.py @@ -0,0 +1,20 @@ +# All of sage.misc.all except for development tools, session management, +# and deprecated functionality + +from sage.misc.lazy_attribute import lazy_attribute, lazy_class_attribute + +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) + +from sage.misc.temporary_file import tmp_dir, tmp_filename # Depends on sage.env + +from sage.misc.mathml import mathml + +from sage.misc.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..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 c7acba4ab07..2f638230b42 100644 --- a/src/sage/misc/all__sagemath_repl.py +++ b/src/sage/misc/all__sagemath_repl.py @@ -1,3 +1,14 @@ +from sage.misc.all__sagemath_objects import * + from sage.misc.sage_eval import sage_eval, sageobj from sage.misc.sage_input import sage_input + +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']) + +lazy_import('pydoc', 'help', 'python_help') 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 diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py index f79aeafb937..7b1e8e1db18 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 @@ -2267,6 +2269,7 @@ def sage_getsourcelines(obj): sage: from sage.misc.sageinspect import sage_getsourcelines sage: # needs sage.modules + sage: from sage.matrix.constructor import matrix sage: sage_getsourcelines(matrix)[1] 21 sage: sage_getsourcelines(matrix)[0][0] diff --git a/src/sage/modular/abvar/all.py b/src/sage/modular/abvar/all.py index f0971bc0b42..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 .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..73048018c69 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, - kronecker_character, kronecker_character_upside_down, - trivial_character) +from sage.modular.dirichlet import (DirichletGroup, + kronecker_character, kronecker_character_upside_down, + trivial_character) -from .arithgroup.all import (Gamma0, Gamma1, GammaH, Gamma, SL2Z, - ArithmeticSubgroup_Permutation, - CongruenceSubgroup, FareySymbol) +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,20 @@ 'sturm_bound'), deprecation=(32647, 'removed from main namespace')) -from .etaproducts import (EtaGroup, EtaProduct, EtaGroupElement, - AllCusps, CuspFamily) +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 * +del lazy_import diff --git a/src/sage/modular/arithgroup/all.py b/src/sage/modular/arithgroup/all.py index d4fb241d1f9..2915566b73c 100644 --- a/src/sage/modular/arithgroup/all.py +++ b/src/sage/modular/arithgroup/all.py @@ -1,18 +1,19 @@ # 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, - degeneracy_coset_representatives_gamma1) +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 +del lazy_import diff --git a/src/sage/modular/btquotients/all.py b/src/sage/modular/btquotients/all.py index 3807442da70..1e96b2db99b 100644 --- a/src/sage/modular/btquotients/all.py +++ b/src/sage/modular/btquotients/all.py @@ -1,3 +1,3 @@ -from .btquotient import BruhatTitsQuotient -#from pautomorphicform import pAdicAutomorphicForms -#from pautomorphicform import BruhatTitsHarmonicCocycles +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..3c9230a2520 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, - is_HeckeModuleMorphism, - is_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..6461e3c7083 100644 --- a/src/sage/modular/modform/all.py +++ b/src/sage/modular/modform/all.py @@ -3,26 +3,27 @@ # # Distributed under the terms of the GNU General Public License (GPL) # -# http://www.gnu.org/licenses/ +# https://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 +del lazy_import diff --git a/src/sage/modular/modform_hecketriangle/all.py b/src/sage/modular/modform_hecketriangle/all.py index cd236efc334..1c2bfeccdc6 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, - QuasiWeakModularFormsRing, QuasiModularFormsRing, - QuasiCuspFormsRing, MeromorphicModularFormsRing, - WeakModularFormsRing, - ModularFormsRing, CuspFormsRing) +from sage.modular.modform_hecketriangle.graded_ring import (QuasiMeromorphicModularFormsRing, + QuasiWeakModularFormsRing, QuasiModularFormsRing, + QuasiCuspFormsRing, MeromorphicModularFormsRing, + WeakModularFormsRing, + ModularFormsRing, CuspFormsRing) -from .space import (QuasiMeromorphicModularForms, QuasiWeakModularForms, - QuasiModularForms, QuasiCuspForms, - MeromorphicModularForms, WeakModularForms, ModularForms, - CuspForms, ZeroForm) +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..f398a735a1e 100644 --- a/src/sage/modular/modsym/all.py +++ b/src/sage/modular/modsym/all.py @@ -1,15 +1,16 @@ 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 +del lazy_import 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/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 929d16b79d0..955a2c72d4c 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -38,3 +38,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/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/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 diff --git a/src/sage/monoids/all.py b/src/sage/monoids/all.py index cd2812c89f1..7b4543dd34c 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, - Radix64Strings, AlphabeticStrings) +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/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..751ec929b7c 100644 --- a/src/sage/numerical/all.py +++ b/src/sage/numerical/all.py @@ -1,7 +1,7 @@ +from sage.numerical.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"]) @@ -9,3 +9,4 @@ lazy_import("sage.numerical.interactive_simplex_method", ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) +del lazy_import 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..7a2c2778373 --- /dev/null +++ b/src/sage/numerical/all__sagemath_modules.py @@ -0,0 +1,5 @@ +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"]) +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/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/parallel/all.py b/src/sage/parallel/all.py index 85f69c86165..dbb6ba2c851 100644 --- a/src/sage/parallel/all.py +++ b/src/sage/parallel/all.py @@ -1,4 +1,5 @@ -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') +del lazy_import diff --git a/src/sage/plot/all.py b/src/sage/plot/all.py index 1f16e2d6789..4d7d65ecf62 100644 --- a/src/sage/plot/all.py +++ b/src/sage/plot/all.py @@ -1,39 +1,41 @@ -from .graphics import Graphics -from .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.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 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"]) +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 -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") +del lazy_import diff --git a/src/sage/plot/plot3d/all.py b/src/sage/plot/plot3d/all.py index 16c647c6b50..1fc801284f5 100644 --- a/src/sage/plot/plot3d/all.py +++ b/src/sage/plot/plot3d/all.py @@ -1,21 +1,22 @@ -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"]) +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 -#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 689ee7a7934..646f3d5a2ad 100644 --- a/src/sage/probability/all.py +++ b/src/sage/probability/all.py @@ -1,9 +1,9 @@ -from .random_variable import ( - DiscreteRandomVariable, - DiscreteProbabilitySpace ) +from sage.probability.random_variable import ( + DiscreteRandomVariable, + DiscreteProbabilitySpace) -from .probability_distribution import ( +from sage.probability.probability_distribution import ( RealDistribution, SphericalDistribution, - GeneralDiscreteDistribution ) + GeneralDiscreteDistribution) diff --git a/src/sage/quadratic_forms/all.py b/src/sage/quadratic_forms/all.py index 81d395f375c..e9e818af865 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 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 new file mode 100644 index 00000000000..62516aead2a --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_modules.py @@ -0,0 +1,12 @@ +from sage.quadratic_forms.binary_qf import BinaryQF, BinaryQF_reduced_representatives + +from sage.quadratic_forms.ternary_qf import TernaryQF, find_all_ternary_qf_by_level_disc, find_a_ternary_qf_by_level_disc + +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) + +from sage.quadratic_forms.extras import least_quadratic_nonresidue, extend_to_primitive, is_triangular_number + +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 new file mode 100644 index 00000000000..f6235960f54 --- /dev/null +++ b/src/sage/quadratic_forms/all__sagemath_pari.py @@ -0,0 +1,6 @@ +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) + +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/all.py b/src/sage/repl/all.py index 96fd6de5f6d..809cea7d7e5 100644 --- a/src/sage/repl/all.py +++ b/src/sage/repl/all.py @@ -5,9 +5,10 @@ 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 from sage.repl.rich_output.pretty_print import pretty_print, show +del lazy_import diff --git a/src/sage/repl/ipython_kernel/all_jupyter.py b/src/sage/repl/ipython_kernel/all_jupyter.py index 37899e1c080..3e6eca3e004 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, - range_slider, checkbox, selector, input_grid, color_selector) -from .interact import interact +from sage.repl.ipython_kernel.widgets_sagenb import (input_box, text_control, slider, + 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 e3c7167fe12..965f83d02f6 100644 --- a/src/sage/rings/all.py +++ b/src/sage/rings/all.py @@ -14,35 +14,22 @@ from sage.rings.all__sagemath_categories 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 +# 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_field import RationalField, QQ from sage.rings.rational import Rational +from sage.rings.rational_field import RationalField, QQ Rationals = RationalField # Integers modulo n. @@ -50,70 +37,41 @@ 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 * -# Number field -from sage.rings.number_field.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 * -# 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 * +# Following will go to all__sagemath_categories.py in #36566 # 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 - +# 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 -from sage.rings.real_arb import RealBallField, RBF +# up to here (#36566) # 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") +# Following will go to all__sagemath_categories.py in #36566 # Power series rings from sage.rings.power_series_ring import PowerSeriesRing @@ -121,19 +79,9 @@ # 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 @@ -144,27 +92,27 @@ # 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.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 +# 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 * +# from sage.rings.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 +del lazy_import 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..d2fa0062d68 100644 --- a/src/sage/rings/all__sagemath_categories.py +++ b/src/sage/rings/all__sagemath_categories.py @@ -1,6 +1,27 @@ +from sage.misc.lazy_import import lazy_import + # Ring base classes -from sage.rings.ring import Ring +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 + +# 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 * + +del lazy_import diff --git a/src/sage/rings/all__sagemath_combinat.py b/src/sage/rings/all__sagemath_combinat.py new file mode 100644 index 00000000000..3e054b1da0b --- /dev/null +++ b/src/sage/rings/all__sagemath_combinat.py @@ -0,0 +1,9 @@ +from sage.rings.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..098426b0e9b --- /dev/null +++ b/src/sage/rings/all__sagemath_flint.py @@ -0,0 +1,36 @@ + +from sage.rings.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 sage.rings.number_field.all import * + +from sage.rings.monomials import monomials + +# Algebraic numbers +from sage.rings.qqbar import (AlgebraicRealField, AA, + AlgebraicReal, + AlgebraicField, QQbar, + AlgebraicNumber, + number_field_elements_from_algebraics) + +# Intervals +from sage.rings.real_mpfi import (RealIntervalField, + RIF, + RealInterval) + +# Complex numbers +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 sage.rings.cif import CIF +del lazy_import 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..c82909b5984 --- /dev/null +++ b/src/sage/rings/all__sagemath_modules.py @@ -0,0 +1,24 @@ +from sage.rings.all__sagemath_categories import * + +from sage.rings.function_field.all__sagemath_modules import * +from sage.rings.polynomial.all__sagemath_modules 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 + +# 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_double import ComplexDoubleField, ComplexDoubleElement, CDF + +from sage.rings.cc import CC + +from sage.rings.complex_mpc import MPComplexField + +# invariant theory +from sage.rings.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..c64b779350c --- /dev/null +++ b/src/sage/rings/all__sagemath_ntl.py @@ -0,0 +1,6 @@ + +from sage.rings.all__sagemath_pari import * + +from sage.rings.padics.all__sagemath_ntl import * + +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 new file mode 100644 index 00000000000..73f3230790e --- /dev/null +++ b/src/sage/rings/all__sagemath_pari.py @@ -0,0 +1,12 @@ + +# Pseudo-ring of PARI objects. +from sage.rings.pari_ring import PariRing, Pari + +# p-adic field +from sage.rings.padics.all__sagemath_pari import * + +# valuations +from sage.rings.valuation.all import * + +# Tate algebras +from sage.rings.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..be07e478a77 --- /dev/null +++ b/src/sage/rings/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from sage.rings.all__sagemath_modules import * diff --git a/src/sage/rings/asymptotic/all.py b/src/sage/rings/asymptotic/all.py index 9353f267624..27e4d289212 100644 --- a/src/sage/rings/asymptotic/all.py +++ b/src/sage/rings/asymptotic/all.py @@ -1,3 +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 5d3d3f21c73..a3dbfe5764f 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 # @@ -15,9 +15,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# ***************************************************************************** -from .finite_field_constructor import FiniteField -from .conway_polynomials import conway_polynomial, exists_conway_polynomial -GF = FiniteField +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 new file mode 100644 index 00000000000..a2330a07fe4 --- /dev/null +++ b/src/sage/rings/finite_rings/all__sagemath_categories.py @@ -0,0 +1,8 @@ +from sage.rings.finite_rings.finite_field_constructor import FiniteField + +GF = FiniteField + +from sage.rings.finite_rings.conway_polynomials import conway_polynomial, exists_conway_polynomial + +# Finite residue fields +from sage.rings.finite_rings.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..e74571b211d 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,5 +1,11 @@ -from .constructor import FunctionField +from sage.rings.function_field.all__sagemath_modules import * + +try: + from sage.rings.function_field.all__sagemath_symbolics import * +except ImportError: + pass 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/function_field/all__sagemath_categories.py b/src/sage/rings/function_field/all__sagemath_categories.py new file mode 100644 index 00000000000..1cc1f1b8b2f --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_categories.py @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..f1bd876653e --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_modules.py @@ -0,0 +1 @@ +from sage.rings.function_field.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..7c97e664309 --- /dev/null +++ b/src/sage/rings/function_field/all__sagemath_symbolics.py @@ -0,0 +1 @@ +from sage.rings.function_field.all__sagemath_modules 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 5c56f8cff58..73cf7750d43 100644 --- a/src/sage/rings/number_field/all.py +++ b/src/sage/rings/number_field/all.py @@ -1,15 +1,19 @@ -from .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 import (NumberField, NumberFieldTower, CyclotomicField, QuadraticField, + is_fundamental_discriminant, is_real_place) +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 +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 .unit_group import UnitGroup +from sage.rings.number_field.unit_group import UnitGroup + +del lazy_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..457e8611c55 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 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 new file mode 100644 index 00000000000..fec72979f02 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_categories.py @@ -0,0 +1 @@ +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 new file mode 100644 index 00000000000..6362a8551f0 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_flint.py @@ -0,0 +1,2 @@ + +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 new file mode 100644 index 00000000000..dfa31e55f90 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_ntl.py @@ -0,0 +1,4 @@ + +from sage.rings.padics.all__sagemath_pari import * + +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 new file mode 100644 index 00000000000..5072418e856 --- /dev/null +++ b/src/sage/rings/padics/all__sagemath_pari.py @@ -0,0 +1,10 @@ + +from sage.rings.padics.all__sagemath_categories import * + +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 sage.rings.padics.padic_printing import _printer_defaults as padic_printing + +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 853f422bdc7..78e29ac0bb9 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 sage.rings.polynomial.all__sagemath_categories import * +from sage.rings.polynomial.all__sagemath_modules import * # Generic convolution from sage.rings.polynomial.convolution import convolution @@ -38,19 +28,9 @@ 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') +del lazy_import 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..647d682eb84 --- /dev/null +++ b/src/sage/rings/polynomial/all__sagemath_modules.py @@ -0,0 +1,7 @@ + +from sage.misc.lazy_import import lazy_import + +# Ore Polynomial Rings +lazy_import('sage.rings.polynomial.ore_polynomial_ring', 'OrePolynomialRing') +SkewPolynomialRing = OrePolynomialRing +del lazy_import 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/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/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/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/affine/all.py b/src/sage/schemes/affine/all.py index 68a540a9f1f..e761ce307c9 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 # @@ -17,8 +17,8 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://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 23858c6f0c8..2aa1a51d1ab 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 # @@ -17,31 +17,24 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# ***************************************************************************** -from .jacobians.all import * +from sage.schemes.all__sagemath_categories import * +from sage.schemes.all__sagemath_polyhedra import * -from .hyperelliptic_curves.all import * +from sage.schemes.jacobians.all import * -from .curves.all import * +from sage.schemes.hyperelliptic_curves.all import * -from .plane_conics.all import * +from sage.schemes.curves.all import * -from .elliptic_curves.all import * +from sage.schemes.plane_conics.all import * -from .plane_quartics.all import * +from sage.schemes.elliptic_curves.all import * -from .generic.all import * +from sage.schemes.plane_quartics.all import * -from .toric.all import * +from sage.schemes.cyclic_covers.all import * -from .affine.all import * - -from .projective.all import * - -from .product_projective.all import * - -from .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 new file mode 100644 index 00000000000..02c6722874e --- /dev/null +++ b/src/sage/schemes/all__sagemath_categories.py @@ -0,0 +1,4 @@ +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_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..2dc39d42014 --- /dev/null +++ b/src/sage/schemes/all__sagemath_polyhedra.py @@ -0,0 +1 @@ +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..49bea579013 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 # @@ -17,9 +17,9 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://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..84f7b0d5a50 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) @@ -14,34 +14,35 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://www.gnu.org/licenses/ +# ***************************************************************************** -from .constructor import (EllipticCurve, - EllipticCurve_from_c4c6, - EllipticCurve_from_j, - EllipticCurve_from_cubic, - EllipticCurves_with_good_reduction_outside_S) +from sage.schemes.elliptic_curves.constructor import (EllipticCurve, + 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') +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']) -lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve') - -from .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') -from .kodaira_symbol import KodairaSymbol +from sage.schemes.elliptic_curves.kodaira_symbol import KodairaSymbol -from .ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel +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 .heegner import heegner_points, heegner_point +from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point +del lazy_import 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..044c97cd498 100644 --- a/src/sage/schemes/hyperelliptic_curves/all.py +++ b/src/sage/schemes/hyperelliptic_curves/all.py @@ -1,4 +1,5 @@ -from .constructor import HyperellipticCurve -from .kummer_surface import KummerSurface -from .mestre import (Mestre_conic, HyperellipticCurve_from_invariants) -from . import monsky_washnitzer +from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve +from sage.schemes.hyperelliptic_curves.kummer_surface import KummerSurface +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/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/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/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/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/projective/all.py b/src/sage/schemes/projective/all.py index 44e92ee5f23..b9e210c8ae0 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 # @@ -17,7 +17,7 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** +# https://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/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 1c1a69e57a7..8cdd85ed269 100644 --- a/src/sage/sets/all.py +++ b/src/sage/sets/all.py @@ -1,15 +1,16 @@ 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 -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.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 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 +del lazy_import diff --git a/src/sage/stats/all.py b/src/sage/stats/all.py index 3b4c8c4ff52..56d9f2eb1e8 100644 --- a/src/sage/stats/all.py +++ b/src/sage/stats/all.py @@ -1,11 +1,14 @@ +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 .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"]) +del lazy_import diff --git a/src/sage/stats/hmm/all.py b/src/sage/stats/hmm/all.py index 2e1bcacd23d..4666e022fac 100644 --- a/src/sage/stats/hmm/all.py +++ b/src/sage/stats/hmm/all.py @@ -2,11 +2,13 @@ # 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 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/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..8e1c9600409 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, - khinchin, twinprime, mertens, glaisher) -from .expression import Expression, solve_diophantine, hold -from .callable import CallableSymbolicExpressionRing +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 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/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 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/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 53b89564daa..18b553e873d 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') @@ -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