[issue19274] make zipfile.PyZipFile more usable

2014-03-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 064ee489982e by R David Murray in branch 'default': whatsnew: improve PyZipFile filterfuc entry, and its docs (#19274). http://hg.python.org/cpython/rev/064ee489982e -- ___ Python tracker

[issue19274] make zipfile.PyZipFile more usable

2014-03-05 Thread R. David Murray
R. David Murray added the comment: For future reference, the update Christian refers to in the previous message is 4f1121ae1cb5. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl
Georg Brandl added the comment: Hi Chris, your commit is a bit hard to review due to all the unrelated spacing changes. I assume this is done automatically by your editor? It's probably best to switch off that feature for CPython development :) --

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Georg Brandl
Georg Brandl added the comment: While reviewing: is it intended that the filter is only called for directories and not for individual files? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2d39b3555951 by Georg Brandl in branch 'default': #19274: use captured_stdout() in the test suite; add NEWS entry. http://hg.python.org/cpython/rev/2d39b3555951 -- ___ Python tracker

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer
Christian Tismer added the comment: ah, I just see that. The problem was that the checkin drove me nuts. It forced me to run reindent to normalize the code. I did that with my WindIde editor, but this did not help. The point was: Actually an end-of-line was missing at the end of the files.

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer
Christian Tismer added the comment: @georg: While reviewing: is it intended that the filter is only called for directories and not for individual files? Not really. I will add this, later. Just wanted to see if this makes sense and it's worth the effort to extend it. --

[issue19274] make zipfile.PyZipFile more usable

2013-10-21 Thread Christian Tismer
Christian Tismer added the comment: added that with tests. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274 ___ ___ Python-bugs-list mailing

[issue19274] make zipfile.PyZipFile more usable

2013-10-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 34fb83421119 by Christian Tismer in branch 'default': add a filterfunc to zip file.PyZipFile.writepy, issue 19274 http://hg.python.org/cpython/rev/34fb83421119 -- nosy: +python-dev ___ Python tracker

[issue19274] make zipfile.PyZipFile more usable

2013-10-20 Thread Christian Tismer
Changes by Christian Tismer tis...@stackless.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274 ___ ___

[issue19274] make zipfile.PyZipFile more usable

2013-10-18 Thread Christian Tismer
Christian Tismer added the comment: Hi Georg, So do you think it is ok this way? I was not sure if extending the function with an optional arg is ok, or if a method to configure PyZipFile would be better. At the moment I just needed the simple functionality. Should it maybe get a regex like

[issue19274] make zipfile.PyZipFile more usable

2013-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I don't think this is needed. You can walk a tree and call writepy() for files and directories which you want. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19274

[issue19274] make zipfile.PyZipFile more usable

2013-10-18 Thread Christian Tismer
Christian Tismer added the comment: @serhiy.storchaka I don't think this is needed. You can walk a tree and call writepy() for files and directories which you want. What exactly do mean by this and needed? I cannot see the connection of my initial post and your reply. Running PyZipFile on a

[issue19274] make zipfile.PyZipFile more usable

2013-10-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: this is a filter function. Not needed means that you can got what you want without adding a filter function to zipfile.PyZipFile. Just don't call writepy() on directories which contains files which shouldn't be zipped. --

[issue19274] make zipfile.PyZipFile more usable

2013-10-18 Thread Christian Tismer
Christian Tismer added the comment: Ah, I understand: The case that does not compile comes from the toplevel test folder, which I could have excluded explicitly. But it is not a complete solution: If I want to add every package from the standard lib, then I necessarily encounter enclosed test

[issue19274] make zipfile.PyZipFile more usable

2013-10-17 Thread Georg Brandl
Georg Brandl added the comment: Looks fine but -- as a new feature -- is 3.4 only, and needs docs and tests. -- nosy: +georg.brandl stage: - patch review versions: +Python 3.4 -Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue19274] make zipfile.PyZipFile more usable

2013-10-16 Thread Christian Tismer
New submission from Christian Tismer: zipfile.PyZipFile needs a filter function. Reason: When creating an archive of the python lib, we don't want the tests. Especially the test file badsyntax_future3.py does not compile. Use case: With this little addition, it becomes very easy to create a

[issue19274] make zipfile.PyZipFile more usable

2013-10-16 Thread Christian Tismer
Christian Tismer added the comment: Here is my use case as an example. With this patch above, I can easily create a .zip file of the standard lib. This was no longer possible at all, after revision 17558, from 2001-04-18: This is a test from __future__ import nested_scopes from __future__