isympy doesn't work with the upcoming IPython v0.11

16 views
Skip to first unread message

gsever

unread,
Jan 23, 2010, 4:10:36 PM1/23/10
to sympy
Parallel posting at: http://mail.scipy.org/pipermail/ipython-dev/2010-January/005750.html

Hello,

I can't get the isympy working with the Fernando's trunk. I solved one
of
the missing attribute error but stuck at the other one:

[gsever@ccn bin]$ ./isympy
Traceback (most recent call last):
File "./isympy", line 153, in <module>
main()
File "./isympy", line 147, in main
init_session('ipython', **args)
File
"/home/gsever/Desktop/python-repo/sympy/sympy/interactive/
__init__.py", line
97, in init_session
ip = IPython.ipapi.get()
AttributeError: 'module' object has no attribute 'ipapi'

[gsever@ccn bin]$ ./isympy
Traceback (most recent call last):
File "./isympy", line 153, in <module>
main()
File "./isympy", line 147, in main
init_session('ipython', **args)
File
"/home/gsever/Desktop/python-repo/sympy/sympy/interactive/
__init__.py", line
106, in init_session
ip = init_IPython()
File
"/home/gsever/Desktop/python-repo/sympy/sympy/interactive/
__init__.py", line
61, in init_IPython
return IPython.Shell.make_IPython(argv)
AttributeError: 'module' object has no attribute 'Shell'

Aaron S. Meurer

unread,
Jan 23, 2010, 5:56:46 PM1/23/10
to sy...@googlegroups.com
OK. We need to fix isympy. Could you push the fixes you were able to make up to github or somewhere? I can't get this error, but rather some NameError, assumedly because it is the issue you already fixed.

On the other hand, I am probably testing it wrong. How did you test the latest iPython? Did you have to install the development ipython, or is there some other way to do it? This is what I tried:

dhcp-baca-43:sympy aaronmeurer(master$)$../../ipython/ipython.py bin/isympy
[IPythonApp] File does not have a .py or .ipy extension: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy>
dhcp-baca-43:sympy aaronmeurer(master$)$mv bin/isympy bin/isympy.py
dhcp-baca-43:sympy aaronmeurer(master*$%)$../../ipython/ipython.py bin/isympy.py
------------------------------------------------------------


Traceback (most recent call last):

File "/Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py", line 54, in <module>
isympy_dir = os.path.dirname(__file__) # bin/isympy
NameError: name '__file__' is not defined

WARNING: Failure executing file: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py>

Aaron Meurer

> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To post to this group, send email to sy...@googlegroups.com.
> To unsubscribe from this group, send email to sympy+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
>

gsever

unread,
Jan 23, 2010, 10:37:43 PM1/23/10
to sympy

On Jan 23, 4:56 pm, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> OK.  We need to fix isympy.  Could you push the fixes you were able to make up to github or somewhere?  I can't get this error, but rather some NameError, assumedly because it is the issue you already fixed.  
>
> On the other hand, I am probably testing it wrong.  How did you test the latest iPython?  Did you have to install the development ipython, or is there some other way to do it?  This is what I tried:
>
> dhcp-baca-43:sympy aaronmeurer(master$)$../../ipython/ipython.py bin/isympy
> [IPythonApp] File does not have a .py or .ipy extension: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy>
> dhcp-baca-43:sympy aaronmeurer(master$)$mv bin/isympy bin/isympy.py
> dhcp-baca-43:sympy aaronmeurer(master*$%)$../../ipython/ipython.py bin/isympy.py
> ------------------------------------------------------------
> Traceback (most recent call last):
>   File "/Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py", line 54, in <module>
>     isympy_dir = os.path.dirname(__file__)         # bin/isympy
> NameError: name '__file__' is not defined
>
> WARNING: Failure executing file: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py>
>
> Aaron Meurer

Here are the steps:

bzr branch lp:~fdo.perez/ipython/trunk-dev
python setup.py install

git clone git://git.sympy.org/sympy.git
python setup.py install

(I like the variety, bzr for IPython, git for sympy, svn for numpy,
scipy, matplotlib, mercurial for SAGE, what else :)

These are my changes so far:

[gsever@ccn sympy]$ git diff
diff --git a/sympy/interactive/__init__.py b/sympy/interactive/
__init__.py
index ba4b37c..7f5393f 100644
--- a/sympy/interactive/__init__.py
+++ b/sympy/interactive/__init__.py
@@ -10,7 +10,7 @@ def init_printing(stringify_func):
try:
import IPython

- ip = IPython.ipapi.get()
+ ip = IPython.core.ipapi.get()

if ip is not None:
def result_display(self, arg):
@@ -94,7 +94,7 @@ def __init__(self):
try:
import IPython

- ip = IPython.ipapi.get()
+ ip = IPython.core.ipapi.get()

if ip is not None:
if session == 'ipython':

There is a substantial API change in the upcoming IPython (v0.11).
Fernando has been calling for test and integration test help. This
might be a good time to figure the issues from the Sympy's window.


Aaron S. Meurer

unread,
Jan 24, 2010, 1:08:03 PM1/24/10
to sy...@googlegroups.com

On Jan 23, 2010, at 8:37 PM, gsever wrote:

>
>
> On Jan 23, 4:56 pm, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
>> OK. We need to fix isympy. Could you push the fixes you were able to make up to github or somewhere? I can't get this error, but rather some NameError, assumedly because it is the issue you already fixed.
>>
>> On the other hand, I am probably testing it wrong. How did you test the latest iPython? Did you have to install the development ipython, or is there some other way to do it? This is what I tried:
>>
>> dhcp-baca-43:sympy aaronmeurer(master$)$../../ipython/ipython.py bin/isympy
>> [IPythonApp] File does not have a .py or .ipy extension: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy>
>> dhcp-baca-43:sympy aaronmeurer(master$)$mv bin/isympy bin/isympy.py
>> dhcp-baca-43:sympy aaronmeurer(master*$%)$../../ipython/ipython.py bin/isympy.py
>> ------------------------------------------------------------
>> Traceback (most recent call last):
>> File "/Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py", line 54, in <module>
>> isympy_dir = os.path.dirname(__file__) # bin/isympy
>> NameError: name '__file__' is not defined
>>
>> WARNING: Failure executing file: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py>
>>
>> Aaron Meurer
>
> Here are the steps:
>
> bzr branch lp:~fdo.perez/ipython/trunk-dev
> python setup.py install

Right. I'd rather not install python 11, especially considering that sympy does not work with it yet. Do you know how to test it without installing it?


>
> git clone git://git.sympy.org/sympy.git
> python setup.py install
>
> (I like the variety, bzr for IPython, git for sympy, svn for numpy,
> scipy, matplotlib, mercurial for SAGE, what else :)
>
> These are my changes so far:
>
> [gsever@ccn sympy]$ git diff
> diff --git a/sympy/interactive/__init__.py b/sympy/interactive/
> __init__.py
> index ba4b37c..7f5393f 100644
> --- a/sympy/interactive/__init__.py
> +++ b/sympy/interactive/__init__.py
> @@ -10,7 +10,7 @@ def init_printing(stringify_func):
> try:
> import IPython
>
> - ip = IPython.ipapi.get()
> + ip = IPython.core.ipapi.get()
>
> if ip is not None:
> def result_display(self, arg):
> @@ -94,7 +94,7 @@ def __init__(self):
> try:
> import IPython
>
> - ip = IPython.ipapi.get()
> + ip = IPython.core.ipapi.get()
>
> if ip is not None:

> if session == 'python':

This patch breaks the current iPython. We will probably want to maintain support for both, at least for a little while, so whatever fix we do will have to do version checking.

By the way, what is the timeline for iPython 0.11?

Aaron Meurer


>
> There is a substantial API change in the upcoming IPython (v0.11).
> Fernando has been calling for test and integration test help. This
> might be a good time to figure the issues from the Sympy's window.
>
>

Vinzent Steinberg

unread,
Jan 24, 2010, 2:38:06 PM1/24/10
to sympy
I opened an issue for this: http://code.google.com/p/sympy/issues/detail?id=1797

Vinzent

Brian Granger

unread,
Jan 24, 2010, 6:42:16 PM1/24/10
to sympy
Hello all,

I just made an IPython ticket to make sure we (the IPython dev team) fix isympy before 0.11 is released:

https://bugs.launchpad.net/ipython/+bug/512123

In the meantime if you are using IPython trunk, you can do:

ipython -p sympy

To get the same effect.

Cheers,

Brian

Brian Granger

unread,
Jan 24, 2010, 6:43:13 PM1/24/10
to sympy

By the way, what is the timeline for iPython 0.11?

We are hoping to have a release candidate in the next few weeks.  But, because it is such a major release, it will be a long release process.

Cheers,

Brian
 

gsever

unread,
Jan 24, 2010, 6:47:24 PM1/24/10
to sympy

On Jan 24, 12:08 pm, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> On Jan 23, 2010, at 8:37 PM, gsever wrote:
>
>
>
>
>
> > On Jan 23, 4:56 pm, "Aaron S. Meurer" <asmeu...@gmail.com> wrote:
> >> OK.  We need to fix isympy.  Could you push the fixes you were able to make up to github or somewhere?  I can't get this error, but rather some NameError, assumedly because it is the issue you already fixed.  
>
> >> On the other hand, I am probably testing it wrong.  How did you test the latest iPython?  Did you have to install the development ipython, or is there some other way to do it?  This is what I tried:
>
> >> dhcp-baca-43:sympy aaronmeurer(master$)$../../ipython/ipython.py bin/isympy
> >> [IPythonApp] File does not have a .py or .ipy extension: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy>
> >> dhcp-baca-43:sympy aaronmeurer(master$)$mv bin/isympy bin/isympy.py
> >> dhcp-baca-43:sympy aaronmeurer(master*$%)$../../ipython/ipython.py bin/isympy.py
> >> ------------------------------------------------------------
> >> Traceback (most recent call last):
> >>   File "/Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py", line 54, in <module>
> >>     isympy_dir = os.path.dirname(__file__)         # bin/isympy
> >> NameError: name '__file__' is not defined
>
> >> WARNING: Failure executing file: </Users/aaronmeurer/Documents/python/sympy/sympy/bin/isympy.py>
>
> >> Aaron Meurer
>
> > Here are the steps:
>
> > bzr branch lp:~fdo.perez/ipython/trunk-dev
> > python setup.py install
>
> Right.  I'd rather not install python 11, especially considering that sympy does not work with it yet.  Do you know how to test it without installing it?

You can run it without making any installation as well. Just do python
ipython.py, likewise you can execute the tests with python iptest.py
(You might need to install some external packages to fully execute the
test suite depending on your system.)

That's what I was thinking of. To do checks for v0.11 upwards and
before...

 
>
> By the way, what is the timeline for iPython 0.11?

Should be coming out soon. Fernando was calling for tests recently.
Once his review merged in and some major bugs fixed it should be out.

Ondrej Certik

unread,
Jan 24, 2010, 7:07:06 PM1/24/10
to sy...@googlegroups.com
On Sun, Jan 24, 2010 at 3:43 PM, Brian Granger <elliso...@gmail.com> wrote:
>
>>
>> By the way, what is the timeline for iPython 0.11?
>
> We are hoping to have a release candidate in the next few weeks.  But,
> because it is such a major release, it will be a long release process.

Thanks. I am looking forward for the new release. My favourite new
feature is "IPython.embed()", I am using it all the time.

Ondrej

Reply all
Reply to author
Forward
0 new messages