Compression level for zipfile #65616
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
assignee = None closed_at = <Date 2018-01-30.06:52:14.039> created_at = <Date 2014-05-02.18:00:16.328> labels = ['3.7', 'type-feature', 'library'] title = 'Compression level for zipfile' updated_at = <Date 2018-02-26.22:50:36.558> user = 'https://bugs.python.org/Sworddragon'
activity = <Date 2018-02-26.22:50:36.558> actor = 'serhiy.storchaka' assignee = 'none' closed = True closed_date = <Date 2018-01-30.06:52:14.039> closer = 'gregory.p.smith' components = ['Library (Lib)'] creation = <Date 2014-05-02.18:00:16.328> creator = 'Sworddragon' dependencies =  files =  hgrepos =  issue_num = 21417 keywords = ['patch'] message_count = 10.0 messages = ['217770', '245753', '272610', '272611', '272646', '311237', '312883', '312921', '312961', '312968'] nosy_count = 10.0 nosy_names = ['gregory.p.smith', 'alanmcintyre', 'Sworddragon', 'fberger', 'berker.peksag', 'jens', 'serhiy.storchaka', 'jfoo', 'Decorater', 'bbayles'] pr_nums = ['5385'] priority = 'normal' resolution = 'fixed' stage = 'commit review' status = 'closed' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue21417' versions = ['Python 3.7']
The text was updated successfully, but these errors were encountered:
keeping the conversation in one place, the code review comment was: "I've prefixed this with an underscore because it's not exposed when reading back. ZipInfo has another "private" attribute, _raw_time"
compresslevel is documented on the public APIs where it appears, I do not believe it needs to be a public attribute within ZipInfo given the above as that is an implementation detail. If we ever find a good reason to make it public in the future we can add a property.
@gpshead so is it a bug or a feature that adding files to archive using
In the library code there is:
# Make sure we have an info object if isinstance(name, ZipInfo): # 'name' is already an info object zinfo = name
So it takes
zipinfo._compresslevel = 9
Or am I missing something here?