-
-
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 - add __exit__ attribute to make ZipFile object compatible with with_statement #49761
Comments
Currently the zipfile.ZipFile class has no __exit__ atribute, so it |
Submitted a patch against trunk. Let me know if you need anything else |
It would be nice if you could provide unit tests. |
Attached is a patch containing the fix, the updated tests, and the doc |
I think there should also be one or more tests that check if the file is |
Added two tests -- test_close and test_close_on_exception, which check |
Done in r77136 (trunk) and r77142 (py3k). Thanks for the patch! |
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: