RFC: new demandimport implementation for Python 3

Siddharth Agarwal sid at less-broken.com
Thu Jul 21 20:06:29 EDT 2016

On 7/18/16 11:36, Gregory Szorc wrote:
> On Mon, Jul 18, 2016 at 11:25 AM, Siddharth Agarwal 
> <sid at less-broken.com <mailto:sid at less-broken.com>> wrote:
>     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

Apparently "never expire" doesn't mean what it used to, so the link 
404'd. Here's another copy: https://gist.github.com
> 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.

More information about the Mercurial-devel mailing list