Barry Wark | 2 Apr 06:03
Picon
Gravatar

Re: [IPython-dev] Twisted 8...

Just FYI, it looks like it won't be that bad getting things to work
with Twisted 8. I modified setupext to not barf if twisted's
version.major > 2 and installed ipython1. I'll go ahead and branch an
ipython1-twisted8 and start fixing the last couple of test... Here's
the output of 'trial ipython1' on my machine (twisted 8.0.1):

ipython1.core.tests.test_shell
  BasicShellTest
    testCommand ...                                                        [OK]
    testExecute ...                                                        [OK]
    testPutGet ...                                                         [OK]
    testUpdate ...                                                         [OK]
ipython1.daemon.tests.test_daemonservice
  BasicDaemonServiceTest
    testIDaemonServiceDeferreds ...                                        [OK]
    testIDaemonServiceInterface ...                                        [OK]
    testIDaemonServiceInterfaceMethods ...                                 [OK]
    testRestart_0 ...                                                      [OK]
    testRestart_1 ...                                                      [OK]
    testShutdown ...                                                     [FAIL]
    testSignal_0 ...                                                       [OK]
    testSignal_1 ...                                                       [OK]
    testSignal_10 ...                                                      [OK]
    testSignal_11 ...                                                      [OK]
    testSignal_12 ...                                                      [OK]
    testSignal_13 ...                                                      [OK]
    testSignal_14 ...                                                      [OK]
    testSignal_15 ...                                                      [OK]
    testSignal_16 ...                                                      [OK]
    testSignal_17 ...                                                      [OK]
(Continue reading)

Brian Granger | 2 Apr 06:58
Picon

Re: [IPython-dev] Twisted 8...

I figured it would mostly "just work".  I wouldn't even worry about
the failure and error.  The error is a particularly nasty one that
probably only appears sometimes.  I can look into it at some point.
The failure is something in the new daemon that Min is working on - it
is possible that the test simply doesn't pass right now.

The bigger thing that we need to decide is what to do with
twisted.web2.  Currently we ship a hacked version of it in
ipython1.externals.  We use it for the notebook and other http
protocols related things.  I don't like shipping it like this, but
given its state, I am not sure we have any other options.  Minimally,
we will have to update the version of web2 that we provide to the
current trunk, so things work with Twisted 8.0

But, let's make a branch for Twisted 8.0 related stuff.  We would also
need to update documentation things and the setupext stuff.

Brian

On Tue, Apr 1, 2008 at 10:03 PM, Barry Wark <barrywark <at> gmail.com> wrote:
> Just FYI, it looks like it won't be that bad getting things to work
>  with Twisted 8. I modified setupext to not barf if twisted's
>  version.major > 2 and installed ipython1. I'll go ahead and branch an
>  ipython1-twisted8 and start fixing the last couple of test... Here's
>  the output of 'trial ipython1' on my machine (twisted 8.0.1):
>
>  ipython1.core.tests.test_shell
>   BasicShellTest
>     testCommand ...                                                        [OK]
>     testExecute ...                                                        [OK]
(Continue reading)

Barry Wark | 2 Apr 08:23
Picon
Gravatar

Re: [IPython-dev] Twisted 8...

On Tue, Apr 1, 2008 at 9:58 PM, Brian Granger <ellisonbg.net <at> gmail.com> wrote:
> I figured it would mostly "just work".  I wouldn't even worry about
>  the failure and error.  The error is a particularly nasty one that
>  probably only appears sometimes.  I can look into it at some point.
>  The failure is something in the new daemon that Min is working on - it
>  is possible that the test simply doesn't pass right now.

OK. Good to know.

>
>  The bigger thing that we need to decide is what to do with
>  twisted.web2.  Currently we ship a hacked version of it in
>  ipython1.externals.  We use it for the notebook and other http
>  protocols related things.  I don't like shipping it like this, but
>  given its state, I am not sure we have any other options.  Minimally,
>  we will have to update the version of web2 that we provide to the
>  current trunk, so things work with Twisted 8.0

This is well out of my knowlege of the codebase, so I'll leave
anything related to twisted.web2 for others.
>
>  But, let's make a branch for Twisted 8.0 related stuff.  We would also
>  need to update documentation things and the setupext stuff.

Done. I modified setupext to allow Twisted >=2.5 and modified
ipython1.kernel.twistedutils to define blockingCallFromThread as a
wrapper to twisted.internet.threads.blockingCallFromThread for Twisted
>=8 and the existing version for Twisted <8.

>
(Continue reading)

Ville M. Vainio | 2 Apr 09:54
Picon
Gravatar

WinPdb support for IPython!

IPython now supports WinPdb!

You need the development version of winpdb from svn (or the next release):

svn co https://winpdb.svn.sourceforge.net/svnroot/winpdb/trunk/winpdb winpdb

You can run the script test.py in WinPdb by:

import ipy_winpdb   (this should probably be in your ipy_user_conf.py)
%wdb test.py

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
Picon
Favicon

Re: Twisted 8... (Brian Granger)


hello,
with Twisted 2.5 and a recent build of ipython1 from bzr I noticed that the

    testShutdown ...                                                     [FAIL]

occurs for me when I launch 'trial ipython1' from the source directory, but not if I launch it from somewhere else.

Also, I get the following final outrput :
===============================================================================
[FAIL]: ipython1.daemon.tests.test_daemonservice.BasicDaemonServiceTest.testShutdown

Traceback (most recent call last):
  File
"/home/cohen/data1/sources/python/ipython1-dev/ipython1/daemon/tests/daemonservicetest.py",
line 172, in <lambda>
    d.addCallback(lambda r: self.assertEquals(len(r), len(validCommands)))
twisted.trial.unittest.FailTest: 1 != 3
===============================================================================
[ERROR]: ipython1.daemon.tests.test_daemonservice.BasicDaemonServiceTest.testSignal_33

Traceback (most recent call last):
  File
"/home/cohen/data1/sources/python/ipython1-dev/ipython1/daemon/tests/daemonservicetest.py",
line 132, in <lambda>
    d.addCallback(lambda r: (r[0],time.sleep(0.1)))
exceptions.KeyboardInterrupt:
-------------------------------------------------------------------------------
Ran 38 tests in 6.862s

(Continue reading)

Olivier Verdier | 2 Apr 19:52
Picon

from __future__ import division

Hi!

I am teaching python for beginners and I would really like to avoid
the python division problem. But no matter how I try I cannot for the
life of me get "from __future__ import division" being automatically
executed at the launching of Ipython.

Has anyone succeed with this? Is there a good way to do it?

Thanks!

== Olivier
Ville M. Vainio | 2 Apr 19:59
Picon
Gravatar

Re: from __future__ import division

On Wed, Apr 2, 2008 at 8:52 PM, Olivier Verdier <zelbier <at> gmail.com> wrote:

>  I am teaching python for beginners and I would really like to avoid
>  the python division problem. But no matter how I try I cannot for the
>  life of me get "from __future__ import division" being automatically
>  executed at the launching of Ipython.
>
>  Has anyone succeed with this? Is there a good way to do it?

Yes. Add the following line to ipy_user_conf.py (provided that you are
running the dev version from bzr):

o.autoexec.append('from __future__ import division')

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
Olivier Verdier | 2 Apr 21:58
Picon

Re: from __future__ import division

Aaargh! It doesn't work on my version (svn rev r2408). Thanks a lot
anyway. I will try to get a new version of IPython installed in the
labs.

Do you folk think that there could be another possibility to fix this
on older versions of IPython?

Thanks!

== Olivier

On 02/04/2008, Ville M. Vainio <vivainio <at> gmail.com> wrote:
> On Wed, Apr 2, 2008 at 8:52 PM, Olivier Verdier <zelbier <at> gmail.com> wrote:
>
>  >  I am teaching python for beginners and I would really like to avoid
>  >  the python division problem. But no matter how I try I cannot for the
>  >  life of me get "from __future__ import division" being automatically
>  >  executed at the launching of Ipython.
>  >
>  >  Has anyone succeed with this? Is there a good way to do it?
>
>
> Yes. Add the following line to ipy_user_conf.py (provided that you are
>  running the dev version from bzr):
>
>  o.autoexec.append('from __future__ import division')
>
>
>  --
>  Ville M. Vainio - vivainio.googlepages.com
(Continue reading)

Ville M. Vainio | 2 Apr 22:09
Picon
Gravatar

Re: from __future__ import division

On Wed, Apr 2, 2008 at 10:58 PM, Olivier Verdier <zelbier <at> gmail.com> wrote:

> Aaargh! It doesn't work on my version (svn rev r2408). Thanks a lot
>  anyway. I will try to get a new version of IPython installed in the
>  labs.
>
>  Do you folk think that there could be another possibility to fix this
>  on older versions of IPython?

I'm not sure if this works in older versions, but it's something to
try anyway (it works in bzr):

- Create divi.ipy with contents:

from __future__ import division

- Start ipython with "ipython -i divi.ipy"

You can also try omitting the -i switch.

--

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
Olivier Verdier | 2 Apr 23:10
Picon

Re: from __future__ import division

Sadly, it doesn't work. But I will try with the bzr version.

Thanks a lot!

== Olivier

On 02/04/2008, Ville M. Vainio <vivainio <at> gmail.com> wrote:
> On Wed, Apr 2, 2008 at 10:58 PM, Olivier Verdier <zelbier <at> gmail.com> wrote:
>
>  > Aaargh! It doesn't work on my version (svn rev r2408). Thanks a lot
>  >  anyway. I will try to get a new version of IPython installed in the
>  >  labs.
>  >
>  >  Do you folk think that there could be another possibility to fix this
>  >  on older versions of IPython?
>
>
> I'm not sure if this works in older versions, but it's something to
>  try anyway (it works in bzr):
>
>  - Create divi.ipy with contents:
>
>  from __future__ import division
>
>  - Start ipython with "ipython -i divi.ipy"
>
>  You can also try omitting the -i switch.
>
>
>  --
(Continue reading)


Gmane