[IPython-dev] Fork to create an IPcluster with engines and clients being a mix of Python 2.6 & 2.7 (bytecode translation utilities)
Mon Oct 31 14:36:01 CDT 2011
To support an IPcluster containing both Python 2.6 & 2.7 engines and 2.6 clients I incorporated a small bytecode translation utility into my fork of IPython. If anyone else is interested you can find the fork at:
(Nothing else has been changed yet, and everything is up to date with the master branch of IPython).
It’s likely not worth pulling this niche feature into IPython, although it may be useful to at least detect when an engine is attempting to run incompatible byte code from a different client Python version. Otherwise you learn of this issue the hard way with the engine-interpreter crashing.
This can be accomplished with a very small addition to the CannedFunction class in IPython.utils.pickleutil module. One simply records the version of Python in which the function is canned, and at uncanning this can be checked for incompatibilities. See:
If anyone is interested the added module IPython.utils.codetranslation is a general translation framework that includes byteplay-derived disassemblers and assemblers for 2.4 – 2.7. This may be of negligible use in IPython as at least 2.6 is required, and hence only the 2.6 -> 2.7 translation has been developed. One could easily code up the additional translations if needed in other projects.
P.S. Thanks ipython dev team for the great tools. I’ve been using the IPython shell for 4 years and have recently found the parallel tools to be incredibly useful.
More information about the IPython-dev