Wednesday, August 06, 2008

IronPython 2.0 Beta 4 Released

The IronPython team has just announced the release of IronPython 2.0 Beta 4. IronPython 2 is the version of IronPython built on top of the Dynamic Language Runtime.

This is an important release, not just because of the number of new features and bugfixes, but because with it come changes to the way IronPython is packaged and what it is packaged with...

As well as the normal binary / source releases, IronPython 2b4 comes with an msi installer that also includes the Python 2.5 standard library. This is something the community has wanted for a long time, and opens the way for the Microsoft Dynamic Languages team to officially support some of the patches needed to enable some standard library modules to work with IronPython. It also makes IronPython a more 'complete' (and installable) version of Python.
IronPython 2 now requires .NET 2 Service Pack 1. If this isn't installed, the msi will prompt you. Unfortunately there is a bug with the currently released installer that will cause it to think that a machine with .NET 3 / 3.5 installed does not meet the requirements (even where .NET 2 SP1 is explicitly installed). Hopefully that will be fixed soon...

UPDATE: The msi bug has now been fixed.

Significant new features in this release include:
  • Static compilation of python files is now supported again and the pyc.py sample has been updated to use the newer version.
  • IDispatch-based cominterop is now the default mode as opposed to generating interop assemblies for interacting with COM components. This is a change that might break some existing scripts. One can switch back to the old behavior by setting the environment variable COREDLR_PreferComInteropAssembly. Read this blog for more details on this feature.
  • Apart from the Silverlight binaries and Chiron, the templates and tools to create a barebones app are included as well. This is in the Silverlight\Script folder.
  • Performance degrades that were reported in Beta 3 have been fixed.

Bugs fixed (45 on codeplex plus 5 reported internally):
  • nt.popen(...) breaks where ... consists of cmd.exe commands
  • globals().fromkeys(...) broken
  • globals().Values enumerator broken
  • Trivial: nt.tempnam("", None) broken
  • Trivial: Remove exceptions.OverflowWarning
  • New-style class dicts (dictproxy) cannot be used for C# methods with IDictionary parameters
  • Negative: ipyw.exe run w/o args crashes
  • 'dictproxy' object has no attribute 'copy'
  • class.__dict__ (dictproxy) doesn't support .get
  • repr() of a UserList containing another userList is wrong
  • NaN == NaN
  • DBNull should implement __nonzero__ that always returns false.
  • IP implementation of _sha512 has extra module attributes
  • Dir on textbox raises exception
  • re.compile(...).match(...) does not permit certain integer pos/endpos keyword parameter values
  • re.compile(...).match(...).groupdict() broken WRT to unnamed groups
  • re.match(..., ...).regs is nearly always incorrect
  • datetime.datetime.fromtimestamp() is not POSIX timestamp
  • Trivial: Charset name
  • datetime.datetime.utcfromtimestamp()
  • datetime.datetime.isoformat() has no parameter
  • nt.fstat(...) broken
  • Python25: __hash__ returning longs broken on old style classes WRT CPython 2.5
  • Trivial: IronPython converts -0x80000000 to a long (should be int)
  • -X:TabCompletion broken in IP2.0A1 WRT simple variable expansion
  • import socket
  • TypeError: staticmethod is not callable when overriding __new__ in old+new derived type
  • using the PropertyGrid class - SelectedObject issue
  • new.classobj fails with "TypeError: __bases__ items must be classes (got type)"
  • dict(...) broken on new style class dictionaries (dictproxy)
  • IronPython should not implement weakref.proxy.__eq__
  • nt.stat(someDirectory) is broken
  • Trivial: Implement 'file(...).mode'
  • Trivial: os.chmod followed by os.unlink fails
  • os.umask does not exist
  • Regular Expression incompatibility
  • co_filename in code objects is None
  • Trivial: help(clr.AddReference) not helpful
  • tb_line member of Traceback objects is incorrect
  • Valid regex under CPython will fail with IronPython
  • time.timezone has different semantic than in cpython
  • IronPython 2.0B2 cannot iterate over an IEnumerable returned from a C# method using yield
  • Implement os.system (nt.system)
  • cStringIO 1-arg .read() and .readlines() broken
  • Trivial: id should return int or long, not Int64
  • misc string related bugs from c-python25 test
  • Implement warnings for -Qwarn and -Qwarnall
  • StackOverflowException when exec "ao==7" for Ironpython, but Cpython can work
  • Helper stubs shown in Python stack traces

4 comments:

  1. Any way around that bug? I'm stuck until it gets fixed.

    ReplyDelete
  2. The bug is now fixed (apparently) - if you download a fresh copy of the installer it should work.

    ReplyDelete
  3. The updated pyc.py seems to be well hidden -- the Samples page still points at the 1.01 version from two years ago; and it's not apparent in either the source or .msi downloads...

    ReplyDelete
  4. Actually - although the new sample has been written, it wasn't included in the release. The samples have their own release cycle - but now that they have 'announced' this one (a mistake) they will push out a new release quickly...

    ReplyDelete

Note: only a member of this blog may post a comment.