Skip to content

Commit

Permalink
refactor(api): remove deprecated ibis.sequence() function
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `ibis.sequence()` is removed
  • Loading branch information
kszucs authored and cpcloud committed Apr 13, 2023
1 parent ba7ce84 commit de0bf69
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
20 changes: 1 addition & 19 deletions ibis/expr/api.py
Expand Up @@ -14,7 +14,6 @@
import ibis.expr.builders as bl
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
import ibis.expr.rules as rlz
import ibis.expr.schema as sch
import ibis.expr.types as ir
from ibis import selectors, util
Expand All @@ -38,7 +37,7 @@
null,
struct,
)
from ibis.util import deprecated, experimental
from ibis.util import experimental

if TYPE_CHECKING:
import pandas as pd
Expand Down Expand Up @@ -146,7 +145,6 @@
'schema',
'Schema',
'selectors',
'sequence',
'set_backend',
'show_sql',
'struct',
Expand Down Expand Up @@ -221,22 +219,6 @@ def param(type: dt.DataType) -> ir.Scalar:
return ops.ScalarParameter(type).to_expr()


@deprecated(as_of='5.0', removed_in='6.0', instead='use tuple or list instead')
def sequence(values: Sequence[T | None]) -> ir.List:
"""Wrap a list of Python values as an Ibis sequence type.
Parameters
----------
values
Should all be None or the same type
Returns
-------
List
A list expression.
"""
return [op.to_expr() for op in rlz.tuple_of(rlz.any, values)]


def schema(
pairs: SupportsSchema | None = None,
names: Iterable[str] | None = None,
Expand Down
8 changes: 0 additions & 8 deletions ibis/tests/expr/test_value_exprs.py
Expand Up @@ -1656,11 +1656,3 @@ def test_quantile_shape():
(b1,) = expr.op().selections

assert b1.output_shape.is_columnar()


def test_sequence():
with pytest.warns(FutureWarning):
exprs = ibis.sequence([3, 2])

for expr in exprs:
assert isinstance(expr, ir.ScalarExpr)

0 comments on commit de0bf69

Please sign in to comment.