New submission from Sam Ezeh <sam.z.e...@gmail.com>:

Initially, I was looking at bpo-18262 and saw the following Stack Overflow 
thread that was linked.

https://stackoverflow.com/questions/434641/how-do-i-set-permissions-attributes-on-a-file-in-a-zip-file-using-pythons-zip/6297838

I've attached a patch that gives ZipInfo objects a `ZipInfo.mode` property 
getter and setter to get and set the file mode.

I considered adding ZipFile.chmod but I didn't know how it would work given 
that archives can contain duplicate files.

As an aside, I wondered if there's a way to update file attributes inside zip 
archives without deleting and rewriting them and if not, whether it would be 
worthwhile to add one.

----------
components: Library (Lib)
files: sam_ezeh.patch
keywords: patch
messages: 416550
nosy: sam_ezeh
priority: normal
severity: normal
status: open
title: Add ZipInfo.mode property
type: enhancement
versions: Python 3.11
Added file: https://bugs.python.org/file50715/sam_ezeh.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47200>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to