-
Notifications
You must be signed in to change notification settings - Fork 44.6k
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
Hotfix - call model_post_init explicitly until pydantic 2.0 #4858
Merged
Pwuts
merged 3 commits into
Significant-Gravitas:master
from
lc0rp:init-plugin-manager-explictly
Jul 4, 2023
Merged
Hotfix - call model_post_init explicitly until pydantic 2.0 #4858
Pwuts
merged 3 commits into
Significant-Gravitas:master
from
lc0rp:init-plugin-manager-explictly
Jul 4, 2023
Conversation
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
✅ Deploy Preview for auto-gpt-docs canceled.
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #4858 +/- ##
==========================================
+ Coverage 70.62% 70.67% +0.05%
==========================================
Files 69 69
Lines 3387 3390 +3
Branches 554 554
==========================================
+ Hits 2392 2396 +4
+ Misses 811 809 -2
- Partials 184 185 +1
☔ View full report in Codecov by Sentry. |
lc0rp
changed the title
Hotfix - Init plugin config explictly until pydantic 2.0
Hotfix - call model_post_init explicitly until pydantic 2.0
Jul 1, 2023
Wladastic
approved these changes
Jul 3, 2023
Wladastic
approved these changes
Jul 4, 2023
Pwuts
previously approved these changes
Jul 4, 2023
Pwuts
reviewed
Jul 4, 2023
Pwuts
approved these changes
Jul 4, 2023
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.
Tested by @NeonN3mesis; thanks!
dayofthedave
pushed a commit
to dayofthedave/Auto-GPT
that referenced
this pull request
Jul 17, 2023
…antic 2.0 (Significant-Gravitas#4858) As per pydantic/pydantic#1729 (comment), the implementation of `model_post_init()` is postponed until Pydantic v2. As a result, the initialization of PluginConfig is being skipped. This fix calls `plugin.model_post_init()` explicitly. The recency of the Pydantic v2 release means that some of the other extensions we use do not support it yet. Specifically, extensions such as spacy and openapi-python-client are currently limited to Pydantic versions that are less than 2.0. There may be other extensions that have the same limitation as well. --------- Co-authored-by: Reinier van der Leer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per pydantic/pydantic#1729 (comment), the implementation of
model_post_init()
is postponed until Pydantic v2. As a result, the initialization of PluginConfig is being skipped.This fix calls
plugin.model_post_init()
explicitly.The recency of the Pydantic v2 release means that some of the other extensions we use do not support it yet. Specifically, extensions such as spacy and openapi-python-client are currently limited to Pydantic versions that are less than 2.0. There may be other extensions that have the same limitation as well.