[IronPython] "code" module in 2.0.1 but missing in 2.6b1

Dave Fugate dfugate at microsoft.com
Thu Jul 23 18:47:50 CEST 2009


Thanks Tony! You reported this just in time for it to get fixed in 2.6 Beta 2.

If you're interested, here's a little background on the problem and the fix.  The code module is dependent upon codeop which in turn has a dependency on __future__.all_feature_names.  IronPython's own implementation of __future__.py (found in the binary and source zip files) does not in fact provide the all_feature_names member.  The way we determine which CPython modules/packages to include in the MSI installer is to fire up an IronPython instance and try to import each and every CPython module.  That is, if we can import a CPython module without an exception being thrown, we'll include it in the MSI.  The problem with this approach was that IronPython was picking up our own implementation of __future__.py before attempting to import any given CPython module.  This obviously breaks codeop because all_feature_names is missing from __future__.  The fix was actually quite simple => set the IRONPYTHONPATH environment variable to use CPython's standard library before starting IronPython.  This forces us to pick up CPython's __future__.py instead of our own.

Dave
http://knowbody.livejournal.com


-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Tony Meyer
Sent: Saturday, July 18, 2009 3:52 PM
To: users at lists.ironpython.com
Subject: [IronPython] "code" module in 2.0.1 but missing in 2.6b1

Hi,

The code module (used for providing an interactive interpreter) isn't
included in IronPython 2.6b1 (it is in 2.0.1).  Copying the code (and
codeop) module from 2.0.1 to 2.6b1 seems to work fine, however.

Is this a deliberate change?  One that will be addressed by 2.6 final?

(I did try searching the web and the issue tracker, but I may have
missed something - searching for "import code" doesn't work amazingly
well).

Thanks,
Tony
_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list