Skip to content

Commit 1900376

Browse files
committed
review comments
1 parent 5bcc589 commit 1900376

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

doc/source/user_guide/io.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,7 @@ Furthermore you can concatenate the strings to produce a list of the original ob
34663466
.. ipython:: python
34673467
:okwarning:
34683468
3469-
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
3469+
pd.read_msgpack(df.to_msgpack() + s.to_msgpack())
34703470
34713471
.. _io.hdf5:
34723472

pandas/core/generic.py

+4
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,10 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
24202420
24212421
.. deprecated:: 0.25.0
24222422
2423+
to_msgpack is deprecated and will be removed in a future version.
2424+
It is recommended to use pyarrow for on-the-wire transmission of
2425+
pandas objects.
2426+
24232427
Parameters
24242428
----------
24252429
path : string File path, buffer-like, or None

pandas/io/packers.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ def to_msgpack(path_or_buf, *args, **kwargs):
8080
8181
.. deprecated:: 0.25.0
8282
83+
to_msgpack is deprecated and will be removed in a future version.
84+
It is recommended to use pyarrow for on-the-wire transmission of
85+
pandas objects.
86+
8387
Parameters
8488
----------
8589
path_or_buf : string File path, buffer-like, or None
@@ -91,11 +95,11 @@ def to_msgpack(path_or_buf, *args, **kwargs):
9195
compress : type of compressor (zlib or blosc), default to None (no
9296
compression)
9397
"""
94-
warnings.warn("The read_msgpack is deprecated and will be removed in a "
98+
warnings.warn("to_msgpack is deprecated and will be removed in a "
9599
"future version.\n"
96100
"It is recommended to use pyarrow for on-the-wire "
97101
"transmission of pandas objects.",
98-
FutureWarning, stacklevel=2)
102+
FutureWarning, stacklevel=3)
99103

100104
global compressor
101105
compressor = kwargs.pop('compress', None)
@@ -128,6 +132,10 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
128132
129133
.. deprecated:: 0.25.0
130134
135+
read_msgpack is deprecated and will be removed in a future version.
136+
It is recommended to use pyarrow for on-the-wire transmission of
137+
pandas objects.
138+
131139
Parameters
132140
----------
133141
path_or_buf : string File path, BytesIO like or string
@@ -148,7 +156,7 @@ def read_msgpack(path_or_buf, encoding='utf-8', iterator=False, **kwargs):
148156
"future version.\n"
149157
"It is recommended to use pyarrow for on-the-wire "
150158
"transmission of pandas objects.",
151-
FutureWarning, stacklevel=2)
159+
FutureWarning, stacklevel=3)
152160

153161
path_or_buf, _, _, should_close = get_filepath_or_buffer(path_or_buf)
154162
if iterator:

0 commit comments

Comments
 (0)