The Fix
pip install pydantic==1.10.19
Based on closed pydantic/pydantic issue #10256 · PR/commit linked
@@ -5,7 +5,7 @@
strategy = []
lock_version = "4.5.0"
-content_hash = "sha256:c1127f3971d4a0c6271ab715e0bd62f40e67b070ea9cc71c78fa9dce52fc993d"
+content_hash = "sha256:f81bce4df16a23258371beb49db59afcdf67484fa7c149159d041762dead7eb5"
Option A — Upgrade to fixed release\npip install pydantic==1.10.19\nWhen NOT to use: Do not use this fix if you require backward compatibility with previous serialization formats.\n\n
Why This Fix Works in Production
- Trigger: - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- Mechanism: The `ser_json_timedelta` parameter did not support a millisecond option for serialization
- Why the fix works: Adds a millisecond option to the `ser_json_timedelta` configuration parameter in Pydantic, allowing for more precise serialization of time deltas. (first fixed release: 1.10.19).
Why This Breaks in Prod
- The `ser_json_timedelta` parameter did not support a millisecond option for serialization
- Production symptom (often without a traceback): - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
Proof / Evidence
- GitHub issue: #10256
- Fix PR: https://github.com/pydantic/pydantic/pull/10293
- First fixed release: 1.10.19
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.74
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“PR is open for the pydantic core side of things, once thats done i'll open a PR to make that available in pydantic”
“@ollz272, Amazing, thanks so much! Releasing v2.9 tomorrow (so can't add in new features at this point), but will give this a thorough review once…”
Failure Signature (Search String)
- - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- - [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)
Copy-friendly signature
Failure Signature
-----------------
- [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)
Error Message
Signature-only (no traceback captured)
Error Message
-------------
- [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
- [ ] [Data validation/parsing](https://docs.pydantic.dev/concepts/models/#basic-model-usage)
What Broke
Users could not serialize timedeltas with millisecond precision, leading to inaccurate data representation.
Why It Broke
The `ser_json_timedelta` parameter did not support a millisecond option for serialization
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==1.10.19
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/10293
First fixed release: 1.10.19
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if you require backward compatibility with previous serialization formats.
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 |
|---|---|
| 1.10.19 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.