Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue21717

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Exclusive mode for ZipFile and TarFile
Type:enhancementStage:resolved
Components:Library (Lib)Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: serhiy.storchakaNosy List: Antony.Lee, berker.peksag, lars.gustaebel, python-dev, serhiy.storchaka
Priority:normalKeywords:patch

Created on2014-06-11 10:26 byAntony.Lee, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
issue21717_tarfile.diffberker.peksag,2014-06-23 14:23review
issue21717_v2.diffberker.peksag,2015-02-06 11:22review
zipfile_mode_x.patchserhiy.storchaka,2015-02-06 16:37review
issue21717_tarfile_v3.diffberker.peksag,2015-02-10 11:24review
issue21717_tarfile_v4.diffberker.peksag,2015-02-11 12:44review
issue21717_tarfile_v5.diffberker.peksag,2015-02-12 19:47review
Messages (12)
msg220249 -(view)Author: Antony Lee (Antony.Lee)*Date: 2014-06-11 10:26
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.
msg221358 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2014-06-23 14:23
Here's a patch for tarfile.
msg235454 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-02-05 21:27
Ping.
msg235478 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2015-02-06 11:22
Here's an updated patch. Thanks Serhiy.
msg235482 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-02-06 13:29
Added more comments.
msg235488 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-02-06 16:37
Here is a patch for zipfile.
msg235679 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2015-02-10 11:24
Updated patch. Thanks again, Serhiy.
msg235912 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-02-13 19:01
New changeseted9e9e6b3c1e by Berker Peksag in branch 'default':Issue#21717: tarfile.open() now supports 'x' (exclusive creation) mode.https://hg.python.org/cpython/rev/ed9e9e6b3c1e
msg235913 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2015-02-13 19:04
Thanks for the review, Serhiy. I'll take a look at the zipfile patch tomorrow.
msg239149 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2015-03-24 16:19
Could you look on zipfile patch Berker? It is simpler than tarfile patch.
msg239231 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2015-03-25 07:42
LGTM. I left two minor comments on Rietveld. Sorry for the delay.
msg239235 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2015-03-25 08:10
New changesetb2a8c30d8ddb by Serhiy Storchaka in branch 'default':Issue#21717: The zipfile.ZipFile.open function now supports 'x' (exclusivehttps://hg.python.org/cpython/rev/b2a8c30d8ddb
History
DateUserActionArgs
2022-04-11 14:58:04adminsetgithub: 65916
2015-03-25 08:11:46serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2015-03-25 08:10:26python-devsetmessages: +msg239235
2015-03-25 07:42:43berker.peksagsetmessages: +msg239231
stage: patch review -> commit review
2015-03-24 16:19:45serhiy.storchakasetassignee:serhiy.storchaka
messages: +msg239149
2015-02-13 19:04:36berker.peksagsetmessages: +msg235913
2015-02-13 19:01:58python-devsetnosy: +python-dev
messages: +msg235912
2015-02-12 19:47:03berker.peksagsetfiles: +issue21717_tarfile_v5.diff
2015-02-11 12:44:57berker.peksagsetfiles: +issue21717_tarfile_v4.diff
2015-02-10 11:24:42berker.peksagsetfiles: +issue21717_tarfile_v3.diff

messages: +msg235679
2015-02-06 16:37:47serhiy.storchakasetfiles: +zipfile_mode_x.patch

messages: +msg235488
2015-02-06 13:29:32serhiy.storchakasetmessages: +msg235482
2015-02-06 11:22:27berker.peksagsetfiles: +issue21717_v2.diff

messages: +msg235478
2015-02-05 21:27:06serhiy.storchakasetmessages: +msg235454
2014-06-23 14:23:14berker.peksagsetfiles: +issue21717_tarfile.diff

type: enhancement
versions: - Python 3.4
keywords: +patch
nosy: +berker.peksag,serhiy.storchaka,lars.gustaebel

messages: +msg221358
stage: patch review
2014-06-11 10:26:20Antony.Leecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp