Skip to content

Commit 805c152

Browse files
author
Release Manager
committed
gh-37342: remove some old deprecations in functional.py remove functions deprecated in late 2021 in #32347 ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: #37342 Reported by: Frédéric Chapoton Reviewer(s): grhkm21
2 parents a451b65 + b0037ce commit 805c152

File tree

2 files changed

+3
-63
lines changed

2 files changed

+3
-63
lines changed

src/sage/misc/all.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@
8585
integral_closure,
8686
interval,
8787
xinterval,
88-
is_commutative,
8988
is_even,
90-
is_integrally_closed,
91-
is_field,
9289
is_odd,
9390
kernel,
9491
krull_dimension,

src/sage/misc/functional.py

Lines changed: 3 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import math
2424

2525
from sage.misc.lazy_import import lazy_import
26-
from sage.misc.superseded import deprecation
2726

2827
lazy_import('sage.rings.complex_double', 'CDF')
2928
lazy_import('sage.rings.real_double', ['RDF', 'RealDoubleElement'])
@@ -589,11 +588,10 @@ def symbolic_sum(expression, *args, **kwds):
589588
"""
590589
if hasattr(expression, 'sum'):
591590
return expression.sum(*args, **kwds)
592-
elif max(len(args),len(kwds)) <= 1:
591+
if max(len(args), len(kwds)) <= 1:
593592
return sum(expression, *args, **kwds)
594-
else:
595-
from sage.symbolic.ring import SR
596-
return SR(expression).sum(*args, **kwds)
593+
from sage.symbolic.ring import SR
594+
return SR(expression).sum(*args, **kwds)
597595

598596

599597
def symbolic_prod(expression, *args, **kwds):
@@ -848,22 +846,6 @@ def xinterval(a, b):
848846
return range(a, b + 1)
849847

850848

851-
def is_commutative(x):
852-
"""
853-
Return whether or not ``x`` is commutative.
854-
855-
EXAMPLES::
856-
857-
sage: R = PolynomialRing(QQ, 'x')
858-
sage: is_commutative(R)
859-
doctest:...DeprecationWarning: use X.is_commutative() or X in Rings().Commutative()
860-
See https://github.com/sagemath/sage/issues/32347 for details.
861-
True
862-
"""
863-
deprecation(32347, "use X.is_commutative() or X in Rings().Commutative()")
864-
return x.is_commutative()
865-
866-
867849
def is_even(x):
868850
"""
869851
Return whether or not an integer ``x`` is even, e.g., divisible by 2.
@@ -883,45 +865,6 @@ def is_even(x):
883865
return x % 2 == 0
884866

885867

886-
def is_integrally_closed(x):
887-
"""
888-
Return whether ``x`` is integrally closed.
889-
890-
EXAMPLES::
891-
892-
sage: is_integrally_closed(QQ)
893-
doctest:...DeprecationWarning: use X.is_integrally_closed()
894-
See https://github.com/sagemath/sage/issues/32347 for details.
895-
True
896-
sage: x = polygen(ZZ, 'x')
897-
sage: K.<a> = NumberField(x^2 + 189*x + 394) # needs sage.rings.number_field
898-
sage: R = K.order(2*a) # needs sage.rings.number_field
899-
sage: is_integrally_closed(R) # needs sage.rings.number_field
900-
False
901-
"""
902-
deprecation(32347, "use X.is_integrally_closed()")
903-
return x.is_integrally_closed()
904-
905-
906-
def is_field(x, proof=True):
907-
"""
908-
Return whether or not ``x`` is a field.
909-
910-
Alternatively, one can use ``x in Fields()``.
911-
912-
EXAMPLES::
913-
914-
sage: R = PolynomialRing(QQ, 'x')
915-
sage: F = FractionField(R)
916-
sage: is_field(F)
917-
doctest:...DeprecationWarning: use X.is_field() or X in Fields()
918-
See https://github.com/sagemath/sage/issues/32347 for details.
919-
True
920-
"""
921-
deprecation(32347, "use X.is_field() or X in Fields()")
922-
return x.is_field(proof=proof)
923-
924-
925868
def is_odd(x):
926869
"""
927870
Return whether or not ``x`` is odd.

0 commit comments

Comments
 (0)