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

[FEAT]: Use pydantic validate call instead of beartype #115

Open
ProKil opened this issue Jun 18, 2024 · 2 comments
Open

[FEAT]: Use pydantic validate call instead of beartype #115

ProKil opened this issue Jun 18, 2024 · 2 comments
Labels
experimental Experimental feature which could fail
Milestone

Comments

@ProKil
Copy link
Member

ProKil commented Jun 18, 2024

Description

Due to the unstable status of beartype, we could use Pydantic's function call validation feature.

In theory, this could be:

  1. more powerful, since we can also use the various features like before/after validator of pydantic etc.
  2. less performant, since beartype is claimed to be O(1).

However, if we only use this in the APIs to, the overhead could be minimal as the performance of the pydantic increases, and we have already heavily used it anyway.

This is an experimental feature, which will not be a part of v0.1, but could be part of v0.2

Additional Information

No response

@ProKil ProKil added the experimental Experimental feature which could fail label Jun 18, 2024
@ProKil ProKil added this to the 0.2.0 Release milestone Jun 18, 2024
@lwaekfjlk
Copy link
Member

may I ask what is the instability within beartype?

@ProKil
Copy link
Member Author

ProKil commented Jun 19, 2024

It is stable performance-wise, but unstable api-wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Experimental feature which could fail
Projects
None yet
Development

No branches or pull requests

2 participants