fix(python): remove unmaintained ratelimiter dependency (#1603)

The `ratelimiter` package hasn't been updated in ages and is no longer
maintained. This PR removes the dependency on `ratelimiter` and replaces
it with a custom rate limiter implementation.

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
This commit is contained in:
Antonio Molner Domenech
2024-09-09 20:35:53 +01:00
committed by GitHub
parent bcc19665ce
commit a405847f9b
3 changed files with 43 additions and 20 deletions

View File

@@ -10,7 +10,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sys
from typing import List, Union
import lance
@@ -35,9 +34,6 @@ 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:
# ratelimiter package doesn't work on 3.11
continue
data = pa.Table.from_arrays(
[
pa.array(["foo", "bar"]),