aio-libs / aiopg

aiopg is a library for accessing a PostgreSQL database from the asyncio
http://aiopg.readthedocs.io
BSD 2-Clause "Simplified" License
1.4k stars 160 forks source link

SQLAlchemy 2.0 compatibility #901

Closed mayty closed 1 year ago

mayty commented 1 year ago

What do these changes do?

Fix SQLAlchemy 2.0 compatibility

Are there changes in behavior for the user?

No

Related issue number

897.bugfix

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #901 (705faac) into master (0b5e63c) will increase coverage by 1.32%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #901      +/-   ##
==========================================
+ Coverage   91.77%   93.09%   +1.32%     
==========================================
  Files           9       12       +3     
  Lines         863     1579     +716     
  Branches      118      188      +70     
==========================================
+ Hits          792     1470     +678     
- Misses         53       77      +24     
- Partials       18       32      +14     
Files Changed Coverage Δ
aiopg/sa/engine.py 99.17% <100.00%> (+0.03%) :arrow_up:
aiopg/sa/result.py 90.47% <100.00%> (ø)

... and 3 files with indirect coverage changes

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

Pliner commented 1 year ago

Hey @mayty,

Thank you for the contribution.

I have pushed CI changes (not ideal through) to run tests on both major versions of sqlalchemy.

Pliner commented 1 year ago

The changes look reasonable for me, so I am happy to merge and release a new beta version.

@mayty Do you want to include any other additional changes into this PR?

mayty commented 1 year ago

Hi That's all the changes I want to include

But older version sqlalchemy test should probably be limited to >=1.4,<1.5. They would fail on 1.3 due to new syntax

Pliner commented 1 year ago

But older version sqlalchemy test should probably be limited to >=1.4,<1.5. They would fail on 1.3 due to new syntax

Thanks for pointing this out. I have bumped a min supported sqlalchemy version to 1.4.

Pliner commented 1 year ago

@mayty I was thinking to release it as 1.5 with a minor version bump. What do you think?

mayty commented 1 year ago

I agree

Pliner commented 1 year ago

https://pypi.org/project/aiopg/1.5.0a1/