[issue27978] Executor#shutdown with timeout

2016-09-06 Thread Patrik Dufresne
New submission from Patrik Dufresne: Would be nice to add a new parameter to timeout if the shutdown take too long. def shutdown(self, wait=True, timeout=None): with self._shutdown_lock: self._shutdown = True self._work_queue.put(None) if wait

[issue21009] Potential deadlock in concurrent futures when garbage collection occurs during Queue.get

2016-09-06 Thread Patrik Dufresne
Patrik Dufresne added the comment: I've encounter this issue. To easily avoid this issue, I've change `queue.put(None)` to `queue.put(None, block=False)` to work around this. -- nosy: +Patrik Dufresne ___ Python tracker <http://bu

[issue14119] Ability to adjust queue size in Executors

2016-09-06 Thread Patrik Dufresne
Patrik Dufresne added the comment: Any update on this subject ? Also had to monkey patch the implementation to avoid consuming all the system memory. -- nosy: +Patrik Dufresne ___ Python tracker <http://bugs.python.org/issue14

[issue26269] zipfile should call lstat instead of stat if available

2016-02-02 Thread Patrik Dufresne
New submission from Patrik Dufresne: To mirror the behavior in tarfile, zipfile should make a call to stat instead of lstat if available. Failure to do so resolved into an "IOError No such file or directory" if the filename is a symbolik link being broken. As such, the creation of t

[issue26253] tarfile in stream mode always set zlib compression level to 9

2016-01-31 Thread Patrik Dufresne
New submission from Patrik Dufresne: When using tarfile.open(mode='w|gz'), the compression level is hard-coded to 9. Seed _Stream._init_write_gz(): self.zlib.compressobj(9, 1. In regards to zlib, I would start by replacing the value of 9 by zlib.Z_DEFAULT_COMPRESSION. This is t

[issue24110] zipfile.ZipFile.write() does not accept bytes arcname

2016-01-30 Thread Patrik Dufresne
Patrik Dufresne added the comment: Manage to work around this issue by using surrogateescape for arcname and filename. For me it's no longer an issue. -- ___ Python tracker <http://bugs.python.org/is

[issue23252] Add support of writing to unseekable file in zipfile

2016-01-30 Thread Patrik Dufresne
Patrik Dufresne added the comment: While this path provide support to create Zip file for non-seekable stream. It doesn't support reading a file from a non-seekable stream. -- nosy: +Patrik Dufresne ___ Python tracker <http://bugs.py

[issue25997] Tarfile.add with bytes path is failing

2016-01-03 Thread Patrik Dufresne
Patrik Dufresne added the comment: It's a bit tricky, but with help of surrogateescape I get the expected result. I'm closing this bug. Thanks -- status: open -> closed ___ Python tracker <http://bugs.pytho

[issue25997] Tarfile.add with bytes path is failing

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: > Is the tarfile module designed to support bytes for file names in general? > The documentation doesn’t seem to mention bytes anywhere relevant. This seems > more like a new feature rather than a bug to me. I'm using bytes in Unix to represen

[issue10757] zipfile.write, arcname should be allowed to be a byte string

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: This bug is very old, any development on the subject. This issue is hitting me trying to port my project (rdiffweb) to python3. It received a lot of broken filename with invalid encoding and I need to create a meaningful Zip archive with it. Currently, it

[issue24110] zipfile.ZipFile.write() does not accept bytes arcname

2016-01-02 Thread Patrik Dufresne
Patrik Dufresne added the comment: I'm converting my project into python3. I'm encountering issue with zipfile encoding. Look like, it only support unicode path. This is a huge issue since path are, by definition, bytes. You may store a file name with an invalid character without is

[issue25997] Tarfile.add with bytes path is failling

2016-01-02 Thread Patrik Dufresne
New submission from Patrik Dufresne: With python 3.4, Tarfile doesn't properly support adding a files with bytes path. Only unicode is supported. It's failing with exception similar to: tar.add(os.path.join(dirpath, filename), filename) File "/usr/lib/python3.4/tarfile.py&