Visitar URL original
bpo-36268: Change default tar format to pax from GNU by CAM-Gerlach · Pull Request #12355 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221005044913/https://github.com/python/cpython/pull/12355
Skip to content
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

Merged
merged 2 commits into from Mar 21, 2019

Conversation

CAM-Gerlach
Copy link
Member

@CAM-Gerlach CAM-Gerlach commented Mar 15, 2019 •

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_FORMAT in one test that assumed that tarfile.DEFAULT_FORMAT would be this, and adds an appropriate news entry (I assume this is far too trivial to be included in What's New or myself in Misc/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

@CAM-Gerlach CAM-Gerlach marked this pull request as ready for review Mar 15, 2019
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Please add also a What's New entry.

The default format for creating archives. This is currently :const:`PAX_FORMAT`.


.. versionchanged:: 3.8
Copy link
Member

@serhiy-storchaka serhiy-storchaka Mar 16, 2019

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.

Copy link
Member Author

@CAM-Gerlach CAM-Gerlach Mar 16, 2019

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.
Copy link
Member

@serhiy-storchaka serhiy-storchaka Mar 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add "Patch by yourname."

Copy link
Member Author

@CAM-Gerlach CAM-Gerlach Mar 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, done.

@bedevere-bot
Copy link

bedevere-bot commented Mar 16, 2019

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@CAM-Gerlach
Copy link
Member Author

CAM-Gerlach commented Mar 16, 2019

@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:

  • Added What's New entry
  • Added name to NEWS entry
  • Moved versionchanged to the correct indent level
  • Minor textual refinements
  • Re-added bpo-number to commit message (it evidently got removed in a rebase before opening the PR)

@bedevere-bot
Copy link

bedevere-bot commented Mar 16, 2019

Thanks for making the requested changes!

@serhiy-storchaka: please review the changes made to this pull request.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

LGTM. But before merging this we should ask the opinion of the module maintainer, @gustaebel.

Copy link
Contributor

@gustaebel gustaebel left a comment

Switching to PAX_FORMAT is a very good idea.

@CAM-Gerlach
Copy link
Member Author

CAM-Gerlach commented Mar 18, 2019

@serhiy-storchaka Perhaps @ncoghlan should also chime in, since he opened bpo-30661 which brought this change up as a possible solution?

@ncoghlan
Copy link
Contributor

ncoghlan commented Mar 21, 2019

+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 PAX_FORMAT, but shutil.make_archive didn't support that)

@serhiy-storchaka serhiy-storchaka merged commit e680c3d into python:master Mar 21, 2019
5 checks passed
@CAM-Gerlach
Copy link
Member Author

CAM-Gerlach commented Mar 21, 2019

Thanks @ncoghlan @serhiy-storchaka @gustaebel !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants