Skip to content

Commit

Permalink
Trac #16689: Remove deprecated function aliases
Browse files Browse the repository at this point in the history
Remove function aliases deprecated in
#2607, #5739, #7634, #8392, #8414, #8595, #8735, #8890, #10335, #10618,
#10859, #12667, #13243, #13508, #13550, #13605, #14143, #14319

URL: http://trac.sagemath.org/16689
Reported by: aapitzsch
Ticket author(s): André Apitzsch
Reviewer(s): Frédéric Chapoton
  • Loading branch information
Release Manager authored and vbraun committed Oct 8, 2014
2 parents 815fac6 + 6f65e4d commit f9201d7
Show file tree
Hide file tree
Showing 24 changed files with 2 additions and 140 deletions.
15 changes: 0 additions & 15 deletions src/sage/categories/modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from sage.misc.lazy_import import LazyImport
from sage.misc.cachefunc import cached_method
from sage.misc.misc import attrcall
from sage.misc.superseded import deprecated_function_alias
from sage.misc.sage_itertools import max_cmp, min_cmp
from sage.categories.category import HomCategory
from sage.categories.cartesian_product import CartesianProductsCategory
Expand Down Expand Up @@ -922,23 +921,9 @@ def map_item(self, f):
sage: a = s([2,1]) + s([1,1,1])
sage: a.map_item(f)
2*s[2, 1] + 2*s[3]
The following methods are deprecated::
sage: a.map_term(f)
doctest:...: DeprecationWarning: map_term is deprecated. Please use map_item instead.
See http://trac.sagemath.org/8890 for details.
2*s[2, 1] + 2*s[3]
sage: a.map_mc(f)
doctest:...: DeprecationWarning: map_mc is deprecated. Please use map_item instead.
See http://trac.sagemath.org/8890 for details.
2*s[2, 1] + 2*s[3]
"""
return self.parent().sum_of_terms( f(m,c) for m,c in self )

map_term = deprecated_function_alias(8890, map_item)
map_mc = deprecated_function_alias(8890, map_item)

def tensor(*elements):
"""
Return the tensor product of its arguments, as an element of
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/composition.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from sage.structure.parent import Parent
from sage.structure.element import Element
from sage.misc.classcall_metaclass import ClasscallMetaclass
from sage.misc.superseded import deprecated_function_alias
from sage.rings.all import ZZ
from combinat import CombinatorialObject
from cartesian_product import CartesianProduct
Expand Down Expand Up @@ -950,8 +949,6 @@ def refinement_splitting_lengths(self, J):
"""
return Compositions()(map(len,self.refinement_splitting(J)))

refinement = deprecated_function_alias(13243, refinement_splitting_lengths)

def major_index(self):
"""
Return the major index of ``self``. The major index is
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/crystals/alcove_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,9 +1131,6 @@ def _eps(self, root):
return 1

CrystalOfAlcovePaths.Element = CrystalOfAlcovePathsElement
#deprecate the old name
from sage.misc.superseded import deprecated_function_alias
ClassicalCrystalOfAlcovePaths = deprecated_function_alias(14143, CrystalOfAlcovePaths)

class RootsWithHeight(UniqueRepresentation, Parent):
r"""
Expand Down
8 changes: 0 additions & 8 deletions src/sage/combinat/dyck_word.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,8 +946,6 @@ def number_of_open_symbols(self):
"""
return len([x for x in self if x == open_symbol])

size = deprecated_function_alias(13550, number_of_open_symbols)

def number_of_close_symbols(self):
r"""
Return the number of close symbols in ``self``.
Expand Down Expand Up @@ -1353,8 +1351,6 @@ def returns_to_zero(self):
h = self.heights()
return [i for i in xrange(2, len(h), 2) if h[i] == 0]

return_to_zero = deprecated_function_alias(13550, returns_to_zero)

def touch_points(self):
r"""
Return the abscissae (or, equivalently, ordinates) of the
Expand Down Expand Up @@ -2877,8 +2873,6 @@ def area(self):
a += above - diagonal
return a

a_statistic = deprecated_function_alias(13550, area)

def bounce_path(self):
r"""
Return the bounce path of ``self`` formed by starting at `(n,n)` and
Expand Down Expand Up @@ -3016,8 +3010,6 @@ def bounce(self):

return b

b_statistic = deprecated_function_alias(13550, bounce)

def dinv(self, labeling=None):
r"""
Return the dinv statistic of ``self`` due to M. Haiman, see [Hag2008]_.
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -4558,9 +4558,6 @@ def outline(self, variable=var("x")):
return sum(abs(variable+c) for c in outside_contents)\
-sum(abs(variable+c) for c in inside_contents)

from sage.misc.superseded import deprecated_function_alias
Partition_class = deprecated_function_alias(13605, Partition)

##############
# Partitions #
##############
Expand Down
7 changes: 0 additions & 7 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
:meth:`from_cycles` | Returns the permutation with given disjoint-cycle representation ``cycles``.
:meth:`from_lehmer_code` | Returns the permutation with Lehmer code ``lehmer``.
:meth:`from_reduced_word` | Returns the permutation corresponding to the reduced word ``rw``.
:meth:`robinson_schensted_inverse` | Returns the permutation corresponding to the pair of tableaux `(p,q)`.
:meth:`bistochastic_as_sum_of_permutations` | Returns a given bistochastic matrix as a nonnegative linear combination of permutations.
:meth:`descents_composition_list` | Returns a list of all the permutations in a given descent class (i. e., having a given descents composition).
:meth:`descents_composition_first` | Returns the smallest element of a descent class.
Expand Down Expand Up @@ -5865,12 +5864,6 @@ def from_reduced_word(rw):

return Permutations()(p)

from sage.misc.superseded import deprecated_function_alias

# Don't forget to remove the robinson_schensted_inverse entry in the index at
# the top of the file when this line will be removed
robinson_schensted_inverse = deprecated_function_alias(8392, RSK_inverse)

def bistochastic_as_sum_of_permutations(M, check = True):
r"""
Return the positive sum of permutations corresponding to
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/posets/posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
from sage.misc.cachefunc import cached_method
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.misc_c import prod
from sage.misc.superseded import deprecated_function_alias
from sage.categories.category import Category
from sage.categories.sets_cat import Sets
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
Expand Down Expand Up @@ -2461,8 +2460,6 @@ def cardinality(self):
"""
return Integer(self._hasse_diagram.order())

size = deprecated_function_alias(8735, cardinality)

def mobius_function(self,x,y):
r"""
Returns the value of the Mobius function of the poset on the
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/root_system/root_lattice_realizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from sage.misc.cachefunc import cached_method, cached_in_parent_method
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.lazy_import import lazy_import, LazyImport
from sage.misc.superseded import deprecated_function_alias
from sage.categories.coxeter_groups import CoxeterGroups
from sage.categories.category_types import Category_over_base_ring
from sage.categories.modules_with_basis import ModulesWithBasis
Expand Down Expand Up @@ -3368,8 +3367,6 @@ def to_dominant_chamber(self, index_set = None, positive = True, reduced_word =
direction.append(i)
self = self.simple_reflection(i)

to_positive_chamber = deprecated_function_alias(12667, to_dominant_chamber)

def reduced_word(self, index_set = None, positive = True):
r"""
Returns a reduced word for the inverse of the shortest Weyl group element that sends the vector ``self`` into the dominant chamber.
Expand Down
10 changes: 0 additions & 10 deletions src/sage/combinat/root_system/weyl_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
from sage.rings.all import ZZ, QQ
from sage.interfaces.gap import gap
from sage.misc.cachefunc import cached_method, ClearCacheOnPickle
from sage.misc.superseded import deprecated_function_alias
from sage.combinat.root_system.cartan_type import CartanType
from sage.combinat.root_system.cartan_matrix import CartanMatrix
from sage.matrix.constructor import matrix, diagonal_matrix
Expand Down Expand Up @@ -439,18 +438,9 @@ def domain(self):
sage: G = WeylGroup(['A',3,1])
sage: G.domain()
Root space over the Rational Field of the Root system of type ['A', 3, 1]
This method used to be called ``lattice``::
sage: G.lattice()
doctest:...: DeprecationWarning: lattice is deprecated. Please use domain instead.
See http://trac.sagemath.org/8414 for details.
Root space over the Rational Field of the Root system of type ['A', 3, 1]
"""
return self._domain

lattice = deprecated_function_alias(8414, domain)

def simple_reflection(self, i):
"""
Returns the `i^{th}` simple reflection.
Expand Down
8 changes: 0 additions & 8 deletions src/sage/combinat/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
from sage.categories.sets_cat import Sets
from sage.combinat.combinatorial_map import combinatorial_map
from sage.misc.superseded import deprecated_function_alias

TableauOptions=GlobalOptions(name='tableaux',
doc=r"""
Expand Down Expand Up @@ -2795,13 +2794,6 @@ def catabolism_projector(self, parts):
else:
return Tableau([])

katabolism = deprecated_function_alias(13605, catabolism)
katabolism_sequence = deprecated_function_alias(13605, catabolism_sequence)
lambda_katabolism = deprecated_function_alias(13605, lambda_catabolism)
reduced_lambda_katabolism = deprecated_function_alias(13605, reduced_lambda_catabolism)
katabolism_projector = deprecated_function_alias(13605, catabolism_projector)


def promotion_operator(self, i):
"""
EXAMPLES::
Expand Down
3 changes: 0 additions & 3 deletions src/sage/combinat/words/morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@
# http://www.gnu.org/licenses/
#*****************************************************************************
import itertools
from sage.misc.superseded import deprecated_function_alias
from sage.structure.sage_object import SageObject
from sage.misc.cachefunc import cached_method
from sage.sets.set import Set
Expand Down Expand Up @@ -1699,8 +1698,6 @@ def _fixed_point_iterator(self, letter):
next_w = next(w)
w = itertools.chain([next_w], w, self.image(next_w))

letter_iterator = deprecated_function_alias(8595, _fixed_point_iterator)

def fixed_point(self, letter):
r"""
Returns the fixed point of ``self`` beginning by the given ``letter``.
Expand Down
9 changes: 0 additions & 9 deletions src/sage/graphs/digraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
"""

from sage.rings.integer import Integer
from sage.misc.superseded import deprecated_function_alias
from sage.misc.superseded import deprecation
import sage.graphs.generic_graph_pyx as generic_graph_pyx
from sage.graphs.generic_graph import GenericGraph
Expand Down Expand Up @@ -1312,8 +1311,6 @@ def neighbor_in_iterator(self, vertex):
"""
return iter(set(self._backend.iterator_in_nbrs(vertex)))

predecessor_iterator = deprecated_function_alias(7634, neighbor_in_iterator)

def neighbors_in(self, vertex):
"""
Returns the list of the in-neighbors of a given vertex.
Expand All @@ -1328,8 +1325,6 @@ def neighbors_in(self, vertex):
"""
return list(self.neighbor_in_iterator(vertex))

predecessors = deprecated_function_alias(7634, neighbors_in)

def neighbor_out_iterator(self, vertex):
"""
Returns an iterator over the out-neighbors of a given vertex.
Expand All @@ -1347,8 +1342,6 @@ def neighbor_out_iterator(self, vertex):
"""
return iter(set(self._backend.iterator_out_nbrs(vertex)))

successor_iterator = deprecated_function_alias(7634, neighbor_out_iterator)

def neighbors_out(self, vertex):
"""
Returns the list of the out-neighbors of a given vertex.
Expand All @@ -1363,8 +1356,6 @@ def neighbors_out(self, vertex):
"""
return list(self.neighbor_out_iterator(vertex))

successors = deprecated_function_alias(7634, neighbors_out)

### Degree functions

def in_degree(self, vertices=None, labels=False):
Expand Down
5 changes: 1 addition & 4 deletions src/sage/graphs/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,14 +529,13 @@
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.integer import Integer
from sage.rings.integer_ring import ZZ
from sage.misc.superseded import deprecated_function_alias
from sage.misc.superseded import deprecation
import sage.graphs.generic_graph_pyx as generic_graph_pyx
from sage.graphs.generic_graph import GenericGraph
from sage.graphs.digraph import DiGraph
from sage.graphs.independent_sets import IndependentSets
from sage.combinat.combinatorial_map import combinatorial_map


class Graph(GenericGraph):
r"""
Undirected graph.
Expand Down Expand Up @@ -5286,8 +5285,6 @@ def cliques_maximal(self, algorithm = "native"):
else:
raise ValueError("Algorithm must be equal to 'native' or to 'NetworkX'.")

cliques = deprecated_function_alias(5739, cliques_maximal)

def clique_maximum(self, algorithm="Cliquer"):
"""
Returns the vertex set of a maximal order complete subgraph.
Expand Down
3 changes: 0 additions & 3 deletions src/sage/groups/perm_gps/permgroup_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ from sage.interfaces.gap import is_GapElement
from sage.interfaces.expect import is_ExpectElement
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
import sage.structure.coerce as coerce
from sage.misc.superseded import deprecated_function_alias

import operator

Expand Down Expand Up @@ -935,8 +934,6 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement):
from sage.combinat.permutation import Permutation
return Permutation(self._gap_list()).cycle_string()

list = deprecated_function_alias(14319, domain)

cpdef domain(self):
"""
Returns the domain of self.
Expand Down
3 changes: 0 additions & 3 deletions src/sage/groups/perm_gps/permgroup_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
from sage.groups.abelian_gps.abelian_group import AbelianGroup
from sage.misc.functional import is_even
from sage.misc.cachefunc import cached_method, weak_cached_function
from sage.misc.superseded import deprecated_function_alias
from sage.groups.perm_gps.permgroup import PermutationGroup_generic
from sage.groups.perm_gps.permgroup_element import PermutationGroupElement
from sage.structure.unique_representation import CachedRepresentation
Expand Down Expand Up @@ -203,8 +202,6 @@ def __classcall__(cls, domain):

return super(PermutationGroup_symalt, cls).__classcall__(cls, domain=v)

set = deprecated_function_alias(10335, PermutationGroup_generic.domain)


class SymmetricGroup(PermutationGroup_symalt):
def __init__(self, domain=None):
Expand Down
35 changes: 0 additions & 35 deletions src/sage/misc/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1586,25 +1586,6 @@ def mathjax_avoid_list(self, L=None):
else:
_Latex_prefs._option['mathjax_avoid'] = L

# Couldn't use deprecated_function_alias for this because of circular imports.
def jsmath_avoid_list(self, L=None):
"""
Deprecated. Use :meth:`mathjax_avoid_list` instead.
EXAMPLES::
sage: latex.jsmath_avoid_list()
doctest:...: DeprecationWarning: Use mathjax_avoid_list instead.
See http://trac.sagemath.org/13508 for details.
[]
"""
from superseded import deprecation
deprecation(13508, 'Use mathjax_avoid_list instead.')
if L is None:
return _Latex_prefs._option['mathjax_avoid']
else:
_Latex_prefs._option['mathjax_avoid'] = L

def add_to_mathjax_avoid_list(self, s):
r"""nodetex
Add to the list of strings which signal that MathJax should not
Expand Down Expand Up @@ -1633,22 +1614,6 @@ def add_to_mathjax_avoid_list(self, s):
if s not in current:
_Latex_prefs._option['mathjax_avoid'].append(s)

# Couldn't use deprecated_function_alias for this because of circular imports.
def add_to_jsmath_avoid_list(self, s):
"""
Deprecated. Use :meth:`add_to_mathjax_avoid_list` instead.
EXAMPLES::
sage: latex.add_to_jsmath_avoid_list('\\text')
doctest:...: DeprecationWarning: Use add_to_mathjax_avoid_list instead.
See http://trac.sagemath.org/13508 for details.
sage: latex.mathjax_avoid_list([]) # reset list to default
"""
from superseded import deprecation
deprecation(13508, 'Use add_to_mathjax_avoid_list instead.')
self.add_to_mathjax_avoid_list(s)

def engine(self, e = None):
r"""
Set Sage to use ``e`` as latex engine when typesetting with
Expand Down
3 changes: 0 additions & 3 deletions src/sage/misc/latex_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ def convert_latex_macro_to_mathjax(macro):
else:
return name + ': ["' + defn + '",' + str(num_args) + ']'

from superseded import deprecated_function_alias
convert_latex_macro_to_jsmath = deprecated_function_alias(13508, convert_latex_macro_to_mathjax)

# To add a new macro for use in the Sage documentation, add a list or
# tuple to the following list. Each list (or tuple) should have the
# form [name, arguments], which will be passed to the function
Expand Down
2 changes: 0 additions & 2 deletions src/sage/numerical/all.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from optimize import (find_fit,
find_local_maximum,
find_local_minimum,
find_maximum_on_interval,
find_minimum_on_interval,
find_root,
linear_program,
minimize,
Expand Down
Loading

0 comments on commit f9201d7

Please sign in to comment.