The Fix
pip install pydantic==2.5.3
Based on closed pydantic/pydantic issue #8610 · 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%.
@@ -1,7 +1,6 @@
import inspect
-from dataclasses import dataclass
from functools import partial
from typing import Any, Awaitable, Callable
import inspect
import pydantic
class Test:
@pydantic.validate_call
def foobar():
pass
class Test2(Test):
pass
inspect.getmembers(Test2)
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==2.5.3\nWhen NOT to use: Do not use this fix if you rely on the previous behavior of the `@validate_call` decorator.\n\n
Why This Fix Works in Production
- Trigger: When using the `validate_call` decorator in a base class, calling `inspect.getmembers` on a derived class raises a `TypeError`. I would expect this to not…
- Mechanism: The `@validate_call` decorator was incorrectly implemented as a custom descriptor, causing binding issues with inheritance
- Why the fix works: Modifies the `@validate_call` decorator to return a function instead of a custom descriptor, fixing a binding issue with inheritance and adding `self/cls` argument to validation errors. (first fixed release: 2.5.3).
- 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.11 in real deployments (not just unit tests).
- The `@validate_call` decorator was incorrectly implemented as a custom descriptor, causing binding issues with inheritance
- Production symptom (often without a traceback): When using the `validate_call` decorator in a base class, calling `inspect.getmembers` on a derived class raises a `TypeError`. I would expect this to not raise an Exception.
Proof / Evidence
- GitHub issue: #8610
- Fix PR: https://github.com/pydantic/pydantic/pull/8268
- First fixed release: 2.5.3
- 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.67
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Thanks for testing the beta! I believe @sydney-runkle is planning on releasing the final 2.6.0 tomorrow”
“Try with pydantic version 2.6.0b1. I'm not seeing an error when I run this locally and I think that's because I'm working with more recent…”
“It does indeed work with 2.6.0b1, any idea when this will land in stable?”
“awesome, and thank you for your quick response!”
Failure Signature (Search String)
- When using the `validate_call` decorator in a base class, calling `inspect.getmembers` on a derived class raises a `TypeError`. I would expect this to not raise an Exception.
- Try with pydantic version 2.6.0b1. I'm not seeing an error when I run this locally and I think that's because I'm working with more recent code which in particular includes
Copy-friendly signature
Failure Signature
-----------------
When using the `validate_call` decorator in a base class, calling `inspect.getmembers` on a derived class raises a `TypeError`. I would expect this to not raise an Exception.
Try with pydantic version 2.6.0b1. I'm not seeing an error when I run this locally and I think that's because I'm working with more recent code which in particular includes https://github.com/pydantic/pydantic/pull/8268.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
When using the `validate_call` decorator in a base class, calling `inspect.getmembers` on a derived class raises a `TypeError`. I would expect this to not raise an Exception.
Try with pydantic version 2.6.0b1. I'm not seeing an error when I run this locally and I think that's because I'm working with more recent code which in particular includes https://github.com/pydantic/pydantic/pull/8268.
Minimal Reproduction
import inspect
import pydantic
class Test:
@pydantic.validate_call
def foobar():
pass
class Test2(Test):
pass
inspect.getmembers(Test2)
Environment
- Python: 3.11
- Pydantic: 2
Why It Broke
The `@validate_call` decorator was incorrectly implemented as a custom descriptor, causing binding issues with inheritance
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==2.5.3
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/8268
First fixed release: 2.5.3
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- Do not use this fix if you rely on the previous behavior of the `@validate_call` decorator.
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 |
|---|---|
| 2.5.3 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.