feat: Upgrade the pydantic from v1 to V2 #3942
feat: Upgrade the pydantic from v1 to V2 #3942shuchu wants to merge 15 commits intofeast-dev:masterfrom
Conversation
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
|
Seems a lot to do at a time, can we leave some of them for another PR such as great expectations? Let's target pydantic only first |
|
The upgradation of "fastapi" and "great-expectation" are required by Pydantic v2. There was a discussion over here: #3778 Also the "mypy", if I don't upgrade it, I can not past the lint check. It is a little bit struggling as you can see. :) |
|
by the way, I can downgrade the fastAPI and great-expectation versions by using the "from pydantic.v1 import" migration strategy. If you think this is better. |
|
I just found some issues of fastAPI. let me try to change the version back (for fastAPI and greate-expectation). The unit test didn't show me any errors. Only the vscode gives me some hints of errors. |
|
Great, we can get rid of GX later cause it needs some extra work for the API changes. Regarding fastapi we should expect to be resolved in this issue #3938 |
| pyarrow==15.0.0 | ||
| # via feast (setup.py) | ||
| pydantic==1.10.13 | ||
| pydantic==2.6.1 |
There was a problem hiding this comment.
Is there a specific reason for requiring 2.6.1? Otherwise, would you consider using something like 2.0.0 to allow for better compatibility for downstream users of this package?
There was a problem hiding this comment.
I didn't specify a version in the setup.py, so it loads the latest one :p. let me find a "safe" version around 2.0.0. @sudohainguyen Harry, what's your opinion?
There was a problem hiding this comment.
the txt files are just for CI workflows 😄
installation from end users should be fine since we set the boundaries in setup.py
There was a problem hiding this comment.
Apologies, the excitement got the better of me. Thanks for the clear up 💪
|
@shuchu Can't we upgrade mypy first without touching anything else? |
|
@tokoko 😆 just had a thought about it too, worth a try I believe |
Okay, let me try. Do you have a specific mypy version requirement? I'm using ~=1.1.1 in this PR. |
No, just suggesting a way to split the PR up into smaller PRs. |
|
Seems a great relief to me :) Thank you for letting me know, Harry! @sudohainguyen |
mypy upgrade is done, would you mind pushing this one? |
Sure, let me merge and adjust the great-expectation version. :) |
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
Signed-off-by: Shuchu Han <[email protected]>
|
it's ready for reviews. :) @sudohainguyen |
|
looks conflicts were resolved incorrectly, think we should re-do on a new PR 😢 |
I see the problems. let me redo it. |
|
@sudohainguyen check the new PR. :) #3948 |
What this PR does / why we need it:
Based on the requirements from the Feast users, we want to upgrade the Pydantic version to v2 (2.6) for the performance of Feast.
Here are a few important package version changes:
pydantic >= 2.0.0
great_expectations>=0.15.41 (the upper bound is removed. Its required by the pydantic v2.)
Since it changes many files in the codebase, I humbly ask our reviewers to review this PR carefully.
Which issue(s) this PR fixes:
Fixes #3778