-
Notifications
You must be signed in to change notification settings - Fork 20
Migrate code to use Pydantic V2 #636
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
Closed
Closed
Changes from 9 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
43f4acb
Feature: Used tool `bump-pydantic` to migrate Pydantic V1 to Pydantic…
44510b8
fix: Solve failing test.
e4e3d1e
Fix: Tweak more issues appeared from the migration.
472c57b
Fix: Replaced `.parse_obj()` by `.model_validate()`
486b461
Fix: Replaced `.dict()` by `.model_dump()` and `.json()` by `.model_d…
bad782f
Fix: Replaced `.dict()` by `.model_dump()` and `.json()` by `.model_d…
abe0f95
Fix: Added good typecasting on test requests.
700f957
Fix: Added typing on validation method.
ee28a85
Fix: Solved last test issues.
0bc368b
Fix: ClientResponse doesn't have model_dump_json
1yam 1c9484b
Merge branch 'main' into andres-migrate_pydantic_v2
Antonyjin 683ec31
Fix: Pydantic2 raised many deprecated functions from Pydantic1
Antonyjin 6e37eaf
Fix: Changing the version of aleph message, using the branch where th…
Antonyjin 2043872
Fix: Some code have been removed during the rebase
Antonyjin 93e091c
Fix: Replacing deprecated functions
Antonyjin a6706ab
Fix: Datetime don't work the same from pydantic1 to pydantic2
Antonyjin 2f27202
Fix; Missing parameter 'details' in GetAccountBalanceResponse()
Antonyjin 79f0a2d
Fix: Replacing message_content type to CostEstimationStoreContent
Antonyjin 9908e64
Fix: Wrong fixture was used in test_compare_account_cost_with_cost_pa…
Antonyjin a526125
Fix: Decimal return str in Pydantic2 and add more precision to the va…
Antonyjin 6655585
Style: ruff, black, isort, yamlfix
Antonyjin 454bde3
Fix: json_encoder() will be deprecated, so I change it but it wasn't …
Antonyjin 64d884c
Style: mypy raise an error about the return type that was given
Antonyjin 76ec37a
Fix: Update field access to use __annotations__ in Pydantic v2
Antonyjin eb7fbe7
Fix: ClientResponse does not have model_dump_json
1yam ead68c0
Feature: Used tool `bump-pydantic` to migrate Pydantic V1 to Pydantic…
2401ad8
Fix: Tweak more issues appeared from the migration.
8d70aa1
Fix: Replaced `.dict()` by `.model_dump()` and `.json()` by `.model_d…
fa63a06
Fix: Replaced `.dict()` by `.model_dump()` and `.json()` by `.model_d…
4672fd1
Fix: Added good typecasting on test requests.
2fbc00d
Fix: Added typing on validation method.
d9b3194
Fix: Solved last test issues.
80783b1
Fix: Pydantic2 raised many deprecated functions from Pydantic1
Antonyjin dd0dc6a
fix: use field_validator instead of model_validator for check_time
1yam b85c76e
fix: unused import
1yam c3896f4
Fix: StoreContent should be CostEstimationStoreContent
1yam aa4f04f
fix: unusded `pydantic.parse_obj_as` import
1yam 462881b
fix: hatch formating issue after the rebase
1yam 8dc952f
fix: client Response is not pydantic objects
1yam e6c952d
fix: use `__annotations__` instead of model_fields for mypy issue
1yam 140b01f
fix: mypy issue using field_validator in base_messages
1yam ae3172d
fix: revert merge change to using pytz for timestamp
1yam 805ef37
Fix: ClientResponse of aiohttps does not have model_dump_json() method
1yam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
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.
Uh oh!
There was an error while loading. Please reload this page.