[issue12382] [msilib] Obscure exception message when trying to open a non-existent MSI database

2014-04-29 Thread William Tisäter

William Tisäter added the comment:

Found this a simple fix for an annoying and time consuming error. Patched as 
discussed earlier and decided to leave the filename out.

--
components: +Windows -Library (Lib)
keywords: +patch
nosy: +tiwilliam
versions: +Python 3.5
Added file: http://bugs.python.org/file35098/12382_msi-open-error-message.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12382
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19214] shutil.make_archive should recognize extensions in filenames

2014-04-29 Thread William Tisäter

William Tisäter added the comment:

I'm not sure if this is a suitable feature in `make_archive()`, it would only 
introduce a more expensive and ugly lookup. Using this method with a 
pre-defined filename including extension must be rare. If you really want this 
behaviour, I would prefer having this helper instead:

def make_archive(filename, **kwargs):
for fmt, ext, info in shutil.get_unpack_formats():
if not filename.lower().endswith(tuple(ext)):
continue
return shutil.make_archive(filename[:-len(ext)], fmt, **kwargs)
raise ValueError(Unknown archive format: %s % filename)

Not sure what version you are using, `get_unpack_formats()` got introduced in 
3.2.

--
nosy: +tiwilliam

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19214
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread William Tisäter

William Tisäter added the comment:

That makes sense.

I proceeded and updated `Lib/gzip.py` to use `io.DEFAULT_BUFFER_SIZE` instead. 
This will change the existing behaviour in two ways:

* Start using 1024 * 8 as buffer size instead of 1024.

* Add one more kwarg (`buffer_size`) to `GzipFile.__init__()`.

Ps. This is my first patch, tell me if I'm missing something.

--
Added file: http://bugs.python.org/file35074/20962_default-buffer-size.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20962
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20050] distutils should check PyPI certs when connecting to it

2014-04-25 Thread William Tisäter

Changes by William Tisäter will...@defunct.cc:


--
nosy: +tiwilliam

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20050
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-24 Thread William Tisäter

William Tisäter added the comment:

I played around with different file and chunk sizes using attached benchmark 
script.

After several test runs I think 1024 * 16 would be the biggest win without 
losing too many μs on small seeks. You can find my benchmark output here: 
https://gist.github.com/tiwilliam/11273483

My test data was generated with following commands:

dd if=/dev/random of=10K bs=1024 count=10
dd if=/dev/random of=1M bs=1024 count=1000
dd if=/dev/random of=5M bs=1024 count=5000
dd if=/dev/random of=100M bs=1024 count=10
dd if=/dev/random of=1000M bs=1024 count=100
gzip 10K 1M 5M 100M 1000M

--
nosy: +tiwilliam
Added file: http://bugs.python.org/file35029/benchmark_20962.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20962
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com