[IPython-dev] Extensions & version dependency

Fernando Perez Fernando.Perez at colorado.edu
Mon Jan 23 13:25:25 EST 2006

Ville Vainio wrote:
> On 1/23/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:
>>Yeah, and even if it's an extension, we want users of ipython to be able to
>>access all of its features.  I don't want to tell them 'this subset of ipython
>>requires 2.4'.
> I think we can refrain from making extensions dependent on syntax of
> new python versions, but I'm not so sure about libraries (esp. if a
> version of the library can be installed on older python versions).
> I'm thinking of writing an extension for some level of job control
> (processes, not threads) using the "subprocess" module one of these
> days.

Well, then we should ship the backported version as a private copy, and do 
something like:

   import foo_new_module  # from 2.4
except ImportError:
   from IPython import foo_new_backport as foo_new_module

It's extra work for us, but that's the life of a developer who wants to be 
nice to his users :)  I did similar things in ipython to support 2.3 features 
in 2.2 for quite a while (I guess we could clean all that up now).

2.3 is still the default on way too many in-production OSes out there to drop 
even partial support for it.  If we want features that rely on 2.4, either we 
include the backport ourselves, or they will be user-only installation things 
(which we can put up for separate download on the website).  But the official 
ipython trunk should remain 2.3-safe for now (Mac OSX Panther ships with 2.3, 
for example, as do many of the 'enterprise' Linuxes, which tend to be managed 
with tight no-out-of-tree-updates policies).



More information about the IPython-dev mailing list