Skip to content

Commit

Permalink
actually remove deprecated aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesturk committed Jul 20, 2023
1 parent 06d47e8 commit 174542b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
18 changes: 0 additions & 18 deletions python/jellyfish/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,3 @@

from ._rustyfish import *
from . import _jellyfish


def jaro_winkler(s1, s2, long_tolerance=False):
warnings.warn(
"the name 'jaro_winkler' is deprecated and will be removed in jellyfish 1.0, "
"for the same functionality please use jaro_winkler_similarity",
DeprecationWarning,
)
return jaro_winkler_similarity(s1, s2, long_tolerance) # noqa


def jaro_distance(s1, s2):
warnings.warn(
"the jaro_distance function incorrectly returns the jaro similarity, "
"replace your usage with jaro_similarity before 1.0",
DeprecationWarning,
)
return jaro_similarity(s1, s2) # noqa
16 changes: 0 additions & 16 deletions tests/test_jellyfish.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,6 @@ def test_jaro_winkler_similarity_longtol(jf, s1, s2, value):
assertAlmostEqual(jf.jaro_winkler_similarity(s1, s2, True), value, places=3)


def test_jaro_winkler_deprecation(jf):
# backwards compatibility function
from jellyfish import jaro_winkler

with pytest.deprecated_call():
assert jaro_winkler("a", "a") == 1


def test_jaro_distance_deprecation():
# backwards compatibility function
from jellyfish import jaro_distance

with pytest.deprecated_call():
assert jaro_distance("a", "a") == 1


@pytest.mark.parametrize("s1,s2,value", _load_data("jaro_distance"), ids=str)
def test_jaro_similarity(jf, s1, s2, value):
value = float(value)
Expand Down

0 comments on commit 174542b

Please sign in to comment.