inveniosoftware / invenio-app-rdm

Turn-key research data management platform.
https://inveniordm.docs.cern.ch
MIT License
108 stars 148 forks source link

Deprecation Warning: SQLAlchemy 2.0 Incompatibility in `invenio-oauthclient` #2819

Open Samk13 opened 2 months ago

Samk13 commented 2 months ago

Package version (if known): V12 - 13

Describe the bug

A deprecation warning related to SQLAlchemy is encountered when using the invenio-oauthclient package. The warning indicates that the current API features being used are not compatible with SQLAlchemy 2.0. The codebase may require updates to prevent breaking changes if SQLAlchemy is upgraded beyond version 2.0.

Steps to Reproduce

  1. Login with Github
  2. see the warning in the console

Screenshots (if applicable)

Details 2024-08-30 17:06:20,464: INFO/MainProcess] Task invenio_files_rest.tasks.verify_checksum[4e0ae82b-fff0-4d93-bbb8-243f171b78c2] received [2024-08-30 17:06:20,467: WARNING/ForkPoolWorker-9] /home/user/.pyenv/versions/3.9.19/envs/my-site/lib/python3.9/site-packages/invenio_files_rest/tasks.py:46: LegacyAPIWarning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) f = FileInstance.query.get(uuid.UUID(file_id)) [2024-08-30 17:06:20,467: INFO/ForkPoolWorker-2] Task invenio_files_rest.tasks.schedule_checksum_verification[ba776528-07c9-4b7f-ad75-fca45cbfaec9] succeeded in 0.051361427998926956s: None [2024-08-30 17:06:20,507: INFO/ForkPoolWorker-9] Task invenio_files_rest.tasks.verify_checksum[4e0ae82b-fff0-4d93-bbb8-243f171b78c2] succeeded in 0.04174777500156779s: None /home/user/.pyenv/versions/3.9.19/envs/my-site/lib/python3.9/site-packages/invenio_oauthclient/models.py:189: SAWarning: TypeDecorator EncryptedType() will not produce a cache key because the ``cache_ok`` attribute is not set to True. This can have significant performance implications including some performance degradations in comparison to prior SQLAlchemy versions. Set this attribute to True if this type object's state is safe to use in a cache key, or False to disable this warning. (Background on this error at: https://sqlalche.me/e/14/cprf) cls.query.options(db.joinedload("remote_account")) /home/user/.pyenv/versions/3.9.19/envs/my-site/lib/python3.9/site-packages/invenio_oauthclient/models.py:189: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings. Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9) cls.query.options(db.joinedload("remote_account"))
github-actions[bot] commented 2 days ago

This issue was automatically marked as stale.