depot/third_party/nixpkgs/pkgs/development/python-modules/lancedb/remove-ratelimiter.patch
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

26 lines
1.1 KiB
Diff

diff --git a/python/python/lancedb/embeddings/utils.py b/python/python/lancedb/embeddings/utils.py
index 813631c..4ae6025 100644
--- a/python/python/lancedb/embeddings/utils.py
+++ b/python/python/lancedb/embeddings/utils.py
@@ -111,7 +111,7 @@ class FunctionWrapper:
if len(self.rate_limiter_kwargs) > 0:
v = int(sys.version_info.minor)
- if v >= 11:
+ if True:
print(
"WARNING: rate limit only support up to 3.10, proceeding "
"without rate limiter"
diff --git a/python/python/tests/test_embeddings.py b/python/python/tests/test_embeddings.py
index ed7b105..28ca9cb 100644
--- a/python/python/tests/test_embeddings.py
+++ b/python/python/tests/test_embeddings.py
@@ -35,7 +35,7 @@ def mock_embed_func(input_data):
def test_with_embeddings():
for wrap_api in [True, False]:
- if wrap_api and sys.version_info.minor >= 11:
+ if wrap_api:
# ratelimiter package doesn't work on 3.11
continue
data = pa.Table.from_arrays(