RFC: new demandimport implementation for Python 3

Gregory Szorc gregory.szorc at gmail.com
Mon Jul 18 14:36:46 EDT 2016

On Mon, Jul 18, 2016 at 11:25 AM, Siddharth Agarwal <sid at less-broken.com>

> On 7/17/16 10:41, Gregory Szorc wrote:
>> Is there a reason this custom loader isn't implemented in terms of
>> importlib.util.LazyLoader? Is the built-in lazy loader not at all suitable
>> for our use, requiring an independent implementation?
> Following up here, with Python 3.5.2+ we can now use the builtin
> LazyLoader. Here's what it looks like:
> https://bpaste.net/show/91c7a00768ce

This looks much more digestible! Thanks.

Have you tried this code with the new source transforming module loader
that landed last week? IIRC, the loader protocol uses the first
loader/finder it sees. If the demandimport loader/finder is bypassing
source transformation, that would be bad, obviously.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20160718/5663613d/attachment.html>

More information about the Mercurial-devel mailing list