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 Iro nPython. This forces us to pick up CPython's __future__.py instead of our own. Dave http://knowbody.livejournal.com -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Tony Meyer Sent: Saturday, July 18, 2009 3:52 PM To: [email protected] 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 [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
