Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEPR: remove nthreads kwarg from read_feather #29728

Merged
merged 2 commits into from
Nov 20, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ or ``matplotlib.Axes.plot``. See :ref:`plotting.formatters` for more.
- Removed the previously deprecated ``assert_raises_regex`` function in ``pandas.util.testing`` (:issue:`29174`)
- Removed :meth:`Index.is_lexsorted_for_tuple` (:issue:`29305`)
- Removed support for nexted renaming in :meth:`DataFrame.aggregate`, :meth:`Series.aggregate`, :meth:`DataFrameGroupBy.aggregate`, :meth:`SeriesGroupBy.aggregate`, :meth:`Rolling.aggregate` (:issue:`29608`)
- Removed previously deprecated "nthreads" argument from :func:`read_feather`, use "use_threads" instead (:issue:`23053`)
-

.. _whatsnew_1000.performance:
Expand Down
7 changes: 0 additions & 7 deletions pandas/io/feather_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from distutils.version import LooseVersion

from pandas.compat._optional import import_optional_dependency
from pandas.util._decorators import deprecate_kwarg

from pandas import DataFrame, Int64Index, RangeIndex

Expand Down Expand Up @@ -66,7 +65,6 @@ def to_feather(df: DataFrame, path):
feather.write_feather(df, path)


@deprecate_kwarg(old_arg_name="nthreads", new_arg_name="use_threads")
def read_feather(path, columns=None, use_threads=True):
"""
Load a feather-format object from the file path.
Expand All @@ -89,11 +87,6 @@ def read_feather(path, columns=None, use_threads=True):
If not provided, all columns are read.
.. versionadded:: 0.24.0
nthreads : int, default 1
Number of CPU threads to use when reading to pandas.DataFrame.
.. versionadded:: 0.21.0
.. deprecated:: 0.24.0
use_threads : bool, default True
Whether to parallelize reading using multiple threads.
Expand Down
17 changes: 0 additions & 17 deletions pandas/tests/io/test_feather.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,6 @@ def test_unsupported_other(self):
# Some versions raise ValueError, others raise ArrowInvalid.
self.check_error_on_write(df, Exception)

def test_rw_nthreads(self):
df = pd.DataFrame({"A": np.arange(100000)})
expected_warning = (
"the 'nthreads' keyword is deprecated, use 'use_threads' instead"
)
# TODO: make the warning work with check_stacklevel=True
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False) as w:
self.check_round_trip(df, nthreads=2)
# we have an extra FutureWarning because of #GH23752
assert any(expected_warning in str(x) for x in w)

# TODO: make the warning work with check_stacklevel=True
with tm.assert_produces_warning(FutureWarning, check_stacklevel=False) as w:
self.check_round_trip(df, nthreads=1)
# we have an extra FutureWarnings because of #GH23752
assert any(expected_warning in str(x) for x in w)

def test_rw_use_threads(self):
df = pd.DataFrame({"A": np.arange(100000)})
self.check_round_trip(df, use_threads=True)
Expand Down