Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions py/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,10 @@ def pylint(session):
unlintable_integrations = set()
for package in _VENDOR_TABLE:
if sys.version_info[:2] < minimum_python.get(package, (3, 10)):
if package == "pydantic-ai-integration":
# pydantic-ai-slim is not installed on Python 3.10, so pylint
# cannot resolve imports in this integration or its example.
unlintable_integrations.add("pydantic_ai")
continue
max_python, integration = maximum_python_exclusive.get(package, (None, None))
if max_python and sys.version_info[:2] >= max_python:
Expand Down
10 changes: 7 additions & 3 deletions py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ lint = [
"llama-index-llms-openai",
"llama-index-embeddings-openai",
# pydantic-ai's matrix latest requires Python 3.11+, so pylint skips it on
# 3.10. Keep a lock-resolved version here so pydantic_ai imports resolve.
"pydantic-ai",
# 3.10. Use slim to resolve pydantic_ai imports without optional extras.
"pydantic-ai-slim>=2.53.0; python_version >= '3.11'",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exclude Pydantic AI files from Python 3.10 pylint

On Python 3.10, this marker prevents the lint group from installing pydantic_ai, while pylint() also skips the matrix package at its (3, 11) minimum without adding the integration to unlintable_integrations. It still lints files such as test_pydantic_ai_integration.py and examples/pydantic_ai/example.py, whose unguarded imports produce E0401 errors, so the Python 3.10 static_checks job fails. Exclude these files on 3.10 or provide a compatible package for import resolution.

AGENTS.md reference: AGENTS.md:L145-L148

Useful? React with 👍 / 👎.

# Keep the lint environment's optional SDK dependencies lock-resolved
# instead of installing the unconstrained [all] extra separately.
"opentelemetry-api==1.39.1",
Expand Down Expand Up @@ -385,7 +385,7 @@ explicit = true
# ---------------------------------------------------------------------------

[tool.uv]
exclude-newer = "2026-10-12T06:05:49Z"
exclude-newer = "2026-10-13T16:16:21Z"
conflicts = [
# Groups that pin or transitively require conflicting openai versions.
[
Expand Down Expand Up @@ -413,6 +413,10 @@ conflicts = [
{group = "test-pydantic-ai-otel-events"},
{group = "test-livekit-agents"},
],
[
{group = "lint"},
{group = "test-pydantic-ai-otel-events"},
],
[
{group = "test-pydantic-ai-logfire-constraints"},
{group = "test-livekit-agents"},
Expand Down
Loading
Loading