-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zipfile.testzip() using progressive file reads #45108
Comments
testzip() still fails for big files. This patch implements reading small buffers. Also corrected main() where the return value of testzip() is ignored, hiding errors in zipfiles. |
Any progress report on this issue, please? |
This sort of change definitely needs to be made to avoid reading huge |
It would appear that the change to testzip has already been made: http://mail.python.org/pipermail/python-checkins/2008-August/072892.html I can add some tests, though. I'll submit another patch shortly. |
Attached is a patch that makes the zipfile module check the result of |
Tried the patch against 2.7 and got "RuntimeError: Attempt to read ZIP archive that was already closed" for TestsWithSourceFile test_deflated and test_stored. The patch needs updating for py3k. |
Ok, I'll see if I can update that in the next week or so. |
Here's an updated patch against the py3k trunk (testzip-patch3.diff) that passes all tests (including test_zipfile64) on Linux on a 64-bit machine. I can backport this to 2.x, but I'll wait until somebody indicates a need for it before I spend any time on it. |
I re-checked testzip-patch3.diff since some time has passed since I last commented on it, and it still seems to work ok (the small test_zipfile.py block failed to apply, but that's easy enough to do manually). Passes full test run, test_zipfile64.py, etc., on Linux x86_64. If there is something about the patch that still needs to be addressed before it can be committed, let me know and I'll see what I can do. |
I'd be glad to do some code reviews or something in exchange for the time of somebody with commit rights. :-) If anybody is interested in getting this change committed, please let me know and I'll check that the patch is still valid. Thanks! |
I'm not sure about new tests, but the changes in the docstring and old tests look necessary. |
I added comments in Rietveld. |
I think this was done in r65761 | antoine.pitrou | 2008-08-17 08:06:29 -0500 (Sun, 17 Aug 2008) | 3 lines
(commit 4cd6a95). |
Yes, the change to testzip has already been made. as was said in #45108 (comment). But the issue was kept open for other patch, which added some tests and improved the docstring. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: