Jump to solution
Verify

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%.

Jump to Verify Open PR/Commit
@@ -1,7 +1,6 @@ import inspect -from dataclasses import dataclass from functools import partial from typing import Any, Awaitable, Callable
repro.py
import inspect import pydantic class Test: @pydantic.validate_call def foobar(): pass class Test2(Test): pass inspect.getmembers(Test2)
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==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).
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.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

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”
@alexmojaki · 2024-01-23 · source
“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…”
@alexmojaki · 2024-01-23 · source
“It does indeed work with 2.6.0b1, any idea when this will land in stable?”
@mroethke · 2024-01-23 · source
“awesome, and thank you for your quick response!”
@mroethke · 2024-01-23 · source

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
signature.txt
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.txt
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

repro.py
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

When NOT to use: Do not use this fix if you rely on the previous behavior of the `@validate_call` decorator.

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.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

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

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