[Ironpython-users] IronPython, Daily Digest 8/24/2011

no_reply at codeplex.com no_reply at codeplex.com
Thu Aug 25 11:18:53 CEST 2011


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] "from <package> import *" fails, causes KeyError
2. [New comment] "from <package> import *" fails, causes KeyError
3. [Status update] wpf module in Silverlight
4. [New issue] ArgumentException when using SetTrace

----------------------------------------------

ISSUES

1. [New issue] "from <package> import *" fails, causes KeyError
http://ironpython.codeplex.com/workitem/31305
User mejohansen has proposed the issue:

"Version info:
> IronPython 2.7 (2.7.0.40) on .NET 4.0.30319.1

Example:
> >>> from email import *
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> KeyError: base64mime
> >>> import email
> >>>"-----------------

2. [New comment] "from <package> import *" fails, causes KeyError
http://ironpython.codeplex.com/workitem/31305
User mejohansen has commented on the issue:

"I found a workaround for IronPython
 __init__.py for the package must be changed to something like:

>all_modules = ['module1', 'module2', 'module3']
>
>for module in all_modules:
>	__import__('%s.%s' % (__name__, module))

Of course, for vanilla Python, it is sufficient to do:
> __all__ = all_modules"-----------------

3. [Status update] wpf module in Silverlight
http://ironpython.codeplex.com/workitem/31204
User jdhardy has updated the issue:
Status has changed from Proposed to Closed.

-----------------

4. [New issue] ArgumentException when using SetTrace
http://ironpython.codeplex.com/workitem/31308
User MarkusSchaber has proposed the issue:

"Testscript: (also works in interactive mode, IronPython 2.7.1 beta):
-- snip --
import os, sys

def trace_handler(a,b,c):
    return trace_handler

sys.settrace(trace_handler)

for root, dirs, files in os.walk("."):
    pass
-- snap --

Traceback (most recent call last):
  File "test.py", line 8, in <module>
ValueError: Ein Element mit dem gleichen Schlüssel wurde bereits hinzugefügt.

.NET traceback:
An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.LayOutVariables(Dictionary`2 strongBoxedLocals, Dictionary`2 parameters)
   at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.TransformLambda(LambdaExpression lambda)
   at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.Transform(LambdaExpression lambda)
   at Microsoft.Scripting.Debugging.CompilerServices.DebugContext.TransformLambda(LambdaExpression lambda, DebugLambdaInfo lambdaInfo)
   at IronPython.Runtime.FunctionCode.<>c__DisplayClass1a.<GetGeneratorOrNormalLambdaTracing>b__19(Expression`1 x)
   at IronPython.Compiler.GeneratorRewriter.Reduce(Boolean shouldInterpret, Boolean emitDebugSymbols, Int32 compilationThreshold, IList`1 parameters, Func`2 bod
yConverter)
   at IronPython.Runtime.FunctionCode.GetGeneratorOrNormalLambdaTracing(PythonContext context)
   at IronPython.Runtime.FunctionCode.UpdateDelegate(PythonContext context, Boolean forceCreation)
   at IronPython.Runtime.FunctionCode.LazyCompileFirstTarget(PythonFunction function)
   at IronPython.Compiler.PythonCallTargets.OriginalCallTarget4(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3)
   at IronPython.Runtime.PythonFunction.FunctionCaller`1.Default3Call1(CallSite site, CodeContext context, Object func, T0 arg0)
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
   at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
   at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
   at IronPython.Compiler.PythonScriptCode.Run(Scope scope)
   at IronPython.Hosting.PythonCommandLine.<>c__DisplayClass1.<RunOneInteraction>b__0()
ValueError: An item with the same key has already been added.

Dino Viehland writes:
My guess would be that the debuggable lambda re-writer isn't handling re-use of the same parameter within different blocks.  It might be possible to change this from calling Insert into using the indexer to assign (which allows replacements) but that's probably not the correct fix."
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20110825/be560875/attachment.html>


More information about the Ironpython-users mailing list