-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Exclusive mode for ZipFile and TarFile #65916
Comments
I noticed that while lzma and bz2 already support the "x" (create a new file, raise if it already exists) flag, zipfile and tarfile don't know about it yet. It would be an useful addition, just as it is useful for regular open. A quick look at both modules show that this likely only requires a little bit more than updating the checks in the corresponding constructors to allow "x" mode, as the modes are passed (nearly) transparently to the open() builtin. |
Here's a patch for tarfile. |
Ping. |
Here's an updated patch. Thanks Serhiy. |
Added more comments. |
Here is a patch for zipfile. |
Updated patch. Thanks again, Serhiy. |
New changeset ed9e9e6b3c1e by Berker Peksag in branch 'default': |
Thanks for the review, Serhiy. I'll take a look at the zipfile patch tomorrow. |
Could you look on zipfile patch Berker? It is simpler than tarfile patch. |
LGTM. I left two minor comments on Rietveld. Sorry for the delay. |
New changeset b2a8c30d8ddb by Serhiy Storchaka in branch 'default': |
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: