Skip to content

Commit df28fcd

Browse files
authored
fix(deps): resolve Pydantic AI Dependabot alerts (#930)
## Summary - Resolve the open Pydantic AI Dependabot alerts by locking `pydantic-ai-slim` to 2.55.0 and using the slim distribution for lint imports on Python 3.11+. - Advance the `uv` cutoff so the patched package version can be resolved. - Keep legacy Pydantic AI constraints isolated in the lock resolution. ## Validation - `test_pydantic_ai_integration(latest)`: 55 passed - `test_pydantic_ai_logfire(latest)`: 1 passed - `test_pydantic_ai_wrap_openai(latest)`: 2 passed - Lint-group `pydantic_ai` import, `uv lock --check`, and pre-commit hooks passed. - Latest cassette playback passed; no cassette files needed re-recording.
1 parent 43b2020 commit df28fcd

3 files changed

Lines changed: 2985 additions & 3279 deletions

File tree

‎py/noxfile.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,10 @@ def pylint(session):
944944
unlintable_integrations = set()
945945
for package in _VENDOR_TABLE:
946946
if sys.version_info[:2] < minimum_python.get(package, (3, 10)):
947+
if package == "pydantic-ai-integration":
948+
# pydantic-ai-slim is not installed on Python 3.10, so pylint
949+
# cannot resolve imports in this integration or its example.
950+
unlintable_integrations.add("pydantic_ai")
947951
continue
948952
max_python, integration = maximum_python_exclusive.get(package, (None, None))
949953
if max_python and sys.version_info[:2] >= max_python:

‎py/pyproject.toml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,8 @@ lint = [
332332
"llama-index-llms-openai",
333333
"llama-index-embeddings-openai",
334334
# pydantic-ai's matrix latest requires Python 3.11+, so pylint skips it on
335-
# 3.10. Keep a lock-resolved version here so pydantic_ai imports resolve.
336-
"pydantic-ai",
335+
# 3.10. Use slim to resolve pydantic_ai imports without optional extras.
336+
"pydantic-ai-slim>=2.53.0; python_version >= '3.11'",
337337
# Keep the lint environment's optional SDK dependencies lock-resolved
338338
# instead of installing the unconstrained [all] extra separately.
339339
"opentelemetry-api==1.39.1",
@@ -385,7 +385,7 @@ explicit = true
385385
# ---------------------------------------------------------------------------
386386

387387
[tool.uv]
388-
exclude-newer = "2026-10-12T06:05:49Z"
388+
exclude-newer = "2026-10-13T16:16:21Z"
389389
conflicts = [
390390
# Groups that pin or transitively require conflicting openai versions.
391391
[
@@ -413,6 +413,10 @@ conflicts = [
413413
{group = "test-pydantic-ai-otel-events"},
414414
{group = "test-livekit-agents"},
415415
],
416+
[
417+
{group = "lint"},
418+
{group = "test-pydantic-ai-otel-events"},
419+
],
416420
[
417421
{group = "test-pydantic-ai-logfire-constraints"},
418422
{group = "test-livekit-agents"},

0 commit comments

Comments
 (0)