From 5372cb9e554d436b8fbae53b9153913172d3e0d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 25 May 2024 15:29:49 -0700 Subject: [PATCH] sage.**.all*: Use 'del lazy_import', 'del install_doc' --- src/sage/algebras/fusion_rings/all.py | 1 + src/sage/algebras/hecke_algebras/all.py | 1 - src/sage/algebras/lie_algebras/all.py | 9 +- .../algebras/lie_conformal_algebras/all.py | 13 ++- src/sage/algebras/quantum_groups/all.py | 1 + src/sage/all__sagemath_objects.py | 12 +- src/sage/all__sagemath_repl.py | 34 +++--- src/sage/all_cmdline.py | 2 +- src/sage/arith/all.py | 108 ++++-------------- src/sage/categories/all.py | 34 +++--- src/sage/categories/all__sagemath_objects.py | 8 +- src/sage/coding/all.py | 14 ++- src/sage/combinat/chas/all.py | 2 + .../combinat/cluster_algebra_quiver/all.py | 3 +- src/sage/combinat/crystals/all.py | 2 + src/sage/combinat/path_tableaux/all.py | 1 + .../combinat/rigged_configurations/all.py | 2 + src/sage/combinat/species/all.py | 1 + src/sage/crypto/all.py | 7 +- src/sage/crypto/block_cipher/all.py | 1 + src/sage/crypto/public_key/all.py | 1 + src/sage/doctest/all.py | 1 + src/sage/dynamics/cellular_automata/all.py | 1 + src/sage/dynamics/complex_dynamics/all.py | 1 + src/sage/game_theory/all.py | 1 + src/sage/geometry/hyperbolic_space/all.py | 1 + src/sage/geometry/polyhedron/all.py | 4 +- src/sage/geometry/riemannian_manifolds/all.py | 1 + src/sage/lfunctions/all.py | 12 +- src/sage/libs/ntl/all.py | 8 +- src/sage/manifolds/all.py | 1 + src/sage/matroids/all.py | 2 + src/sage/misc/all__sagemath_objects.py | 2 +- src/sage/modular/ssmod/all.py | 1 + src/sage/modules/all.py | 1 + src/sage/modules/with_basis/all.py | 1 + src/sage/repl/all.py | 5 +- src/sage/rings/asymptotic/all.py | 4 +- src/sage/rings/polynomial/weil/all.py | 1 + src/sage/rings/valuation/all.py | 1 + src/sage/sandpiles/all.py | 1 + src/sage/sat/all.py | 1 + src/sage/schemes/product_projective/all.py | 1 + src/sage/schemes/toric/all.py | 1 + src/sage/stats/hmm/all.py | 6 +- src/sage/structure/all.py | 2 +- src/sage/tensor/modules/all.py | 1 + src/sage/typeset/all.py | 1 + 48 files changed, 158 insertions(+), 162 deletions(-) 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_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/all__sagemath_objects.py b/src/sage/all__sagemath_objects.py index 7780f245aae..36a12b3f339 100644 --- a/src/sage/all__sagemath_objects.py +++ b/src/sage/all__sagemath_objects.py @@ -9,16 +9,16 @@ # This import also sets up the interrupt handler from cysignals.signals import (AlarmInterrupt, SignalError, - sig_on_reset as sig_on_count) + sig_on_reset as sig_on_count) -from time import sleep +from time import sleep -from sage.misc.all__sagemath_objects import * -from sage.structure.all import * -from sage.arith.power import generic_power as power +from sage.misc.all__sagemath_objects import * +from sage.structure.all import * +from sage.arith.power import generic_power as power from sage.categories.all__sagemath_objects import * -from sage.cpython.all import * +from sage.cpython.all import * from cysignals.alarm import alarm, cancel_alarm diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index ca3403e382c..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', @@ -100,8 +102,8 @@ from sage.all__sagemath_objects import * from sage.all__sagemath_environment import * -from sage.doctest.all import * -from sage.repl.all import * +from sage.doctest.all import * +from sage.repl.all import * from sage.misc.all__sagemath_repl import * # For doctesting. These are overwritten later diff --git a/src/sage/all_cmdline.py b/src/sage/all_cmdline.py index 197d34ebc90..33d0712c996 100644 --- a/src/sage/all_cmdline.py +++ b/src/sage/all_cmdline.py @@ -19,7 +19,7 @@ from sage.misc.lazy_import import lazy_import -for pkg in ['axiom', 'fricas', 'gap' , 'gap3', 'giac', 'gp', +for pkg in ['axiom', 'fricas', 'gap', 'gap3', 'giac', 'gp', 'gnuplot', 'kash', 'magma', 'macaulay2', 'maple', 'mathematica', 'mathics', 'matlab', 'mupad', 'mwrank', 'octave', 'qepcad', 'singular', diff --git a/src/sage/arith/all.py b/src/sage/arith/all.py index 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/categories/all.py b/src/sage/categories/all.py index e4171ef4439..c34ef14a725 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/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/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/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/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/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/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/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/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/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/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/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/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/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__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/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/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/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/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/polynomial/weil/all.py b/src/sage/rings/polynomial/weil/all.py index 6b00c9bee88..bb0a807c3da 100644 --- a/src/sage/rings/polynomial/weil/all.py +++ b/src/sage/rings/polynomial/weil/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.polynomial.weil.weil_polynomials', 'WeilPolynomials') +del lazy_import diff --git a/src/sage/rings/valuation/all.py b/src/sage/rings/valuation/all.py index 3f90ef9daa0..ebebe8f7a1f 100644 --- a/src/sage/rings/valuation/all.py +++ b/src/sage/rings/valuation/all.py @@ -3,3 +3,4 @@ lazy_import('sage.rings.valuation.gauss_valuation', 'GaussValuation') lazy_import('sage.rings.valuation', 'valuations_catalog', 'valuations') lazy_import('sage.rings.valuation.value_group', 'DiscreteValueGroup') +del lazy_import diff --git a/src/sage/sandpiles/all.py b/src/sage/sandpiles/all.py index 7ddccbf3869..8d26966aa38 100644 --- a/src/sage/sandpiles/all.py +++ b/src/sage/sandpiles/all.py @@ -9,3 +9,4 @@ lazy_import('sage.sandpiles.sandpile', 'triangle_sandpile') lazy_import('sage.sandpiles.examples', 'sandpiles') +del lazy_import diff --git a/src/sage/sat/all.py b/src/sage/sat/all.py index d4beeb2a9a1..ad1a0ec2c14 100644 --- a/src/sage/sat/all.py +++ b/src/sage/sat/all.py @@ -1,2 +1,3 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.sat.solvers.satsolver', 'SAT') +del lazy_import diff --git a/src/sage/schemes/product_projective/all.py b/src/sage/schemes/product_projective/all.py index c9ee0d6b51f..e529331007b 100644 --- a/src/sage/schemes/product_projective/all.py +++ b/src/sage/schemes/product_projective/all.py @@ -2,3 +2,4 @@ lazy_import('sage.schemes.product_projective.space', 'ProductProjectiveSpaces') lazy_import('sage.schemes.product_projective.space', 'is_ProductProjectiveSpaces') +del lazy_import diff --git a/src/sage/schemes/toric/all.py b/src/sage/schemes/toric/all.py index 71ad52ef5c6..17965d2899c 100644 --- a/src/sage/schemes/toric/all.py +++ b/src/sage/schemes/toric/all.py @@ -6,3 +6,4 @@ lazy_import('sage.schemes.toric.library', 'toric_varieties') lazy_import('sage.schemes.toric.fano_variety', 'CPRFanoToricVariety') lazy_import('sage.schemes.toric.ideal', 'ToricIdeal') +del lazy_import diff --git a/src/sage/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/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/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