Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Samk13 opened this issue Aug 30, 2024 · 1 comment
Open
Labels
bug Something isn't working stale No activity for more than 60 days.

Comments

@Samk13
Copy link
Member

Samk13 commented Aug 30, 2024

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"))

@Samk13 Samk13 added the bug Something isn't working label Aug 30, 2024
Copy link
Contributor

This issue was automatically marked as stale.

@github-actions github-actions bot added the stale No activity for more than 60 days. label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale No activity for more than 60 days.
Projects
None yet
Development

No branches or pull requests

1 participant