Skip to content

Commit 71ce9aa

Browse files
author
Release Manager
committed
gh-40774: fix script and remove deprecated stuff fix the script used to find deprecation ; remove deprecated things in File: src/sage/combinat/binary_tree.py ; PR: #36394 ; Closed Date: 2023-10-14 File: src/sage/categories/metric_spaces.py ; PR: #30062 ; Closed Date: 2020-08-02 ### 📝 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: #40774 Reported by: Frédéric Chapoton Reviewer(s): Tobias Diez
2 parents 92be1f9 + 1803d51 commit 71ce9aa

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

src/sage/categories/metric_spaces.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
r"""
33
Metric Spaces
44
"""
5-
#*****************************************************************************
5+
# ***************************************************************************
66
# Copyright (C) 2015 Travis Scrimshaw <tscrim at ucdavis.edu>
77
#
88
# Distributed under the terms of the GNU General Public License (GPL)
9-
# http://www.gnu.org/licenses/
10-
#******************************************************************************
9+
# https://www.gnu.org/licenses/
10+
# ***************************************************************************
1111

1212
from sage.misc.cachefunc import cached_method
13-
from sage.misc.superseded import deprecated_function_alias
1413
from sage.categories.category import Category
1514
from sage.categories.category_with_axiom import CategoryWithAxiom
1615
from sage.categories.cartesian_product import CartesianProductsCategory
@@ -161,9 +160,7 @@ def metric_function(self):
161160
sage: m(p1, p2)
162161
2.23230104635820
163162
"""
164-
return lambda a,b: a.dist(b)
165-
166-
metric = deprecated_function_alias(30062, metric_function)
163+
return lambda a, b: a.dist(b)
167164

168165
def dist(self, a, b):
169166
"""

src/sage/combinat/binary_tree.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@
3838
from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
3939
from sage.sets.family import Family
4040
from sage.misc.cachefunc import cached_method
41-
from sage.misc.superseded import deprecated_function_alias
4241

4342

4443
class BinaryTree(AbstractClonableTree, ClonableArray,
45-
metaclass=InheritComparisonClasscallMetaclass):
44+
metaclass=InheritComparisonClasscallMetaclass):
4645
"""
4746
Binary trees.
4847
@@ -3272,8 +3271,6 @@ def under(self, bt):
32723271
else:
32733272
return B([self.under(bt[0]), bt[1]])
32743273

3275-
_backslash_ = deprecated_function_alias(36394, under)
3276-
32773274
def under_decomposition(self):
32783275
r"""
32793276
Return the unique maximal decomposition as an under product.

tools/check_deprecations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ def search_deprecations(path: str) -> set[tuple[str, int]]:
3636
content = f.read()
3737
matches = DEPRECATION_PATTERN.findall(content)
3838
for match in matches:
39+
if isinstance(match, tuple):
40+
match = match[1]
3941
deprecations.add((str(filepath), int(match)))
4042
except (PermissionError, UnicodeDecodeError):
4143
pass

0 commit comments

Comments
 (0)