fastapi-users / fastapi-users-db-beanie

FastAPI Users database adapter for Beanie
MIT License
5 stars 5 forks source link

Update Collection to Settings #2

Closed vittoriozamboni closed 2 years ago

vittoriozamboni commented 2 years ago

Description

In beanie 1.11, the Collection configuration class has been unified in Settings.

This is not a breaking issue since the Collection is still supported, but a DeprecationWarning is thrown. For a new project, where there is a need to change the Settings and inheriting the ones set in this package, can cause confusion or a mix of the two. In the linked commit, it's easy to see that Collection attributes will overrides the one in Settings.

To Reproduce

Steps to reproduce the behaviour:

  1. make install
  2. make test

test_warnings

Expected behaviour

No warning is raised.

Additional context

After updating the code, I'd suggest bumping the version and update the Readme too, as this is a breaking change.