Closed rakesh-163 closed 1 month ago
In the new versions
Can you clarify, new versions of pydantic or new versions of the Python SDK? Specifically, can you confirm the sample does not work out of the box right now? If so, this may be a bug.
The same did not work out of the box with following versions of the SDK and Pydantic:
pydantic==2.8.2
temporalio==1.6.0
It worked when I made the one line change above.
The pydantic converter sample is meant for pydantic v1: https://github.com/temporalio/samples-python/blob/a0b2cdf4b0eef905776fba9b1a2805357b8b473e/pyproject.toml#L66-L68
In that case, this seems redundant. Thanks.
What are you really trying to do?
I was trying to use the encoder example here:
https://github.com/temporalio/samples-python/tree/a0b2cdf4b0eef905776fba9b1a2805357b8b473e/pydantic_converter
Describe the bug
In the new versions, the converter was not working as advertised.
I had to modify the import of pydantic_encoder:
to
As show here:
https://fastapi.tiangolo.com/tutorial/encoder/#using-the-jsonable_encoder
--
I think it is a bug. But I am not a 100% to be honest if there is something else going on that I am not aware of.