Jump to solution
Details

The Fix

pip install pydantic==1.10.18

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

Open PR/Commit
@@ -198,6 +198,47 @@ except ValidationError as exc: ``` +## `complex_str_parsing` + +This error is raised when the input value is a string but cannot be parsed as a complex number because
fix.md
Option A — Upgrade to fixed release\npip install pydantic==1.10.18\nWhen NOT to use: Do not use this fix if complex number support is not required in your application.\n\n

Why This Fix Works in Production

  • Trigger: - [x] Finish up merging `json_schema_extra` via https://github.com/pydantic/pydantic/pull/9792
  • Mechanism: Merged the `json_schema_extra` dictionaries from annotated types, providing a more additive approach to merging
  • Why the fix works: Merged the `json_schema_extra` dictionaries from annotated types, providing a more additive approach to merging. (first fixed release: 1.10.18).

Why This Breaks in Prod

  • Merged the `json_schema_extra` dictionaries from annotated types, providing a more additive approach to merging
  • Production symptom (often without a traceback): - [x] Finish up merging `json_schema_extra` via https://github.com/pydantic/pydantic/pull/9792

Proof / Evidence

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“@hramezani and @Kludex, Confirmed, I finally fixed the relnotes application thing. Here's a PR with proof: https://github.com/pydantic/pydantic/pull/9814”
@sydney-runkle · 2024-07-01 · source
“My work for this week will be catching up on everything I missed over my holiday, then will pivot to another weekly plan next Monday!”
@sydney-runkle · 2024-07-17 · source

Failure Signature (Search String)

  • - [x] Finish up merging `json_schema_extra` via https://github.com/pydantic/pydantic/pull/9792
  • - [ ] Backlog grooming for both `pydantic` and `pydantic-core`, as well as issue categorization to support easy access / entry for new contributors
Copy-friendly signature
signature.txt
Failure Signature ----------------- - [x] Finish up merging `json_schema_extra` via https://github.com/pydantic/pydantic/pull/9792 - [ ] Backlog grooming for both `pydantic` and `pydantic-core`, as well as issue categorization to support easy access / entry for new contributors

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- - [x] Finish up merging `json_schema_extra` via https://github.com/pydantic/pydantic/pull/9792 - [ ] Backlog grooming for both `pydantic` and `pydantic-core`, as well as issue categorization to support easy access / entry for new contributors

What Broke

Complex numbers were not properly validated, leading to potential data integrity issues.

Why It Broke

Merged the `json_schema_extra` dictionaries from annotated types, providing a more additive approach to merging

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

pip install pydantic==1.10.18

When NOT to use: Do not use this fix if complex number support is not required in your application.

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/9654

First fixed release: 1.10.18

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 complex number support is not required in your application.

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.
  • Track RSS + object counts after deployments; alert on monotonic growth and GC pressure.
  • Add a long-running test that repeats the failing call path and asserts stable memory.

Version Compatibility Table

VersionStatus
1.10.18 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.