-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed imports to avoid pydantic if the version is >=2 #281
Fixed imports to avoid pydantic if the version is >=2 #281
Conversation
2ba5eab
to
c71443d
Compare
c71443d
to
3a6c8be
Compare
From the docs it looks like another option might be in v2 you can do |
89406a5
to
a574d58
Compare
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? |
a574d58
to
04936d1
Compare
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. |
04936d1
to
2deace2
Compare
2deace2
to
9b8ed05
Compare
Closes #280
Will now use dummy imports if the pydantic version is >= 2.0.0, not only if pydantic doesn't exist.