[Python-ideas] Move optional data out of pyc files

Brett Cannon brett at python.org
Mon Apr 16 13:35:30 EDT 2018


On Sat, 14 Apr 2018 at 17:01 Neil Schemenauer <nas-python-ideas at arctrix.com>
wrote:

> On 2018-04-12, M.-A. Lemburg wrote:
> > This leaves the proposal to restructure pyc files into a sectioned
> > file and possibly indexed file to make access to (lazily) loaded
> > parts faster.
>
> I would like to see a format can hold one or more modules in a
> single file.  Something like the zip format but optimized for fast
> interpreter startup time.  It should support lazy loading of module
> parts (e.g. maybe my lazy bytecode execution idea[1]).  Obviously a
> lot of details to work out.
>

Eric Snow, Barry Warsaw, and I chatted about a custom file format for
holding Python source (and data files). My notes on the chat can be found
at
https://notebooks.azure.com/Brett/libraries/design-ideas/html/Python%20source%20archive%20file%20format.ipynb
. (And since we aren't trying to rewrite bytecode we figured it wouldn't
break your proposal, Neil ;) .

-Brett


>
> The design should also take into account the widespread use of
> virtual environments.  So, it should be easy and space efficient to
> build virtual environments using this format (e.g. maybe allow
> overlays so that stdlib package is not copied into virtual
> environment, virtual packages would be overlaid on stdlib file).
> Also, should be easy to bundle all modules into a "uber" package and
> append it to the Python executable.  CPython should provide
> out-of-box support for single-file executables.
>
>
> 1. https://github.com/python/cpython/pull/6194
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180416/460b82db/attachment-0001.html>


More information about the Python-ideas mailing list