-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: allow pydantic v2 usage #15
Conversation
* feat: start migration to pydantic v2 * update tests for pydantic v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gr8 initiative @cfbevan
@@ -100,7 +100,7 @@ version = "0.2.1" | |||
[tool.poetry.dependencies] | |||
aioarango = "^1.0.0" | |||
indexed = "^1.3.0" | |||
pydantic = "==1.10.12" | |||
pydantic = ">=1.10.17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can already set this to
pydantic = ">=1.10.17" | |
pydantic = "<2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation claims that the v1
modules were not added till 1.10.17. Another option is to update the imports to something like this:
try:
from pydantic.v1.fields import ModelField
except ImportError:
from pydantic.fields import ModelField
I'm a bit confused by the CI checks. They ran locally fine. I will take a look at the errors and update as needed. |
I see my issue. The CI/CD uses 3.9 and I was using 3.11 locally. |
- Fix issues raised in ci/cd for nadobando#15 that came from testing with python 3.11 locally instead of python 3.9
All tests passed. There is something wrong with the tokens. |
|
Followed https://docs.pydantic.dev/latest/migration/#using-pydantic-v1-features-in-a-v1v2-environment
Note that current documentation references a CONTRIBUTING.md that does not exist. The GitHub Pages site encourages reaching out for instructions on contributing, but no contact information is listed. Please feel free to comment on any changes needed.