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
When I try to use from pydantic.v1 import SecretStr as an input arg type to my flow I"m getting:
pydantic.errors.PydanticUserError: The `__modify_schema__` method is not supported in Pydantic v2. Use `__get_pydantic_json_schema__` instead in class `SecretStr`.
For example:
fromtypingimportAny, Optionalfromprefectimportget_run_loggerfromprefectimportflowfrompydantic.v1importSecretStr# works with from pydantic import SecretStr@flowdeffoo(token: Optional[SecretStr] =None) ->Any:
logger=get_run_logger()
logger.info(token)
foo()
Bug summary
When I try to use from pydantic.v1 import SecretStr as an input arg type to my flow I"m getting:
For example:
Note
This use-case was mentioned in https://github.com/PrefectHQ/prefect/pull/11656/files#r1458002878
Slack thread.
Version info (
prefect version
output)Additional context
No response
The text was updated successfully, but these errors were encountered: