Skip to content

Commit

Permalink
sqlalchemy 2.x: select() uses positional arguments
Browse files Browse the repository at this point in the history
The list of columns is passed positionally, rather than as a list:
https://docs.sqlalchemy.org/en/20/changelog/migration_20.html#select-no-longer-accepts-varied-constructor-arguments-columns-are-passed-positionally

Signed-off-by: Taylor Madore <tmadore@redhat.com>
Signed-off-by: Ben Alkov <ben.alkov@redhat.com>
  • Loading branch information
taylormadore authored and ben-alkov committed Dec 13, 2023
1 parent 2729264 commit a7cd48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -1257,7 +1257,7 @@ def test_create_request_connection_error(mock_chain, app, auth_env, client, db):
engine = db.create_engine(app.config["SQLALCHEMY_DATABASE_URI"])
connection = engine.connect()
request_state = db.Table("request_state", db.MetaData(), autoload_with=engine)
query = db.select([request_state]).where(request_state.columns.request_id == 1)
query = db.select(request_state).where(request_state.columns.request_id == 1)

state_reasons = []
for res in connection.execute(query):
Expand Down

0 comments on commit a7cd48e

Please sign in to comment.