From ad55417d1091f29f25925a387733a1f35d5953d3 Mon Sep 17 00:00:00 2001 From: Nathaniel Ramm Date: Sun, 19 Jul 2026 20:24:36 +1000 Subject: [PATCH] deps: relax pydantic pin to >=2.9.2 (keep pydantic-settings==2.6.1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The exact pydantic==2.9.2 pin blocked any consumer needing pydantic>=2.11 — notably modern mcp/fastmcp, whose Tool.from_function needs pydantic>=2.11 to handle PEP 604 (str | None) tool annotations. Relaxing to >=2.9.2 lets those consumers resolve while keeping 2.9.2 as the floor. pydantic-settings stays hard-pinned at 2.6.1: 2.14.x regresses env_prefix + dotenv handling (test_init_file_prefix1 — file-sourced values return None). Full settings suite: 441 passed on pydantic 2.13.4 + pydantic-settings 2.6.1. Co-Authored-By: Claude Opus 4.8 (1M context) --- pyproject.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d231e0e..e8d48ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,11 @@ classifiers = [ "Programming Language :: Python :: Implementation :: PyPy", ] dependencies = [ - "pydantic==2.9.2", + "pydantic>=2.9.2", + # pydantic-settings stays pinned: 2.14.x regresses env_prefix + dotenv + # handling (test_init_file_prefix1 — file values return None). 2.6.1 works + # with pydantic 2.9–2.13. Relaxing pydantic (not -settings) lets consumers + # that need pydantic>=2.11 (e.g. modern mcp/fastmcp) resolve cleanly. "pydantic-settings==2.6.1", "universal_pathlib==0.2.2", "pyaml",