[Ironpython-users] IronPython, Daily Digest 9/29/2014

CodePlex no_reply at codeplex.com
Tue Sep 30 09:26:49 CEST 2014


Hi ironpython,

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

In today's digest:ISSUES

1. [New comment] BaseHTTPServer doesn't accept empty string as server address like CPython does
2. [New comment] BaseHTTPServer doesn't accept empty string as server address like CPython does
3. [New comment] ast.literal_eval in IronPython raises exception for negative numbers in expressions
4. [New comment] ast.literal_eval in IronPython raises exception for negative numbers in expressions
5. [New comment] socket.create_connection() causes exception "getaddrinfo returns an empty list"
6. [New issue] formatting inconsistency between % and format
7. [New issue] % formattin for '%f#...' and '%g#...' are broken
8. [New issue] Re-import module using importlib fails
9. [New comment] Re-import module using importlib fails

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

ISSUES

1. [New comment] BaseHTTPServer doesn't accept empty string as server address like CPython does
http://ironpython.codeplex.com/workitem/29477
User tcalmant has commented on the issue:

"<p>This still happends in IronPython 2.7.4.[0A][0A]```[0A]C:\Users\Thomas\>ipy -X:ExceptionDetail                                                                                        [0A]IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.34014 (32-bit)                                                                                      [0A]Type "help", "copyright", "credits" or "license" for more information.                                                                            [0A]>>> from BaseHTTPServer import HTTPServer                                                                                                         [0A]>>> from SimpleHTTPServer import SimpleHTTPRequestHandler                                                                                         [0A]>>> HTTPServer(('', 80), SimpleHTTPRequestHandler)                                                                                                [0A]L'adresse IPv4 0.0.0.0 et l'adresse IPv6 ::0 sont des adresses non spécifiées qui ne peuvent pas être utilisées comme adresses cibles.            [0A]Nom du paramètre : hostNameOrAddress                                                                                                              [0A]   à System.Net.Dns.GetHostEntry(String hostNameOrAddress)                                                                                        [0A]   à IronPython.Modules.PythonSocket.getfqdn(String host)                                                                                         [0A]   à Microsoft.Scripting.Interpreter.FuncCallInstruction`2.Run(InterpretedFrame frame)                                                            [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)                                       [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)                                    [0A]   à Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame)                                                            [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)                                       [0A]   à IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)                                                        [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)                                                               [0A]   à IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0)                                              [0A]   à IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0)                                          [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)                                    [0A]   à IronPython.Runtime.FunctionCaller`1.Default1Call1(CallSite site, CodeContext context, Object func, T0 arg0)                                  [0A]   à IronPython.Runtime.Method.MethodBinding.SelfTarget(CallSite site, CodeContext context, Object target)                                        [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)                                                [0A]   à Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame frame)                                                            [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)                                                   [0A]   à IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame)                                                        [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)                           [0A]   à IronPython.Compiler.PythonCallTargets.OriginalCallTarget4(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3)       [0A]   à IronPython.Runtime.FunctionCaller`3.Default1Call3(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2)                [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)            [0A]   à Microsoft.Scripting.Interpreter.FuncCallInstruction`8.Run(InterpretedFrame frame)                                                            [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run6[T0,T1,T2,T3,T4,T5,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)               [0A]   à IronPython.Runtime.Method.MethodBinding`2.SelfTarget(CallSite site, CodeContext context, Object target, T0 arg0, T1 arg1)                    [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)                        [0A]   à Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)                                                             [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)                           [0A]   à System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)                        [0A]   à Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Run(InterpretedFrame frame)                                                            [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)                           [0A]   à IronPython.Compiler.Ast.CallExpression.Invoke2Instruction.Run(InterpretedFrame frame)                                                        [0A]   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                                                      [0A]   à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)                                                               [0A]   à IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)                                                                              [0A]   à IronPython.Compiler.PythonScriptCode.Run(Scope scope)                                                                                        [0A]   à IronPython.Hosting.PythonCommandLine.<>c__DisplayClass1.<RunOneInteraction>b__0()                                                            [0A]ValueError: L'adresse IPv4 0.0.0.0 et l'adresse IPv6 ::0 sont des adresses non spécifiées qui ne peuvent pas être utilisées comme adresses cibles.[0A]Nom du paramètre : hostNameOrAddress                                                                                                              [0A]```</p>"-----------------

2. [New comment] BaseHTTPServer doesn't accept empty string as server address like CPython does
http://ironpython.codeplex.com/workitem/29477
User tcalmant has commented on the issue:

"<p>(Don't known what happened with previous comment format)[0A][0A]This error happens only when binding the '::0' IPv6 address: no problem with '0.0.0.0' nor other IPv6 addresses like '::1'.[0A]</p>"-----------------

3. [New comment] ast.literal_eval in IronPython raises exception for negative numbers in expressions
http://ironpython.codeplex.com/workitem/35572
User paweljasinski has commented on the issue:

"<p>As usually I am not able to format things on the first try :-)[0A][0A]```[0A]import ast[0A][0A]class Fix(ast.NodeTransformer):[0A]    def visit_UnaryOp(self, node):[0A]        if isinstance(node.operand, ast.Num):[0A]            if isinstance(node.op, ast.USub):[0A]                node.operand.n=-node.operand.n[0A]                return node.operand[0A]            if isinstance(node.op, ast.UAdd):[0A]                return node.operand[0A]        return node[0A][0A]def literal_eval_fix(string_only):[0A]    tree = ast.parse(string_only, mode="eval" )[0A]    tree = Fix().visit(tree)[0A]    return ast.literal_eval(tree)[0A][0A]print literal_eval_fix("42")[0A]print literal_eval_fix("-42")[0A]print literal_eval_fix("{ -1:-2, 2:'aaaaa'}")[0A]```</p>"-----------------

4. [New comment] ast.literal_eval in IronPython raises exception for negative numbers in expressions
http://ironpython.codeplex.com/workitem/35572
User s3e3 has commented on the issue:

"<p>Thank you very much for this workaround.[0A]I will use it in our local instance of jenkinsapi package untill this issue is fixed.</p>"-----------------

5. [New comment] socket.create_connection() causes exception "getaddrinfo returns an empty list"
http://ironpython.codeplex.com/workitem/35576
User tcalmant has commented on the issue:

"<p>Indeed, this exception is therefore caused by the lack of server, due to issue #29477[0A]https://ironpython.codeplex.com/workitem/29477</p>"-----------------

6. [New issue] formatting inconsistency between % and format
http://ironpython.codeplex.com/workitem/35580
User paweljasinski has proposed the issue:

"IronPython 2.7.5b3 DEBUG (2.7.5.0) on .NET 4.0.30319.18444 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> format(9.3126672485384569e+23, ".16e")
'9.3126672485384600e+23'
>>> "%.16e"%9.3126672485384569e+23
'9.3126672485384569e+23'

Given the sys.float_info.dig returning 15, both values are correct, but what bothers me, is that they are different."-----------------

7. [New issue] % formattin for '%f#...' and '%g#...' are broken
http://ironpython.codeplex.com/workitem/35581
User paweljasinski has proposed the issue:

"detailed list of failing test cases can be found under Languages/IronPython/Tests/formatfloat_testcases.txt"-----------------

8. [New issue] Re-import module using importlib fails
http://ironpython.codeplex.com/workitem/35586
User tcalmant has proposed the issue:

"Loading a module with importlib.import_module, deleting it in sys.modules then reloading it with importlib causes an exception in IronPython while it is transparent in CPython.

With IronPython:

C:\Users\Thomas\Documents\Git\ipopo>ipy -X:ExceptionDetail                                                      
IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.34014 (32-bit)                                                    
Type "help", "copyright", "credits" or "license" for more information.                                          
>>> import importlib                                                                                            
>>> module1 = importlib.import_module('samples.remote.provider')                                                          
>>> import sys                                                                                                  
>>> del sys.modules['samples.remote.provider']                                                                  
>>> module2 = importlib.import_module('samples.remote.provider')                                                          
samples.remote.provider                                                                                         
   à IronPython.Runtime.PythonDictionary.GetItem(Object key)                                                    
   à IronPython.Runtime.PythonDictionary.get_Item(Object key)                                                   
   à Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)                           
   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                    
   à Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)                 
   à IronPython.Runtime.FunctionCaller`1.Default1Call1(CallSite site, CodeContext context, Object func, T0 arg0)
   à System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)  
   à Microsoft.Scripting.Interpreter.FuncCallInstruction`6.Run(InterpretedFrame frame)                          
   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                    
   à Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3)     
   à IronPython.Compiler.Ast.CallExpression.Invoke1Instruction.Run(InterpretedFrame frame)                      
   à Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)                                    
   à Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)                             
   à IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)                                            
   à IronPython.Compiler.PythonScriptCode.Run(Scope scope)                                                      
   à IronPython.Hosting.PythonCommandLine.<>c__DisplayClass1.<RunOneInteraction>b__0()                          
KeyError: samples.remote.provider


With Python (here with Python 3.4, but Python 2.7 behaves the same way):

C:\Users\Thomas\Documents\Git\ipopo>python
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import importlib
>>> module1 = importlib.import_module('samples.remote.provider')
>>> import sys
>>> del sys.modules['samples.remote.provider']
>>> module2 = importlib.import_module('samples.remote.provider')
>>> module1 is module2
False
"-----------------

9. [New comment] Re-import module using importlib fails
http://ironpython.codeplex.com/workitem/35586
User tcalmant has commented on the issue:

"<p>It seems to only happen for modules under packages:[0A][0A]- urlparse works[0A]- logging.config raises the error</p>"
----------------------------------------------



----------------------------------------------
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/20140930/05f642fe/attachment.html>


More information about the Ironpython-users mailing list