The Fix
pip install pydantic==2.10.0
Based on closed pydantic/pydantic issue #10561 · PR/commit linked
Production note: Watch p95/p99 latency and retry volume; timeouts can turn into retry storms and duplicate side-effects.
@@ -11,6 +11,7 @@
from ..dataclasses import PydanticDataclass
from ..main import BaseModel
+ from ..type_adapter import TypeAdapter
Option A — Upgrade to fixed release\npip install pydantic==2.10.0\nWhen NOT to use: Do not use this fix if backward compatibility with older versions is required.\n\n
Why This Fix Works in Production
- Trigger: Performance issues leading to slow response times in applications using pydantic.
- Mechanism: Refactor namespace logic for annotations evaluation to improve performance and support edge cases
- Why the fix works: Refactor namespace logic for annotations evaluation to improve performance and support edge cases. (first fixed release: 2.10.0).
- If left unfixed, tail latency can spike under load and surface as timeouts/retries (amplifying incident impact).
Why This Breaks in Prod
- Refactor namespace logic for annotations evaluation to improve performance and support edge cases
- Production symptom (often without a traceback): Performance issues leading to slow response times in applications using pydantic.
Proof / Evidence
- GitHub issue: #10561
- Fix PR: https://github.com/pydantic/pydantic/pull/10537
- First fixed release: 2.10.0
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.75
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.82
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Much of this will roll over to next week - ended up doing more logfire work than expected + minor bug fixes here on pydantic.…”
Failure Signature (Search String)
- Performance issues leading to slow response times in applications using pydantic.
Copy-friendly signature
Failure Signature
-----------------
Performance issues leading to slow response times in applications using pydantic.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Performance issues leading to slow response times in applications using pydantic.
What Broke
Performance issues leading to slow response times in applications using pydantic.
Why It Broke
Refactor namespace logic for annotations evaluation to improve performance and support edge cases
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==2.10.0
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/pydantic/pydantic/pull/10537
First fixed release: 2.10.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if backward compatibility with older versions is required.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
- Upgrade behind a canary and run integration tests against the canary before 100% rollout.
Version Compatibility Table
| Version | Status |
|---|---|
| 2.10.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.