PythonNest / PyNest

PyNest is a Python framework built on top of FastAPI that follows the modular architecture of NestJS
https://pythonnest.github.io/PyNest
MIT License
737 stars 50 forks source link

[UpgradeDependecies] Upgrade Pydantic to v2, FastAPI > 0.100.0, beanie > 1.21.0 #30

Open ItayTheDar opened 9 months ago

ItayTheDar commented 9 months ago

Description

This issue is to track the upgrade of key dependencies in the PyNest project. The upgrades are necessary to ensure compatibility with the latest versions and to leverage new features and improvements in these libraries.

Dependencies to Upgrade

  1. Pydantic: Upgrade to version 2.

    • Reason: Pydantic version 2 includes significant improvements in performance (rust backbone) and bug fixes that can enhance the robustness of data validation in PyNest.
  2. FastAPI: Upgrade to version 0.100.0 or higher.

    • Reason: Newer versions of FastAPI offer enhanced performance, better error handling, and additional features that can improve the API development experience in PyNest.
  3. Beanie: Upgrade to version 1.21.0 or higher.

    • Reason: Beanie's newer versions might include optimizations and new functionalities that are beneficial for database interactions within PyNest.

Expected Benefits

Considerations


This upgrade is crucial for maintaining the project's relevance and efficiency. Contributions and discussions on how to best approach these upgrades are welcome.

uriafranko commented 9 months ago

@ItayTheDar,

Important to keep in mind that Pydantic V2 has a lot of changes and a lot of deprecated functions. I wouldn't be hurry to change unless it has full backward compatibility.

ItayTheDar commented 8 months ago

@uriafranko have you experienced this migration? Does the improvement in performance is that good? And since PyNest is rely on fastapi, then most of the migration has been done already.

geovalexis commented 1 month ago

Pydantic v2 comes with huge improvements over previous version. FastApi is heavily relied on Pydantic and its team has already completed the full upgrade. I don't concibe any new projects starting from a <2 version of Pydantic. Please, this upgrade is necessary and it's the only thing holding me up from using this library.

ItayTheDar commented 1 month ago

Hi @geovalexis , I'm planning to do that migration very soon.