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

Fix use of deprecated SQLAlchemy functionality in tests #814

Merged
merged 1 commit into from
Jul 9, 2022

Conversation

Nothing4You
Copy link
Collaborator

What do these changes do?

Fixes the following deprecation warning:
SADeprecationWarning: The FromClause.count() method is deprecated, and will be removed in a future release. Please use the count function available from the func namespace.

References:
https://docs.sqlalchemy.org/en/13/core/metadata.html#sqlalchemy.schema.Table.count
https://docs.sqlalchemy.org/en/13/core/functions.html#sqlalchemy.sql.functions.count

Are there changes in behavior for the user?

No, tests only.

Fixes the following deprecation warning:
SADeprecationWarning: The FromClause.count() method is deprecated, and will be removed in a future release.   Please use the count function available from the func namespace.

References:
https://docs.sqlalchemy.org/en/13/core/metadata.html#sqlalchemy.schema.Table.count
https://docs.sqlalchemy.org/en/13/core/functions.html#sqlalchemy.sql.functions.count
@Nothing4You Nothing4You added this to the 0.2 milestone Jul 9, 2022
@codecov
Copy link

codecov bot commented Jul 9, 2022

Codecov Report

Merging #814 (3d24610) into master (572b5a3) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #814   +/-   ##
=======================================
  Coverage   92.72%   92.72%           
=======================================
  Files          38       38           
  Lines        5569     5569           
  Branches      943      943           
=======================================
  Hits         5164     5164           
  Misses        317      317           
  Partials       88       88           
Flag Coverage Δ
ubuntu-latest_3.10_mariadb-10.3 89.27% <100.00%> (ø)
ubuntu-latest_3.10_mariadb-10.4 89.27% <100.00%> (ø)
ubuntu-latest_3.10_mariadb-10.5 89.26% <100.00%> (ø)
ubuntu-latest_3.10_mariadb-10.6 89.26% <100.00%> (ø)
ubuntu-latest_3.10_mariadb-10.7 89.26% <100.00%> (ø)
ubuntu-latest_3.10_mariadb-10.8 89.26% <100.00%> (ø)
ubuntu-latest_3.10_mysql-5.7 89.96% <100.00%> (ø)
ubuntu-latest_3.10_mysql-8.0 91.34% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.3 89.24% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.4 89.24% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.5 89.22% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.6 89.22% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.7 89.22% <100.00%> (ø)
ubuntu-latest_3.11-dev_mariadb-10.8 89.22% <100.00%> (ø)
ubuntu-latest_3.11-dev_mysql-5.7 89.92% <100.00%> (ø)
ubuntu-latest_3.11-dev_mysql-8.0 91.30% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.3 88.67% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.4 88.67% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.5 88.66% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.6 88.66% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.7 88.66% <100.00%> (ø)
ubuntu-latest_3.7_mariadb-10.8 88.66% <100.00%> (ø)
ubuntu-latest_3.7_mysql-5.7 89.40% <100.00%> (ø)
ubuntu-latest_3.7_mysql-8.0 90.87% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.3 89.32% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.4 89.32% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.5 89.30% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.6 89.30% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.7 89.30% <100.00%> (ø)
ubuntu-latest_3.8_mariadb-10.8 89.30% <100.00%> (ø)
ubuntu-latest_3.8_mysql-5.7 90.00% <100.00%> (ø)
ubuntu-latest_3.8_mysql-8.0 91.37% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.3 89.17% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.4 89.17% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.5 89.15% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.6 89.15% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.7 89.15% <100.00%> (ø)
ubuntu-latest_3.9_mariadb-10.8 89.15% <100.00%> (ø)
ubuntu-latest_3.9_mysql-5.7 89.85% <100.00%> (ø)
ubuntu-latest_3.9_mysql-8.0 91.22% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
tests/sa/test_sa_connection.py 97.32% <100.00%> (ø)
tests/sa/test_sa_transaction.py 97.50% <100.00%> (ø)
tests/test_async_with.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 572b5a3...3d24610. Read the comment docs.

@Nothing4You Nothing4You merged commit 57d5b8e into aio-libs:master Jul 9, 2022
@Nothing4You Nothing4You deleted the sqlalchemy branch July 9, 2022 20:34
@Nothing4You Nothing4You mentioned this pull request Jul 9, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant