Skip to content

sdist format: qualify pax compatibility - #2108

Open
woodruffw wants to merge 4 commits into
mainfrom
ww/pax
Open

sdist format: qualify pax compatibility#2108
woodruffw wants to merge 4 commits into
mainfrom
ww/pax

Conversation

@woodruffw

@woodruffw woodruffw commented Aug 18, 2026

Copy link
Copy Markdown
Member

I'm opening this as a direct living spec PR, since it's arguably just a clarification of the existing requirement, not a new one 🙂. However, if there's disagreement about that, I'm happy to take this to DPO for discussion first.

My rationale: the sdist spec already says that the tarball must be a POSIX.1-2001 pax archive. This implies a bunch of things that people may not realize, but are already fully covered by that requirement. For example, GNU-style tar files are not pax-conforming (they use a different magic and have special extended value encoding rules), and the S typeflag is GNU-specific.

There's a passable argument to be made that GNU.sparse.* is pax-conforming, since they're pax-style records. However:

  1. Some versions of GNU.sparse.* are illegal to represent in pax, since they use duplicated record names;
  2. GNU.sparse.* in general changes the framing logic, making it hard to correctly model the parse of a sparse member with a standard pax-conforming parser.

Finally, I think the most controversial part of this is adding a NOT RECOMMENDED for other pax-style (but not standard) vendor records. These are technically allowed in pax, just not defined by the standard themselves. However, they're also subject to a bunch of interoperability problems. For example, SCHILY.xattr is sometimes encoded as raw binary, which is not pax-conforming and causes problems for standard parsers.

(And more generally, Python source distributions have no business encoding xattrs or anything like that, from what I can tell 🙂)


📚 Documentation preview 📚: https://python-packaging-user-guide--2108.org.readthedocs.build/en/2108/

Signed-off-by: William Woodruff <william@yossarian.net>
@woodruffw

Copy link
Copy Markdown
Member Author

CCing some other folks who I think might be interested: @konstin @miketheman

Comment thread source/specifications/source-distribution-format.rst
Comment thread source/specifications/source-distribution-format.rst
Comment thread source/specifications/source-distribution-format.rst
Comment thread source/specifications/source-distribution-format.rst

@sethmlarson sethmlarson 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.

LGTM, thanks @woodruffw!

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.

3 participants