This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author obfusk
Recipients christian.heimes, eighthave, jondo, obfusk
Date 2021-03-23.15:26:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616513182.97.0.261467025139.issue43547@roundup.psfhosted.org>
In-reply-to
Content
> The __getattr__ hack is not needed. You can reset the flags in a different, more straight forward way

As mentioned, ZipFile._open_to_write() will modify the ZipInfo's .external_attr when it is set to 0.

> I just found another specific example in _open_to_write().  0 is a valid value for zinfo.external_attr.  But this code always forces 0 to something else:
>
>     if not zinfo.external_attr:
>         zinfo.external_attr = 0o600 << 16  # permissions: ?rw-------

Your alternative doesn't seem to take that subsequent modification into account.
History
Date User Action Args
2021-03-23 15:26:22obfusksetrecipients: + obfusk, christian.heimes, jondo, eighthave
2021-03-23 15:26:22obfusksetmessageid: <1616513182.97.0.261467025139.issue43547@roundup.psfhosted.org>
2021-03-23 15:26:22obfusklinkissue43547 messages
2021-03-23 15:26:22obfuskcreate