On Wed, 4 Oct 2017 10:14:22 -0400
Barry Warsaw <barry@python.org> wrote:
> On Oct 3, 2017, at 13:29, Benjamin Peterson <benjamin@python.org> wrote:
>
> > I'm not sure turning the implementation details of our internal formats
> > into APIs is the way to go.
>
> I still think an API in the stdlib would be useful and appropriate, but it’s not like this couldn’t be done as a 3rd party module.
It can also be an implementation-specific API for which we don't
guarantee anything in the future. The consenting adults rule would
apply.
I've toyed with the idea of coming up with an API for bytecode files, but having lived through the last file format change I could never come up with one that didn't just chop off the header or would be a maintenance burden. But having an API that followed just what was in that Python release like the ast module would solve that problem. Then 3rd-party code could wrap it it smooth out differences between versions.
-Brett