File tree 1 file changed +5
-13
lines changed
1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ def save(self):
142
142
elif hasattr (self .path_or_buf , 'write' ):
143
143
f = self .path_or_buf
144
144
close = False
145
+ if self .compression :
146
+ import warnings
147
+ msg = ("compression has no effect when passing file-like "
148
+ "object as input." )
149
+ warnings .warn (msg , RuntimeWarning , stacklevel = 2 )
145
150
else :
146
151
f , handles = _get_handle (self .path_or_buf , self .mode ,
147
152
encoding = encoding ,
@@ -179,19 +184,6 @@ def save(self):
179
184
for _fh in handles :
180
185
_fh .close ()
181
186
182
- # GH 17778 handles zip compression for byte strings separately.
183
- # if path is not None:
184
- # buf = f.getvalue()
185
- # f, handles = _get_handle(path, self.mode,
186
- # encoding=encoding,
187
- # compression=self.compression)
188
- # f.write(buf)
189
- #
190
- # if not py2zip:
191
- # f.close()
192
- # for _fh in handles:
193
- # _fh.close()
194
-
195
187
def _save_header (self ):
196
188
197
189
writer = self .writer
You can’t perform that action at this time.
0 commit comments