mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-06 14:48:29 +00:00
Compare commits
6 Commits
bugfix-pyt
...
devin/1743
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4924cb244c | ||
|
|
6d6d0ebdc8 | ||
|
|
bd817290c2 | ||
|
|
764e1b8a51 | ||
|
|
d4b7846f4c | ||
|
|
aeb89605e0 |
@@ -11,7 +11,7 @@ dependencies = [
|
|||||||
# Core Dependencies
|
# Core Dependencies
|
||||||
"pydantic>=2.4.2",
|
"pydantic>=2.4.2",
|
||||||
"openai>=1.13.3",
|
"openai>=1.13.3",
|
||||||
"litellm==1.60.2",
|
"litellm>=1.65.1,<2.0.0",
|
||||||
"instructor>=1.3.3",
|
"instructor>=1.3.3",
|
||||||
# Text Processing
|
# Text Processing
|
||||||
"pdfplumber>=0.11.4",
|
"pdfplumber>=0.11.4",
|
||||||
|
|||||||
79
tests/test_dependency_compatibility.py
Normal file
79
tests/test_dependency_compatibility.py
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
"""
|
||||||
|
Dependency Compatibility Tests
|
||||||
|
|
||||||
|
Tests to verify compatibility between litellm and other packages that depend on httpx.
|
||||||
|
|
||||||
|
Known working versions:
|
||||||
|
- httpx >= 0.28.1
|
||||||
|
- litellm >= 1.65.1
|
||||||
|
- exa-py (optional)
|
||||||
|
- google-genai (optional)
|
||||||
|
"""
|
||||||
|
import importlib.util
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def _check_optional_dependency(package_name):
|
||||||
|
"""Centralized handling of optional dependency checks"""
|
||||||
|
if importlib.util.find_spec(package_name) is None:
|
||||||
|
pytest.skip(f"{package_name} not installed. Skipping compatibility test.")
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True)
|
||||||
|
def log_versions():
|
||||||
|
"""Log all relevant package versions before tests"""
|
||||||
|
import httpx
|
||||||
|
import litellm
|
||||||
|
|
||||||
|
versions = {
|
||||||
|
"httpx": httpx.__version__,
|
||||||
|
}
|
||||||
|
print("\nRunning tests with versions:", versions)
|
||||||
|
return versions
|
||||||
|
|
||||||
|
|
||||||
|
class TestDependencyCompatibility:
|
||||||
|
"""Test suite for checking package dependency compatibility"""
|
||||||
|
|
||||||
|
def test_httpx_litellm_compatibility(self):
|
||||||
|
"""Test that litellm is compatible with the latest httpx"""
|
||||||
|
import httpx
|
||||||
|
import litellm
|
||||||
|
|
||||||
|
assert hasattr(httpx, "__version__")
|
||||||
|
|
||||||
|
print(f"Using httpx version: {httpx.__version__}")
|
||||||
|
print("Successfully imported litellm")
|
||||||
|
|
||||||
|
def test_exa_py_compatibility(self):
|
||||||
|
"""Test that exa-py can be imported alongside litellm"""
|
||||||
|
_check_optional_dependency("exa")
|
||||||
|
|
||||||
|
import exa
|
||||||
|
import httpx
|
||||||
|
import litellm
|
||||||
|
|
||||||
|
assert hasattr(exa, "__version__")
|
||||||
|
assert hasattr(httpx, "__version__")
|
||||||
|
|
||||||
|
print(f"Using exa-py version: {exa.__version__}")
|
||||||
|
print("Successfully imported litellm")
|
||||||
|
print(f"Using httpx version: {httpx.__version__}")
|
||||||
|
|
||||||
|
def test_google_genai_compatibility(self):
|
||||||
|
"""Test that google-genai can be imported alongside litellm"""
|
||||||
|
_check_optional_dependency("google.generativeai")
|
||||||
|
|
||||||
|
import httpx
|
||||||
|
import litellm
|
||||||
|
from google import generativeai
|
||||||
|
|
||||||
|
assert hasattr(generativeai, "version")
|
||||||
|
assert hasattr(httpx, "__version__")
|
||||||
|
|
||||||
|
print(f"Using google-genai version: {generativeai.version}")
|
||||||
|
print("Successfully imported litellm")
|
||||||
|
print(f"Using httpx version: {httpx.__version__}")
|
||||||
12
uv.lock
generated
12
uv.lock
generated
@@ -1,5 +1,4 @@
|
|||||||
version = 1
|
version = 1
|
||||||
revision = 1
|
|
||||||
requires-python = ">=3.10, <3.13"
|
requires-python = ">=3.10, <3.13"
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"python_full_version < '3.11' and sys_platform == 'darwin'",
|
"python_full_version < '3.11' and sys_platform == 'darwin'",
|
||||||
@@ -702,7 +701,7 @@ requires-dist = [
|
|||||||
{ name = "json-repair", specifier = ">=0.25.2" },
|
{ name = "json-repair", specifier = ">=0.25.2" },
|
||||||
{ name = "json5", specifier = ">=0.10.0" },
|
{ name = "json5", specifier = ">=0.10.0" },
|
||||||
{ name = "jsonref", specifier = ">=1.1.0" },
|
{ name = "jsonref", specifier = ">=1.1.0" },
|
||||||
{ name = "litellm", specifier = "==1.60.2" },
|
{ name = "litellm", specifier = ">=1.65.1,<2.0.0" },
|
||||||
{ name = "mem0ai", marker = "extra == 'mem0'", specifier = ">=0.1.29" },
|
{ name = "mem0ai", marker = "extra == 'mem0'", specifier = ">=0.1.29" },
|
||||||
{ name = "openai", specifier = ">=1.13.3" },
|
{ name = "openai", specifier = ">=1.13.3" },
|
||||||
{ name = "openpyxl", specifier = ">=3.1.5" },
|
{ name = "openpyxl", specifier = ">=3.1.5" },
|
||||||
@@ -722,7 +721,6 @@ requires-dist = [
|
|||||||
{ name = "tomli-w", specifier = ">=1.1.0" },
|
{ name = "tomli-w", specifier = ">=1.1.0" },
|
||||||
{ name = "uv", specifier = ">=0.4.25" },
|
{ name = "uv", specifier = ">=0.4.25" },
|
||||||
]
|
]
|
||||||
provides-extras = ["tools", "embeddings", "agentops", "fastembed", "pdfplumber", "pandas", "openpyxl", "mem0", "docling", "aisuite"]
|
|
||||||
|
|
||||||
[package.metadata.requires-dev]
|
[package.metadata.requires-dev]
|
||||||
dev = [
|
dev = [
|
||||||
@@ -2253,7 +2251,7 @@ wheels = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "litellm"
|
name = "litellm"
|
||||||
version = "1.60.2"
|
version = "1.65.1"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "aiohttp" },
|
{ name = "aiohttp" },
|
||||||
@@ -2268,9 +2266,9 @@ dependencies = [
|
|||||||
{ name = "tiktoken" },
|
{ name = "tiktoken" },
|
||||||
{ name = "tokenizers" },
|
{ name = "tokenizers" },
|
||||||
]
|
]
|
||||||
sdist = { url = "https://files.pythonhosted.org/packages/94/8f/704cdb0fdbdd49dc5062a39ae5f1a8f308ae0ffd746df6e0137fc1776b8a/litellm-1.60.2.tar.gz", hash = "sha256:a8170584fcfd6f5175201d869e61ccd8a40ffe3264fc5e53c5b805ddf8a6e05a", size = 6447447 }
|
sdist = { url = "https://files.pythonhosted.org/packages/da/d0/240bb0e7cb9c490aafff7c1c28e3cf7d68ac2c6089b49f90c64823207cb3/litellm-1.65.1.tar.gz", hash = "sha256:cbc8d7dfa5f7f47e6842796ca0c39682eb874718faab17fa991ab6c2f55e844c", size = 6695530 }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/8a/ba/0eaec9aee9f99fdf46ef1c0bddcfe7f5720b182f84f6ed27f13145d5ded2/litellm-1.60.2-py3-none-any.whl", hash = "sha256:1cb08cda04bf8c5ef3e690171a779979e4b16a5e3a24cd8dc1f198e7f198d5c4", size = 6746809 },
|
{ url = "https://files.pythonhosted.org/packages/c1/25/217b796420d9cd9eabb539adb81701cf27f3677aef84a181bb89073491ad/litellm-1.65.1-py3-none-any.whl", hash = "sha256:56478866373c4af13d86e71ab44fd337305dee39a82d742bc496bc56a2d732a1", size = 7032194 },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2975,6 +2973,7 @@ name = "nvidia-nccl-cu12"
|
|||||||
version = "2.20.5"
|
version = "2.20.5"
|
||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
wheels = [
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/c1/bb/d09dda47c881f9ff504afd6f9ca4f502ded6d8fc2f572cacc5e39da91c28/nvidia_nccl_cu12-2.20.5-py3-none-manylinux2014_aarch64.whl", hash = "sha256:1fc150d5c3250b170b29410ba682384b14581db722b2531b0d8d33c595f33d01", size = 176238458 },
|
||||||
{ url = "https://files.pythonhosted.org/packages/4b/2a/0a131f572aa09f741c30ccd45a8e56316e8be8dfc7bc19bf0ab7cfef7b19/nvidia_nccl_cu12-2.20.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:057f6bf9685f75215d0c53bf3ac4a10b3e6578351de307abad9e18a99182af56", size = 176249402 },
|
{ url = "https://files.pythonhosted.org/packages/4b/2a/0a131f572aa09f741c30ccd45a8e56316e8be8dfc7bc19bf0ab7cfef7b19/nvidia_nccl_cu12-2.20.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:057f6bf9685f75215d0c53bf3ac4a10b3e6578351de307abad9e18a99182af56", size = 176249402 },
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2984,6 +2983,7 @@ version = "12.6.85"
|
|||||||
source = { registry = "https://pypi.org/simple" }
|
source = { registry = "https://pypi.org/simple" }
|
||||||
wheels = [
|
wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/9d/d7/c5383e47c7e9bf1c99d5bd2a8c935af2b6d705ad831a7ec5c97db4d82f4f/nvidia_nvjitlink_cu12-12.6.85-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:eedc36df9e88b682efe4309aa16b5b4e78c2407eac59e8c10a6a47535164369a", size = 19744971 },
|
{ url = "https://files.pythonhosted.org/packages/9d/d7/c5383e47c7e9bf1c99d5bd2a8c935af2b6d705ad831a7ec5c97db4d82f4f/nvidia_nvjitlink_cu12-12.6.85-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:eedc36df9e88b682efe4309aa16b5b4e78c2407eac59e8c10a6a47535164369a", size = 19744971 },
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/31/db/dc71113d441f208cdfe7ae10d4983884e13f464a6252450693365e166dcf/nvidia_nvjitlink_cu12-12.6.85-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cf4eaa7d4b6b543ffd69d6abfb11efdeb2db48270d94dfd3a452c24150829e41", size = 19270338 },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
Reference in New Issue
Block a user