-
Notifications
You must be signed in to change notification settings - Fork 15
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
Pydantic Refactoring #279
Closed
Closed
Pydantic Refactoring #279
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
Subtypes of this enum variant that are embedded in a pydantic model will be: - coerced into an enum instance using member name (case insensitive) - and expose member names (upper case) in model json schema.
…w factory init from dict
reasons why dict is overridden here: pydantic will serialize from inner types outward, serializing each type as a dictionary, list, or primitive and replacing its previous type with the new "serialized" type. Consequently, this means hashable container types like tuples and frozensets that contain values that "serialize" to a non-hashable type (non-primitive, in this case) will raise a `TypeError: unhashable type: 'dict'`. In the case of PartitionConfig, FronzenSet[Partition] "serializes" inner Partition types as dictionaries which are not hashable. To get around this, we will momentarily swap the `partitions` field for a non-hashable container type, serialize using `.dict()`, and swap back in the original `partitions` container.
… in 3.8 and is deprecated in 3.11
This was referenced Feb 22, 2023
Thanks for carefully considering how we need to merge this work and spearheading the effort. LMK how I can help. |
aaraney
added a commit
to aaraney/DMOD
that referenced
this pull request
Apr 17, 2023
christophertubbs
pushed a commit
that referenced
this pull request
Apr 17, 2023
aaraney
added a commit
to aaraney/DMOD
that referenced
this pull request
Apr 24, 2023
…ved although we may want to merge the work
Closing in favor of the more up to date #331. |
aaraney
added a commit
to aaraney/DMOD
that referenced
this pull request
Jun 9, 2023
…ved although we may want to merge the work
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.
Merging of Pydantic work into
master
branch. See previous PRs to the associated feature branch tracked under #254.This PR is blocked by #278, as the code from that PR (and its predecessors) needs to be included here. As a result, the branch for this PR is going to have a force-push or two for rebasing that work once things are complete (although much of that is already done and staged in another branch).