The Fix
pip install pydantic==2.6.4
Based on closed pydantic/pydantic issue #8902 · PR/commit linked
@@ -30,6 +30,8 @@
DeprecationWarning = PydanticDeprecatedSince20
+__all__ = 'Field', 'PrivateAttr', 'computed_field'
+
Option A — Upgrade to fixed release\npip install pydantic==2.6.4\nWhen NOT to use: This fix is not applicable if the public API needs to remain unchanged.\n\n
Why This Fix Works in Production
- Trigger: https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165
- Mechanism: The `ComputedFieldInfo` class was made public, exposing internal utilities
- Why the fix works: Adds `__all__` to `fields.py` and makes some utilities not explicitly public, addressing issue #8902. (first fixed release: 2.6.4).
Why This Breaks in Prod
- The `ComputedFieldInfo` class was made public, exposing internal utilities
- Production symptom (often without a traceback): https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165
Proof / Evidence
- GitHub issue: #8902
- Fix PR: https://github.com/pydantic/pydantic/pull/8925
- First fixed release: 2.6.4
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.75
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.83
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165”
Failure Signature (Search String)
- https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165
Copy-friendly signature
Failure Signature
-----------------
https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165
Error Message
Signature-only (no traceback captured)
Error Message
-------------
https://github.com/pydantic/pydantic/pull/8237#discussion_r1503542165
What Broke
Internal utilities were unintentionally exposed, leading to potential misuse.
Why It Broke
The `ComputedFieldInfo` class was made public, exposing internal utilities
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==2.6.4
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/8925
First fixed release: 2.6.4
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is not applicable if the public API needs to remain unchanged.
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 |
|---|---|
| 2.6.4 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.