Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
bpo-26253: Add compressionlevel to tarfile stream#2962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from4 commits
89fa20531b9835c217360f48acbd2b1b417File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -98,8 +98,8 @@ Some facts and figures: | ||
| If *fileobj* is specified, it is used as an alternative to a :term:`file object` | ||
| opened in binary mode for *name*. It is supposed to be at position 0. | ||
| For modes ``'w:gz'``, ``'x:gz'``, ``'w|gz'``, ``'w:bz2'``, ``'x:bz2'``, | ||
Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Add the Document the change in the What's New document. ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more.
| ||
| ``'w|bz2'``, :func:`tarfile.open` accepts the keyword argument | ||
| *compresslevel* (default ``9``) to specify the compression level of the file. | ||
| For modes ``'w:xz'`` and ``'x:xz'``, :func:`tarfile.open` accepts the | ||
| @@ -152,6 +152,9 @@ Some facts and figures: | ||
| .. versionchanged:: 3.6 | ||
| The *name* parameter accepts a :term:`path-like object`. | ||
| .. versionchanged:: 3.12 | ||
| The *compresslevel* keyword argument also works for streams. | ||
| .. class:: TarFile | ||
| :noindex: | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| Allow adjustable compression level for tarfile streams in | ||
| :function:`tarfile.open`. | ||
serhiy-storchaka marked this conversation as resolved. OutdatedShow resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||