From 494535eed60e61fcfda9614eef0f319900d2c277 Mon Sep 17 00:00:00 2001 From: GALI PREM SAGAR Date: Mon, 17 Jul 2023 18:53:21 -0500 Subject: [PATCH] Enforce deprecations and add clarifications around existing deprecations (#13710) Fixes: https://github.com/rapidsai/cudf/issues/13619 This PR enforces deprecation warnings and adds comments around the existing deprecation warnings that shouldn't be dropped right now. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Bradley Dice (https://github.com/bdice) - Matthew Roeschke (https://github.com/mroeschke) URL: https://github.com/rapidsai/cudf/pull/13710 --- .../developer_guide/contributing_guide.md | 2 ++ python/cudf/cudf/core/_base_index.py | 9 ++++++ python/cudf/cudf/core/algorithms.py | 1 + python/cudf/cudf/core/column/categorical.py | 15 +++++----- python/cudf/cudf/core/column/column.py | 9 +----- python/cudf/cudf/core/column/decimal.py | 21 ++++++++++++++ python/cudf/cudf/core/dataframe.py | 16 ++-------- python/cudf/cudf/core/frame.py | 29 ------------------- python/cudf/cudf/core/groupby/groupby.py | 4 +++ python/cudf/cudf/core/index.py | 8 +++++ python/cudf/cudf/core/indexed_frame.py | 2 ++ python/cudf/cudf/core/join/join.py | 1 + python/cudf/cudf/core/multiindex.py | 3 ++ python/cudf/cudf/core/reshape.py | 1 + python/cudf/cudf/core/series.py | 1 + python/cudf/cudf/core/single_column_frame.py | 1 + python/cudf/cudf/io/orc.py | 4 ++- python/cudf/cudf/tests/test_binops.py | 19 ++++++++++-- python/cudf/cudf/tests/test_reductions.py | 9 ++---- python/cudf/cudf/tests/test_series.py | 2 +- python/cudf/cudf/utils/ioutils.py | 7 ----- 21 files changed, 88 insertions(+), 76 deletions(-) diff --git a/docs/cudf/source/developer_guide/contributing_guide.md b/docs/cudf/source/developer_guide/contributing_guide.md index 26a5c13c017..65b0e4e3f41 100644 --- a/docs/cudf/source/developer_guide/contributing_guide.md +++ b/docs/cudf/source/developer_guide/contributing_guide.md @@ -40,6 +40,8 @@ For more information on how to use pre-commit hooks, see the code formatting sec cuDF follows the policy of deprecating code for one release prior to removal. For example, if we decide to remove an API during the 22.08 release cycle, it will be marked as deprecated in the 22.08 release and removed in the 22.10 release. +Note that if it is explicitly mentioned in a comment (like `# Do not remove until..`), +do not enforce the deprecation by removing the affected code until the condition in the comment is met. All internal usage of deprecated APIs in cuDF should be removed when the API is deprecated. This prevents users from encountering unexpected deprecation warnings when using other (non-deprecated) APIs. The documentation for the API should also be updated to reflect its deprecation. diff --git a/python/cudf/cudf/core/_base_index.py b/python/cudf/cudf/core/_base_index.py index b96e4256ee4..de2eae2c23e 100644 --- a/python/cudf/cudf/core/_base_index.py +++ b/python/cudf/cudf/core/_base_index.py @@ -202,6 +202,7 @@ def is_monotonic(self): ------- bool """ + # Do not remove until pandas 2.0 support is added. warnings.warn( "is_monotonic is deprecated and will be removed in a future " "version. Use is_monotonic_increasing instead.", @@ -880,6 +881,7 @@ def is_numeric(self): >>> idx.is_numeric() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_numeric is deprecated. " "Use cudf.api.types.is_any_real_numeric_dtype instead", @@ -924,6 +926,7 @@ def is_boolean(self): >>> idx.is_boolean() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_boolean is deprecated. " "Use cudf.api.types.is_bool_dtype instead", @@ -968,6 +971,7 @@ def is_integer(self): >>> idx.is_integer() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_integer is deprecated. " "Use cudf.api.types.is_integer_dtype instead", @@ -1019,6 +1023,7 @@ def is_floating(self): >>> idx.is_floating() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_floating is deprecated. " "Use cudf.api.types.is_float_dtype instead", @@ -1064,6 +1069,7 @@ def is_object(self): >>> idx.is_object() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_object is deprecated. " "Use cudf.api.types.is_object_dtype instead", @@ -1116,6 +1122,7 @@ def is_categorical(self): >>> s.index.is_categorical() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_categorical is deprecated. " "Use cudf.api.types.is_categorical_dtype instead", @@ -1162,6 +1169,7 @@ def is_interval(self): >>> idx.is_interval() False """ + # Do not remove until pandas removes this. warnings.warn( f"{type(self).__name__}.is_interval is deprecated. " "Use cudf.api.types.is_interval_dtype instead", @@ -1541,6 +1549,7 @@ def get_slice_bound(self, label, side: str, kind=None) -> int: Index of label. """ if kind is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "'kind' argument in get_slice_bound is deprecated and will be " "removed in a future version.", diff --git a/python/cudf/cudf/core/algorithms.py b/python/cudf/cudf/core/algorithms.py index b98906a6f15..ff604d3252b 100644 --- a/python/cudf/cudf/core/algorithms.py +++ b/python/cudf/cudf/core/algorithms.py @@ -120,6 +120,7 @@ def factorize( "Specify `use_na_sentinel=True` to use the sentinel value -1, " "and `use_na_sentinel=False` to encode NA values.", ) + # Do not remove until pandas 2.0 support is added. warnings.warn(msg, FutureWarning) if size_hint: diff --git a/python/cudf/cudf/core/column/categorical.py b/python/cudf/cudf/core/column/categorical.py index c692949d7a5..9a1fab372a6 100644 --- a/python/cudf/cudf/core/column/categorical.py +++ b/python/cudf/cudf/core/column/categorical.py @@ -191,6 +191,7 @@ def as_ordered(self, inplace: bool = False) -> Optional[SeriesOrIndex]: Categories (3, int64): [1 < 2 < 10] """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The inplace parameter is deprecated and will be removed in a " "future release. set_ordered will always return a new Series " @@ -272,6 +273,7 @@ def as_unordered(self, inplace: bool = False) -> Optional[SeriesOrIndex]: Categories (3, int64): [1, 2, 10] """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The inplace parameter is deprecated and will be removed in a " "future release. set_ordered will always return a new Series " @@ -341,6 +343,7 @@ def add_categories( Categories (5, int64): [1, 2, 0, 3, 4] """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The `inplace` parameter in cudf.Series.cat.add_categories " "is deprecated and will be removed in a future version of " @@ -460,6 +463,7 @@ def remove_categories( Categories (2, int64): [1, 2] """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The `inplace` parameter in " "cudf.Series.cat.remove_categories is deprecated and " @@ -578,6 +582,7 @@ def set_categories( Categories (2, int64): [1, 10] """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The `inplace` parameter in cudf.Series.cat.set_categories is " "deprecated and will be removed in a future version of cudf. " @@ -666,6 +671,7 @@ def reorder_categories( old categories """ if inplace: + # Do not remove until pandas 2.0 support is added. warnings.warn( "The `inplace` parameter in " "cudf.Series.cat.reorder_categories is deprecated " @@ -1042,14 +1048,7 @@ def data_array_view( ) -> cuda.devicearray.DeviceNDArray: return self.codes.data_array_view(mode=mode) - def unique(self, preserve_order=True) -> CategoricalColumn: - if preserve_order is not True: - warnings.warn( - "The preserve_order argument is deprecated. It will be " - "removed in a future version. As of now, unique always " - "preserves order regardless of the argument's value.", - FutureWarning, - ) + def unique(self) -> CategoricalColumn: codes = self.as_numerical.unique() return column.build_categorical_column( categories=self.categories, diff --git a/python/cudf/cudf/core/column/column.py b/python/cudf/cudf/core/column/column.py index 86de0f21671..89c5cbe2f5d 100644 --- a/python/cudf/cudf/core/column/column.py +++ b/python/cudf/cudf/core/column/column.py @@ -1149,17 +1149,10 @@ def searchsorted( values, side, ascending=ascending, na_position=na_position ) - def unique(self, preserve_order=True) -> ColumnBase: + def unique(self) -> ColumnBase: """ Get unique values in the data """ - if preserve_order is not True: - warnings.warn( - "The preserve_order argument is deprecated. It will be " - "removed in a future version. As of now, unique always " - "preserves order regardless of the argument's value.", - FutureWarning, - ) return drop_duplicates([self], keep="first")[0] def serialize(self) -> Tuple[dict, list]: diff --git a/python/cudf/cudf/core/column/decimal.py b/python/cudf/cudf/core/column/decimal.py index 171c34c0afd..a8a707ec805 100644 --- a/python/cudf/cudf/core/column/decimal.py +++ b/python/cudf/cudf/core/column/decimal.py @@ -62,6 +62,27 @@ def as_string_column( "cudf.core.column.StringColumn", as_column([], dtype="object") ) + def __pow__(self, other): + if isinstance(other, int): + if other == 0: + res = cudf.core.column.full( + size=len(self), fill_value=1, dtype=self.dtype + ) + if self.nullable: + res = res.set_mask(self.mask) + return res + elif other < 0: + raise TypeError("Power of negative integers not supported.") + res = self + for _ in range(other - 1): + res = self * res + return res + else: + raise NotImplementedError( + f"__pow__ of types {self.dtype} and {type(other)} is " + "not yet implemented." + ) + # Decimals in libcudf don't support truediv, see # https://github.com/rapidsai/cudf/pull/7435 for explanation. def __truediv__(self, other): diff --git a/python/cudf/cudf/core/dataframe.py b/python/cudf/cudf/core/dataframe.py index 0184c1e9b3c..0fe89490905 100644 --- a/python/cudf/cudf/core/dataframe.py +++ b/python/cudf/cudf/core/dataframe.py @@ -4848,6 +4848,7 @@ def describe( if datetime_is_numeric: default_include.append("datetime") else: + # Do not remove until pandas 2.0 support is added. warnings.warn( "`datetime_is_numeric` is deprecated. Specify " "`datetime_is_numeric=True` to silence this " @@ -5795,6 +5796,7 @@ def _reduce( ) if numeric_only is None and op in numeric_ops: + # Do not remove until pandas 2.0 support is added. warnings.warn( f"The default value of numeric_only in DataFrame.{op} " "is deprecated. In a future version, it will default " @@ -6268,26 +6270,12 @@ def to_csv( encoding=None, compression=None, lineterminator=None, - line_terminator=None, chunksize=None, storage_options=None, ): """{docstring}""" from cudf.io import csv - if line_terminator is not None: - warnings.warn( - "line_terminator is a deprecated keyword argument, " - "use lineterminator instead.", - FutureWarning, - ) - if lineterminator is not None: - warnings.warn( - f"Ignoring {line_terminator=} in favor " - f"of {lineterminator=}" - ) - else: - lineterminator = line_terminator if lineterminator is None: lineterminator = os.linesep return csv.to_csv( diff --git a/python/cudf/cudf/core/frame.py b/python/cudf/cudf/core/frame.py index baf1b9d71bd..51d0febafdd 100644 --- a/python/cudf/cudf/core/frame.py +++ b/python/cudf/cudf/core/frame.py @@ -2483,35 +2483,6 @@ def any(self, axis=0, skipna=True, level=None, **kwargs): **kwargs, ) - @_cudf_nvtx_annotate - def sum_of_squares(self, dtype=None): - """Return the sum of squares of values. - - Parameters - ---------- - dtype: data type - Data type to cast the result to. - - Returns - ------- - Series - - Examples - -------- - >>> import cudf - >>> df = cudf.DataFrame({'a': [3, 2, 3, 4], 'b': [7, 0, 10, 10]}) - >>> df.sum_of_squares() - a 38 - b 249 - dtype: int64 - """ - warnings.warn( - f"Support for {self.__class__}.sum_of_squares is deprecated and " - "will be removed", - FutureWarning, - ) - return self._reduce("sum_of_squares", dtype=dtype) - @_cudf_nvtx_annotate def median( self, axis=None, skipna=True, level=None, numeric_only=None, **kwargs diff --git a/python/cudf/cudf/core/groupby/groupby.py b/python/cudf/cudf/core/groupby/groupby.py index fb20940847c..2519fda326a 100644 --- a/python/cudf/cudf/core/groupby/groupby.py +++ b/python/cudf/cudf/core/groupby/groupby.py @@ -275,6 +275,7 @@ def __init__( def __iter__(self): if isinstance(self._by, list) and len(self._by) == 1: + # Do not remove until pandas 2.0 support is added. warnings.warn( "In a future version of cudf, a length 1 tuple will be " "returned when iterating over a groupby with a grouper equal " @@ -2062,6 +2063,7 @@ def pad(self, limit=None): if limit is not None: raise NotImplementedError("Does not support limit param yet.") + # Do not remove until pandas 2.0 support is added. warnings.warn( "pad is deprecated and will be removed in a future version. " "Use ffill instead.", @@ -2098,6 +2100,7 @@ def backfill(self, limit=None): if limit is not None: raise NotImplementedError("Does not support limit param yet.") + # Do not remove until pandas 2.0 support is added. warnings.warn( "backfill is deprecated and will be removed in a future version. " "Use bfill instead.", @@ -2278,6 +2281,7 @@ def pct_change( if fill_method in ("pad", "backfill"): alternative = "ffill" if fill_method == "pad" else "bfill" + # Do not remove until pandas 2.0 support is added. warnings.warn( f"{fill_method} is deprecated and will be removed in a future " f"version. Use f{alternative} instead.", diff --git a/python/cudf/cudf/core/index.py b/python/cudf/cudf/core/index.py index 1389f6a20e3..58e1b6fc7b7 100644 --- a/python/cudf/cudf/core/index.py +++ b/python/cudf/cudf/core/index.py @@ -342,6 +342,7 @@ def copy(self, name=None, deep=False, dtype=None, names=None): New RangeIndex instance with same range, casted to new dtype """ if dtype is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter dtype is deprecated and will be removed in a " "future version. Use the astype method instead.", @@ -349,6 +350,7 @@ def copy(self, name=None, deep=False, dtype=None, names=None): ) if names is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter names is deprecated and will be removed in a " "future version. Use the name parameter instead.", @@ -554,6 +556,7 @@ def get_loc(self, key, method=None, tolerance=None): # get_indexers method as an alternative, see # https://github.com/rapidsai/cudf/issues/12312 if method is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( f"Passing method to {self.__class__.__name__}.get_loc is " "deprecated and will raise in a future version.", @@ -1128,6 +1131,7 @@ def copy(self, name=None, deep=False, dtype=None, names=None): New index instance, casted to new dtype """ if dtype is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter dtype is deprecated and will be removed in a " "future version. Use the astype method instead.", @@ -1135,6 +1139,7 @@ def copy(self, name=None, deep=False, dtype=None, names=None): ) if names is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter names is deprecated and will be removed in a " "future version. Use the name parameter instead.", @@ -1197,6 +1202,7 @@ def get_loc(self, key, method=None, tolerance=None): # get_indexers method as an alternative, see # https://github.com/rapidsai/cudf/issues/12312 if method is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( f"Passing method to {self.__class__.__name__}.get_loc is " "deprecated and will raise in a future version.", @@ -1568,6 +1574,7 @@ class NumericIndex(GenericIndex): @_cudf_nvtx_annotate def __init__(self, data=None, dtype=None, copy=False, name=None): + # Do not remove until pandas 2.0 support is added. warnings.warn( f"cudf.{self.__class__.__name__} is deprecated and will be " "removed from cudf in a future version. Use cudf.Index with the " @@ -3065,6 +3072,7 @@ class StringIndex(GenericIndex): @_cudf_nvtx_annotate def __init__(self, values, copy=False, **kwargs): + # Do not remove until pandas 2.0 support is added. warnings.warn( f"cudf.{self.__class__.__name__} is deprecated and will be " "removed from cudf in a future version. Use cudf.Index with the " diff --git a/python/cudf/cudf/core/indexed_frame.py b/python/cudf/cudf/core/indexed_frame.py index 741b8b62f64..2a46db43fc2 100644 --- a/python/cudf/cudf/core/indexed_frame.py +++ b/python/cudf/cudf/core/indexed_frame.py @@ -2109,6 +2109,7 @@ def backfill(self, value=None, axis=None, inplace=None, limit=None): ------- Object with missing values filled or None if ``inplace=True``. """ + # Do not remove until pandas removes this. warnings.warn( "DataFrame.backfill/Series.backfill is deprecated. Use " "DataFrame.bfill/Series.bfill instead", @@ -2145,6 +2146,7 @@ def pad(self, value=None, axis=None, inplace=None, limit=None): ------- Object with missing values filled or None if ``inplace=True``. """ + # Do not remove until pandas removes this. warnings.warn( "DataFrame.pad/Series.pad is deprecated. Use " "DataFrame.ffill/Series.ffill instead", diff --git a/python/cudf/cudf/core/join/join.py b/python/cudf/cudf/core/join/join.py index e50a63f75aa..6a6e37180ca 100644 --- a/python/cudf/cudf/core/join/join.py +++ b/python/cudf/cudf/core/join/join.py @@ -434,6 +434,7 @@ def _validate_merge_params( # modified in the size 0 case. and max(lhs._data.nlevels, 1) != max(rhs._data.nlevels, 1) ): + # Do not remove until pandas 2.0 support is added. warnings.warn( "merging between different levels is deprecated and will be " f"removed in a future version. ({lhs._data.nlevels} levels on " diff --git a/python/cudf/cudf/core/multiindex.py b/python/cudf/cudf/core/multiindex.py index 690d6f7ea38..c1685274198 100644 --- a/python/cudf/cudf/core/multiindex.py +++ b/python/cudf/cudf/core/multiindex.py @@ -404,6 +404,7 @@ def copy( # TODO: Update message when set_levels is implemented. # https://github.com/rapidsai/cudf/issues/12307 if levels is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter levels is deprecated and will be removed in a " "future version.", @@ -413,6 +414,7 @@ def copy( # TODO: Update message when set_codes is implemented. # https://github.com/rapidsai/cudf/issues/12308 if codes is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter codes is deprecated and will be removed in a " "future version.", @@ -420,6 +422,7 @@ def copy( ) if dtype is not None: + # Do not remove until pandas 2.0 support is added. warnings.warn( "parameter dtype is deprecated and will be removed in a " "future version. Use the astype method instead.", diff --git a/python/cudf/cudf/core/reshape.py b/python/cudf/cudf/core/reshape.py index f6e0b16cfc1..3c8489481d8 100644 --- a/python/cudf/cudf/core/reshape.py +++ b/python/cudf/cudf/core/reshape.py @@ -704,6 +704,7 @@ def get_dummies( raise NotImplementedError("drop_first is not supported yet") if dtype is no_default: + # Do not remove until pandas 2.0 support is added. warnings.warn( "Default `dtype` value will be changed to 'bool' in a future " "release, please update `dtype='bool'` to adapt for " diff --git a/python/cudf/cudf/core/series.py b/python/cudf/cudf/core/series.py index d64bfd57399..aaac91e927a 100644 --- a/python/cudf/cudf/core/series.py +++ b/python/cudf/cudf/core/series.py @@ -3162,6 +3162,7 @@ def describe( """{docstring}""" if not datetime_is_numeric: + # Do not remove until pandas 2.0 support is added. warnings.warn( "`datetime_is_numeric` is deprecated and will be removed in " "a future release. Specify `datetime_is_numeric=True` to " diff --git a/python/cudf/cudf/core/single_column_frame.py b/python/cudf/cudf/core/single_column_frame.py index 0320e404e16..91a192e5942 100644 --- a/python/cudf/cudf/core/single_column_frame.py +++ b/python/cudf/cudf/core/single_column_frame.py @@ -231,6 +231,7 @@ def is_monotonic(self): ------- bool """ + # Do not remove until pandas 2.0 support is added. warnings.warn( "is_monotonic is deprecated and will be removed in a future " "version. Use is_monotonic_increasing instead.", diff --git a/python/cudf/cudf/io/orc.py b/python/cudf/cudf/io/orc.py index 8865bdd9d33..f51952d23bf 100644 --- a/python/cudf/cudf/io/orc.py +++ b/python/cudf/cudf/io/orc.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Copyright (c) 2019-2023, NVIDIA CORPORATION. import datetime import warnings @@ -296,12 +296,14 @@ def read_orc( from cudf import DataFrame if skiprows is not None: + # Do not remove until cuIO team approves its removal. warnings.warn( "skiprows is deprecated and will be removed.", FutureWarning, ) if num_rows is not None: + # Do not remove until cuIO team approves its removal. warnings.warn( "num_rows is deprecated and will be removed.", FutureWarning, diff --git a/python/cudf/cudf/tests/test_binops.py b/python/cudf/cudf/tests/test_binops.py index f8eddc21acd..6307c3655c1 100644 --- a/python/cudf/cudf/tests/test_binops.py +++ b/python/cudf/cudf/tests/test_binops.py @@ -2361,10 +2361,25 @@ def test_binops_reflect_decimal( utils.assert_eq(expect, got) +@pytest.mark.parametrize("powers", [0, 1, 2, 3]) +def test_binops_decimal_pow(powers): + s = cudf.Series( + [ + decimal.Decimal("1.324324"), + None, + decimal.Decimal("2"), + decimal.Decimal("3"), + decimal.Decimal("5"), + ] + ) + ps = s.to_pandas() + + utils.assert_eq(s**powers, ps**powers, check_dtype=False) + + def test_binops_raise_error(): s = cudf.Series([decimal.Decimal("1.324324")]) - with pytest.raises(TypeError): - s**1 + with pytest.raises(TypeError): s // 1 diff --git a/python/cudf/cudf/tests/test_reductions.py b/python/cudf/cudf/tests/test_reductions.py index 61dde412b89..c549ac20f59 100644 --- a/python/cudf/cudf/tests/test_reductions.py +++ b/python/cudf/cudf/tests/test_reductions.py @@ -122,10 +122,8 @@ def test_sum_of_squares(dtype, nelem): sr = Series(data) df = cudf.DataFrame(sr) - with pytest.warns(FutureWarning): - got = sr.sum_of_squares() - with pytest.warns(FutureWarning): - got_df = df.sum_of_squares() + got = (sr**2).sum() + got_df = (df**2).sum() expect = (data**2).sum() if cudf.dtype(dtype).kind in {"u", "i"}: @@ -158,8 +156,7 @@ def test_sum_of_squares_decimal(dtype): data = [str(x) for x in gen_rand("int8", 3) / 10] expected = pd.Series([Decimal(x) for x in data]).pow(2).sum() - with pytest.warns(FutureWarning): - got = cudf.Series(data).astype(dtype).sum_of_squares() + got = (cudf.Series(data).astype(dtype) ** 2).sum() assert_eq(expected, got) diff --git a/python/cudf/cudf/tests/test_series.py b/python/cudf/cudf/tests/test_series.py index 3bb669dede6..af1e11f0e11 100644 --- a/python/cudf/cudf/tests/test_series.py +++ b/python/cudf/cudf/tests/test_series.py @@ -2045,7 +2045,7 @@ def test_series_ordered_dedup(): sr = cudf.Series(np.random.randint(0, 100, 1000)) # pandas unique() preserves order expect = pd.Series(sr.to_pandas().unique()) - got = cudf.Series(sr._column.unique(preserve_order=True)) + got = cudf.Series(sr._column.unique()) assert_eq(expect.values, got.values) diff --git a/python/cudf/cudf/utils/ioutils.py b/python/cudf/cudf/utils/ioutils.py index 2f2e57ae83e..fb8492bbf4f 100644 --- a/python/cudf/cudf/utils/ioutils.py +++ b/python/cudf/cudf/utils/ioutils.py @@ -1236,13 +1236,6 @@ compression : str, None A string representing the compression scheme to use in the output file Compression while writing csv is not supported currently -line_terminator : str, optional - - .. deprecated:: 23.04 - - Replaced with ``lineterminator`` for consistency with - :meth:`cudf.read_csv` and :meth:`pandas.DataFrame.to_csv` - lineterminator : str, optional The newline character or character sequence to use in the output file. Defaults to :data:`os.linesep`.