Skip to content

Commit 9ea5127

Browse files
author
Release Manager
committed
gh-36307: `sage.rings`: Remove code deprecated in #23204, #24483, #24371, #24511, #25848, #26105, #28481, #29010, #29412, #30332, #30372, #31345, #32375, #32606, #32610, #32612, #32641, #32660, #32750, #32869, #33602 <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36307 Reported by: Matthias Köppe Reviewer(s):
2 parents fb84666 + 5cecd1c commit 9ea5127

25 files changed

+51
-789
lines changed

src/sage/rings/all.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
"""
22
Rings
3-
4-
Tests for deprecations of imports in global namespace from :trac:`33602`::
5-
6-
sage: PowerSeries
7-
doctest:warning...:
8-
DeprecationWarning:
9-
Importing PowerSeries from here is deprecated;
10-
please use "from sage.rings.power_series_ring_element import PowerSeries" instead.
11-
See https://github.com/sagemath/sage/issues/33602 for details.
12-
...
13-
sage: PuiseuxSeries
14-
doctest:warning...:
15-
DeprecationWarning:
16-
Importing PuiseuxSeries from here is deprecated;
17-
please use "from sage.rings.puiseux_series_ring_element import PuiseuxSeries" instead.
18-
See https://github.com/sagemath/sage/issues/33602 for details.
19-
...
20-
sage: LaurentSeries
21-
doctest:warning...:
22-
DeprecationWarning:
23-
Importing LaurentSeries from here is deprecated;
24-
please use "from sage.rings.laurent_series_ring_element import LaurentSeries" instead.
25-
See https://github.com/sagemath/sage/issues/33602 for details.
26-
...
273
"""
284
# ****************************************************************************
295
# Copyright (C) 2005 William Stein <[email protected]>
@@ -139,11 +115,9 @@
139115

140116
# Power series rings
141117
from .power_series_ring import PowerSeriesRing
142-
lazy_import('sage.rings.power_series_ring_element', 'PowerSeries', deprecation=33602)
143118

144119
# Laurent series ring in one variable
145120
from .laurent_series_ring import LaurentSeriesRing
146-
lazy_import('sage.rings.laurent_series_ring_element', 'LaurentSeries', deprecation=33602)
147121

148122
# Lazy Laurent series ring
149123
lazy_import('sage.rings.lazy_series_ring', ['LazyLaurentSeriesRing', 'LazyPowerSeriesRing',
@@ -154,7 +128,6 @@
154128

155129
# Puiseux series ring
156130
from .puiseux_series_ring import PuiseuxSeriesRing
157-
lazy_import('sage.rings.puiseux_series_ring_element', 'PuiseuxSeries', deprecation=33602)
158131

159132
# Pseudo-ring of PARI objects.
160133
from .pari_ring import PariRing, Pari

src/sage/rings/complex_arb.pyx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ from sage.structure.unique_representation import UniqueRepresentation
191191
from sage.arith.long cimport is_small_python_int
192192

193193
from sage.misc.lazy_string import lazy_string
194-
from sage.misc.superseded import deprecated_function_alias
195194
from sage.rings.complex_interval_field import ComplexIntervalField, ComplexIntervalField_class
196195
from sage.rings.integer_ring import ZZ
197196

197+
198198
cdef void ComplexIntervalFieldElement_to_acb(
199199
acb_t target,
200200
ComplexIntervalFieldElement source):
@@ -4229,8 +4229,6 @@ cdef class ComplexBall(RingElement):
42294229
if _do_sig(prec(self)): sig_off()
42304230
return result
42314231

4232-
ei = deprecated_function_alias(32869, Ei)
4233-
42344232
def Si(self):
42354233
"""
42364234
Return the sine integral with argument ``self``.
@@ -4255,8 +4253,6 @@ cdef class ComplexBall(RingElement):
42554253

42564254
sin_integral = Si # as for the symbolic function
42574255

4258-
si = deprecated_function_alias(32869, Si)
4259-
42604256
def Ci(self):
42614257
"""
42624258
Return the cosine integral with argument ``self``.
@@ -4281,8 +4277,6 @@ cdef class ComplexBall(RingElement):
42814277

42824278
cos_integral = Ci # as for the symbolic function
42834279

4284-
ci = deprecated_function_alias(32869, Ci)
4285-
42864280
def Shi(self):
42874281
"""
42884282
Return the hyperbolic sine integral with argument ``self``.
@@ -4307,8 +4301,6 @@ cdef class ComplexBall(RingElement):
43074301

43084302
sinh_integral = Shi
43094303

4310-
shi = deprecated_function_alias(32869, Shi)
4311-
43124304
def Chi(self):
43134305
"""
43144306
Return the hyperbolic cosine integral with argument ``self``.
@@ -4333,8 +4325,6 @@ cdef class ComplexBall(RingElement):
43334325

43344326
cosh_integral = Chi
43354327

4336-
chi = deprecated_function_alias(32869, Chi)
4337-
43384328
def li(self, bint offset=False):
43394329
"""
43404330
Return the logarithmic integral with argument ``self``.

src/sage/rings/complex_double.pyx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -116,30 +116,6 @@ cimport gmpy2
116116
gmpy2.import_gmpy2()
117117

118118

119-
def is_ComplexDoubleField(x):
120-
"""
121-
Return ``True`` if ``x`` is the complex double field.
122-
123-
This function is deprecated. Use :func:`isinstance` with
124-
:class:`~sage.rings.abc.ComplexDoubleField` instead.
125-
126-
EXAMPLES::
127-
128-
sage: from sage.rings.complex_double import is_ComplexDoubleField
129-
sage: is_ComplexDoubleField(CDF)
130-
doctest:warning...
131-
DeprecationWarning: is_ComplexDoubleField is deprecated;
132-
use isinstance(..., sage.rings.abc.ComplexDoubleField) instead
133-
See https://github.com/sagemath/sage/issues/32610 for details.
134-
True
135-
sage: is_ComplexDoubleField(ComplexField(53))
136-
False
137-
"""
138-
from sage.misc.superseded import deprecation
139-
deprecation(32610, 'is_ComplexDoubleField is deprecated; use isinstance(..., sage.rings.abc.ComplexDoubleField) instead')
140-
return isinstance(x, ComplexDoubleField_class)
141-
142-
143119
cdef class ComplexDoubleField_class(sage.rings.abc.ComplexDoubleField):
144120
"""
145121
An approximation to the field of complex numbers using double

src/sage/rings/complex_field.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/sage/rings/complex_interval_field.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,27 +49,6 @@
4949
from sage.misc.cachefunc import cached_method
5050

5151

52-
def is_ComplexIntervalField(x):
53-
"""
54-
Check if ``x`` is a :class:`ComplexIntervalField`.
55-
56-
EXAMPLES::
57-
58-
sage: from sage.rings.complex_interval_field import is_ComplexIntervalField as is_CIF
59-
sage: is_CIF(CIF)
60-
doctest:warning...
61-
DeprecationWarning: is_ComplexIntervalField is deprecated;
62-
use isinstance(..., sage.rings.abc.ComplexIntervalField) instead
63-
See https://github.com/sagemath/sage/issues/32612 for details.
64-
True
65-
sage: is_CIF(CC)
66-
False
67-
"""
68-
from sage.misc.superseded import deprecation
69-
deprecation(32612, 'is_ComplexIntervalField is deprecated; use isinstance(..., sage.rings.abc.ComplexIntervalField) instead')
70-
return isinstance(x, ComplexIntervalField_class)
71-
72-
7352
cache = {}
7453
def ComplexIntervalField(prec=53, names=None):
7554
"""

src/sage/rings/complex_mpc.pyx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ from .real_mpfr import mpfr_prec_min, mpfr_prec_max
8484
from sage.structure.richcmp cimport rich_to_bool, richcmp
8585
from sage.categories.fields import Fields
8686

87-
from sage.misc.superseded import deprecated_function_alias
88-
8987
cimport gmpy2
9088
gmpy2.import_gmpy2()
9189

@@ -1949,8 +1947,6 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
19491947
"""
19501948
return ~(self.tan())
19511949

1952-
cotan = deprecated_function_alias(29412, cot)
1953-
19541950
################################
19551951
# Other functions
19561952
################################

src/sage/rings/complex_mpfr.pyx

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ from sage.libs.gsl.complex cimport *
5656
from sage.libs.mpmath.utils cimport mpfr_to_mpfval
5757
from sage.rings.integer_ring import ZZ
5858

59-
from sage.misc.superseded import deprecated_function_alias
60-
6159
cimport gmpy2
6260
gmpy2.import_gmpy2()
6361

@@ -157,32 +155,6 @@ def is_ComplexNumber(x):
157155
return isinstance(x, ComplexNumber)
158156

159157

160-
def is_ComplexField(x):
161-
"""
162-
Check if ``x`` is a :class:`complex field <ComplexField_class>`.
163-
164-
This function is deprecated. Use :func:`isinstance` with
165-
:class:`~sage.rings.abc.ComplexField` instead.
166-
167-
EXAMPLES::
168-
169-
sage: from sage.rings.complex_mpfr import is_ComplexField as is_CF
170-
sage: is_CF(ComplexField())
171-
doctest:warning...
172-
DeprecationWarning: is_ComplexField is deprecated;
173-
use isinstance(..., sage.rings.abc.ComplexField) instead
174-
See https://github.com/sagemath/sage/issues/32610 for details.
175-
True
176-
sage: is_CF(ComplexField(12))
177-
True
178-
sage: is_CF(CC)
179-
True
180-
"""
181-
from sage.misc.superseded import deprecation
182-
deprecation(32610, 'is_ComplexField is deprecated; use isinstance(..., sage.rings.abc.ComplexField) instead')
183-
return isinstance(x, ComplexField_class)
184-
185-
186158
cache = {}
187159
def ComplexField(prec=53, names=None):
188160
"""
@@ -2267,8 +2239,6 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
22672239
"""
22682240
return ~(self.tan())
22692241

2270-
cotan = deprecated_function_alias(29412, cot)
2271-
22722242
def cos(self):
22732243
"""
22742244
Return the cosine of ``self``.

src/sage/rings/complex_number.pyx

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/sage/rings/finite_rings/finite_field_base.pyx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,7 +1173,7 @@ cdef class FiniteField(Field):
11731173
else:
11741174
return PolynomialRing(GF(self.characteristic()), variable_name)
11751175

1176-
def free_module(self, base=None, basis=None, map=None, subfield=None):
1176+
def free_module(self, base=None, basis=None, map=True):
11771177
"""
11781178
Return the vector space over the subfield isomorphic to this
11791179
finite field as a vector space, along with the isomorphisms.
@@ -1253,15 +1253,6 @@ cdef class FiniteField(Field):
12531253
sage: all(to_V(h(c) * e) == c * to_V(e) for e in E for c in F)
12541254
True
12551255
"""
1256-
if subfield is not None:
1257-
if base is not None:
1258-
raise ValueError
1259-
deprecation(28481, "The subfield keyword argument has been renamed to base")
1260-
base = subfield
1261-
if map is None:
1262-
deprecation(28481, "The default value for map will be changing to True. To keep the current behavior, explicitly pass map=False.")
1263-
map = False
1264-
12651256
if base is None and self.__vector_space is not None and not map:
12661257
# A very common case: return as early as possible.
12671258
return self.__vector_space

src/sage/rings/finite_rings/integer_mod.pyx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ cdef class IntegerMod_abstract(FiniteRingElement):
629629
else:
630630
return sib(self.parent())(v)
631631

632-
def log(self, b=None, logarithm_exists=None):
632+
def log(self, b=None):
633633
r"""
634634
Compute the discrete logarithm of this element to base `b`,
635635
that is,
@@ -759,11 +759,6 @@ cdef class IntegerMod_abstract(FiniteRingElement):
759759
760760
- Lorenz Panny (2021): speedups for composite moduli
761761
"""
762-
763-
if logarithm_exists is not None:
764-
from sage.misc.superseded import deprecation
765-
deprecation(32375, 'The "logarithm_exists" argument to .log() is no longer necessary and will be removed at some point.')
766-
767762
if not self.is_unit():
768763
raise ValueError(f"logarithm of {self} is not defined since it is not a unit modulo {self.modulus()}")
769764

0 commit comments

Comments
 (0)