[PATCH] import-checker: exclude dist-packages tree from stdlib as well

Gregory Szorc gregory.szorc at gmail.com
Fri Jul 3 11:57:58 CDT 2015


On Fri, Jul 3, 2015 at 8:00 AM, Augie Fackler <raf at durin42.com> wrote:

>
> > On Jul 3, 2015, at 9:48 AM, Yuya Nishihara <yuya at tcha.org> wrote:
> >
> > # HG changeset patch
> > # User Yuya Nishihara <yuya at tcha.org>
> > # Date 1435929436 -32400
> > #      Fri Jul 03 22:17:16 2015 +0900
> > # Node ID 506956b94ca90eec47dfd7d9746e129bc3ccf884
> > # Parent  d3d2ba265e17af1d9700e3e99de4d012b1b31ab8
> > import-checker: exclude dist-packages tree from stdlib as well
> >
> > On Debian, packaged modules are installed into dist-packages, not to
> > site-packages. Because of this, if we have mercurial installed, the test
> > failed as 'mercurial.node' was listed in stdlib_modules:
>
> Hmm. I think this means that the import-checker is running with too many
> things on its sys.path - does that make sense to you?
>
> I’m not sure what we should do about it, but it definitely seems a bit
> undesirable to pick things up from diet-packages when we’re trying to
> analyze a working tree. Thoughts?
>

Having recently touched this code, I believe the only place where "is
stdlib module" comes into play is when checking for mixed imports between
mercurial modules and stdlib modules on the same line. Instead of worrying
about sys.path, site-packages, etc, how about simply excluding
"mercurial.*" and "hgext.*" modules from the stdlib modules list?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20150703/84383e09/attachment.html>


More information about the Mercurial-devel mailing list