Closed uroboro closed 1 year ago
Hi @uroboro, thanks for taking the time to report this issue with details. I've confirmed all the unit tests in this project pass with the changes works for both v1.4 and v2.0, but it seems that it was not enough to verify the backward compatibility.
I can work on resolving this breaking change early next week and release a new patch version. If you are happy to send a pull request fixing this, your contribution will be greatly apprecitated too!
I tried to resolve this issue but found that more changes are required for 1.3 or older version supports:
sqlalchemy.exc.ArgumentError: columns argument to select() must be a Python list or other iterable
Having if/else conditions based on the SQLAlchemy version runtime is not a complexity we want to have only for legacy versions. So, let us drop SQLAlchemy 1.3 version support since v3.20. We will make it clear in the setup.py starting in the next patch version.
To: existing users who have to keep using SQLAlchemy 1.3 or older, A workaround until you upgrade SQLAlchemy minor version is to fork the installation_store / state_store as of v3.19.5 in your app project. We'd appreciate it if you could understand this.
@uroboro Thank you very much again for reporting this issue with details, and I am sorry to come to this decision. I hope migrating to 1.4 or newer won't be hard for your apps.
Thank you for the quick reply!
We were able to upgrade to 1.4 without major issues, mostly SQLAlchemy typing issues that mypy was not able to determine as it did before.
Summary
Some compatibility with SQLAlchemy v1 was broken when adding compatibility with SQLAlchemy v2 (in #1335 for https://github.com/slackapi/bolt-python/issues/822).
Overview
From the documentation on SQLAlchemy 1.4:
CursorResult
has amappings()
member thatResultProxy
does not.Lastly, setup.py declares compatibility with
SQLAlchemy>=1,<3
, this caught us off guard.The code can be updated to support both
CursorResult
andResultProxy
as the return type ofsqlalchemy.engine.Connection.execute
with something like the following:for all the similar usages in the PR.
The Slack SDK version
slack-sdk==3.20.0
Python runtime version
3.9.5
Steps to reproduce:
Expected result:
Process the event.
Actual result: