Jump to solution
Verify

The Fix

pip install pydantic==1.10.19

Based on closed pydantic/pydantic issue #10679 · 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%.

Jump to Verify Open PR/Commit
@@ -1,11 +1,12 @@ [`pydantic.dataclasses.dataclass`][pydantic.dataclasses.dataclass]<br> -If you don't want to use Pydantic's `BaseModel` you can instead get the same data validation on standard -[dataclasses](https://docs.python.org/3/library/dataclasses.html) (introduced in Python 3.7). +If you don't want to use Pydantic's [`BaseModel`][pydantic.BaseModel] you can instead get the same data validation
repro.py
from pydantic import ConfigDict from pydantic.dataclasses import dataclass @dataclass class TestDC: model_config = ConfigDict(extra="forbid") a: int b: int
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\npip install pydantic==1.10.19\nWhen NOT to use: This fix is not applicable if the configuration is intended for standard dataclasses.\n\n

Why This Fix Works in Production

  • Trigger: Users experienced confusion and misconfiguration when using dataclass settings.
  • Mechanism: The dataclass configuration was not applied correctly when defined directly within the dataclass
  • Why the fix works: Improves the documentation for Pydantic dataclasses, clarifying the configuration options available. (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

  • The dataclass configuration was not applied correctly when defined directly within the dataclass
  • Production symptom (often without a traceback): Users experienced confusion and misconfiguration when using dataclass settings.

Proof / Evidence

Discussion

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

“The __pydantic_config__ attribute can be used for this. It wasn't properly documented, so I tackled it in https://github.com/pydantic/pydantic/pull/10686.”
@Viicos · 2024-10-22 · source
“Go it. However, I believe that in this example, if Pydantic could issue a warning, it would alert users that the model_config won't be applied,…”
@RajatRajdeep · 2024-10-25 · source
“> Go it”
@Viicos · 2025-01-03 · source

Failure Signature (Search String)

  • Users experienced confusion and misconfiguration when using dataclass settings.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Users experienced confusion and misconfiguration when using dataclass settings.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Users experienced confusion and misconfiguration when using dataclass settings.

Minimal Reproduction

repro.py
from pydantic import ConfigDict from pydantic.dataclasses import dataclass @dataclass class TestDC: model_config = ConfigDict(extra="forbid") a: int b: int

Environment

  • Pydantic: 2

What Broke

Users experienced confusion and misconfiguration when using dataclass settings.

Why It Broke

The dataclass configuration was not applied correctly when defined directly within the dataclass

Fix Options (Details)

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

pip install pydantic==1.10.19

When NOT to use: This fix is not applicable if the configuration is intended for standard dataclasses.

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

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 is not applicable if the configuration is intended for standard dataclasses.

Verify Fix

verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.

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.