The Fix
pip install pydantic==2.6.0
Based on closed pydantic/pydantic issue #8604 · 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%.
@@ -1388,8 +1388,9 @@ def _subclass_schema(self, type_: Any) -> core_schema.CoreSchema:
"""Generate schema for a Sequence, e.g. `Sequence[int]`."""
item_type = self._get_first_arg_or_any(sequence_type)
+ item_type_schema = self.generate_schema(item_type)
+ list_schema = core_schema.list_schema(item_type_schema)
>> TypeAdapter(Sequence[int]).validate_python((), strict=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 239, in validate_python
return self.validator.validate_python(__object, strict=strict, from_attributes=from_attributes, context=context)
pydantic_core._pydantic_core.ValidationError: 1 validation error for json-or-python[json=list[int],python=chain[is-instance[Sequence],function-wrap[sequence_validator()]]]
Input should be a valid list [type=list_type, input_value=(), input_type=tuple]
For further information visit https://errors.pydantic.dev/2.5/v/list_type
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.6.0\nWhen NOT to use: This fix should not be used if strict mode behavior is intentionally required for tuples.\n\n
Why This Fix Works in Production
- Trigger: >> TypeAdapter(Sequence[int]).validate_python((), strict=True)
- Mechanism: Strict mode incorrectly rejects tuples as valid inputs for Sequence types
- Why the fix works: Fix strict parsing for some `Sequence`s to handle cases where a tuple is incorrectly rejected as a valid input. (first fixed release: 2.6.0).
- 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.10 in real deployments (not just unit tests).
- Strict mode incorrectly rejects tuples as valid inputs for Sequence types
- Surfaces as: >> TypeAdapter(Sequence[int]).validate_python((), strict=True)
Proof / Evidence
- GitHub issue: #8604
- Fix PR: https://github.com/pydantic/pydantic/pull/8614
- First fixed release: 2.6.0
- 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.39
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“@Dreamsorcerer, Merged the PR :) should be fixed on main now.”
“I tested a couple of versions, it's still present on latest version.”
“@Dreamsorcerer, Thanks for reporting this! This does look like a bug. What version of pydantic are you using?”
“@Dreamsorcerer, I've opened a PR with a potential fix, we'll get a fix for this into 2.7!”
Failure Signature (Search String)
- >> TypeAdapter(Sequence[int]).validate_python((), strict=True)
Error Message
Stack trace
Error Message
-------------
>> TypeAdapter(Sequence[int]).validate_python((), strict=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 239, in validate_python
return self.validator.validate_python(__object, strict=strict, from_attributes=from_attributes, context=context)
pydantic_core._pydantic_core.ValidationError: 1 validation error for json-or-python[json=list[int],python=chain[is-instance[Sequence],function-wrap[sequence_validator()]]]
Input should be a valid list [type=list_type, input_value=(), input_type=tuple]
For further information visit https://errors.pydantic.dev/2.5/v/list_type
Minimal Reproduction
>> TypeAdapter(Sequence[int]).validate_python((), strict=True)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.10/site-packages/pydantic/type_adapter.py", line 239, in validate_python
return self.validator.validate_python(__object, strict=strict, from_attributes=from_attributes, context=context)
pydantic_core._pydantic_core.ValidationError: 1 validation error for json-or-python[json=list[int],python=chain[is-instance[Sequence],function-wrap[sequence_validator()]]]
Input should be a valid list [type=list_type, input_value=(), input_type=tuple]
For further information visit https://errors.pydantic.dev/2.5/v/list_type
Environment
- Python: 3.10
What Broke
Users experience validation errors when passing tuples to Sequence types in strict mode.
Why It Broke
Strict mode incorrectly rejects tuples as valid inputs for Sequence types
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install pydantic==2.6.0
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/8614
First fixed release: 2.6.0
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if strict mode behavior is intentionally required for tuples.
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.6.0 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.