PEP 711: PyBI: a standard format for distributing Python Binaries

Can you use JSON instead? The format of METADATA is really janky and underspecified (line continuations alone …). Pretty much every new file we have put into wheels for metadata have been JSON-based for a reason. :sweat_smile:

My suspicion is your answer to this question/suggestion is, “let’s start small” (and I do appreciate including all the metadata necessary to do a resolve for library dependencies without executing code with the interpreter), but it would great to have more data about the interpreter for other tooling like editors. Support a way for other tools to assist in environment/interpreter discovery · brettcannon/python-launcher · Discussion #168 · GitHub is where I have been thinking on this topic and it’s around details about the interpreter and how to use it, which editors and the Python Launcher would like to know. Having that available without having to run the interpreter would be handy.

I’m also noticing that the PEP doesn’t say whether the PYBI file gets installed anywhere. Is the idea it doesn’t? If not it seems like an unfortunate waste because of what could be done with it after the interpreter is installed.

The key word there, though, is “did”. :wink: Since that’s no longer the case I would not expect the stdlib to ship packaging-related stuff like installer and build so they can update faster than Python does.

I talked to @thomas about this at the core dev sprints, and if I remember correctly there’s a way to do the builds such that you can ship e.g. sqlite3 as a .so with the interpreter but let a copy of sqlite3 on the machine override it if available. This would help with the typical “what about OpenSSL” concern (although PyPy has been shipping OpenSSL in-box and they told me they haven’t had any issues or concerns from doing that).

3 Likes