Jump to solution
Details

The Fix

pip install pydantic==1.10.19

Based on closed pydantic/pydantic issue #10256 · PR/commit linked

Open PR/Commit
@@ -5,7 +5,7 @@ strategy = [] lock_version = "4.5.0" -content_hash = "sha256:c1127f3971d4a0c6271ab715e0bd62f40e67b070ea9cc71c78fa9dce52fc993d" +content_hash = "sha256:f81bce4df16a23258371beb49db59afcdf67484fa7c149159d041762dead7eb5"
fix.md
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

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 · 2024-09-02 · source
“@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…”
@sydney-runkle · 2024-09-04 · source

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
signature.txt
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.txt
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

When NOT to use: Do not use this fix if you require backward compatibility with previous serialization formats.

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.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

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

VersionStatus
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.