Jump to solution
Verify

The Fix

pip install pydantic==1.10.14

Based on closed pydantic/pydantic issue #8573 · 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
@@ -188,6 +188,11 @@ def wrapped_model_post_init(self: BaseModel, __context: Any) -> None: create_model_module=_create_model_module, ) + + # If this is placed before the complete_model_class call above, + # the generic computed fields return type is set to PydanticUndefined
repro.py
from pydantic import BaseModel, computed_field class M(BaseModel): x: float = 1.0 @computed_field @property def tenx(self)->float: return self.x*10 >> M.model_computed_fields <property at 0x7fc4cbcf2860> >> M.model_computed_fields.__get__(None, M) # actually same as above <property at 0x7fc4cbcf2860> >> M.model_computed_fields.__get__(M, None) {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None, examples=None, json_schema_extra=None, repr=True)}
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.14\nWhen NOT to use: Do not use this fix if you require computed fields to behave differently at the class level.\n\n

Why This Fix Works in Production

  • Trigger: {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None,…
  • Mechanism: The model_computed_fields property only works on model instances, not on the model class
  • Why the fix works: Introduced a classproperty decorator for model_computed_fields to allow access as both a class attribute and an instance property. (first fixed release: 1.10.14).
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

  • Shows up under Python 3.9 in real deployments (not just unit tests).
  • The model_computed_fields property only works on model instances, not on the model class
  • Production symptom (often without a traceback): {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None, examples=None, json_schema_extra=None, repr=True)}

Proof / Evidence

Discussion

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

“Fixed here: https://github.com/pydantic/pydantic/pull/8437 Should be released with 2.6 soon”
@sydney-runkle · 2024-01-17 · confirmation · source
“I think one can actually add a property to the BaseModel Metaclass to fix it. I did the following test, it does not seems to…”
@SylvainGuieu · 2024-01-17 · source

Failure Signature (Search String)

  • {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None,
  • I did the following test, it does not seems to be a problem in python :
Copy-friendly signature
signature.txt
Failure Signature ----------------- {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None, examples=None, json_schema_extra=None, repr=True)} I did the following test, it does not seems to be a problem in python :

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None, examples=None, json_schema_extra=None, repr=True)} I did the following test, it does not seems to be a problem in python :

Minimal Reproduction

repro.py
from pydantic import BaseModel, computed_field class M(BaseModel): x: float = 1.0 @computed_field @property def tenx(self)->float: return self.x*10 >> M.model_computed_fields <property at 0x7fc4cbcf2860> >> M.model_computed_fields.__get__(None, M) # actually same as above <property at 0x7fc4cbcf2860> >> M.model_computed_fields.__get__(M, None) {'tenx': ComputedFieldInfo(wrapped_property=<property object at 0x7fc4cbc84360>, return_type=<class 'float'>, alias=None, alias_priority=None, title=None, description=None, examples=None, json_schema_extra=None, repr=True)}

Environment

  • Python: 3.9
  • Pydantic: 2

What Broke

Users cannot access computed fields at the class level, leading to confusion and potential misuse.

Why It Broke

The model_computed_fields property only works on model instances, not on the model class

Fix Options (Details)

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

pip install pydantic==1.10.14

When NOT to use: Do not use this fix if you require computed fields to behave differently at the class level.

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

First fixed release: 1.10.14

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 you require computed fields to behave differently at the class level.

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.14 Fixed

Related Issues

No related fixes found.

Sources

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