-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Pull Request Checklist** - [x] Fixes #713 - [ ] Tests added - [ ] Documentation/examples added - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** WIP, but wanted to get the bulk of it up for any feedback while I: - add a test run in CI with pydantic v1 installed (to ensure existing users are covered - they passed manually) - add a couple more tests and try to support serializing v1 *and* v2 user-defined models (not just the v1 models from either version - I think this should be possible). - update the model generation to update the Field import --- This PR updates hera to support use with either pydantic v1 or v2 installed. All hera internal code now imports pydantic objects from `hera.shared._pydantic` (extended and renamed from `_base_model`). This module ensures that we're always using v1 compatible objects, which allows us to support codebases installing either pydantic v1 or v2 (although the models passed to Hera must be v1 for pydantic v1 and v2 for pydantic v2). --------- Signed-off-by: Jacob Hayes <[email protected]> Signed-off-by: Matt Rose <[email protected]> Signed-off-by: Sambhav Kothari <[email protected]> Co-authored-by: Matt Rose <[email protected]> Co-authored-by: Sambhav Kothari <[email protected]>
- Loading branch information
1 parent
826cebb
commit f0279c8
Showing
73 changed files
with
439 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.