You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using lenient_issubclass breaks for GernicAlias types.
This is important in python >= 3.9 as the typing become the default for defining types.
Reproducible example:
frompydantic.utilsimportlenient_issubclassfromcollections.abcimportMapping# should not raise an error here:assertlenient_issubclass(list[str], Mapping) isFalse
raises:
if lenient_issubclass(param.annotation, Request):
\lib\site-packages\pydantic\utils.py:151: in lenient_issubclass
return isinstance(cls, type) and issubclass(cls, class_or_tuple)
\lib\abc.py:102: in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
E TypeError: issubclass() arg 1 must be a class
The text was updated successfully, but these errors were encountered:
Checks
Bug
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:Using
lenient_issubclass
breaks forGernicAlias
types.This is important in python >= 3.9 as the typing become the default for defining types.
Reproducible example:
raises:
The text was updated successfully, but these errors were encountered: