Skip to content

Commit 8b627bc

Browse files
committed
remove some deprecated stuff
1 parent 2d62aa8 commit 8b627bc

File tree

8 files changed

+4
-270
lines changed

8 files changed

+4
-270
lines changed

src/sage/groups/perm_gps/permgroup_element.pyx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -202,28 +202,6 @@ def make_permgroup_element_v2(G, x, domain):
202202
return G.element_class(x, G, check=False)
203203

204204

205-
def is_PermutationGroupElement(x):
206-
r"""
207-
Return ``True`` if ``x`` is a :class:`PermutationGroupElement`.
208-
209-
EXAMPLES::
210-
211-
sage: p = PermutationGroupElement([(1,2),(3,4,5)])
212-
sage: from sage.groups.perm_gps.permgroup_element import is_PermutationGroupElement
213-
sage: is_PermutationGroupElement(p)
214-
doctest:warning...
215-
DeprecationWarning: The function is_PermutationGroupElement is deprecated;
216-
use 'isinstance(..., PermutationGroupElement)' instead.
217-
See https://github.com/sagemath/sage/issues/38184 for details.
218-
True
219-
"""
220-
from sage.misc.superseded import deprecation_cython
221-
deprecation_cython(38184,
222-
"The function is_PermutationGroupElement is deprecated; "
223-
"use 'isinstance(..., PermutationGroupElement)' instead.")
224-
return isinstance(x, PermutationGroupElement)
225-
226-
227205
cdef class PermutationGroupElement(MultiplicativeGroupElement):
228206
r"""
229207
An element of a permutation group.

src/sage/modules/free_module_element.pyx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -135,26 +135,6 @@ __one__ = smallInteger(1)
135135
__two__ = smallInteger(2)
136136

137137

138-
def is_FreeModuleElement(x):
139-
"""
140-
EXAMPLES::
141-
142-
sage: sage.modules.free_module_element.is_FreeModuleElement(0)
143-
doctest:warning...
144-
DeprecationWarning: The function is_FreeModuleElement is deprecated;
145-
use 'isinstance(..., FreeModuleElement)' instead.
146-
See https://github.com/sagemath/sage/issues/38184 for details.
147-
False
148-
sage: sage.modules.free_module_element.is_FreeModuleElement(vector([1,2,3]))
149-
True
150-
"""
151-
from sage.misc.superseded import deprecation_cython
152-
deprecation_cython(38184,
153-
"The function is_FreeModuleElement is deprecated; "
154-
"use 'isinstance(..., FreeModuleElement)' instead.")
155-
return isinstance(x, FreeModuleElement)
156-
157-
158138
def vector(arg0, arg1=None, arg2=None, sparse=None, immutable=False):
159139
r"""
160140
Return a vector or free module element with specified entries.

src/sage/monoids/free_abelian_monoid_element.pyx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,6 @@ from sage.rings.integer cimport Integer, _Integer_from_mpz
4141
from sage.libs.gmp.mpz cimport *
4242

4343

44-
def is_FreeAbelianMonoidElement(x):
45-
r"""
46-
Queries whether ``x`` is an object of type ``FreeAbelianMonoidElement``.
47-
48-
INPUT:
49-
50-
- ``x`` -- an object
51-
52-
OUTPUT:
53-
54-
- ``True`` if ``x`` is an object of type ``FreeAbelianMonoidElement``;
55-
``False`` otherwise.
56-
"""
57-
from sage.misc.superseded import deprecation_cython
58-
deprecation_cython(38184,
59-
"The function is_FreeAbelianMonoidElement is deprecated; "
60-
"use 'isinstance(..., FreeAbelianMonoidElement)' instead.")
61-
return isinstance(x, FreeAbelianMonoidElement)
62-
63-
6444
cdef class FreeAbelianMonoidElement(MonoidElement):
6545
cdef int _init(self, Py_ssize_t n, Parent parent) except -1:
6646
"""

src/sage/numerical/linear_functions.pyx

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -109,74 +109,6 @@ from sage.structure.element cimport ModuleElement, Element
109109
from sage.misc.cachefunc import cached_function
110110
from sage.misc.superseded import deprecated_function_alias
111111

112-
#*****************************************************************************
113-
#
114-
# Utility functions to test that something is a linear function / constraint
115-
#
116-
#*****************************************************************************
117-
118-
cpdef is_LinearFunction(x):
119-
"""
120-
Test whether ``x`` is a linear function.
121-
122-
INPUT:
123-
124-
- ``x`` -- anything
125-
126-
OUTPUT: boolean
127-
128-
EXAMPLES::
129-
130-
sage: p = MixedIntegerLinearProgram()
131-
sage: x = p.new_variable()
132-
sage: from sage.numerical.linear_functions import is_LinearFunction
133-
sage: is_LinearFunction(x[0] - 2*x[2])
134-
doctest:warning...
135-
DeprecationWarning: The function is_LinearFunction is deprecated;
136-
use 'isinstance(..., LinearFunction)' instead.
137-
See https://github.com/sagemath/sage/issues/38184 for details.
138-
True
139-
sage: is_LinearFunction('a string')
140-
False
141-
"""
142-
from sage.misc.superseded import deprecation_cython
143-
deprecation_cython(38184,
144-
"The function is_LinearFunction is deprecated; "
145-
"use 'isinstance(..., LinearFunction)' instead.")
146-
return isinstance(x, LinearFunction)
147-
148-
149-
def is_LinearConstraint(x):
150-
"""
151-
Test whether ``x`` is a linear constraint.
152-
153-
INPUT:
154-
155-
- ``x`` -- anything
156-
157-
OUTPUT: boolean
158-
159-
EXAMPLES::
160-
161-
sage: p = MixedIntegerLinearProgram()
162-
sage: x = p.new_variable()
163-
sage: ieq = (x[0] <= x[1])
164-
sage: from sage.numerical.linear_functions import is_LinearConstraint
165-
sage: is_LinearConstraint(ieq)
166-
doctest:warning...
167-
DeprecationWarning: The function is_LinearConstraint is deprecated;
168-
use 'isinstance(..., LinearConstraint)' instead.
169-
See https://github.com/sagemath/sage/issues/38184 for details.
170-
True
171-
sage: is_LinearConstraint('a string')
172-
False
173-
"""
174-
from sage.misc.superseded import deprecation_cython
175-
deprecation_cython(38184,
176-
"The function is_LinearConstraint is deprecated; "
177-
"use 'isinstance(..., LinearConstraint)' instead.")
178-
return isinstance(x, LinearConstraint)
179-
180112

181113
# ****************************************************************************
182114
#

src/sage/numerical/linear_tensor.py

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -102,50 +102,11 @@
102102
from sage.numerical.linear_functions import LinearFunction, LinearFunctionsParent_class
103103
from sage.numerical.linear_tensor_element import LinearTensor
104104

105-
106-
#*****************************************************************************
107-
#
108-
# Utility functions to test that something is a linear function / constraint
109-
#
110-
#*****************************************************************************
111-
112-
def is_LinearTensor(x):
113-
"""
114-
Test whether ``x`` is a tensor product of linear functions with a
115-
free module.
116-
117-
INPUT:
118-
119-
- ``x`` -- anything
120-
121-
OUTPUT: boolean
122-
123-
EXAMPLES::
124-
125-
sage: p = MixedIntegerLinearProgram()
126-
sage: x = p.new_variable(nonnegative=False)
127-
sage: from sage.numerical.linear_tensor import is_LinearTensor
128-
sage: is_LinearTensor(x[0] - 2*x[2])
129-
doctest:warning...
130-
DeprecationWarning: The function is_LinearTensor is deprecated;
131-
use 'isinstance(..., LinearTensor)' instead.
132-
See https://github.com/sagemath/sage/issues/38184 for details.
133-
False
134-
sage: is_LinearTensor('a string')
135-
False
136-
"""
137-
from sage.misc.superseded import deprecation
138-
deprecation(38184,
139-
"The function is_LinearTensor is deprecated; "
140-
"use 'isinstance(..., LinearTensor)' instead.")
141-
return isinstance(x, LinearTensor)
142-
143-
144-
#*****************************************************************************
105+
# ***************************************************************************
145106
#
146107
# Factory functions for the parents to ensure uniqueness
147108
#
148-
#*****************************************************************************
109+
# ***************************************************************************
149110

150111
@cached_function
151112
def LinearTensorParent(free_module_parent, linear_functions_parent):

src/sage/numerical/linear_tensor_constraints.py

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -33,48 +33,11 @@
3333
from sage.misc.cachefunc import cached_function
3434

3535

36-
#*****************************************************************************
37-
#
38-
# Utility functions to test that something is a linear function / constraint
39-
#
40-
#*****************************************************************************
41-
42-
def is_LinearTensorConstraint(x):
43-
"""
44-
Test whether ``x`` is a constraint on module-valued linear functions.
45-
46-
INPUT:
47-
48-
- ``x`` -- anything
49-
50-
OUTPUT: boolean
51-
52-
EXAMPLES::
53-
54-
sage: mip.<x> = MixedIntegerLinearProgram()
55-
sage: vector_ieq = (x[0] * vector([1,2]) <= x[1] * vector([2,3]))
56-
sage: from sage.numerical.linear_tensor_constraints import is_LinearTensorConstraint
57-
sage: is_LinearTensorConstraint(vector_ieq)
58-
doctest:warning...
59-
DeprecationWarning: The function is_LinearTensorConstraint is deprecated;
60-
use 'isinstance(..., LinearTensorConstraint)' instead.
61-
See https://github.com/sagemath/sage/issues/38184 for details.
62-
True
63-
sage: is_LinearTensorConstraint('a string')
64-
False
65-
"""
66-
from sage.misc.superseded import deprecation
67-
deprecation(38184,
68-
"The function is_LinearTensorConstraint is deprecated; "
69-
"use 'isinstance(..., LinearTensorConstraint)' instead.")
70-
return isinstance(x, LinearTensorConstraint)
71-
72-
73-
#*****************************************************************************
36+
# ***************************************************************************
7437
#
7538
# Factory functions for the parents to ensure uniqueness
7639
#
77-
#*****************************************************************************
40+
# ***************************************************************************
7841

7942
@cached_function
8043
def LinearTensorConstraintsParent(linear_functions_parent):

src/sage/plot/graphics.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,29 +53,6 @@
5353
do_verify = True
5454

5555

56-
def is_Graphics(x):
57-
"""
58-
Return ``True`` if `x` is a Graphics object.
59-
60-
EXAMPLES::
61-
62-
sage: from sage.plot.graphics import is_Graphics
63-
sage: is_Graphics(1)
64-
doctest:warning...
65-
DeprecationWarning: The function is_Graphics is deprecated;
66-
use 'isinstance(..., Graphics)' instead.
67-
See https://github.com/sagemath/sage/issues/38184 for details.
68-
False
69-
sage: is_Graphics(disk((0.0, 0.0), 1, (0, pi/2))) # needs sage.symbolic
70-
True
71-
"""
72-
from sage.misc.superseded import deprecation
73-
deprecation(38184,
74-
"The function is_Graphics is deprecated; "
75-
"use 'isinstance(..., Graphics)' instead.")
76-
return isinstance(x, Graphics)
77-
78-
7956
def _parse_figsize(figsize):
8057
r"""
8158
Helper function to get a figure size in matplotlib format.

src/sage/probability/random_variable.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -23,43 +23,6 @@
2323
from sage.sets.set import Set
2424
from pprint import pformat
2525

26-
################################################################################
27-
################################################################################
28-
29-
30-
def is_ProbabilitySpace(S):
31-
from sage.misc.superseded import deprecation
32-
deprecation(38184,
33-
"The function is_ProbabilitySpace is deprecated; "
34-
"use 'isinstance(..., ProbabilitySpace_generic)' instead.")
35-
return isinstance(S, ProbabilitySpace_generic)
36-
37-
38-
def is_DiscreteProbabilitySpace(S):
39-
from sage.misc.superseded import deprecation
40-
deprecation(38184,
41-
"The function is_DiscreteProbabilitySpace is deprecated; "
42-
"use 'isinstance(..., DiscreteProbabilitySpace)' instead.")
43-
return isinstance(S, DiscreteProbabilitySpace)
44-
45-
46-
def is_RandomVariable(X):
47-
from sage.misc.superseded import deprecation
48-
deprecation(38184,
49-
"The function is_RandomVariable is deprecated; "
50-
"use 'isinstance(..., RandomVariable_generic)' instead.")
51-
return isinstance(X, RandomVariable_generic)
52-
53-
54-
def is_DiscreteRandomVariable(X):
55-
from sage.misc.superseded import deprecation
56-
deprecation(38184,
57-
"The function is_DiscreteRandomVariable is deprecated; "
58-
"use 'isinstance(..., DiscreteRandomVariable)' instead.")
59-
return isinstance(X, DiscreteRandomVariable)
60-
61-
################################################################################
62-
################################################################################
6326

6427
# We could inherit from a functions class here but use Parent
6528

0 commit comments

Comments
 (0)