The Fix
pip install pydantic==1.10.19
Based on closed pydantic/pydantic issue #10371 · PR/commit linked
@@ -90,6 +90,7 @@ def complete_dataclass(
raise_errors: bool = True,
types_namespace: dict[str, Any] | None,
+ _force_build: bool = False,
) -> bool:
"""Finish building a pydantic dataclass.
Option A — Upgrade to fixed release\npip install pydantic==1.10.19\nWhen NOT to use: This fix should not be used if multiple configuration sources are intended.\n\n
Why This Fix Works in Production
- Trigger: Users experienced unexpected behavior due to conflicting configuration specifications.
- Mechanism: The configuration was specified in both the `@dataclass` decorator and the `__pydantic_config__` attribute
- Why the fix works: Warns if configuration is specified on both the `@dataclass` decorator and the `__pydantic_config__` attribute, addressing issue #10371. (first fixed release: 1.10.19).
Why This Breaks in Prod
- The configuration was specified in both the `@dataclass` decorator and the `__pydantic_config__` attribute
- Production symptom (often without a traceback): Users experienced unexpected behavior due to conflicting configuration specifications.
Proof / Evidence
- GitHub issue: #10371
- Fix PR: https://github.com/pydantic/pydantic/pull/10313
- 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.79
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Unblocks https://github.com/pydantic/pydantic/pull/10313”
Failure Signature (Search String)
- Users experienced unexpected behavior due to conflicting configuration specifications.
Copy-friendly signature
Failure Signature
-----------------
Users experienced unexpected behavior due to conflicting configuration specifications.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Users experienced unexpected behavior due to conflicting configuration specifications.
What Broke
Users experienced unexpected behavior due to conflicting configuration specifications.
Why It Broke
The configuration was specified in both the `@dataclass` decorator and the `__pydantic_config__` attribute
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/10313
First fixed release: 1.10.19
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if multiple configuration sources are intended.
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.