On Tue, Jun 12, 2012 at 10:52 AM, Brett Cannon <br...@python.org> wrote:
> I would like to have importlib just work out of the box for all VMs in 3.3 > instead of requiring a minor patch in order to not throw an exception when > loading from source and there is no bytecode. The relevant code for this > discussion can be seen at > http://hg.python.org/cpython/file/c2910971eb86/Lib/importlib/_bootstrap.py#l691 > . > > First question is what are all the VMs doing for imp.cache_from_source()? > Are you implementing it like CPython, or are you returning None? And if you > implemented it, what does marshal.loads() do? Right now cache_from_source() > is implemented in importlib itself, but we can either provide a flag to > control what it does or in your setup code for import you can override the > function with ``lambda _, __=None: None``. > I should mention another option is to add sys.dont_read_bytecode (I think I have discussed this with Frank at some point). -Brett > > Second question, what do you set sys.dont_write_bytecode to? > > The answers to those questions will dictate if there is anything to > actually discuss. =) >
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com