File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -101,15 +101,8 @@ def to_pickle(
101
101
is_text = False ,
102
102
storage_options = storage_options ,
103
103
) as handles :
104
- if handles .compression ["method" ] in ("bz2" , "xz" ) and protocol >= 5 :
105
- # some weird TypeError GH#39002 with pickle 5: fallback to letting
106
- # pickle create the entire object and then write it to the buffer.
107
- # "zip" would also be here if pandas.io.common._BytesZipFile
108
- # wouldn't buffer write calls
109
- handles .handle .write (pickle .dumps (obj , protocol = protocol ))
110
- else :
111
- # letting pickle write directly to the buffer is more memory-efficient
112
- pickle .dump (obj , handles .handle , protocol = protocol )
104
+ # letting pickle write directly to the buffer is more memory-efficient
105
+ pickle .dump (obj , handles .handle , protocol = protocol )
113
106
114
107
115
108
@doc (
You can’t perform that action at this time.
0 commit comments