The Fix
pip install pydantic==1.10.1
Based on closed pydantic/pydantic issue #11485 · PR/commit linked
@@ -0,0 +1,2 @@
@@ -0,0 +1,2 @@
+Change default value of ``__module__`` argument of ``create_model`` from ``None`` to ``'pydantic.main'``.
+Set reference of created concrete model to it's module to allow pickling (not applied to models created in functions)
\ No newline at end of file
Option A — Upgrade to fixed release\npip install pydantic==1.10.1\nWhen NOT to use: Do not use this fix if you require non-generic behavior for `ValidationInfo`.\n\n
Why This Fix Works in Production
- Trigger: Make `ValidationInfo` generic
- Mechanism: The `ValidationInfo` class lacks generic support for type hinting the `context` attribute
- Why the fix works: Adds pickle support to dynamically created models and generics, allowing for better type hinting with ValidationInfo. (first fixed release: 1.10.1).
Why This Breaks in Prod
- The `ValidationInfo` class lacks generic support for type hinting the `context` attribute
- Production symptom (often without a traceback): Make `ValidationInfo` generic
Proof / Evidence
- GitHub issue: #11485
- Fix PR: https://github.com/pydantic/pydantic-core/pull/1686
- First fixed release: 1.10.1
- 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.66
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 Make ValidationInfo generic so that use”
Failure Signature (Search String)
- Make `ValidationInfo` generic
- Make `ValidationInfo` generic so that users can type hint the `context` attribute. This would be defined with a type var default to avoid static type checking breaking changes:
Copy-friendly signature
Failure Signature
-----------------
Make `ValidationInfo` generic
Make `ValidationInfo` generic so that users can type hint the `context` attribute. This would be defined with a type var default to avoid static type checking breaking changes:
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Make `ValidationInfo` generic
Make `ValidationInfo` generic so that users can type hint the `context` attribute. This would be defined with a type var default to avoid static type checking breaking changes:
What Broke
Users cannot type hint the `context` attribute, leading to potential type errors.
Why It Broke
The `ValidationInfo` class lacks generic support for type hinting the `context` attribute
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==1.10.1
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/pydantic/pydantic-core/pull/1686
First fixed release: 1.10.1
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if you require non-generic behavior for `ValidationInfo`.
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.1 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.