[IronPython] 2.7Beta1 Bug in Compile Modules

Bruce Bromberek bruce.bromberek at gmail.com
Tue Nov 9 20:09:37 CET 2010


Created work Item # 	29390.

On Tue, Nov 9, 2010 at 11:19 AM, Dino Viehland <dinov at microsoft.com> wrote:
> Bruce wrote:
>> In trying to compile the StdLib for a program, I kept running into an error with
>> BaseHTTPServer.py.  I've isolated it down to an issue with Dictionaries and
>> tuples.
>>
>> This code:
>>
>> responses = {
>>     100: ('Continue', 'Request received, please continue'),
>>     }
>>
>> Generates this error:
>> Traceback (most recent call last):
>>   File "pyc.py", line 159, in <module>
>>   File "pyc.py", line 151, in Main
>> SystemError: CompileToMethod cannot compile constant '('Continue',
>> 'Request received, please continue')' because it is a non-trivial value, such as
>> a live object. Instead, create an expression tree that can construct this value.
>>
>> However, these constructs work fine:
>>
>> x = ('Continue', 'Request received, please continue') responses = {
>>     100: x,
>>     }
>>
>> responses = {
>>     100: ('Continue'),
>>     }
>>
>> Is this a known issue?
>
>
> I don't think this is a known issue, can you open a bug?  This regression was probably
> caused by my addition of the ConstantDictionaryStorage which makes creation of
> constant dictionaries really fast.  This expression probably just needs to be IExpressionSerializable.
>
> _______________________________________________
> 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