Jump to solution
Verify

The Fix

pip install pydantic==1.10.15

Based on closed pydantic/pydantic issue #8930 · 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
@@ -274,7 +274,7 @@ class SequenceValidator: min_length: int | None = None max_length: int | None = None - strict: bool = False + strict: bool | None = None
repro.py
>> from collections.abc import Set >> from pydantic import ConfigDict, validate_call >> >> @validate_call(config=ConfigDict(strict=True, arbitrary_types_allowed=True),) ... def my_test(a_set: Set[str],): ... print(type(a_set), a_set) ... >> my_test({"1","2","3",}) <class 'frozenset'> frozenset({'1', '2', '3'}) >> my_test(("1","2","3",)) <class 'frozenset'> frozenset({'1', '2', '3'}) >>
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.15\nWhen NOT to use: Do not use this fix if strict validation is not required.\n\n

Why This Fix Works in Production

  • Trigger: validate_call makes an unexpected conversion
  • Mechanism: The validate_call function incorrectly converts tuples to frozensets in strict mode
  • Why the fix works: Fixes the issue where tuples were incorrectly converted to frozensets when strict validation was enabled in Pydantic's validate_call function. (first fixed release: 1.10.15).
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.12 in real deployments (not just unit tests).
  • The validate_call function incorrectly converts tuples to frozensets in strict mode
  • Production symptom (often without a traceback): validate_call makes an unexpected conversion

Proof / Evidence

Discussion

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

“Ah, this does seem like a bug, but isn't just for validate_call, but also this problem applies to general validation with BaseModel, pydantic dataclasses, etc…”
@sydney-runkle · 2024-03-02 · source

Failure Signature (Search String)

  • validate_call makes an unexpected conversion
  • You will notice that the `tuple` got turned into a `frozenset` instead of being rejected as an incompatible input (this is running in `strict=True` mode)
Copy-friendly signature
signature.txt
Failure Signature ----------------- validate_call makes an unexpected conversion You will notice that the `tuple` got turned into a `frozenset` instead of being rejected as an incompatible input (this is running in `strict=True` mode)

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- validate_call makes an unexpected conversion You will notice that the `tuple` got turned into a `frozenset` instead of being rejected as an incompatible input (this is running in `strict=True` mode)

Minimal Reproduction

repro.py
>> from collections.abc import Set >> from pydantic import ConfigDict, validate_call >> >> @validate_call(config=ConfigDict(strict=True, arbitrary_types_allowed=True),) ... def my_test(a_set: Set[str],): ... print(type(a_set), a_set) ... >> my_test({"1","2","3",}) <class 'frozenset'> frozenset({'1', '2', '3'}) >> my_test(("1","2","3",)) <class 'frozenset'> frozenset({'1', '2', '3'}) >>

Environment

  • Python: 3.12
  • Pydantic: 2

What Broke

Users experience unexpected type conversions leading to incorrect data handling.

Why It Broke

The validate_call function incorrectly converts tuples to frozensets in strict mode

Fix Options (Details)

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

pip install pydantic==1.10.15

When NOT to use: Do not use this fix if strict validation is not required.

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

First fixed release: 1.10.15

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 strict validation is not required.

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

Related Issues

No related fixes found.

Sources

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