Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

zipfile.ZipInfo._compresslevel should be public. #113971

Closed
Assignees
gpshead
Labels
3.13bugs and security fixestype-featureA feature request or enhancement
@gpshead

Description

@gpshead

Feature or enhancement

Proposal:

Today people passZipInfo instances into APIs that accept them such asZipFile.writestr() in order to control how individual items are put into a zip archive as such:

zip_info=zipfile.ZipInfo(filename=filename,date_time=desired_timestamp)zip_info.compress_type=this_files_compress_type# This attribute is sadly not public; manual creation of ZipInfo objects# is uncommon.  Without this we cannot write compressed files with our# own overridden info.zip_info._compresslevel=this_files_compress_level# pylint: disable=protected-accesszip_info.external_attr=desired_permissionszip_file.writestr(zip_info,data)

There is no reason for._compresslevel to be protected with an _. We should make it public as it is useful.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixestype-featureA feature request or enhancement

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp