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%.
@@ -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
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)}
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
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).
- 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
- GitHub issue: #8573
- Fix PR: https://github.com/pydantic/pydantic/pull/8437
- First fixed release: 1.10.14
- 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.53
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”
“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…”
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
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 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
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
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.
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
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
| Version | Status |
|---|---|
| 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.