<@ULVA73B9P>, how do I enable Pydantic 2 support i...
# ask-marvin
j
@Marvin, how do I enable Pydantic 2 support in prefect 2?
m
In Prefect 2, Pydantic validation is enabled out-of-the-box. This is one of the new features introduced in Prefect 2, along with more flexibility for flow deployments, native async support, and others. You don't need to do anything special to enable Pydantic 2 support, it's already there in Prefect 2. For more details, you can check out the migration guide.
n
while the suggested reasoning is wrong, it is true that pydantic 2 is "sort of" default as in, if you pip install prefect without a pydantic pin, you will get pydantic 2, but internally we mostly grab v1 objects from their
pydantic.v1
compat module
j
oh sweet, there's no experimental setting I enable or anything 🦜
n
nope! worst case scenario i think you find a rough edge between pydantic v2 and prefect and then pin
pydantic<2
j
great thank you Nate!
👍 1