Skip to content

Commit

Permalink
Remove deprecated code. (#10450)
Browse files Browse the repository at this point in the history
This PR removes various pieces of deprecated code. These removals are also helpful for certain ongoing refactoring tasks.

Resolves #10166 
Resolves #9316

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #10450
  • Loading branch information
vyasr authored Mar 24, 2022
1 parent 79f2b4c commit 8c7260f
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 1,457 deletions.
20 changes: 0 additions & 20 deletions python/cudf/cudf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,26 +58,6 @@
StructDtype,
)
from cudf.core.groupby import Grouper
from cudf.core.ops import (
add,
arccos,
arcsin,
arctan,
cos,
exp,
floor_divide,
log,
logical_and,
logical_not,
logical_or,
multiply,
remainder,
sin,
sqrt,
subtract,
tan,
true_divide,
)
from cudf.core.reshape import (
concat,
get_dummies,
Expand Down
22 changes: 0 additions & 22 deletions python/cudf/cudf/core/_base_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from __future__ import annotations

import pickle
import warnings
from functools import cached_property
from typing import Any, Set

Expand Down Expand Up @@ -1556,27 +1555,6 @@ def _split_columns_by_levels(self, levels):
def _split(self, splits):
raise NotImplementedError

def sample(
self,
n=None,
frac=None,
replace=False,
weights=None,
random_state=None,
axis=None,
ignore_index=False,
):
warnings.warn(
"Index.sample is deprecated and will be removed.", FutureWarning,
)
return cudf.core.index._index_from_data(
self.to_frame()
.sample(
n, frac, replace, weights, random_state, axis, ignore_index
)
._data
)


def _get_result_name(left_name, right_name):
if left_name == right_name:
Expand Down
30 changes: 3 additions & 27 deletions python/cudf/cudf/core/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,16 +2023,6 @@ def update(
def __iter__(self):
return iter(self._column_names)

@_cudf_nvtx_annotate
def iteritems(self):
"""Iterate over column names and series pairs"""
warnings.warn(
"iteritems is deprecated and will be removed in a future version. "
"Use .items instead.",
FutureWarning,
)
return self.items()

@_cudf_nvtx_annotate
def items(self):
"""Iterate over column names and series pairs"""
Expand Down Expand Up @@ -3361,22 +3351,6 @@ def merge(
- For outer joins, the result will be the union of categories
from both sides.
"""
if indicator:
raise NotImplementedError(
"Only indicator=False is currently supported"
)

if lsuffix or rsuffix:
raise ValueError(
"The lsuffix and rsuffix keywords have been replaced with the "
"``suffixes=`` keyword. "
"Please provide the following instead: \n\n"
" suffixes=('%s', '%s')"
% (lsuffix or "_x", rsuffix or "_y")
)
else:
lsuffix, rsuffix = suffixes

# Compute merge
gdf_result = super()._merge(
right,
Expand All @@ -3389,6 +3363,8 @@ def merge(
sort=sort,
indicator=indicator,
suffixes=suffixes,
lsuffix=lsuffix,
rsuffix=rsuffix,
)
return gdf_result

Expand Down Expand Up @@ -6341,7 +6317,7 @@ def from_pandas(obj, nan_as_null=None):

@_cudf_nvtx_annotate
def merge(left, right, *args, **kwargs):
return left.merge(right, *args, **kwargs)
return super(type(left), left)._merge(right, *args, **kwargs)


# a bit of fanciness to inject docstring with left parameter
Expand Down
Loading

0 comments on commit 8c7260f

Please sign in to comment.