Testing help needed with IPython1

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Testing help needed with IPython1

Brian Granger-2
Hello all,

We have been chasing down some extremely subtle edge cases in the
IPython1 interpreter (branches/saw) over the last few days.  We think
we have this solved, but we are running into some undocumented dark
corners of the compiler module.  For those of you using ipython1 saw,
could you do an svn up and run some of your code and see if it works.
Thanks.  We are hoping to get these things worked out ASAP - hopefully
we are already there.

Brian
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Fernando Perez
On 6/22/07, Brian Granger <[hidden email]> wrote:
> Hello all,
>
> We have been chasing down some extremely subtle edge cases in the
> IPython1 interpreter (branches/saw) over the last few days.  We think
> we have this solved, but we are running into some undocumented dark
> corners of the compiler module.  For those of you using ipython1 saw,
> could you do an svn up and run some of your code and see if it works.
> Thanks.  We are hoping to get these things worked out ASAP - hopefully
> we are already there.

And if anyone on the list happens to be an expert on the internals of
how Python's AST code is supposed to work (this stuff is more or less
undocumented, except for the AST construction code itself), please let
us know.  It might come handy to know we have an expert on this topic
'on call', since the debugging for this stuff has been, ahem, 'fun'.

Cheers,

f
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Robert Kern-2
In reply to this post by Brian Granger-2
Fernando Perez wrote:

> And if anyone on the list happens to be an expert on the internals of
> how Python's AST code is supposed to work (this stuff is more or less
> undocumented, except for the AST construction code itself), please let
> us know.  It might come handy to know we have an expert on this topic
> 'on call', since the debugging for this stuff has been, ahem, 'fun'.

Aren't you so glad I dropped that piece of code on you?  :-)

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Stéfan van der Walt
In reply to this post by Fernando Perez
On Fri, Jun 22, 2007 at 02:08:00PM -0600, Fernando Perez wrote:
> And if anyone on the list happens to be an expert on the internals of
> how Python's AST code is supposed to work (this stuff is more or less
> undocumented, except for the AST construction code itself), please let
> us know.  It might come handy to know we have an expert on this topic
> 'on call', since the debugging for this stuff has been, ahem, 'fun'.

I am curious -- how are you guys planning to use the AST?  Creating an
AST tree from source code is one thing, but can a person reconstruct
code from an AST tree for execution?

Cheers
Stéfan
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Fernando Perez
On 6/22/07, Stefan van der Walt <[hidden email]> wrote:

> On Fri, Jun 22, 2007 at 02:08:00PM -0600, Fernando Perez wrote:
> > And if anyone on the list happens to be an expert on the internals of
> > how Python's AST code is supposed to work (this stuff is more or less
> > undocumented, except for the AST construction code itself), please let
> > us know.  It might come handy to know we have an expert on this topic
> > 'on call', since the debugging for this stuff has been, ahem, 'fun'.
>
> I am curious -- how are you guys planning to use the AST?  Creating an
> AST tree from source code is one thing, but can a person reconstruct
> code from an AST tree for execution?

We're not planning, we're using it :)  This comes from code
contributed by R. Kern recently, and it allows us to properly compute
from source input what multiline input blocks should be considered
'units' for execution.  Today's ipython has the limitations inherited
from code.py, which tries to guess when an input sequence is finished
via some finicky conventions on trailing blank lines.  By building the
AST, we can properly identify the split points, so that multiline
input can be fed with arbitrary whitespace just like in a normal file,
and IPython won't choke.

After using the AST for splitting, we feed each chunk of original
source to the compiler for real compilation and execution.  All of
this is in saw, in the core/interpreter.py file, if you're curious.

Cheers,

f
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Fernando Perez
In reply to this post by Robert Kern-2
On 6/22/07, Robert Kern <[hidden email]> wrote:
> Fernando Perez wrote:
>
> > And if anyone on the list happens to be an expert on the internals of
> > how Python's AST code is supposed to work (this stuff is more or less
> > undocumented, except for the AST construction code itself), please let
> > us know.  It might come handy to know we have an expert on this topic
> > 'on call', since the debugging for this stuff has been, ahem, 'fun'.
>
> Aren't you so glad I dropped that piece of code on you?  :-)

Actually, we are :)  While that stuff is a bit painful to debug
sometimes, it is ultimately the right way to tackle the problem (FAR
better than that messy stateful approach that code.py uses).

So yes, thanks for the pain, it's good for us ;)

Cheers,

f
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Testing help needed with IPython1

Brian Granger-2
In reply to this post by Robert Kern-2
> > And if anyone on the list happens to be an expert on the internals of
> > how Python's AST code is supposed to work (this stuff is more or less
> > undocumented, except for the AST construction code itself), please let
> > us know.  It might come handy to know we have an expert on this topic
> > 'on call', since the debugging for this stuff has been, ahem, 'fun'.


> Aren't you so glad I dropped that piece of code on you?  :-)

In the global picture, yes...now that more of the funny business is
out of the way.  But now it works and it is _much_ better than the
hack that is code.py.

> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
>  that is made terrible by our own mad attempt to interpret it as though it had
>  an underlying truth."
>   -- Umberto Eco
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email]
> http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev
>
_______________________________________________
IPython-dev mailing list
[hidden email]
http://lists.ipython.scipy.org/mailman/listinfo/ipython-dev