Issue18262
Created on 2013-06-19 06:19 by techtonik, last changed 2022-04-11 14:57 by admin.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| Issue18262_27.patch | Alex.LordThorsen, 2014-04-14 22:53 | python 2.7 documentation patch | review | |
| Issue18262_34_35.patch | Alex.LordThorsen, 2014-04-14 22:54 | python 3.x zipfile documentation patch | review | |
| Messages (10) | |||
|---|---|---|---|
| msg191447 - (view) | Author: anatoly techtonik (techtonik) | Date: 2013-06-19 06:19 | |
zipfile doesn't restore file attributes when extracting. Documentation should at least contain example how to do this manually, because the ony way to do this - through ZipInfo.external_attr is too cryptic. |
|||
| msg191451 - (view) | Author: anatoly techtonik (techtonik) | Date: 2013-06-19 07:01 | |
Here is the doc - http://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838#6297838 |
|||
| msg191456 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2013-06-19 08:24 | |
I'd be +1 on extending the zipfile API in 3.4 (with a documentation update in older releases as suggested by anatoly): * Add a method or property to ZipInfo for (un)packing the external_attr field * Add an keyword argument to Zipfile.extract and Zipfile.extractall that toggles restoring file permissions. This should be off by default for backward compatibility. The code that restores the file permissions should be careful to avoid security problems, IMHO it should by default ignore the SUID en SGID bits. |
|||
| msg191457 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2013-06-19 08:24 | |
See also #15795 |
|||
| msg191458 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2013-06-19 08:26 | |
Closing this as a duplicate of #15795 (which already has a patch) |
|||
| msg191488 - (view) | Author: anatoly techtonik (techtonik) | Date: 2013-06-19 18:22 | |
3.4+ feature is not a replacement for proper documentation for 2.7-3.4 |
|||
| msg216246 - (view) | Author: Alex LordThorsen (Alex.LordThorsen) * | Date: 2014-04-14 22:53 | |
Here's a documentation patch for 2.7 that informs the users that Zipfile.extra and Zipfile.extraall don't save permissions and that Zipfile.writestr will use ZipInfo.extra_attr or default to chmod permission set of 0600. |
|||
| msg216247 - (view) | Author: Alex LordThorsen (Alex.LordThorsen) * | Date: 2014-04-14 22:54 | |
And here's the 3.4 and 3.5 patch |
|||
| msg241314 - (view) | Author: Alex LordThorsen (Alex.LordThorsen) * | Date: 2015-04-17 05:19 | |
Any follow up on this? |
|||
| msg369122 - (view) | Author: Pavol Babinčák (scrool) * | Date: 2020-05-17 14:25 | |
I'm interested in this documentation enhancement as well. Alex, I'm wondering if you could convert your patch to GitHub? [1] [1] https://devguide.python.org/pullrequest/#converting-an-existing-patch-from-b-p-o-to-github |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:47 | admin | set | github: 62462 |
| 2020-05-17 14:25:40 | scrool | set | nosy:
+ scrool messages: + msg369122 |
| 2015-04-17 22:54:45 | serhiy.storchaka | set | assignee: docs@python -> serhiy.storchaka |
| 2015-04-17 05:22:42 | ned.deily | set | stage: needs patch -> patch review versions: + Python 3.4, Python 3.5 |
| 2015-04-17 05:22:07 | ned.deily | set | nosy:
+ twouters, alanmcintyre, serhiy.storchaka |
| 2015-04-17 05:19:32 | Alex.LordThorsen | set | messages: + msg241314 |
| 2014-04-14 22:54:32 | Alex.LordThorsen | set | files:
+ Issue18262_34_35.patch messages: + msg216247 |
| 2014-04-14 22:53:44 | Alex.LordThorsen | set | files:
+ Issue18262_27.patch versions: - Python 2.6, Python 3.1, Python 3.2, Python 3.3, Python 3.4 nosy: + Alex.LordThorsen messages: + msg216246 keywords: + patch |
| 2013-06-19 18:22:03 | techtonik | set | resolution: duplicate -> messages: + msg191488 |
| 2013-06-19 08:26:50 | ronaldoussoren | set | superseder: Zipfile.extractall does not preserve file permissions resolution: duplicate messages: + msg191458 |
| 2013-06-19 08:24:51 | ronaldoussoren | set | messages: + msg191457 |
| 2013-06-19 08:24:16 | ronaldoussoren | set | type: enhancement components: + Library (Lib) versions: - Python 3.5 nosy: + ronaldoussoren messages:
+ msg191456 |
| 2013-06-19 07:01:18 | techtonik | set | messages: + msg191451 |
| 2013-06-19 06:19:22 | techtonik | create | |
