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

backends: db: Avoid deprecated Table.count SQLAlchemy API. #1036

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Apteryks
Copy link

@Apteryks Apteryks commented May 4, 2022

Fixes #1035.

  • gourmet/backends/db.py (RecData.fetch_len): Use
    the sqlalchemy.func.count selector to return the table length.

How Has This Been Tested?

Building the package with GNU Guix and ensuring the test suite passes + summarily testing the resulting gourmet executable.

Fixes thinkle#1035.

* gourmet/backends/db.py (RecData.fetch_len): Use
the sqlalchemy.func.count selector to return the table length.
@Apteryks
Copy link
Author

Apteryks commented May 4, 2022

I'm no sqlalchemy expert, so review carefully, but it at least passes the test suite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not compatible with SQLAlchemy >= 1.4.
1 participant