deprecate _jellyfish
diff --git a/python/jellyfish/__init__.py b/python/jellyfish/__init__.py
index 76df448..a5e8204 100644
--- a/python/jellyfish/__init__.py
+++ b/python/jellyfish/__init__.py
@@ -1,13 +1,7 @@
import warnings
-try:
- from .rustyfish import *
-
- library = "Rust"
-except ImportError:
- from ._jellyfish import * # noqa
-
- library = "Python"
+from .rustyfish import *
+from . import _jellyfish
def jaro_winkler(s1, s2, long_tolerance=False):
diff --git a/python/jellyfish/_jellyfish.py b/python/jellyfish/_jellyfish.py
index dc24966..b8fe8d1 100644
--- a/python/jellyfish/_jellyfish.py
+++ b/python/jellyfish/_jellyfish.py
@@ -1,6 +1,13 @@
import unicodedata
from collections import defaultdict
from itertools import zip_longest
+import warnings
+
+warnings.warn(
+ "The jellyfish._jellyfish module is deprecated and will be removed in jellyfish 1.0.",
+ DeprecationWarning,
+ stacklevel=2,
+)
def _normalize(s):
@@ -173,7 +180,6 @@
def soundex(s):
-
_check_type(s)
if not s:
@@ -238,7 +244,6 @@
def nysiis(s):
-
_check_type(s)
if not s:
diff --git a/tests/test_jellyfish.py b/tests/test_jellyfish.py
index abd1d77..66cf8ff 100644
--- a/tests/test_jellyfish.py
+++ b/tests/test_jellyfish.py
@@ -16,7 +16,7 @@
@pytest.fixture(params=implementations)
def jf(request):
if request.param == "python":
- from jellyfish import _jellyfish as jf
+ import jellyfish._jellyfish as jf
elif request.param == "rust":
from jellyfish import rustyfish as jf
return jf