From f2d90cf13387c28be4cad847d3f5accc1df7a234 Mon Sep 17 00:00:00 2001 From: Jeff West Date: Fri, 22 May 2026 08:54:17 -0500 Subject: [PATCH] deps: bump pydantic floor to >=2.4 for money-safety invariants The SDK's money-safety invariants depend on Pydantic v2 behaviors that stabilized after 2.0: - StrictInt boolean rejection (relied on by #295) was tightened in 2.4. - model_validator(mode='before') inheritance semantics changed through 2.3. - Decimal coercion edge cases (negative-zero, scientific input) used by _coerce_decimal (#270) were fixed across 2.4/2.5. Allowing 2.0-2.3 lets resolvers land a runtime with subtler validators than the test matrix exercises, quietly undermining #225 / #243 / #295. Bump the floor to pydantic>=2.4,<3 so the installed runtime always matches the invariants the changelog advertises. Verified: ruff, mypy, and tests/test_models.py + tests/test_types.py all pass under the regenerated lock (pydantic 2.13.4 resolved). Closes #346 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 24bf3e4..da04bc4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ classifiers = [ ] dependencies = [ "httpx>=0.27,<1", - "pydantic>=2.0,<3", + "pydantic>=2.4,<3", "cryptography>=43,<49", "websockets>=14,<17", "typing-extensions>=4.5",