aio-libs / aiomysql

aiomysql is a library for accessing a MySQL database from the asyncio
https://aiomysql.rtfd.io
MIT License
1.75k stars 255 forks source link

Bump SQLAlchemy version to 1.4 #940

Open Nothing4You opened 1 year ago

Nothing4You commented 1 year ago

What do these changes do?

Update SQLAlchemy dependency to 1.4.

Are there changes in behavior for the user?

SQLAlchemy <1.4 will no longer be supported.

Related issue number

wip notes

Relevant SQLAlchemy changes: https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#change-4645

This should port https://github.com/aio-libs/aiopg/pull/806. The aiopg PR indicates that this might need to be implemented differently due to aiomysql supporting executemany. Since #294, aiomysql also supports compiled cache, which on first look seems to need additional care.

https://github.com/aio-libs/aiomysql/issues/577#issuecomment-829737354 has a monkeypatch snippet for SAConnection._execute.

I'm personally not an SQLAlchemy user, so if someone can contribute additional test cases, patches or review I'd appreciate it.

Also needs to port https://github.com/aio-libs/aiopg/pull/891.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #940 (e856063) into master (83aa96e) will decrease coverage by 0.06%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #940      +/-   ##
==========================================
- Coverage   93.68%   93.62%   -0.06%     
==========================================
  Files          36       36              
  Lines        5538     5538              
  Branches      895      895              
==========================================
- Hits         5188     5185       -3     
- Misses        260      263       +3     
  Partials       90       90              
Flag Coverage Δ
CI-GHA 93.22% <100.00%> (-0.06%) :arrow_down:
DB-mariadb-10.10 90.26% <100.00%> (-0.02%) :arrow_down:
DB-mariadb-10.11 90.26% <100.00%> (-0.02%) :arrow_down:
DB-mariadb-10.4 90.28% <100.00%> (-0.02%) :arrow_down:
DB-mariadb-10.5 90.26% <100.00%> (-0.02%) :arrow_down:
DB-mariadb-10.6 90.26% <100.00%> (-0.02%) :arrow_down:
DB-mariadb-10.9 90.26% <100.00%> (-0.02%) :arrow_down:
DB-mysql-5.7 90.97% <100.00%> (-0.02%) :arrow_down:
DB-mysql-8.0 92.36% <100.00%> (-0.06%) :arrow_down:
OS-Linux 93.22% <100.00%> (-0.06%) :arrow_down:
Py-3.10.11 93.13% <100.00%> (-0.02%) :arrow_down:
Py-3.11.3 93.13% <100.00%> (-0.06%) :arrow_down:
Py-3.7.16 92.76% <100.00%> (-0.02%) :arrow_down:
Py-3.8.16 93.16% <100.00%> (-0.02%) :arrow_down:
Py-3.9.16 93.00% <100.00%> (-0.02%) :arrow_down:
VM-ubuntu-latest 93.22% <100.00%> (-0.06%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.10 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.11 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.4 90.19% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.5 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.6 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mariadb-10.9 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mysql-5.7 90.88% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.10_mysql-8.0 92.27% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.10 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.11 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.4 90.19% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.5 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.6 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mariadb-10.9 90.17% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mysql-5.7 90.88% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.11_mysql-8.0 92.27% <100.00%> (-0.06%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.10 89.62% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.11 89.62% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.4 89.64% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.5 89.62% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.6 89.62% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mariadb-10.9 89.62% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mysql-5.7 90.37% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.7_mysql-8.0 91.84% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.10 90.21% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.11 90.21% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.4 90.23% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.5 90.21% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.6 90.21% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mariadb-10.9 90.21% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mysql-5.7 90.92% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.8_mysql-8.0 92.29% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.10 90.05% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.11 90.05% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.4 90.07% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.5 90.05% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.6 90.05% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mariadb-10.9 90.05% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mysql-5.7 90.76% <100.00%> (-0.02%) :arrow_down:
ubuntu-latest_3.9_mysql-8.0 92.13% <100.00%> (-0.02%) :arrow_down:

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

Impacted Files Coverage Δ
aiomysql/sa/connection.py 93.43% <100.00%> (ø)
aiomysql/sa/engine.py 90.74% <100.00%> (ø)

... and 2 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more