From 3981d477aff6845bda1b4a09647f29d686c0cc87 Mon Sep 17 00:00:00 2001 From: nameexhaustion Date: Wed, 24 Jul 2024 02:32:47 +1000 Subject: [PATCH] fix(python): Restore accidentally removed deprecated parameters (#17818) --- py-polars/polars/io/ipc/functions.py | 4 ++++ py-polars/polars/io/ndjson.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/py-polars/polars/io/ipc/functions.py b/py-polars/polars/io/ipc/functions.py index ce05d19eaf0c..4443c31d513f 100644 --- a/py-polars/polars/io/ipc/functions.py +++ b/py-polars/polars/io/ipc/functions.py @@ -31,6 +31,8 @@ from polars._typing import SchemaDict +@deprecate_renamed_parameter("row_count_name", "row_index_name", version="0.20.4") +@deprecate_renamed_parameter("row_count_offset", "row_index_offset", version="0.20.4") def read_ipc( source: str | Path | IO[bytes] | bytes, *, @@ -341,6 +343,8 @@ def read_ipc_schema(source: str | Path | IO[bytes] | bytes) -> dict[str, DataTyp return _read_ipc_schema(source) +@deprecate_renamed_parameter("row_count_name", "row_index_name", version="0.20.4") +@deprecate_renamed_parameter("row_count_offset", "row_index_offset", version="0.20.4") def scan_ipc( source: str | Path | list[str] | list[Path], *, diff --git a/py-polars/polars/io/ndjson.py b/py-polars/polars/io/ndjson.py index 739daa7d0c36..e8eccca53ccd 100644 --- a/py-polars/polars/io/ndjson.py +++ b/py-polars/polars/io/ndjson.py @@ -5,6 +5,7 @@ from pathlib import Path from typing import TYPE_CHECKING, Any, Sequence +from polars._utils.deprecation import deprecate_renamed_parameter from polars._utils.various import normalize_filepath from polars._utils.wrap import wrap_df, wrap_ldf from polars.datatypes import N_INFER_DEFAULT @@ -162,6 +163,8 @@ def read_ndjson( ).collect() +@deprecate_renamed_parameter("row_count_name", "row_index_name", version="0.20.4") +@deprecate_renamed_parameter("row_count_offset", "row_index_offset", version="0.20.4") def scan_ndjson( source: str | Path | list[str] | list[Path], *,