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
fromunittest.mockimportcallfrompydantic_coreimportto_jsonable_python# TypeError: '_Call' object cannot be converted to 'SchemaSerializer'to_jsonable_python(call(1, 2, 3), fallback=lambdacall: call.args)
We usually try very hard to avoid raising errors from serialization, this is also on a type inference pathway. I think it'd be reasonable to just hit fallback if the __pydantic_serializer__ attribute is invalid (this is the root cause of the TypeError).