Skip to content

DEPR: deprecate msgpack support #27103

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

Merged
merged 3 commits into from
Jun 29, 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
Prev Previous commit
review comments
  • Loading branch information
jreback committed Jun 28, 2019
commit 1900376e8d64e2477e6bf38fe34e7c231a05c4a8
2 changes: 1 addition & 1 deletion doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3466,7 +3466,7 @@ Furthermore you can concatenate the strings to produce a list of the original ob
.. ipython:: python
:okwarning:

pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())

.. _io.hdf5:

Expand Down
4 changes: 4 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2420,6 +2420,10 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):

.. deprecated:: 0.25.0

to_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.

Parameters
----------
path : string File path, buffer-like, or None
Expand Down
14 changes: 11 additions & 3 deletions pandas/io/packers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ def to_msgpack(path_or_buf, *args, **kwargs):

.. deprecated:: 0.25.0

to_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.

Parameters
----------
path_or_buf : string File path, buffer-like, or None
Expand All @@ -91,11 +95,11 @@ def to_msgpack(path_or_buf, *args, **kwargs):
compress : type of compressor (zlib or blosc), default to None (no
compression)
"""
warnings.warn("The read_msgpack is deprecated and will be removed in a "
warnings.warn("to_msgpack is deprecated and will be removed in a "
"future version.\n"
"It is recommended to use pyarrow for on-the-wire "
"transmission of pandas objects.",
FutureWarning, stacklevel=2)
FutureWarning, stacklevel=3)

global compressor
compressor = kwargs.pop('compress', None)
Expand Down Expand Up @@ -128,6 +132,10 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):

.. deprecated:: 0.25.0

read_msgpack is deprecated and will be removed in a future version.
It is recommended to use pyarrow for on-the-wire transmission of
pandas objects.

Parameters
----------
path_or_buf : string File path, BytesIO like or string
Expand All @@ -148,7 +156,7 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
"future version.\n"
"It is recommended to use pyarrow for on-the-wire "
"transmission of pandas objects.",
FutureWarning, stacklevel=2)
FutureWarning, stacklevel=3)

path_or_buf, _, _, should_close = get_filepath_or_buffer(path_or_buf)
if iterator:
Expand Down