diff --git a/confection/_registry.py b/confection/_registry.py index 49628da..1832858 100644 --- a/confection/_registry.py +++ b/confection/_registry.py @@ -268,7 +268,11 @@ def _make_unresolved_schema( ) elif field.annotation is None: fields[name] = (Any, Field(field.default)) - elif issubclass(field.annotation, BaseModel): + elif ( + # On Python 3.10, typing.* objects were not classes + isinstance(field.annotation, type) + and issubclass(field.annotation, BaseModel) + ): fields[name] = cls._make_unresolved_schema( field.annotation, config[name] )