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

Migrate deprecated Pydantic function #395

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmathys
Copy link

@mmathys mmathys commented Dec 30, 2024

Pydantic's .schema() function is deprecated. This throws warnings and will eventually break when Pydantic v3.0 is used with Spectree. See the migration guide here.

This PR fixes this issue.

Thanks!

@mmathys
Copy link
Author

mmathys commented Dec 30, 2024

However I can't seem to figure out why the tests fail

@kemingy
Copy link
Member

kemingy commented Dec 30, 2024

There are still some legacy pydantic v1 interfaces used internally. To eliminate all the deprecation warnings, we will need to provide another abstraction layer to hide the diff.

The test failed because we tested against both v1&v2.

@mmathys
Copy link
Author

mmathys commented Dec 30, 2024

Thanks @kemingy. I'm not that familiar with the codebase and cannot invest time to implement this.

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.

2 participants