Skip to content

Commit 4ec53a4

Browse files
committed
refactor(sqlalchemy): remove use of deprecated isnot
1 parent bf4bdde commit 4ec53a4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ibis/backends/base/sql/alchemy/registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def _is_null(t, op):
220220

221221
def _not_null(t, op):
222222
arg = t.translate(op.arg)
223-
return arg.isnot(sa.null())
223+
return arg.is_not(sa.null())
224224

225225

226226
def _round(t, op):

ibis/tests/sql/test_sqlalchemy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import operator
1616

1717
import pytest
18+
from pytest import param
1819
from sqlalchemy import func as F
1920
from sqlalchemy import sql
2021
from sqlalchemy import types as sat
@@ -163,8 +164,8 @@ def test_between(con, functional_alltypes, sa_functional_alltypes):
163164
@pytest.mark.parametrize(
164165
("expr_fn", "expected_fn"),
165166
[
166-
(lambda d: d.isnull(), lambda sd: sd.is_(sa.null())),
167-
(lambda d: d.notnull(), lambda sd: sd.isnot(sa.null())),
167+
param(lambda d: d.isnull(), lambda sd: sd.is_(sa.null()), id="isnull"),
168+
param(lambda d: d.notnull(), lambda sd: sd.is_not(sa.null()), id="notnull"),
168169
],
169170
)
170171
def test_isnull_notnull(

0 commit comments

Comments
 (0)