[IronPython] IronPython 2.0 Beta 1

Dave Fugate dfugate at microsoft.com
Fri Mar 14 13:48:50 CET 2008

Hello IronPython Community,

I'm pleased to announce IronPython 2.0 Beta 1.  This particular release contains almost one hundred bug fixes of which the majority were reported on CodePlex (118 votes)!  2.0 Beta 1 includes the following improvements over the Alphas:

*         PEP 328, absolute and relative imports, has been implemented

*         PEP 302, new import hooks, has been implemented

*         Numerous Python dictionary improvements

*         'sys' is now a real builtin module

*         Test projects for IronPython .NET (ClrAssembly) and COM interop (DlrComLibrary) support have been added to the 'Src\Tests' directory within the source zip file

*         More improvements to the -X:PreferComDispatch flag

The following CodePlex Work Items have been closed since IronPython 2.0 Alpha 8:

*         946         import clr doesn't give access to the contents of __builtins__ using .NET method names

*         1402       try-finally has an issue in generator

*         2206       with statement broken in command line

*         2443       problem with __slots__ and __init__ in new-style classes

*         2648       Error importing module

*         2704       __import__ and packages aren't mixing well

*         3092       struct.unpack mishandling the "x" format code

*         3117       dict.update doesn't take keyword arguments - differs from CPython

*         3287       Descriptor/metaclass problems

*         4197       Trivial: int('0x20', 16) fails to parse, long too

*         4322       unpacking single element tuples in for-statement, listcomp and generator

*         4691       AttributeError on __ComObject when using a C++/ATL/MFC COM object which implements a .NET interface

*         5083       operator.__contains__ is broken

*         5447       socket.getnameinfo(...) broken under Vista

*         5566       base64 slash bug

*         5609       Trivial: Python25: File lacks __enter__ and __exit__

*         5801       Class with slots and getattr not compatible

*         5904       Trivial: Multi-line dictionary/list/tuple expressions in IP interpreter console not compatible w/ CPython Interpreter console

*         6006       pyc is mixing up ia64 and x64

*         6265       maxsplit keyword arg of re.split not accepted

*         6272       re.compile(...).match(...).endpos has an incorrect value

*         6805       Trivial: func_code.co_argcount and func_code.co_flags are wrong

*         6991       Trivial: IDictionary.GetEnumerator on IronPython Dict returns the wrong enumerator implementation

*         7972       if the argument k in method GetRandBits(k) is not greater than zero, the valueError would be thrown

*         8009       the getrandbits method would throw overflow exception in ironpython if the argument k is a int.MaxValue

*         8297       range w/ large negative number produces incorrect results

*         8361       Trivial: popen shouldn't open new window

*         8678       itertools.izip does not work when the arguments are the same iterator

*         8780       Removes the inexistent file did not throw OSError in IP

*         9070       Python25: Assertions Fail with unittest - requires 2.5 style exceptions

*         9349       The array.array format "I" handles large values incorrectly

*         9351       int() doesn't convert representable longs to int

*         10291    calling base class __call__ invokes constructor instead

*         10577    Trivial: Python25: Attempts to set __dict__ of new style classes fails with wrong exception WRT CPython 2.5

*         10642    Non-empty expression list after "yield" keyword gives a SyntaxError

*         10643    Can't assign to []

*         10648    Trivial: rpartition method of string objects broken when no separator match is found

*         10709    Using lambda in class definition will add <lambda$..> into the class's dictionary

*         10782    Python25: Stringified representation of exception classes are incorrect

*         10983    Reading files in text mode reads chars > 0x7F as '?'

*         11362    Tracebacks not generated under 64-bit OSes

*         11487    __str__ does not call __repr__ in new style classes

*         11576    SystemError: Ambiguous match found.

*         11760    Method incorrectly casts to PythonFunction.

*         12038    Parser reports weird SyntaxError when trying to use digits for member names

*         12493    Error in import

*         12647    Implement __coerce__, __float__, __index__, __long__, and __rdivmod__ for bool type

*         13617    Trivial: Modules with bad encoding names throw wrong exception

*         13618    IRONPYTHONPATH should be split with platform-specific path separator

*         13651    importing package with imp module

*         13686    Using setattr with modules

*         13806    Cannot import Python 2.5 email module

*         13860    Complex infinite not allowed by IP

*         14454    Event handlers can cause circular references and leak memory

*         14456    raw_input blocks until 20 characters are read

*         14499    Trivial: sys.version incorrect in IP2.0A7

*         14539    .Visible=True (property) does not work in 2.0

*         14605    Trivial: Enum truth broken

*         14636    Trivial: Bug in ScriptDomainManager.GetPublishedModules()

*         14833    Remove -X:AssembliesDir flag

*         14861    Value types don't work when a function is called twice

*         14878    type(sys) does not have a default constructor

*         14882    Trivial: Implement float.__lt__(float)

*         14982    Trivial: able to derive from System.Double (or not able to derive from System.Single)

*         15102    Deriving from "property" breaks default constructor params

*         15289    re module never compiles regular expressions

We'd like to think everyone in the IronPython Community who reported these: undebtedly, Anthony Baxter, pobrien, Kamil Dworakowski, millind, romank, tarlano, Michael Foord, Evan Klitzke, sanxiyn, jbevain, jackeyoo, Jeff Brown, Oliver Yu, rridge, lthompson, JiaJun Liu, CriGoT, abs, jdhardy, sbergman, sjmachin, Eloff, atifaziz, arman0, Qvin, Vizcayno, Davy Mitchell, CurtHagenlocher, Laurion, luntain, py_sunil, zvikag, David Fraser, Gary Stephenson, and Beaton.

Additionally, we've closed the following bugs that were reported internally:

*         12% perf degrade on worst case generator scenario with loops

*         Copying arguments for the ContextAware methods in BuiltinFunction.cs

*         Performance issues in the Dict implementation

*         Trivial: overhead  in using typed slots with environment

*         PythonFile.Write flushes on each write

*         Document difference converting instance without __complex__ or __float__ to complex

*         IronPython: Cannot step into a method

*         IronPython: Cannot Localize Windows Forms

*         formatting with '%o' on object which has __oct__ defined

*         6% degrade in the try-raise-except scenario by change#183362

*         unicode() can't handle 'unicode-escape'

*         raw_input is broken

*         it  is different for yield statement between IronPython and CPython .

*         ImportError: Cannot import name defaultdict

*         true division(from __future__ import division)  throws OverflowError on division by huge number

*         tuple([0,1,2,3,4])[-100:100:-1] throw OverflowError

*         a derived tuple  which overrode the method __getitem__ gets an error result with the iter()

*         Trivial: u''.isdecimal() returns 'True' in IronPython but 'False' in CPython

*         there are different handle for getweakrefs and refequal  against IronPython and CPython. lead to different result

*         istitle() returns False in IronPython with unicode object from u'\u1F88' to u'\u1FFc'

*         PythonContext.DisplayName is broken

*         return can't have an expression in generators

*         expect System.Nullable[()] returning the non-generic type, instead TypeError thrown

*         Dict slice eval order is incorrect

*         ctime() returns unicode on non-English machine

*         Can't call old style classes with non-simple signatures when __init__ is not defined

*         with doesn't work in interactive mode.

*         One overload is missing for decode methods in _codecs module.

You can download IronPython 2.0 Beta 1 at:  http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=IronPython&ReleaseId=10266

The IronPython Team

The hosting APIs are nearing completion and will be unlikely to change much in future IronPython 2.0 releases.  For anyone interested, you might want to check out "EngineTest.cs" and "test_ipye.py" in the source zip file to get an idea of where the hosting APIs are for Beta 1.  It's also worth pointing out that the 'CodeBlock'/'CodeBlockInfo' AST symbols have been renamed to 'LambdaExpression' and 'LambdaInfo' respectively.  The APIs around both of these changed significantly since the last release.

ToyScript, a small scripting language built on top of the DLR, is merely a DLR sample and not some new scripting language Microsoft has created.  Also, ToyScript is not intended to be distributed with IronPython on a permanent basis.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080314/6a59372a/attachment.html>

More information about the Ironpython-users mailing list