sabuhish / fastapi-mail

Fastapi mail system sending mails(individual, bulk) attachments(individual, bulk)
https://sabuhish.github.io/fastapi-mail/
MIT License
673 stars 82 forks source link

chore: update dependencies for support pydantic V2 and adapt code in consequences #195

Closed fchancel closed 1 year ago

fchancel commented 1 year ago

Update pydantic to v2, fastapi to v0.100, email-validator to v2.0 packages. Updated code according to pydantic V1 to V2 migration documentation. Fix #194

chrisK824 commented 1 year ago

@sabuhish this incompatibility is blocking updates into pydantic v2 which came out already with tons of enhancements.

Do you plan to merge this request and update dependencies or should we move out to some other solution?

alexvhicks commented 1 year ago

@sabuhish Need any help with this update? Currently blocking my team's update to Pydantic v2 as well. Let me know if I can help out anywhere.

sabuhish commented 1 year ago

Thank you guys, for the report and work on it, changes LGTM. I would ask @fchancel to fix the linter please, it suppose to run on the pull request, but I realized it is manual work. Once it is fixed I will merge and realease it. Good work!

fchancel commented 1 year ago

@sabuhish I fixed the linter. Only mypy errors persist. 32 already existing errors and an additional one due to the fact that mypy is not updated and therefore the expected formats for Pydantic do not correspond.

This new PR (#197) remove all mypy errors and alerts.

A re-reading of the modifications would be a plus to ensure a smooth transition from pydantic V1 to V2. Although I imagine the unit tests cover the essential cases.

sabuhish commented 1 year ago

Thank you for your work, sorry for being late and busy. I believe so also, many people are waiting for this PR to be merged, it is worth having it in the next release. I will have a look at your next PR too. Thanks again for your efforts, in helping the growth of this library!