Skip to content

Commit 56b00fc

Browse files
author
Matthias Koeppe
committed
src/sage/rings/{{complex,real}_{double,mpfr}.pyx, qqbar.py}: Remove functions deprecated in #32610 (2021)
1 parent f0a3d1a commit 56b00fc

File tree

5 files changed

+0
-119
lines changed

5 files changed

+0
-119
lines changed

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_mpfr.pyx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -157,32 +157,6 @@ def is_ComplexNumber(x):
157157
return isinstance(x, ComplexNumber)
158158

159159

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-
186160
cache = {}
187161
def ComplexField(prec=53, names=None):
188162
"""

src/sage/rings/qqbar.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,28 +2113,6 @@ def is_AlgebraicField(F):
21132113
QQbar = AlgebraicField()
21142114

21152115

2116-
def is_AlgebraicField_common(F):
2117-
r"""
2118-
Check whether ``F`` is an :class:`~AlgebraicField_common` instance.
2119-
2120-
This function is deprecated. Use :func:`isinstance` with
2121-
:class:`~sage.rings.abc.AlgebraicField_common` instead.
2122-
2123-
EXAMPLES::
2124-
2125-
sage: from sage.rings.qqbar import is_AlgebraicField_common
2126-
sage: [is_AlgebraicField_common(x) for x in [AA, QQbar, None, 0, "spam"]]
2127-
doctest:warning...
2128-
DeprecationWarning: is_AlgebraicField_common is deprecated;
2129-
use isinstance(..., sage.rings.abc.AlgebraicField_common) instead
2130-
See https://github.com/sagemath/sage/issues/32610 for details.
2131-
[True, True, False, False, False]
2132-
"""
2133-
from sage.misc.superseded import deprecation
2134-
deprecation(32610, 'is_AlgebraicField_common is deprecated; use isinstance(..., sage.rings.abc.AlgebraicField_common) instead')
2135-
return isinstance(F, AlgebraicField_common)
2136-
2137-
21382116
def prec_seq():
21392117
r"""
21402118
Return a generator object which iterates over an infinite increasing

src/sage/rings/real_double.pyx

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,30 +68,6 @@ cimport gmpy2
6868
new_gen_from_real_double_element = None
6969

7070

71-
def is_RealDoubleField(x):
72-
"""
73-
Returns ``True`` if ``x`` is the field of real double precision numbers.
74-
75-
This function is deprecated. Use :func:`isinstance` with
76-
:class:`~sage.rings.abc.RealDoubleField` instead.
77-
78-
EXAMPLES::
79-
80-
sage: from sage.rings.real_double import is_RealDoubleField
81-
sage: is_RealDoubleField(RDF)
82-
doctest:warning...
83-
DeprecationWarning: is_RealDoubleField is deprecated;
84-
use isinstance(..., sage.rings.abc.RealDoubleField) instead
85-
See https://github.com/sagemath/sage/issues/32610 for details.
86-
True
87-
sage: is_RealDoubleField(RealField(53)) # needs sage.rings.real_mpfr
88-
False
89-
"""
90-
from sage.misc.superseded import deprecation
91-
deprecation(32610, 'is_RealDoubleField is deprecated; use isinstance(..., sage.rings.abc.RealDoubleField) instead')
92-
return isinstance(x, RealDoubleField_class)
93-
94-
9571
cdef class RealDoubleField_class(sage.rings.abc.RealDoubleField):
9672
"""
9773
An approximation to the field of real numbers using double

src/sage/rings/real_mpfr.pyx

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5912,29 +5912,6 @@ def create_RealNumber(s, int base=10, int pad=0, rnd="RNDN", int min_prec=53):
59125912
return RealLiteral(R, s, base)
59135913

59145914

5915-
def is_RealField(x):
5916-
"""
5917-
Returns ``True`` if ``x`` is technically of a Python real field type.
5918-
5919-
This function is deprecated. Use :func:`isinstance` with
5920-
:class:`~sage.rings.abc.RealField` instead.
5921-
5922-
EXAMPLES::
5923-
5924-
sage: sage.rings.real_mpfr.is_RealField(RR)
5925-
doctest:warning...
5926-
DeprecationWarning: is_RealField is deprecated;
5927-
use isinstance(..., sage.rings.abc.RealField) instead
5928-
See https://github.com/sagemath/sage/issues/32610 for details.
5929-
True
5930-
sage: sage.rings.real_mpfr.is_RealField(CC)
5931-
False
5932-
"""
5933-
from sage.misc.superseded import deprecation
5934-
deprecation(32610, 'is_RealField is deprecated; use isinstance(..., sage.rings.abc.RealField) instead')
5935-
return isinstance(x, RealField_class)
5936-
5937-
59385915
def is_RealNumber(x):
59395916
"""
59405917
Return ``True`` if ``x`` is of type :class:`RealNumber`, meaning that it

0 commit comments

Comments
 (0)