markomirosavljev / fastapi-cognito

Basic Cognito-Auth library for Python and FastAPI.
MIT License
48 stars 15 forks source link

Make `CognitoSettings` compatible with Pydantic v2 #13

Closed YaraslauZhylko closed 1 year ago

YaraslauZhylko commented 1 year ago

When using Pydantic v2+, CognitoSettings raises a warning about using the deprecated way of configuring the settings model via the Config class and urging to migrate to the new way of doing that via the model_config field.

The warning is not critical. But as more and more projects start migration to Pydantic v2, it seems reasonable to start supporting it as well.

markomirosavljev commented 1 year ago

Hello, thank you for reporting. I will update settings and create new release soon :)

markomirosavljev commented 1 year ago

I just created new release, I think everything will be correct now :)

Check release here

YaraslauZhylko commented 1 year ago

Yes, the fixed version works without warnings. Thank you.