Fix deprecated usage patterns for sqlalchemy 2.0 #237
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hoping to get the ball rolling on the issue I raised earlier this year
I haven't done extensive testing, but I can confirm that with the following minimal changes I can now use the
sqlalchemy-2.0styleFutureEnginewithsqlalchemy-redshiftfor reflection and simple DDL operations.If this doesn't break any existing functionality I'd propose we at least merge this in initially as a quick fix and sort out any
sqlalchemy-2.0edge-cases I might've missed as bug reports come in.For context, in
sqlalchemy-2.0you can no longer:Connection.execute()(you must wrap them insqlalchemy.text())Connectionby callingConnection.connect()Which are both things that were being done in
sqlalchemy-redshift