[IPython-dev] Critical: For now IPython requires Python 2.5 - we need to fix this

Fernando Perez fperez.net at gmail.com
Thu Jun 12 16:27:40 EDT 2008

On Thu, Jun 12, 2008 at 1:11 PM, Brian Granger <ellisonbg.net at gmail.com> wrote:
> Hi,
> Now that all of the stuff from ipython1 has moved into IPython,
> IPython has new fancy parallel computing capabilities.....and..... a
> dependency on Python 2.5.
> Here is the story.  In IPython.kernel there is a likely lots of code
> that requires python 2.4, and a little that requires 2.5.  At this
> point, it is probably too late to get rid of the 2.4 specific stuff,
> but we still have to figure out what to do about 2.5 specific syntax
> and features.
> The main things are our usage of the with statement.  Currently
> building IPython with <2.5 gives a syntax error because of this.  We
> clearly need to fix this as IPython definitely needs to run under 2.4.
>  But, how do we want to handle these things?  Requires 2.4 and make
> 2.5 features optional?  Thoughts?

I have a few minutes of network...

I can't test which step fails right now,  because the setup.py install
is crashing for me with all versions:

Traceback (most recent call last):
  File "setup.py", line 174, in <module>
  File "/usr/lib/python2.5/distutils/core.py", line 151, in setup
  File "/usr/lib/python2.5/distutils/dist.py", line 974, in run_commands
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
  File "/usr/lib/python2.5/distutils/command/install.py", line 510, in run
  File "/usr/lib/python2.5/distutils/cmd.py", line 333, in run_command
  File "/usr/lib/python2.5/distutils/dist.py", line 994, in run_command
  File "/home/fperez/ipython/bzr-repo/trunk-dev/setupext/install_data_ext.py",
line 75, in run
    (out, _) = self.copy_file(f, dir)
  File "/usr/lib/python2.5/distutils/cmd.py", line 376, in copy_file
  File "/usr/lib/python2.5/distutils/file_util.py", line 117, in copy_file
    if not os.path.isfile(src):
  File "/usr/lib/python2.5/posixpath.py", line 208, in isfile
    st = os.stat(path)
TypeError: coercing to Unicode: need string or buffer, list found

In a couple of hours I may be able to pull bzr again and will test.  I
can play with alternatives for the 2.5 dependency.

I think we'll have to be OK with 2.4 as a dependency for versions >=
0.9, but 2.5 is definitely a little harsh.  I *really* want those cool
context managers in there, the idea is too cool not to put it  in.
But we need them to be optional.  The trick is to exclude them from
the build process if the  setup.py file is processed with python2.4,
since they simply won't compile at all (the with statement is a syntax

It may require a bit of distutils hackery with the MANIFEST.in, but I
don't think it's impossible to make them optional.



More information about the IPython-dev mailing list