Skip to content

Commit fa188af

Browse files
author
Release Manager
committed
gh-40659: remove 2 deprecated functions in symbolic/ as deprecated in #35505 ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: #40659 Reported by: Frédéric Chapoton Reviewer(s): David Coudert
2 parents c26f608 + 7a02f52 commit fa188af

File tree

2 files changed

+1
-77
lines changed

2 files changed

+1
-77
lines changed

src/sage/symbolic/expression.pyx

Lines changed: 1 addition & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -408,76 +408,6 @@ include "pynac_impl.pxi"
408408
from sage.symbolic.symbols import symbol_table, register_symbol # used to be defined in pynac_impl
409409

410410

411-
cpdef bint is_SymbolicEquation(x) noexcept:
412-
"""
413-
Return ``True`` if ``x`` is a symbolic equation.
414-
415-
This function is deprecated.
416-
417-
EXAMPLES:
418-
419-
The following two examples are symbolic equations::
420-
421-
sage: from sage.symbolic.expression import is_SymbolicEquation
422-
sage: is_SymbolicEquation(sin(x) == x)
423-
doctest:warning...
424-
DeprecationWarning: is_SymbolicEquation is deprecated; use
425-
'isinstance(x, sage.structure.element.Expression) and x.is_relational()' instead
426-
See https://github.com/sagemath/sage/issues/35505 for details.
427-
True
428-
sage: is_SymbolicEquation(sin(x) < x)
429-
True
430-
sage: is_SymbolicEquation(x)
431-
False
432-
433-
This is not, since ``2==3`` evaluates to the boolean
434-
``False``::
435-
436-
sage: is_SymbolicEquation(2 == 3)
437-
False
438-
439-
However here since both 2 and 3 are coerced to be symbolic, we
440-
obtain a symbolic equation::
441-
442-
sage: is_SymbolicEquation(SR(2) == SR(3))
443-
True
444-
"""
445-
from sage.misc.superseded import deprecation
446-
deprecation(35505,
447-
"is_SymbolicEquation is deprecated; use "
448-
"'isinstance(x, sage.structure.element.Expression) and x.is_relational()' instead")
449-
return isinstance(x, Expression) and is_a_relational((<Expression>x)._gobj)
450-
451-
452-
# Defined here but exported by sage.symbolic.ring
453-
cpdef bint _is_SymbolicVariable(x) noexcept:
454-
"""
455-
Return ``True`` if ``x`` is a variable.
456-
457-
EXAMPLES::
458-
459-
sage: from sage.symbolic.ring import is_SymbolicVariable
460-
sage: is_SymbolicVariable(x)
461-
doctest:warning...
462-
DeprecationWarning: is_SymbolicVariable is deprecated; use
463-
'isinstance(x, sage.structure.element.Expression) and x.is_symbol()' instead
464-
See https://github.com/sagemath/sage/issues/35505 for details.
465-
True
466-
sage: is_SymbolicVariable(x + 2)
467-
False
468-
469-
TESTS::
470-
471-
sage: ZZ['x']
472-
Univariate Polynomial Ring in x over Integer Ring
473-
"""
474-
from sage.misc.superseded import deprecation
475-
deprecation(35505,
476-
"is_SymbolicVariable is deprecated; use "
477-
"'isinstance(x, sage.structure.element.Expression) and x.is_symbol()' instead")
478-
return isinstance(x, Expression) and is_a_symbol((<Expression>x)._gobj)
479-
480-
481411
def _dict_update_check_duplicate(dict d1, dict d2):
482412
r"""
483413
Merge the dictionary ``d2`` into ``d1`` and check for duplicates.
@@ -4540,7 +4470,7 @@ cdef class Expression(Expression_abc):
45404470
sage: f.derivative(2)
45414471
x |--> 6*x - sin(x)
45424472
4543-
Some expressions can't be cleanly differentiated by the
4473+
Some expressions cannot be cleanly differentiated by the
45444474
chain rule::
45454475
45464476
sage: _ = var('x', domain='real')

src/sage/symbolic/ring.pyx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ from sage.structure.coerce cimport is_numpy_type
5252
import sage.rings.abc
5353
from sage.rings.integer_ring import ZZ
5454

55-
# is_SymbolicVariable used to be defined here; re-export it here lazily
56-
cpdef bint is_SymbolicVariable(x):
57-
from sage.symbolic.expression import _is_SymbolicVariable
58-
59-
return _is_SymbolicVariable(x)
60-
6155
import keyword
6256
import operator
6357

0 commit comments

Comments
 (0)