[PATCH] debugshell: disable demand importer when importing debugger

Augie Fackler raf at durin42.com
Mon Jan 11 22:05:38 CST 2016


On Mon, Jan 11, 2016 at 06:48:24PM -0800, Sean Farley wrote:
>
> Gregory Szorc <gregory.szorc at gmail.com> writes:
>
> > # HG changeset patch
> > # User Gregory Szorc <gregory.szorc at gmail.com>
> > # Date 1452564998 28800
> > #      Mon Jan 11 18:16:38 2016 -0800
> > # Node ID 7e2276ca61d80c04e8838e502f42304be2e70aa9
> > # Parent  4571c0b383378f5eec5189e3a39c672a169ce566
> > debugshell: disable demand importer when importing debugger
> >
> > For reasons I can't explain (but likely have something to do with a
> > combination of __import__ inferring default values for arguments and
> > the demand importer mechanism further assuming defaults), the demand
> > importer isn't playing well with IPython. Without this patch, we get
> > a failure "ValueError: Attempted relative import in non-package" when
> > attempting to import "IPython." The stack has numerous demandimport
> > calls on it and adding "IPython" to the exclude list in demandimport
> > isn't enough to make the problem go away, which means the issue is
> > likely somewhere in the bowells of IPython. It's easier to just disable
> > the demand importer when importing the debugger.
>
> Sweet! This fixes the issue for me.

Queued this, thanks for the review!

> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list