Skip to content

bpo-36268: Change default tar format to pax from GNU #12355

Merged
serhiy-storchaka merged 2 commits into
python:masterfrom
CAM-Gerlach:change-default-tar-pax
Mar 21, 2019
Merged

bpo-36268: Change default tar format to pax from GNU #12355
serhiy-storchaka merged 2 commits into
python:masterfrom
CAM-Gerlach:change-default-tar-pax

Conversation

@CAM-Gerlach

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

Copy link
Copy Markdown
Member

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 March 15, 2019 18:53

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add also a What's New entry.

Comment thread Doc/library/tarfile.rst Outdated

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Great catch, thanks. Done.

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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
Copy Markdown

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
CAM-Gerlach force-pushed the change-default-tar-pax branch from 9ccc144 to 65286ab Compare March 16, 2019 15:44
@CAM-Gerlach

Copy link
Copy Markdown
Member Author

@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
Copy Markdown

Thanks for making the requested changes!

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

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@gustaebel gustaebel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Switching to PAX_FORMAT is a very good idea.

@CAM-Gerlach

Copy link
Copy Markdown
Member Author

@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
Copy Markdown
Contributor

+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
@CAM-Gerlach

Copy link
Copy Markdown
Member Author

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.

6 participants