mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
[Fix] CI: fix uv lock resolution and tiktoken test timeout
1. Cap requires-python to <3.14 — no deps ship 3.14 wheels yet, and uv's cross-version resolver fails on the Python 3.14 split. 2. Change exclude-newer from relative "30 days" to absolute "2026-04-10" so the lockfile stays reproducible. The relative date caused cryptography==46.0.7 (published April 8) to fall outside the window. 3. Parametrize test_eager_loading_env_var_values instead of looping — with xdist the 6 subprocess cases can run in parallel instead of all running sequentially on one worker (~13 min → ~2 min). Also removed redundant case variants (Yes/YES/On/ON) that test the same str_to_bool code path.
This commit is contained in:
parent
78c282f400
commit
d9a460277a
3 changed files with 142 additions and 1269 deletions
|
|
@ -3,7 +3,7 @@ name = "litellm"
|
||||||
version = "1.83.6"
|
version = "1.83.6"
|
||||||
description = "Library to easily interface with LLM API providers"
|
description = "Library to easily interface with LLM API providers"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.9"
|
requires-python = ">=3.9, <3.14"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
authors = [
|
authors = [
|
||||||
|
|
@ -211,7 +211,7 @@ build-backend = "uv_build"
|
||||||
[tool.uv]
|
[tool.uv]
|
||||||
default-groups = ["dev"]
|
default-groups = ["dev"]
|
||||||
required-version = "==0.10.9"
|
required-version = "==0.10.9"
|
||||||
exclude-newer = "30 days"
|
exclude-newer = "2026-04-10"
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
litellm-proxy-extras = { workspace = true }
|
litellm-proxy-extras = { workspace = true }
|
||||||
|
|
|
||||||
|
|
@ -55,23 +55,22 @@ def test_eager_loading_enabled():
|
||||||
assert result.returncode == 0, f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}"
|
assert result.returncode == 0, f"Subprocess failed:\nstdout: {result.stdout}\nstderr: {result.stderr}"
|
||||||
|
|
||||||
|
|
||||||
def test_eager_loading_env_var_values():
|
@pytest.mark.parametrize("value", ["1", "true", "True", "TRUE", "yes", "on"])
|
||||||
|
def test_eager_loading_env_var_values(value):
|
||||||
"""Test that various env var values enable eager loading"""
|
"""Test that various env var values enable eager loading"""
|
||||||
values = ["1", "true", "True", "TRUE", "yes", "Yes", "YES", "on", "On", "ON"]
|
result = _run_python(
|
||||||
for value in values:
|
"""
|
||||||
result = _run_python(
|
import litellm
|
||||||
"""
|
assert hasattr(litellm, "encoding"), "Encoding should be available"
|
||||||
import litellm
|
encoding = litellm.encoding
|
||||||
assert hasattr(litellm, "encoding"), "Encoding should be available"
|
tokens = encoding.encode("test")
|
||||||
encoding = litellm.encoding
|
assert len(tokens) > 0
|
||||||
tokens = encoding.encode("test")
|
""",
|
||||||
assert len(tokens) > 0
|
env_override={"LITELLM_DISABLE_LAZY_LOADING": value},
|
||||||
""",
|
)
|
||||||
env_override={"LITELLM_DISABLE_LAZY_LOADING": value},
|
assert result.returncode == 0, (
|
||||||
)
|
f"Failed for value {value!r}:\nstdout: {result.stdout}\nstderr: {result.stderr}"
|
||||||
assert result.returncode == 0, (
|
)
|
||||||
f"Failed for value {value!r}:\nstdout: {result.stdout}\nstderr: {result.stderr}"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_lazy_loading_default():
|
def test_lazy_loading_default():
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue