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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-36268: Change default tar format to pax from GNU #12355
bpo-36268: Change default tar format to pax from GNU #12355
Conversation
Doc/library/tarfile.rst
Outdated
| The default format for creating archives. This is currently :const:`PAX_FORMAT`. | ||
|
|
||
|
|
||
| .. versionchanged:: 3.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs additional indentation. "versionchanged" is corresponded to "DEFAULT_FORMAT", not to the whole module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch, thanks. Done.
| @@ -0,0 +1,2 @@ | |||
| Switch the default format used for writing tars with mod:`tarfile` to | |||
| POSIX.1-2001 pax (from GNU) for modern standards conformance. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "Patch by yourname."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, done.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
9ccc144
to
65286ab
Compare
|
@serhiy-storchaka I have made the requested changes; please review again. Also, should I keep the NEWS entry commit separate (as I've seen others do in the most recent PRs here), or is that not necessary? Should I amend the commit message to include the now-known GH-NNNN number, or is that not needed for a non-backport? Thanks. Changes:
|
|
Thanks for making the requested changes! @serhiy-storchaka: please review the changes made to this pull request. |
|
@serhiy-storchaka Perhaps @ncoghlan should also chime in, since he opened bpo-30661 which brought this change up as a possible solution? |
|
+1 from me (if I recall correctly, the PAX_FORMAT vs GNU_FORMAT question came up in a distutils-sig discussion about the sdist tar.gz format, and the fact that those should really be in |
|
Thanks @ncoghlan @serhiy-storchaka @gustaebel ! |


Per my proposal and the resulting discussion in bpo-36268, changes tarfile.DEFAULT_FORMAT to be tarfile.PAX_FORMAT , rather than the legacy tarfile.GNU_FORMAT for Python 3.8. It also updates the docs to reflect this, explicitly passes
tarfile.GNU_FORMATin one test that assumed thattarfile.DEFAULT_FORMATwould be this, and adds an appropriate news entry (I assume this is far too trivial to be included in What's New or myself inMisc/ACKS).This should also fix bpo-30661, and offers several other benefits, including fewer limitations, greater interoperability with POSIX-conformant implementations, increased extensibility and backward-compatibility with ustar, cross-platform portability with a standardized encoding (UTF-8) and avoidance of errors like this one.
Fix #80449
https://bugs.python.org/issue36268