[Distutils] PEP 426: proposed change to extension fields + entry points

Nick Coghlan ncoghlan at gmail.com
Mon Feb 25 15:54:22 CET 2013


On Tue, Feb 26, 2013 at 12:38 AM, Daniel Holth <dholth at gmail.com> wrote:
> I'm probably the only one but I'm not a fan of JSON with all the extra "
> marks compared to the venerable, lovely, flatter and much easier to edit
> Key: value format.

I don't really care that much about human readability of the raw
metadata files, I care a lot more about ease of interoperability for
automated tools, and ease of display for generic tools that may not
understand the semantics. I also care about the standard format being
amenable to the publication of metadata through TUF's JSON based
infrastructure.

> The METADATA file needs to represent Name, Version, and
> Requirements and the rest is fluff that no one will ever use. It's very
> healthy to put other kinds of metadata in different files in the .dist-info
> directory (no need to bump the metadata version number) and our package
> indices can learn how to index those too.

No, it's not healthy at all. It means you have an ad hoc collection of
formats, that some tools may or may not understand, so you can't
publish them with confidence, because you're relying on consumers
using particular tools. The whole point of wheel is to decouple
builders from installers, which means you can't rely on ad hoc formats
for communicating between them reliably.

Furthermore, handling arbitrary files would make life a lot harder
than it needs to be when we finally make the installation database
work with import hooks, whereas exposing JSON-compatible structured
metadata through an API is relatively trivial (you can just return a
metadata dictionary, without needing to care how the import hook
stores that data).

Should people be able to add arbitrary files to .dist-info directories
and be confident that standards compliant tools will preserve them
correctly through the deployment process? Absolutely. Will the
standard library ever meaningfully interpret anything other than WHEEL
and the four files already named in PEP 376? Most likely not.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Distutils-SIG mailing list