Closed evalott100 closed 1 year ago
From the docs it looks like another option might be in v2 you can do from pydantic import v1 as pydantic
, which might mean you can get it to work for both?
From the docs it looks like another option might be in v2 you can do
from pydantic import v1 as pydantic
, which might mean you can get it to work for both?
I've used try except with v1 now, so the generation code will work with either.
From the docs it looks like another option might be in v2 you can do
from pydantic import v1 as pydantic
, which might mean you can get it to work for both?I've used try except with v1 now, so the generation code will work with either.
But the upper cap is still in to stop pydantic < 2 being installed?
From the docs it looks like another option might be in v2 you can do
from pydantic import v1 as pydantic
, which might mean you can get it to work for both?I've used try except with v1 now, so the generation code will work with either.
But the upper cap is still in to stop pydantic < 2 being installed?
I think it's probably still good to pin pydantic<2 as a dev requirement since the generation code does require that version, the difference is that if event-model is installed as a requirement in an environment with pydantic 2 then the wrapper will use pydantic 1 instead.
Closes #280 Will now use dummy imports if the pydantic version is >= 2.0.0, not only if pydantic doesn't exist.