AttributeError: name with frozendict[..., ...] and subclass (maybe Mapping+GenericAlias issue?) #3122
Closed
3 tasks done
Labels
bug V1
Bug related to Pydantic V1.X
Bug
Using a
frozendict
as a model field works normally/correctly but when subscripted (eg:frozendict[str, int]
), pydantic errors in some weird ways:dict
(similar to External dict-like type gets mapped to dict (unwanted behaviour) #2311 and others, except even converting tofrozendict
explicitly or in a@validator
doesn't work)field.outer_type_
seems to be botched and missing attributes (but works fine on the original defining class)outputs
The
type(frozendict[str, int])
is aGenericAlias
and otherwise seems to be normal:Checks
Output of
python -c "import pydantic.utils; print(pydantic.utils.version_info())"
:The text was updated successfully, but these errors were encountered: