Skip to content

Commit

Permalink
Omit params for execute if empty
Browse files Browse the repository at this point in the history
... to avoid the following warning which was added by [1]

```
sqlalchemy.exc.SADeprecationWarning: Empty parameter sequence passed to
execute(). This use is deprecated and will raise an exception in
a future SQLAlchemy release
```

[1] sqlalchemy/sqlalchemy@af655e5

Change-Id: I2dc73c422e38d002717a5f4e0db20c696b4df581
  • Loading branch information
kajinamit committed May 29, 2024
1 parent e502313 commit 94926c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oslo_db/tests/sqlalchemy/test_exc_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def do_execute(self, cursor, statement, parameters, **kw):
yield

def _run_test(self, dialect_name, statement, raises, expected,
is_disconnect=False, params=()):
is_disconnect=False, params=None):
with self._fixture(dialect_name, raises, is_disconnect=is_disconnect):
with self.engine.connect() as conn:
matched = self.assertRaises(
Expand Down

0 comments on commit 94926c4

Please sign in to comment.