Jump to solution
Details

The Fix

pip install pydantic==1.10.19

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

Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.

Open PR/Commit
@@ -351,7 +351,7 @@ def model_construct(cls, _fields_set: set[str] | None = None, **values: Any) -> return m - def model_copy(self, *, update: dict[str, Any] | None = None, deep: bool = False) -> Self: + def model_copy(self, *, update: Mapping[str, Any] | None = None, deep: bool = False) -> Self: """Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#model_copy
fix.md
Option A — Upgrade to fixed release\npip install pydantic==1.10.19\nWhen NOT to use: This fix should not be used if strict type checking for dictionaries is required.\n\n

Why This Fix Works in Production

  • Trigger: Changing `model_copy.update`'s type hint from `dict[str, Any]` to `Mapping[str, Any]`
  • Mechanism: Changed the type hint of `model_copy.update` from `dict[str, Any]` to `Mapping[str, Any]` to allow for more general mapping types.
  • Why the fix works: Changed the type hint of `model_copy.update` from `dict[str, Any]` to `Mapping[str, Any]` to allow for more general mapping types. (first fixed release: 1.10.19).
Production impact:
  • If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.

Why This Breaks in Prod

  • Production symptom (often without a traceback): Changing `model_copy.update`'s type hint from `dict[str, Any]` to `Mapping[str, Any]`

Proof / Evidence

Discussion

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

“### Initial Checks - [X] I have searched Google & GitHub for similar requests and couldn't find anything - [X] I have read and followed the docs and still think this feature is missing ### Description https://github.com/pydantic/pydantic/bl”
Issue thread · issue description · source

Failure Signature (Search String)

  • Changing `model_copy.update`'s type hint from `dict[str, Any]` to `Mapping[str, Any]`
  • - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)
Copy-friendly signature
signature.txt
Failure Signature ----------------- Changing `model_copy.update`'s type hint from `dict[str, Any]` to `Mapping[str, Any]` - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Changing `model_copy.update`'s type hint from `dict[str, Any]` to `Mapping[str, Any]` - [ ] [Compatibility between releases](https://docs.pydantic.dev/changelog/)

What Broke

Users could not use other mapping types with `model_copy` leading to type errors.

Fix Options (Details)

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

pip install pydantic==1.10.19

When NOT to use: This fix should not be used if strict type checking for dictionaries is required.

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

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

  • This fix should not be used if strict type checking for dictionaries 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

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.