[Ironpython-users] IronPython, Daily Digest 7/17/2011

no_reply at codeplex.com no_reply at codeplex.com
Mon Jul 18 16:45:02 CEST 2011


Hi ironpython,

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

In today's digest:ISSUES

1. [New issue] builtin codecs can not be found in executable compiled with pyc.py
2. [New issue] can not compile function with 14+ arguments with pyc.py (Popen.__init__ in subprocess.py)

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

ISSUES

1. [New issue] builtin codecs can not be found in executable compiled with pyc.py
http://ironpython.codeplex.com/workitem/31032
User roxaz911 has proposed the issue:

"seems that codecs somehow do not compile right. in compiled binary i
cant use utf-16 codec (i did not test others).

testcase is really simple:

> import codecs
> codecs.open('file.txt', 'r', 'utf-16')
file.txt should exist before testing this. it can be empty, doesnt matter.
running it on ipy interpreter no exception is thrown, but if this is
compiled to executable this is what i get:

> F:\py\src>test.exe
>
> Unhandled Exception: IronPython.Runtime.Exceptions.LookupException:
> unknown encoding: utf-16
>    at
> IronPython.Runtime.Operations.PythonOps.LookupEncoding(CodeContext
> context, String encoding)
>    at
> Microsoft.Scripting.Interpreter.FuncCallInstruction`3.Run(InterpretedFrame
> frame)
>    at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame
> frame)
>    at
> Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0
> arg0, T1 arg1, T2 arg2, T3 arg3)
>    at
> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite
> site, T0 arg0, T1 arg1, T2 arg2)
>    at DLRCachedCode.open$64(Closure , PythonFunction $function, Object
> filename, Object mode, Object encoding, Object errors, Object buffering)
>    at
> IronPython.Runtime.PythonFunction.FunctionCaller`3.Default2Call3(CallSite
> site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2)
>    at
> System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite
> site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
>    at DLRCachedCode.__main__$2(CodeContext $globalContext,
> FunctionCode $functionCode)
>    at IronPython.Compiler.OnDiskScriptCode.Run()
>    at IronPython.Runtime.PythonContext.InitializeModule(String
> fileName, ModuleContext moduleContext, ScriptCode scriptCode,
> ModuleOptions options)
>    at IronPython.Runtime.ModuleLoader.load_module(CodeContext context,
> String fullName)
>    at
> Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame
> frame)
>    at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame
> frame)
>    at
> Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0
> arg0, T1 arg1, T2 arg2, T3 arg3)
>    at
> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite
> site, T0 arg0, T1 arg1, T2 arg2)
>    at
> IronPython.Runtime.Importer.FindAndLoadModuleFromImporter(CodeContext
> context, Object importer, String fullName,
> List path, Object& ret)
>    at IronPython.Runtime.Importer.TryLoadMetaPathModule(CodeContext
> context, String fullName, List path, Object& ret)
>    at IronPython.Runtime.Importer.ImportTopAbsolute(CodeContext
> context, String name)
>    at IronPython.Runtime.Importer.ImportModule(CodeContext context,
> Object globals, String modName, Boolean bottom, Int32 level)
>    at IronPython.Modules.Builtin.__import__(CodeContext context,
> String name, Object globals, Object locals, Object fromlist, Int32 level)
>    at
> Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Run(InterpretedFrame
> frame)
>    at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame
> frame)
>    at
> Microsoft.Scripting.Interpreter.LightLambda.Run8[T0,T1,T2,T3,T4,T5,T6,T7,TRet](T0
> arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
>    at
> System.Dynamic.UpdateDelegates.UpdateAndExecute7[T0,T1,T2,T3,T4,T5,T6,TRet](CallSite
> site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
>    at IronPython.Runtime.Importer.ImportLightThrow(CodeContext
> context, String fullName, PythonTuple from, Int32 level)
>    at
> IronPython.Runtime.Operations.PythonOps.InitializeModule(Assembly
> precompiled, String main, String[] references)
>    at PythonMain.Main()"-----------------

2. [New issue] can not compile function with 14+ arguments with pyc.py (Popen.__init__ in subprocess.py)
http://ironpython.codeplex.com/workitem/31033
User roxaz911 has proposed the issue:

"subprocess.py from standard ironpython library can not be compiled with pyc.py due to Popen.__init__ that has 15 arguments. For some reason there is max 13 arguments limit when compiling with pyc.py.  If function with 14 or more arguments is being compiled it fails like this:
Input Files:
Output:
        freezetest
Target:
        ConsoleApplication
Platform:
        ILOnly
Machine:
        I386
Compiling...
Traceback (most recent call last):
  File "c:\Programs\IronPython 2.7\Tools\Scripts\pyc.py", line 159, in <module>
  File "c:\Programs\IronPython 2.7\Tools\Scripts\pyc.py", line 151, in Main
SystemError: Unable to make a reference to a transient module from a
non-transient module."
----------------------------------------------



----------------------------------------------
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/20110718/271cd35d/attachment.html>


More information about the Ironpython-users mailing list