vocodedev/vocode-core

[Feature]: Support for Pydantic v2

arpagon opened this issue · 3 comments

Brief Description

I propose that we add support for Pydantic v2 in the Vocode project. This will allow us to leverage the latest features and improvements in Pydantic, such as enhanced performance and strict mode for data validation.

Rationale

Pydantic is a critical part of our project, and keeping up with the latest version ensures we can leverage all its features and improvements. This can lead to better performance, improved features, and fewer bugs. Pydantic v2, in particular, offers significant performance improvements and a new strict mode for data validation, which could be beneficial for our project.

Suggested Implementation

  1. Update the Pydantic version in our project dependencies to v2.
  2. Review the Pydantic v2 migration guide and update our existing code to ensure compatibility with Pydantic v2.
  3. Test our application thoroughly to ensure that the update does not introduce any regressions.
  4. If necessary, use the code transformation tool provided by Pydantic to assist with the migration.

If any issues are encountered during the migration, we can report them to the Pydantic team using the bug V2 label on GitHub.

Just to add to this, it may also be beneficial to move to support pydantic's Settings Management with a v2 transition. Probably worthy of a whole separate issue though.

I know theres a lot of dotenv work being done but this drastically simplifies a project's environment management and can even open dynamic importing from remote SecretsManagers (happy to provide PoC code for GCP Secret Manager I wrote in the past)

See docs here:
https://docs.pydantic.dev/latest/concepts/pydantic_settings/

That's an interesting proposition! Particularly for handling dynamic imports from remote Secrets Managers.

To ensure this suggestion gets the attention it deserves, I agree that creating a separate Feature Request is the best course of action.