Skip to content

Migrate to Pydantic V2#29

Merged
Martin005 merged 1 commit intoMartin005:mainfrom
tancnle:migrate-pydantic-v2
Mar 10, 2026
Merged

Migrate to Pydantic V2#29
Martin005 merged 1 commit intoMartin005:mainfrom
tancnle:migrate-pydantic-v2

Conversation

@tancnle
Copy link
Contributor

@tancnle tancnle commented Mar 10, 2026

Resolves #28

@tancnle
Copy link
Contributor Author

tancnle commented Mar 10, 2026

Annotated is added in Python 3.9 (ref) and hence causes test failures in 3.7 and 3.8 CI pipeline.

@tancnle
Copy link
Contributor Author

tancnle commented Mar 10, 2026

I see, we can get Annotated from typing_extensions module instead of typing.

@tancnle tancnle force-pushed the migrate-pydantic-v2 branch 2 times, most recently from 9c6fb5a to c3b1123 Compare March 10, 2026 14:11
@tancnle tancnle force-pushed the migrate-pydantic-v2 branch from c3b1123 to dd08e64 Compare March 10, 2026 14:19
api_client = ApiClient.get_default()
self.api_client = api_client

@validate_arguments
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This method is deprecated in favour of validate_call.

The `validate_arguments` method is deprecated; use `validate_call` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.5/migration/

@Martin005
Copy link
Owner

@tancnle Thanks for tackling this! ❤️

As Pydantic v2 officially supports only Python 3.9+, I think we also need to drop 3.7 and 3.8. Additionally, we can expand to 3.12, 3.13 and 3.14 (the last one is available from Pydantic v2.12).
Can I make that modification to your branch?

@Martin005
Copy link
Owner

@tancnle Thanks for tackling this! ❤️

As Pydantic v2 officially supports only Python 3.9+, I think we also need to drop 3.7 and 3.8. Additionally, we can expand to 3.12, 3.13 and 3.14 (the last one is available from Pydantic v2.12). Can I make that modification to your branch?

@tancnle I will make that change in another PR so we can move forward with this.

@Martin005 Martin005 merged commit ff01641 into Martin005:main Mar 10, 2026
5 checks passed
@Martin005
Copy link
Owner

@tancnle Thanks again for this PR ❤️

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.

Migrate to Pydantic v2

2 participants