Surprising difference in validation between collections.abc.Sequence and typing.Sequence #8321
Open
1 task done
Labels
bug V2
Bug related to Pydantic V2
Initial Checks
Description
I was upgrading some code to drop python 3.9 support and ran into a validation error when replacing
typing.Sequence
withcollections.abc.Sequence
in the example below the basemodel fail to validate withoutarbitrary_types_allowed
ifcollections.abc.Sequence
is used without subscript (which normally would be equivalent tocollections.abc.Sequence[Any]
The same issue (with a slightly different error message) happens in v1
Example Code
Python, Pydantic & OS Version
The text was updated successfully, but these errors were encountered: