Skip to content
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

Refactor/ support both Pydantic 1 and 2 #1135

Merged
merged 52 commits into from Dec 7, 2023
Merged

Refactor/ support both Pydantic 1 and 2 #1135

merged 52 commits into from Dec 7, 2023

Conversation

jlnav
Copy link
Member

@jlnav jlnav commented Oct 17, 2023

Addresses #1132

  • Let globus-compute know about possibly updating for pydantic2
  • Let Balsam know about possibly updating for pydantic2
  • Refactor to support both Pydantic1 and Pydantic2

@jlnav jlnav requested a review from shuds13 October 17, 2023 20:54
Copy link
Member

@shuds13 shuds13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work well with Pydantic 2. Are you going to support 1 and 2 through a import test? How much effort is it?

@jlnav jlnav marked this pull request as draft November 6, 2023 21:39
@jlnav jlnav changed the title Refactor/pydantic2 [WIP] Refactor/ try to support both Pydantic 1 and 2 Nov 27, 2023
…etting validator attributes directly didn't work since they didn't get bound to fields. various other cross-version fixes and improvements
@jlnav jlnav marked this pull request as ready for review November 27, 2023 21:02
@jlnav jlnav changed the title [WIP] Refactor/ try to support both Pydantic 1 and 2 Refactor/ try to support both Pydantic 1 and 2 Dec 1, 2023
@jlnav jlnav requested a review from shuds13 December 1, 2023 14:50
@jlnav jlnav changed the title Refactor/ try to support both Pydantic 1 and 2 Refactor/ support both Pydantic 1 and 2 Dec 5, 2023
@jlnav
Copy link
Member Author

jlnav commented Dec 5, 2023

A thought I just had was maybe we keep this current implementation through v1, then maybe if we ever do a libE 2.0, we drop pydantic 1 support

Copy link
Member

@shuds13 shuds13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup.py "docs" lists "autodoc_pydantic<2",
Should this be changed?

@jlnav
Copy link
Member Author

jlnav commented Dec 6, 2023

setup.py "docs" lists "autodoc_pydantic<2", Should this be changed?

Yeah it should. Thanks!

@@ -60,6 +61,7 @@
# from libensemble import logger
# logger.set_level("DEBUG") # For testing the test

warnings.filterwarnings("ignore", category=UserWarning)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What warning do we get here?

@jlnav jlnav merged commit 3e03f8d into develop Dec 7, 2023
15 of 16 checks passed
@jlnav jlnav deleted the refactor/pydantic2 branch December 7, 2023 01:16
@shuds13 shuds13 mentioned this pull request Dec 15, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants