On 1/17/2010 2:09 PM, Tarek Ziadé wrote:
> Distribute has
> some utility code to handle zip/tar archives. So does PyPM. This is because
> the `tarfile` and `zipfile` modules do not "just work" due to several
> issues.
>
> Seehttp://gist.github.com/279606
>
> Take note of the following in the above code:
>
> 1) _ensure_read_write_access
> 2) *File.is_valid
> 3) ZippedFile.extract ... issue 6510
> 4) ZippedFile.extract ... issue 6609
> 5) TarredFile.extract ... issue 6584
Looks like some of these are already fixed (I just looked quickly in
the bug tracker though)
Only one of them was fixed (issue 6510), but the rest were either
rejected or still open:
http://bugs.python.org/issue6609 - catch special file errors
http://bugs.python.org/issue6584 - catch CRC errors in gzip
http://bugs.python.org/issue6196 - set permissions during extract
If its not already done and pending, it would be great if you could
refactor your fixes into patches for the remaining issues for each one
of those modules
I'd be happy to do so. This is what I am considering:
1) Patch Lib/zipfile.py to fix issue6609
2) Patch Lib/gzip.py and Lib/tarfile.py to fix issue6584
3) Patch Lib/tarfile.py to fix issue6196
I am hoping that (1) and (2) will get accepted. But not (3) - in which
case, should this go as a workarond (_ensure_read_write_access in
http://gist.github.com/279606) in the new, say, shutil.extract function?
-srid
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com