File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ Changelog
7
7
.. This document is user facing. Please word the changes in such a way
8
8
.. that users understand how the changes affect the new version.
9
9
10
+ version 1.6.0-dev
11
+ -----------------
12
+ + Fix an error that occurred in the ``__close__ `` function when a threaded
13
+ writer was initialized with incorrect parameters.
14
+
10
15
version 1.5.3
11
16
-----------------
12
17
+ Fix a bug where append mode would not work when using
Original file line number Diff line number Diff line change @@ -204,6 +204,9 @@ def __init__(self,
204
204
queue_size : int = 1 ,
205
205
block_size : int = 1024 * 1024 ,
206
206
):
207
+ # File should be closed during init, so __exit__ method does not
208
+ # touch the self.raw value before it is initialized.
209
+ self ._closed = True
207
210
if "t" in mode or "r" in mode :
208
211
raise ValueError ("Only binary writing is supported" )
209
212
if "b" not in mode :
@@ -243,8 +246,8 @@ def __init__(self,
243
246
self ._crc = 0
244
247
self .running = False
245
248
self ._size = 0
246
- self ._closed = False
247
249
self .raw = open_as_binary_stream (filename , mode )
250
+ self ._closed = False
248
251
self ._write_gzip_header ()
249
252
self .start ()
250
253
You can’t perform that action at this time.
0 commit comments