Skip to content

Commit

Permalink
Fixup changes to reestablish sagemath#36676
Browse files Browse the repository at this point in the history
The chain of immediate ancestors of this commit was created by
cherry-picking the relevant commits that comprise sagemath#36676. Replaying all
these commits (and the necessary conflict resolution) still leaves a
non-empty diff when comparing 10.4.beta2 to the previous sagemath#36676 and
10.4.beta3 to that cherry-picked branch. This commit makes sure that the
diff is trivial. The changes introduced here were likely introduced in
conflict resolution when merging develop into sagemath#36676. I did not replay
these conflict resolutions, so I do this here manually.
  • Loading branch information
saraedum committed Apr 14, 2024
1 parent e9f86a0 commit 2c6dd83
Show file tree
Hide file tree
Showing 20 changed files with 47 additions and 88 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# The full text of the GPL is available at:
#
# https://www.gnu.org/licenses/
# ****************************************************************************
# *****************************************************************************

from sage.algebras.all__sagemath_modules import *
from sage.algebras.all__sagemath_combinat import *
Expand Down
4 changes: 3 additions & 1 deletion src/sage/algebras/all__sagemath_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

lazy_import('sage.algebras.group_algebra', 'GroupAlgebra')

from sage.algebras.algebra import Algebra
# old-style class for associative algebras, use Parent instead
from sage.rings.ring import Algebra

from sage.algebras.finite_dimensional_algebras.all import FiniteDimensionalAlgebra
from sage.algebras.clifford_algebra import CliffordAlgebra, ExteriorAlgebra
from sage.algebras.weyl_algebra import DifferentialWeylAlgebra
Expand Down
5 changes: 0 additions & 5 deletions src/sage/all__sage_categories.py

This file was deleted.

2 changes: 0 additions & 2 deletions src/sage/arith/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

lazy_import("sage.arith.misc", ("Sigma", "Moebius", "Euler_Phi"), deprecation=30322)

from sage.arith.functions import lcm

from sage.arith.functions import lcm
LCM = lcm

Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
RingModules = Modules
from sage.categories.vector_spaces import VectorSpaces

# (hopf) algebra structures
# (Hopf) algebra structures
from sage.categories.algebras import Algebras
from sage.categories.commutative_algebras import CommutativeAlgebras
from sage.categories.coalgebras import Coalgebras
Expand All @@ -104,7 +104,7 @@

# schemes and varieties
from sage.categories.modular_abelian_varieties import ModularAbelianVarieties
from sage.categories.schemes import Schemes
from sage.categories.schemes import Schemes, AbelianVarieties

# * with basis
from sage.categories.modules_with_basis import ModulesWithBasis
Expand Down
4 changes: 1 addition & 3 deletions src/sage/combinat/all__sagemath_combinat.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
lazy_import('sage.combinat.integer_vectors_mod_permgroup',
'IntegerVectorsModPermutationGroup')

lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial'])
lazy_import('sage.combinat.q_analogues', ['gaussian_binomial', 'q_binomial', 'number_of_irreducible_polynomials'])

from sage.combinat.species.all import *

Expand All @@ -174,8 +174,6 @@
lazy_import('sage.combinat.recognizable_series', 'RecognizableSeriesSpace')
lazy_import('sage.combinat.regular_sequence', 'RegularSequenceRing')



# Six Vertex Model
lazy_import('sage.combinat.six_vertex_model', 'SixVertexModel')

Expand Down
2 changes: 1 addition & 1 deletion src/sage/groups/all__sagemath_categories.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from sage.groups.all__sagemath_objects import *

from sage.groups.generic import (discrete_log, discrete_log_rho, discrete_log_lambda,
linear_relation, multiple, multiples)
linear_relation, multiple, multiples, order_from_multiple)

from sage.misc.lazy_import import lazy_import

Expand Down
4 changes: 1 addition & 3 deletions src/sage/knots/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@

lazy_import('sage.knots.knot', ['Knot', 'Knots'])
lazy_import('sage.knots.link', 'Link')
if DatabaseKnotInfo().is_present():
lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries'])
del lazy_import
lazy_import('sage.knots.knotinfo', ['KnotInfo', 'KnotInfoSeries'])
2 changes: 1 addition & 1 deletion src/sage/libs/all__sagemath_flint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

from sage.misc.lazy_import import lazy_import

lazy_import('sage.libs.flint.qsieve', 'qsieve')
lazy_import('sage.libs.flint.qsieve_sage', 'qsieve')

del lazy_import
3 changes: 0 additions & 3 deletions src/sage/misc/all__sagemath_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@
integral_closure,
interval,
xinterval,
is_commutative,
is_even,
is_integrally_closed,
is_field,
is_odd,
kernel,
krull_dimension,
Expand Down
6 changes: 4 additions & 2 deletions src/sage/misc/sageinspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -2267,8 +2267,10 @@ def sage_getsourcelines(obj):
EXAMPLES::
sage: from sage.misc.sageinspect import sage_getsourcelines
sage: from sage.matrix.constructor import matrix # needs sage.modules
sage: sage_getsourcelines(matrix)[1] # needs sage.modules
sage: # needs sage.modules
sage: from sage.matrix.constructor import matrix
sage: sage_getsourcelines(matrix)[1]
21
sage: sage_getsourcelines(matrix)[0][0]
'def matrix(*args, **kwds):\n'
Expand Down
15 changes: 11 additions & 4 deletions src/sage/modules/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@

from sage.modules.free_module import FreeModule, VectorSpace, span

from sage.modules.free_quadratic_module import (FreeQuadraticModule, QuadraticSpace,
InnerProductSpace)
from sage.modules.free_quadratic_module import (
FreeQuadraticModule,
QuadraticSpace,
InnerProductSpace,
)

from sage.modules.free_module_element import (vector, free_module_element, zero_vector,
random_vector)
from sage.modules.free_module_element import (
vector,
free_module_element,
zero_vector,
random_vector,
)

from sage.modules.vector_space_morphism import linear_transformation

Expand Down
1 change: 1 addition & 0 deletions src/sage/quadratic_forms/all__sagemath_pari.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from sage.quadratic_forms.bqf_class_group import BQFClassGroup

from sage.quadratic_forms.special_values import (gamma__exact, zeta__exact, QuadraticBernoulliNumber,
quadratic_L_function__exact, quadratic_L_function__numerical)
Expand Down
20 changes: 11 additions & 9 deletions src/sage/rings/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,7 @@
# ****************************************************************************
from sage.misc.lazy_import import lazy_import

from sage.rings.all__sagemath_combinat import *
from sage.rings.all__sagemath_flint import *
from sage.rings.all__sagemath_gap import *
from sage.rings.all__sagemath_modules import *

try:
from sage.rings.all__sagemath_symbolics import *
except ImportError:
pass
from sage.rings.all__sagemath_categories import *

# Following will go to all__sagemath_categories.py in #36566

Expand Down Expand Up @@ -50,6 +42,16 @@
# Finite fields
from sage.rings.finite_rings.all import *

from sage.rings.all__sagemath_combinat import *
from sage.rings.all__sagemath_flint import *
from sage.rings.all__sagemath_gap import *
from sage.rings.all__sagemath_modules import *

try:
from sage.rings.all__sagemath_symbolics import *
except ImportError:
pass

# Function field
from sage.rings.function_field.all import *

Expand Down
6 changes: 0 additions & 6 deletions src/sage/rings/all__sage_categories.py

This file was deleted.

4 changes: 3 additions & 1 deletion src/sage/rings/all__sagemath_categories.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

# Ring base classes
from sage.rings.ring import (Ring, Field, CommutativeRing, IntegralDomain,
DedekindDomain, PrincipalIdealDomain, EuclideanDomain)
PrincipalIdealDomain)

lazy_import("sage.rings.ring", "DedekindDomain")

# Ring element base classes
from sage.structure.element import (CommutativeAlgebraElement,
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

from types import GeneratorType

import sage.rings.ring
from sage.categories.rings import Rings
from sage.categories.fields import Fields
from sage.structure.element import MonoidElement
from sage.structure.richcmp import rich_to_bool, richcmp
from sage.structure.sequence import Sequence
Expand Down Expand Up @@ -1862,7 +1863,6 @@ def FieldIdeal(R):
over Finite Field in alpha of size 2^4
"""
q = R.base_ring().order()

import sage.rings.infinity
if q is sage.rings.infinity.infinity:
raise TypeError("Cannot construct field ideal for R.base_ring().order()==infinity")
Expand Down
4 changes: 4 additions & 0 deletions src/sage/schemes/elliptic_curves/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from sage.misc.lazy_import import lazy_import
lazy_import('sage.schemes.elliptic_curves.jacobian', 'Jacobian')

lazy_import('sage.schemes.elliptic_curves.ell_finite_field', 'special_supersingular_curve')

lazy_import('sage.schemes.elliptic_curves.ell_rational_field',
['cremona_curves', 'cremona_optimal_curves'])

Expand All @@ -40,5 +42,7 @@

from sage.schemes.elliptic_curves.ell_curve_isogeny import EllipticCurveIsogeny, isogeny_codomain_from_kernel

lazy_import('sage.schemes.elliptic_curves.mod_poly', 'classical_modular_polynomial')

from sage.schemes.elliptic_curves.heegner import heegner_points, heegner_point
del lazy_import
42 changes: 0 additions & 42 deletions src/sage/schemes/hyperelliptic_curves/all.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,5 @@
"""
Tests for deprecations of imports in global namespace from :trac:`28064`::
sage: igusa_clebsch_invariants
doctest:warning...:
DeprecationWarning:
Importing igusa_clebsch_invariants from here is deprecated;
please use "from sage.schemes.hyperelliptic_curves.invariants import igusa_clebsch_invariants" instead.
See https://github.com/sagemath/sage/issues/28064 for details.
...
sage: absolute_igusa_invariants_kohel
doctest:warning...:
DeprecationWarning:
Importing absolute_igusa_invariants_kohel from here is deprecated;
please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_kohel" instead.
See https://github.com/sagemath/sage/issues/28064 for details.
...
sage: absolute_igusa_invariants_wamelen
doctest:warning...:
DeprecationWarning:
Importing absolute_igusa_invariants_wamelen from here is deprecated;
please use "from sage.schemes.hyperelliptic_curves.invariants import absolute_igusa_invariants_wamelen" instead.
See https://github.com/sagemath/sage/issues/28064 for details.
...
sage: clebsch_invariants
doctest:warning...:
DeprecationWarning:
Importing clebsch_invariants from here is deprecated;
please use "from sage.schemes.hyperelliptic_curves.invariants import clebsch_invariants" instead.
See https://github.com/sagemath/sage/issues/28064 for details.
...
"""
from sage.misc.lazy_import import lazy_import

from sage.schemes.hyperelliptic_curves.constructor import HyperellipticCurve
from sage.schemes.hyperelliptic_curves.kummer_surface import KummerSurface
lazy_import('sage.schemes.hyperelliptic_curves.invariants',
['igusa_clebsch_invariants', 'absolute_igusa_invariants_kohel',
'absolute_igusa_invariants_wamelen', 'clebsch_invariants'],
deprecation=28064)
from sage.schemes.hyperelliptic_curves.mestre import (
Mestre_conic, HyperellipticCurve_from_invariants)
from sage.schemes.hyperelliptic_curves import monsky_washnitzer
del lazy_import
1 change: 1 addition & 0 deletions src/sage/stats/all.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from sage.stats.basic_stats import (mean, mode, std, variance, median, moving_average)
from sage.stats.hmm import all as hmm
import sage.stats.distributions.catalog as distributions

from sage.misc.lazy_import import lazy_import

Expand Down

0 comments on commit 2c6dd83

Please sign in to comment.