mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
[Bug Fix]: ImportError: cannot import name 'T' from 're' (#7314)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 11s
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 11s
* fix unused imports * add test for python 3.12 * re introduce error - as a test * update config for ci/cd * fix python 13 install * bump pyyaml * bump numpy * fix embedding requests * bump pillow dep * bump version * bump pydantic * bump tiktoken * fix import * fix python 3.13 import * fix unused imports in tests/*
This commit is contained in:
parent
c7f14e936a
commit
a790d43116
9 changed files with 41 additions and 19 deletions
|
@ -785,7 +785,33 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
pwd
|
pwd
|
||||||
ls
|
ls
|
||||||
python -m pytest -vv tests/local_testing/test_python_38.py
|
python -m pytest -vv tests/local_testing/test_basic_python_version.py
|
||||||
|
|
||||||
|
installing_litellm_on_python_3_13:
|
||||||
|
docker:
|
||||||
|
- image: cimg/python:3.13.1
|
||||||
|
auth:
|
||||||
|
username: ${DOCKERHUB_USERNAME}
|
||||||
|
password: ${DOCKERHUB_PASSWORD}
|
||||||
|
working_directory: ~/project
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install Dependencies
|
||||||
|
command: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install -r requirements.txt
|
||||||
|
pip install "pytest==7.3.1"
|
||||||
|
pip install "pytest-retry==1.6.3"
|
||||||
|
pip install "pytest-asyncio==0.21.1"
|
||||||
|
pip install "pytest-cov==5.0.0"
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: |
|
||||||
|
pwd
|
||||||
|
ls
|
||||||
|
python -m pytest -vv tests/local_testing/test_basic_python_version.py
|
||||||
|
|
||||||
check_code_and_doc_quality:
|
check_code_and_doc_quality:
|
||||||
docker:
|
docker:
|
||||||
|
@ -1607,6 +1633,12 @@ workflows:
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
- /litellm_.*/
|
- /litellm_.*/
|
||||||
|
- installing_litellm_on_python_3_13:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
- /litellm_.*/
|
||||||
- load_testing:
|
- load_testing:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
|
@ -1638,6 +1670,7 @@ workflows:
|
||||||
- e2e_ui_testing
|
- e2e_ui_testing
|
||||||
- litellm_proxy_unit_testing
|
- litellm_proxy_unit_testing
|
||||||
- installing_litellm_on_python
|
- installing_litellm_on_python
|
||||||
|
- installing_litellm_on_python_3_13
|
||||||
- proxy_logging_guardrails_model_info_tests
|
- proxy_logging_guardrails_model_info_tests
|
||||||
- proxy_pass_through_endpoint_tests
|
- proxy_pass_through_endpoint_tests
|
||||||
- check_code_and_doc_quality
|
- check_code_and_doc_quality
|
||||||
|
|
|
@ -4,12 +4,12 @@ httpx==0.27.0 # Pin Httpx dependency
|
||||||
openai==1.55.3 # openai req.
|
openai==1.55.3 # openai req.
|
||||||
fastapi==0.111.0 # server dep
|
fastapi==0.111.0 # server dep
|
||||||
backoff==2.2.1 # server dep
|
backoff==2.2.1 # server dep
|
||||||
pyyaml==6.0.0 # server dep
|
pyyaml==6.0.2 # server dep
|
||||||
uvicorn==0.29.0 # server dep
|
uvicorn==0.29.0 # server dep
|
||||||
gunicorn==22.0.0 # server dep
|
gunicorn==22.0.0 # server dep
|
||||||
boto3==1.34.34 # aws bedrock/sagemaker calls
|
boto3==1.34.34 # aws bedrock/sagemaker calls
|
||||||
redis==5.0.0 # caching
|
redis==5.0.0 # caching
|
||||||
numpy==1.24.3 # semantic caching
|
numpy==2.1.1 # semantic caching
|
||||||
prisma==0.11.0 # for db
|
prisma==0.11.0 # for db
|
||||||
mangum==0.17.0 # for aws lambda functions
|
mangum==0.17.0 # for aws lambda functions
|
||||||
pynacl==1.5.0 # for encrypting keys
|
pynacl==1.5.0 # for encrypting keys
|
||||||
|
@ -19,12 +19,12 @@ google-generativeai==0.5.0 # for vertex ai calls
|
||||||
async_generator==1.10.0 # for async ollama calls
|
async_generator==1.10.0 # for async ollama calls
|
||||||
langfuse==2.45.0 # for langfuse self-hosted logging
|
langfuse==2.45.0 # for langfuse self-hosted logging
|
||||||
prometheus_client==0.20.0 # for /metrics endpoint on proxy
|
prometheus_client==0.20.0 # for /metrics endpoint on proxy
|
||||||
orjson==3.9.15 # fast /embedding responses
|
orjson==3.10.12 # fast /embedding responses
|
||||||
apscheduler==3.10.4 # for resetting budget in background
|
apscheduler==3.10.4 # for resetting budget in background
|
||||||
fastapi-sso==0.10.0 # admin UI, SSO
|
fastapi-sso==0.10.0 # admin UI, SSO
|
||||||
pyjwt[crypto]==2.9.0
|
pyjwt[crypto]==2.9.0
|
||||||
python-multipart==0.0.9 # admin UI
|
python-multipart==0.0.9 # admin UI
|
||||||
Pillow==10.3.0
|
Pillow==11.0.0
|
||||||
azure-ai-contentsafety==1.0.0 # for azure content safety
|
azure-ai-contentsafety==1.0.0 # for azure content safety
|
||||||
azure-identity==1.16.1 # for azure content safety
|
azure-identity==1.16.1 # for azure content safety
|
||||||
azure-storage-file-datalake==12.15.0 # for azure buck storage logging
|
azure-storage-file-datalake==12.15.0 # for azure buck storage logging
|
||||||
|
@ -37,16 +37,16 @@ cryptography==42.0.7
|
||||||
|
|
||||||
### LITELLM PACKAGE DEPENDENCIES
|
### LITELLM PACKAGE DEPENDENCIES
|
||||||
python-dotenv==1.0.0 # for env
|
python-dotenv==1.0.0 # for env
|
||||||
tiktoken==0.7.0 # for calculating usage
|
tiktoken==0.8.0 # for calculating usage
|
||||||
importlib-metadata==6.8.0 # for random utils
|
importlib-metadata==6.8.0 # for random utils
|
||||||
tokenizers==0.14.0 # for calculating usage
|
tokenizers==0.20.2 # for calculating usage
|
||||||
click==8.1.7 # for proxy cli
|
click==8.1.7 # for proxy cli
|
||||||
jinja2==3.1.4 # for prompt templates
|
jinja2==3.1.4 # for prompt templates
|
||||||
certifi==2024.7.4 # [TODO] clean up
|
certifi==2024.7.4 # [TODO] clean up
|
||||||
aiohttp==3.10.2 # for network calls
|
aiohttp==3.10.2 # for network calls
|
||||||
aioboto3==12.3.0 # for async sagemaker calls
|
aioboto3==12.3.0 # for async sagemaker calls
|
||||||
tenacity==8.2.3 # for retrying requests, when litellm.num_retries set
|
tenacity==8.2.3 # for retrying requests, when litellm.num_retries set
|
||||||
pydantic==2.7.1 # proxy + openai req.
|
pydantic==2.10.0 # proxy + openai req.
|
||||||
jsonschema==4.22.0 # validating json schema
|
jsonschema==4.22.0 # validating json schema
|
||||||
websockets==10.4 # for realtime API
|
websockets==10.4 # for realtime API
|
||||||
####
|
####
|
|
@ -1,6 +1,5 @@
|
||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
from re import T
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
from unittest.mock import AsyncMock
|
||||||
|
|
||||||
from pydantic.main import Model
|
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system path
|
) # Adds the parent directory to the system path
|
||||||
|
|
|
@ -4,8 +4,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
from unittest.mock import AsyncMock
|
||||||
|
|
||||||
from pydantic.main import Model
|
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system-path
|
) # Adds the parent directory to the system-path
|
||||||
|
|
|
@ -8,8 +8,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
from unittest.mock import AsyncMock
|
||||||
|
|
||||||
from pydantic.main import Model
|
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system-path
|
) # Adds the parent directory to the system-path
|
||||||
|
|
|
@ -4,8 +4,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
from unittest.mock import AsyncMock
|
||||||
|
|
||||||
from pydantic.main import Model
|
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system-path
|
) # Adds the parent directory to the system-path
|
||||||
|
|
|
@ -4,8 +4,6 @@ import sys
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from unittest.mock import AsyncMock
|
from unittest.mock import AsyncMock
|
||||||
|
|
||||||
from pydantic.main import Model
|
|
||||||
|
|
||||||
sys.path.insert(
|
sys.path.insert(
|
||||||
0, os.path.abspath("../..")
|
0, os.path.abspath("../..")
|
||||||
) # Adds the parent directory to the system-path
|
) # Adds the parent directory to the system-path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue