Yuya Nishihara wrote:
> Can't we simply ignore 'contextlib' ?

I had a patch that did that. It felt gross (it clearly wasn't very elegant)

> Since contextlib is imported by demandimport.py, there's no benefit to delay
> importing contextlib.

So, demandimport could just return a given module if it's already
loaded w/o wrapping things,
but it's possible for a module to be loaded w/o its submodules being loaded.

We don't want to automatically load all submodules (that would more or
less bypass demandimport, and thus defeat its purpose).

I think that other modules have similarly unfriendly code, and that it
thus makes sense to offer this feature.

After looking through our list of ignores, I think that it should be
possible to make distutils.msvc9compiler work with my general approach
(although the specific implementation I have in v1 and v2 doesn't
work, so I'll need a v3).
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to