From no_reply at codeplex.com Tue Aug 5 09:26:34 2014 From: no_reply at codeplex.com (CodePlex) Date: 5 Aug 2014 00:26:34 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/4/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Investigate NUnit/NDepend + IronPython conflict which results in invalid code being generated ---------------------------------------------- ISSUES 1. [New comment] Investigate NUnit/NDepend + IronPython conflict which results in invalid code being generated http://ironpython.codeplex.com/workitem/19128 User DanielWolf has commented on the issue: "

I'm experiencing the same problem with IronPython 2.7.4. To reproduce, you need a unit test containing just the line ```Python.CreateEngine();```.

In our build environment, TeamCity (CI) performs code coverage analysis by calling [NCover](http://www.ncover.com). When I deactivate NCover, the unit test runs fine; with NCover enabled, I get the following exception. My guess is that NCover does some kind of instrumentation which IronPython then stumbles over.

SetUp method failed. SetUp : System.Reflection.TargetInvocationException : Failed to load language 'IronPython 2.7.4': Common Language Runtime detected an invalid program.
----> System.InvalidProgramException : Common Language Runtime detected an invalid program.
at Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded)
at Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config)
at Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language)
at Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName)
at Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName)
at IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime)
at IronPython.Hosting.Python.CreateEngine()
at MIP.ScriptDebugger.Tests.PythonToolsTest.Setup() in c:\BuildAgent\work\71475aae5f18e70f\MIP.ScriptDebugger.Tests\PythonToolsTest.cs:line 11
--InvalidProgramException
at IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options)

" ---------------------------------------------- ---------------------------------------------- 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: From Rickard.Holmberg at raysearchlabs.com Wed Aug 6 09:39:22 2014 From: Rickard.Holmberg at raysearchlabs.com (Rickard Holmberg) Date: Wed, 6 Aug 2014 07:39:22 +0000 Subject: [Ironpython-users] https://www.enthought.com/repo/.iron/ gone again Message-ID: Hi everyone, The old numpy/scipy eggs that used to be hosted at https://www.enthought.com/repo/.iron/ are gone again. Does anyone know of a mirror, or is in a position to put them back up? Best regards, Rickard Holmberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Aug 6 10:43:56 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 6 Aug 2014 09:43:56 +0100 Subject: [Ironpython-users] https://www.enthought.com/repo/.iron/ gone again In-Reply-To: References: Message-ID: On Wed, Aug 6, 2014 at 8:39 AM, Rickard Holmberg < Rickard.Holmberg at raysearchlabs.com> wrote: > Hi everyone, > > > > The old numpy/scipy eggs that used to be hosted at > https://www.enthought.com/repo/.iron/ are gone again. Does anyone know of > a mirror, or is in a position to put them back up? > If anyone does have a copy I can add it to the ironlanguages GitHub account to avoid this in the future. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Wed Aug 6 15:46:53 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Wed, 6 Aug 2014 15:46:53 +0200 Subject: [Ironpython-users] https://www.enthought.com/repo/.iron/ gone again In-Reply-To: References: Message-ID: It can be recreated: https://github.com/numpy/numpy-refactor/wiki/Recompile --pawel On Wed, Aug 6, 2014 at 10:43 AM, Jeff Hardy wrote: > On Wed, Aug 6, 2014 at 8:39 AM, Rickard Holmberg > wrote: >> >> Hi everyone, >> >> >> >> The old numpy/scipy eggs that used to be hosted at >> https://www.enthought.com/repo/.iron/ are gone again. Does anyone know of a >> mirror, or is in a position to put them back up? > > > If anyone does have a copy I can add it to the ironlanguages GitHub account > to avoid this in the future. > > - Jeff > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > From no_reply at codeplex.com Sun Aug 10 09:26:43 2014 From: no_reply at codeplex.com (CodePlex) Date: 10 Aug 2014 00:26:43 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/9/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] IronPython allows obj.None - should be a SyntaxError 2. [Status update] Improve slice support for arrays (ValueError: cannot do slice assignment w/ no step) 3. [Status update] 1.1: site.py not run under limited user account on Windows XP SP2 4. [Status update] IronRuby 1.1.3 incompatible with Microsoft.Scripting 1.1.0.21 ---------------------------------------------- ISSUES 1. [Status update] IronPython allows obj.None - should be a SyntaxError http://ironpython.codeplex.com/workitem/669 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "Fixed in c633a1"----------------- 2. [Status update] Improve slice support for arrays (ValueError: cannot do slice assignment w/ no step) http://ironpython.codeplex.com/workitem/14452 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "Fixed in cdce35"----------------- 3. [Status update] 1.1: site.py not run under limited user account on Windows XP SP2 http://ironpython.codeplex.com/workitem/18646 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "XP is no longer a supported operating system."----------------- 4. [Status update] IronRuby 1.1.3 incompatible with Microsoft.Scripting 1.1.0.21 http://ironpython.codeplex.com/workitem/32936 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "IR seems dead, I don't think its in the interest of IP to try and support a dead project." ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Mon Aug 11 09:22:35 2014 From: no_reply at codeplex.com (CodePlex) Date: 11 Aug 2014 00:22:35 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/10/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] 2.6: add _winreg.ExpandEnvironmentStrings, DisableReflectionKey(), EnableReflectionKey(), and QueryReflectionKey() 2. [Status update] test_cp10825 in test_stdmodules.py shouldn't depend on www.microsoft.com being available 3. [Status update] COM objects unusable from ipy.exe on x64 platforms 4. [Status update] lseek() isn't implemented in module nt 5. [Status update] "None=..." error message has changed 6. [Status update] Installation of IronPython on Windows XP over VMware Fusion 7. [Status update] Exceptions not being trapped by Debugger in VS 2013 ---------------------------------------------- ISSUES 1. [New comment] 2.6: add _winreg.ExpandEnvironmentStrings, DisableReflectionKey(), EnableReflectionKey(), and QueryReflectionKey() http://ironpython.codeplex.com/workitem/19583 User slide_o_mix has commented on the issue: "

ExpandEnvironmentStrings is implemented now. Has been for a while.

"----------------- 2. [Status update] test_cp10825 in test_stdmodules.py shouldn't depend on www.microsoft.com being available http://ironpython.codeplex.com/workitem/22956 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "IP has no servers it can depend on being up for tests."----------------- 3. [Status update] COM objects unusable from ipy.exe on x64 platforms http://ironpython.codeplex.com/workitem/23587 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "Unable to reproduce issue."----------------- 4. [Status update] lseek() isn't implemented in module nt http://ironpython.codeplex.com/workitem/23813 User slide_o_mix has updated the issue: Status has changed from Active to Closed with the following comment, "This has been fixed for some time."----------------- 5. [Status update] "None=..." error message has changed http://ironpython.codeplex.com/workitem/28379 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Fixed some time ago"----------------- 6. [Status update] Installation of IronPython on Windows XP over VMware Fusion http://ironpython.codeplex.com/workitem/32925 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "XP is no longer a supported OS"----------------- 7. [Status update] Exceptions not being trapped by Debugger in VS 2013 http://ironpython.codeplex.com/workitem/35389 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed. ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Tue Aug 12 09:22:34 2014 From: no_reply at codeplex.com (CodePlex) Date: 12 Aug 2014 00:22:34 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/11/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] COM objects unusable from ipy.exe on x64 platforms 2. [Status update] COM objects unusable from ipy.exe on x64 platforms 3. [New comment] lseek() isn't implemented in module nt 4. [Status update] lseek() isn't implemented in module nt 5. [New comment] "None=..." error message has changed 6. [Status update] "None=..." error message has changed 7. [Status update] Debugging in Visual Studio stops working after a script has been executed twice. 8. [New comment] Installation of IronPython on Windows XP over VMware Fusion 9. [Status update] Installation of IronPython on Windows XP over VMware Fusion 10. [New comment] Exceptions not being trapped by Debugger in VS 2013 11. [Status update] Exceptions not being trapped by Debugger in VS 2013 ---------------------------------------------- ISSUES 1. [New comment] COM objects unusable from ipy.exe on x64 platforms http://ironpython.codeplex.com/workitem/23587 User slide_o_mix has commented on the issue: "Unable to reproduce issue. ** Closed by slide_o_mix 8/10/2014 6:07 AM"----------------- 2. [Status update] COM objects unusable from ipy.exe on x64 platforms http://ironpython.codeplex.com/workitem/23587 User slide_o_mix has updated the issue: Status has changed from Closed to Proposed. ----------------- 3. [New comment] lseek() isn't implemented in module nt http://ironpython.codeplex.com/workitem/23813 User slide_o_mix has commented on the issue: "This has been fixed for some time. ** Closed by slide_o_mix 8/10/2014 6:52 AM"----------------- 4. [Status update] lseek() isn't implemented in module nt http://ironpython.codeplex.com/workitem/23813 User slide_o_mix has updated the issue: Status has changed from Closed to Proposed. ----------------- 5. [New comment] "None=..." error message has changed http://ironpython.codeplex.com/workitem/28379 User slide_o_mix has commented on the issue: "Fixed some time ago ** Closed by slide_o_mix 8/10/2014 6:13 AM"----------------- 6. [Status update] "None=..." error message has changed http://ironpython.codeplex.com/workitem/28379 User slide_o_mix has updated the issue: Status has changed from Closed to Proposed. ----------------- 7. [Status update] Debugging in Visual Studio stops working after a script has been executed twice. http://ironpython.codeplex.com/workitem/29554 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "This sounds like something with PTVS. Please raise an issue with them at https://pytools.codeplex.com/"----------------- 8. [New comment] Installation of IronPython on Windows XP over VMware Fusion http://ironpython.codeplex.com/workitem/32925 User slide_o_mix has commented on the issue: "XP is no longer a supported OS ** Closed by slide_o_mix 8/10/2014 6:19 AM"----------------- 9. [Status update] Installation of IronPython on Windows XP over VMware Fusion http://ironpython.codeplex.com/workitem/32925 User slide_o_mix has updated the issue: Status has changed from Closed to Proposed. ----------------- 10. [New comment] Exceptions not being trapped by Debugger in VS 2013 http://ironpython.codeplex.com/workitem/35389 User slide_o_mix has commented on the issue: "** Closed by slide_o_mix 8/10/2014 6:29 AM"----------------- 11. [Status update] Exceptions not being trapped by Debugger in VS 2013 http://ironpython.codeplex.com/workitem/35389 User slide_o_mix has updated the issue: Status has changed from Closed to Proposed. ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Wed Aug 13 09:22:39 2014 From: no_reply at codeplex.com (CodePlex) Date: 13 Aug 2014 00:22:39 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/12/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ScriptScope.GetVariable throws when the actual type is a double 2. [New issue] Can't create a pure ironpython WCF service 3. [New comment] Can't create a pure ironpython WCF service ---------------------------------------------- ISSUES 1. [New comment] ScriptScope.GetVariable throws when the actual type is a double http://ironpython.codeplex.com/workitem/24074 User slide_o_mix has commented on the issue: "

This is related to 24075, but 24075 has more information, so closing this one out.

"----------------- 2. [New issue] Can't create a pure ironpython WCF service http://ironpython.codeplex.com/workitem/35457 User Erxin has proposed the issue: "The pure ironpython WCF service could be create in ironpython 2.6 but after migrate to ironpython 2.7 the code is not work. The process to create a pure ironpython WCF service, it works in ironpython 2.6. The attachement is the relative clrtype implementation. http://gui-at.blogspot.com/2009/11/wcf-service-in-pure-ironpython.html Is there a solution or workaround to fix this? Thank you!"----------------- 3. [New comment] Can't create a pure ironpython WCF service http://ironpython.codeplex.com/workitem/35457 User slide_o_mix has commented on the issue: "

Can you give information as to what "doesn't work"? What issue are you running into?

" ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Thu Aug 14 09:24:35 2014 From: no_reply at codeplex.com (CodePlex) Date: 14 Aug 2014 00:24:35 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/13/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] implement clr.GetString and clr.GetBytes as helper to convert strings to and from bytes 2. [New comment] IronPython thread module does not allow small stack sizes 3. [New comment] Passing globals/locals with eval() 4. [New comment] help broken for Vista x64 5. [New comment] Implement mmap module 6. [New comment] Implement mmap module 7. [New comment] STRESS: test_cominterop.py fails under the gcstress test mode 8. [New comment] PYC - Allow the Setting of the Icon if generating EXE 9. [New comment] Create wiki for 3rd party apps compat list 10. [New comment] Use Windows SDK for builds instead of Visual C++ 11. [New comment] I can't import PIL module ---------------------------------------------- ISSUES 1. [New comment] implement clr.GetString and clr.GetBytes as helper to convert strings to and from bytes http://ironpython.codeplex.com/workitem/7159 User slide_o_mix has commented on the issue: "

Fixed in 24317f5

"----------------- 2. [New comment] IronPython thread module does not allow small stack sizes http://ironpython.codeplex.com/workitem/7827 User slide_o_mix has commented on the issue: "

Fixed in 796152

"----------------- 3. [New comment] Passing globals/locals with eval() http://ironpython.codeplex.com/workitem/16884 User slide_o_mix has commented on the issue: "

This must have been fixed at some point:

Type "help", "copyright", "credits" or "license" for more information.
>>> def a():
... print locals()
... print globals()
...
>>> eval(a.func_code, { 'test' : 1})
{}
{'test': 1, '__builtins__': <module '__builtin__' (built-in)>}
>>>

"----------------- 4. [New comment] help broken for Vista x64 http://ironpython.codeplex.com/workitem/19258 User slide_o_mix has commented on the issue: "

Fixed in 41763cf

"----------------- 5. [New comment] Implement mmap module http://ironpython.codeplex.com/workitem/21401 User slide_o_mix has commented on the issue: "

Looks like mmap.__doc__ prints out 'None' on Python 2.7

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmap
>>> print mmap.__doc__
None
>>>

Should be an easy implementation to close this out.

"----------------- 6. [New comment] Implement mmap module http://ironpython.codeplex.com/workitem/21401 User slide_o_mix has commented on the issue: "

Fixed the \__doc__ issue in c65b87

"----------------- 7. [New comment] STRESS: test_cominterop.py fails under the gcstress test mode http://ironpython.codeplex.com/workitem/21438 User slide_o_mix has commented on the issue: "

Marking this as resolved since we don't have a way to reproduce the gcstress that was internal to MS.

"----------------- 8. [New comment] PYC - Allow the Setting of the Icon if generating EXE http://ironpython.codeplex.com/workitem/22138 User slide_o_mix has commented on the issue: "

I am current rewriting pyc a bit and will include support for setting a .ico file for the stub exe.

"----------------- 9. [New comment] Create wiki for 3rd party apps compat list http://ironpython.codeplex.com/workitem/22223 User slide_o_mix has commented on the issue: "

Created https://github.com/IronLanguages/main/wiki/Compatibility-List to be used for application compatibility list.

"----------------- 10. [New comment] Use Windows SDK for builds instead of Visual C++ http://ironpython.codeplex.com/workitem/30024 User slide_o_mix has commented on the issue: "

Since we no longer need IronStudio or IronPythonTools, can we switch to the SDK for builds in general?

"----------------- 11. [New comment] I can't import PIL module http://ironpython.codeplex.com/workitem/31865 User slide_o_mix has commented on the issue: "

This is related to CP376, IronPython could give better information when a pyd is needed for the 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: From no_reply at codeplex.com Fri Aug 15 09:30:11 2014 From: no_reply at codeplex.com (CodePlex) Date: 15 Aug 2014 00:30:11 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/14/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Document: IronPython does not run PYTHONSTARTUP 2. [New comment] help(System.String) doesn't include XML doc comments when running in 64-bit 3. [New comment] help(System) on 64-bit results in a SystemError while initializing DynamicType 4. [New comment] Incompat: bytearray("some unencoded string") should work 5. [New comment] socket.IPPROTO_GGP and socket.IPPROTO_PUP were removed in CPy 2.6 6. [New comment] Use Windows SDK for builds instead of Visual C++ 7. [New comment] pyc should generate try/catch around module call 8. [New comment] hashlib update really slow ---------------------------------------------- ISSUES 1. [New comment] Document: IronPython does not run PYTHONSTARTUP http://ironpython.codeplex.com/workitem/3361 User slide_o_mix has commented on the issue: "

Added wiki page that will be used to document differences between IronPython and C Python

https://github.com/IronLanguages/main/wiki/Differences-from-C-Python

"----------------- 2. [New comment] help(System.String) doesn't include XML doc comments when running in 64-bit http://ironpython.codeplex.com/workitem/8416 User slide_o_mix has commented on the issue: "

Fixed in 41763c

"----------------- 3. [New comment] help(System) on 64-bit results in a SystemError while initializing DynamicType http://ironpython.codeplex.com/workitem/8417 User slide_o_mix has commented on the issue: "

Fixed in 41763c

"----------------- 4. [New comment] Incompat: bytearray("some unencoded string") should work http://ironpython.codeplex.com/workitem/21334 User slide_o_mix has commented on the issue: "

In IPY 2.7 the exception above does not occur, you just get a TypeError

TypeError: unicode argument without an encoding

"----------------- 5. [New comment] socket.IPPROTO_GGP and socket.IPPROTO_PUP were removed in CPy 2.6 http://ironpython.codeplex.com/workitem/21918 User slide_o_mix has commented on the issue: "

This is only true on Windows and the configuration of the CPython implementation. On other platforms, I believe these will still be there.

"----------------- 6. [New comment] Use Windows SDK for builds instead of Visual C++ http://ironpython.codeplex.com/workitem/30024 User jdhardy has commented on the issue: "

Probably. I think the only piece that might need it is the COM tests ... and I don't even know if those run.

"----------------- 7. [New comment] pyc should generate try/catch around module call http://ironpython.codeplex.com/workitem/32419 User slide_o_mix has commented on the issue: "

Implemented in https://github.com/IronLanguages/main/pull/212

"----------------- 8. [New comment] hashlib update really slow http://ironpython.codeplex.com/workitem/34022 User slide_o_mix has commented on the issue: "

Wow, that is pretty horrible. I'll see what I can do about that.

" ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Sat Aug 16 09:22:07 2014 From: no_reply at codeplex.com (CodePlex) Date: 16 Aug 2014 00:22:07 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/15/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] nt.system(some garbage command) should return a non-zero exit code; not throw a WindowsError ---------------------------------------------- ISSUES 1. [New comment] nt.system(some garbage command) should return a non-zero exit code; not throw a WindowsError http://ironpython.codeplex.com/workitem/23205 User slide_o_mix has commented on the issue: "

Fixed in 0ee28a2

" ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Sun Aug 17 09:21:01 2014 From: no_reply at codeplex.com (CodePlex) Date: 17 Aug 2014 00:21:01 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/16/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] str subclasses not always treated as strings 2. [New comment] str(System.Char(...)) broken 3. [New comment] Compiling with pyc.py for Silverlight 4. [New comment] Error message for indexing into unsubscriptable objects changed with 2.7 ---------------------------------------------- ISSUES 1. [New comment] str subclasses not always treated as strings http://ironpython.codeplex.com/workitem/20275 User slide_o_mix has commented on the issue: "

Even if there might be other cases that are broken, I'll close this out for now. If others crop up, we can look at them as they show up.

"----------------- 2. [New comment] str(System.Char(...)) broken http://ironpython.codeplex.com/workitem/23147 User slide_o_mix has commented on the issue: "

Works on the latest.

Type "help", "copyright", "credits" or "license" for more information.
>>> import System
>>> unicode(System.Char.MaxValue)
u'\uffff'
>>>

"----------------- 3. [New comment] Compiling with pyc.py for Silverlight http://ironpython.codeplex.com/workitem/25680 User slide_o_mix has commented on the issue: "

How does one target another runtime with IKVM.Reflection?

"----------------- 4. [New comment] Error message for indexing into unsubscriptable objects changed with 2.7 http://ironpython.codeplex.com/workitem/28220 User slide_o_mix has commented on the issue: "

Fixed in d4693d4

" ---------------------------------------------- ---------------------------------------------- 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: From fernandez_dan2 at hotmail.com Mon Aug 18 02:20:43 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Sun, 17 Aug 2014 18:20:43 -0600 Subject: [Ironpython-users] bytearray encoding issue Message-ID: Hi All, I ran into an issue bytearray with encoding. The scenario I am using it is with read/writing data over the serial com port. I notice in CPython 2.7.8 the following works >>> bytearray('Michael Gilfix was here\n')bytearray(b'Michael Gilfix was here\n') In IronPython 2.7.5 beta I get the following>>> b = bytearray('Michael Gilfix was here\n')Traceback (most recent call last): File "", line 1, in TypeError: unicode argument without an encoding I can get it to work if I do the followingb = bytearray(b'Michael Gilfix was here\n') does the bytearray in CPython do an implicit encoding if not specific to binary? I am trying to use hex with bytearray but I see issues with that as well with encoding. Here is an example CPython 2.7.8>>> hex_string = "deadbeef">>> hex_data = hex_string.decode("hex")>>> hex_data'\xde\xad\xbe\xef'>>> bytearray(hex_data)bytearray(b'\xde\xad\xbe\xef') IronPython 2.7.5 Beta >>> hex_string = "deadbeef">>> hex_data = hex_string.decode("hex")>>> hex_datau'\xde\xad\xbe\xef'>>> bytearray(hex_data)Traceback (most recent call last): File "", line 1, in TypeError: unicode argument without an encoding >>> bytearray(hex_data, 'hex')bytearray(b'deadbeef') Thanks Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Mon Aug 18 05:08:27 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Sun, 17 Aug 2014 21:08:27 -0600 Subject: [Ironpython-users] bytearray encoding issue In-Reply-To: References: , Message-ID: Hi Alex, Oh wow I didn't know that, interesting question. If CPython is wrong for bytearray, should IronPython follow the same, unless you think CPython will fix it? Thanks. Danny Date: Sun, 17 Aug 2014 19:13:59 -0700 Subject: Re: [Ironpython-users] bytearray encoding issue From: slide.o.mix at gmail.com To: fernandez_dan2 at hotmail.com You are probably running into this http://ironpython.codeplex.com/workitem/21334. As is mentioned in the issue, I believe this shouldn't really work in cpython, but does because str implements the buffer interface. On Aug 17, 2014 5:21 PM, "Daniel Fernandez" wrote: Hi All, I ran into an issue bytearray with encoding. The scenario I am using it is with read/writing data over the serial com port. I notice in CPython 2.7.8 the following works >>> bytearray('Michael Gilfix was here\n')bytearray(b'Michael Gilfix was here\n') In IronPython 2.7.5 beta I get the following >>> b = bytearray('Michael Gilfix was here\n')Traceback (most recent call last): File "", line 1, in TypeError: unicode argument without an encoding I can get it to work if I do the followingb = bytearray(b'Michael Gilfix was here\n') does the bytearray in CPython do an implicit encoding if not specific to binary? I am trying to use hex with bytearray but I see issues with that as well with encoding. Here is an example CPython 2.7.8>>> hex_string = "deadbeef" >>> hex_data = hex_string.decode("hex")>>> hex_data'\xde\xad\xbe\xef'>>> bytearray(hex_data)bytearray(b'\xde\xad\xbe\xef') IronPython 2.7.5 Beta >>> hex_string = "deadbeef">>> hex_data = hex_string.decode("hex")>>> hex_datau'\xde\xad\xbe\xef' >>> bytearray(hex_data)Traceback (most recent call last): File "", line 1, in TypeError: unicode argument without an encoding >>> bytearray(hex_data, 'hex')bytearray(b'deadbeef') Thanks Danny _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Mon Aug 18 09:24:21 2014 From: no_reply at codeplex.com (CodePlex) Date: 18 Aug 2014 00:24:21 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/17/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Remove obsolete APIs after IronPython 2.6 ships 2. [New comment] socket.getnameinfo(("127.0.0.1", ...), ....) broken on machines with multiple network connections 3. [New comment] Need to investigate various doctest failures 4. [New comment] Compiling with pyc.py for Silverlight 5. [New comment] hashlib update really slow ---------------------------------------------- ISSUES 1. [New comment] Remove obsolete APIs after IronPython 2.6 ships http://ironpython.codeplex.com/workitem/20775 User slide_o_mix has commented on the issue: "

This is one of those issues we have no insight into the MS task. Closing out since we can't really make progress on it.

"----------------- 2. [New comment] socket.getnameinfo(("127.0.0.1", ...), ....) broken on machines with multiple network connections http://ironpython.codeplex.com/workitem/22982 User fdanny has commented on the issue: "

I just tried this code snippet with IronPython 2.7.4 on my PC which has two NIC cards. I didn't see the exception. The output looks the same as CPython 2.7.8.

The two NIC cards is one for the internet and one private I am not sure if that makes a difference.

"----------------- 3. [New comment] Need to investigate various doctest failures http://ironpython.codeplex.com/workitem/24549 User slide_o_mix has commented on the issue: "

No information provided to reproduce for over two years.

"----------------- 4. [New comment] Compiling with pyc.py for Silverlight http://ironpython.codeplex.com/workitem/25680 User MarkusSchaber has commented on the issue: "

It may be simply the dependencies you add implcitly via the framework assemblies you reference...

Maybe you could check the new mono compiler which allows "cross-target" compiling?

AFAICS, the author of IKVM.Reflection is communicative, so maybe he can answer this question.

"----------------- 5. [New comment] hashlib update really slow http://ironpython.codeplex.com/workitem/34022 User MarkusSchaber has commented on the issue: "

As far as I remember, we had some duscussion if this a few months ago on the mailing list, including some patches. But I don't remember whether any of them was applied.

" ---------------------------------------------- ---------------------------------------------- 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: From pawel.jasinski at gmail.com Mon Aug 18 09:45:37 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Mon, 18 Aug 2014 09:45:37 +0200 Subject: [Ironpython-users] bytearray encoding issue In-Reply-To: References: Message-ID: I personally vote for as close to cpython as possible. This is based on porting experience with python packages. It is really a lot of effort effort to find the places where it trips in other packages, get the 'if' around it and get it accepted upstream. This appears to fix it: https://github.com/paweljasinski/IronLanguages/commit/f0c8b64c14e1ea088715cd1aeed1b058c61f00d3 --pawel On Mon, Aug 18, 2014 at 5:08 AM, Daniel Fernandez < fernandez_dan2 at hotmail.com> wrote: > Hi Alex, > > Oh wow I didn't know that, interesting question. If CPython is wrong for > bytearray, should IronPython follow the same, unless you think CPython will > fix it? > > Thanks. > > Danny > > ------------------------------ > Date: Sun, 17 Aug 2014 19:13:59 -0700 > Subject: Re: [Ironpython-users] bytearray encoding issue > From: slide.o.mix at gmail.com > To: fernandez_dan2 at hotmail.com > > You are probably running into this > http://ironpython.codeplex.com/workitem/21334. As is mentioned in the > issue, I believe this shouldn't really work in cpython, but does because > str implements the buffer interface. > On Aug 17, 2014 5:21 PM, "Daniel Fernandez" > wrote: > > Hi All, > > I ran into an issue bytearray with encoding. The scenario I am using it is > with read/writing data over the serial com port. I notice in CPython 2.7.8 > the following works > > >>> bytearray('Michael Gilfix was here\n') > bytearray(b'Michael Gilfix was here\n') > > > In IronPython 2.7.5 beta I get the following > >>> b = bytearray('Michael Gilfix was here\n') > Traceback (most recent call last): > File "", line 1, in > TypeError: unicode argument without an encoding > > I can get it to work if I do the following > b = bytearray(b'Michael Gilfix was here\n') > > does the bytearray in CPython do an implicit encoding if not specific to > binary? > > > I am trying to use hex with bytearray but I see issues with that as well > with encoding. Here is an example > > CPython 2.7.8 > >>> hex_string = "deadbeef" > >>> hex_data = hex_string.decode("hex") > >>> hex_data > '\xde\xad\xbe\xef' > >>> bytearray(hex_data) > bytearray(b'\xde\xad\xbe\xef') > > IronPython 2.7.5 Beta > >>> hex_string = "deadbeef" > >>> hex_data = hex_string.decode("hex") > >>> hex_data > u'\xde\xad\xbe\xef' > >>> bytearray(hex_data) > Traceback (most recent call last): > File "", line 1, in > TypeError: unicode argument without an encoding > > >>> bytearray(hex_data, 'hex') > bytearray(b'deadbeef') > > > Thanks > > Danny > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Aug 18 17:22:22 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 18 Aug 2014 08:22:22 -0700 Subject: [Ironpython-users] bytearray encoding issue In-Reply-To: References: Message-ID: I agree, I think we need to determine the best way to implement this so we match CPython more. I think if we just patch the stdlib though, we may run into other cases in the future that we would need to fix, but if we determine how to make it work inside IronPython, it would be better. On Mon, Aug 18, 2014 at 12:45 AM, Pawel Jasinski wrote: > I personally vote for as close to cpython as possible. This is based on > porting experience with python packages. It is really a lot of effort > effort to find the places where it trips in other packages, get the 'if' > around it and get it accepted upstream. > This appears to fix it: > https://github.com/paweljasinski/IronLanguages/commit/f0c8b64c14e1ea088715cd1aeed1b058c61f00d3 > --pawel > > > > On Mon, Aug 18, 2014 at 5:08 AM, Daniel Fernandez < > fernandez_dan2 at hotmail.com> wrote: > >> Hi Alex, >> >> Oh wow I didn't know that, interesting question. If CPython is wrong for >> bytearray, should IronPython follow the same, unless you think CPython will >> fix it? >> >> Thanks. >> >> Danny >> >> ------------------------------ >> Date: Sun, 17 Aug 2014 19:13:59 -0700 >> Subject: Re: [Ironpython-users] bytearray encoding issue >> From: slide.o.mix at gmail.com >> To: fernandez_dan2 at hotmail.com >> >> You are probably running into this >> http://ironpython.codeplex.com/workitem/21334. As is mentioned in the >> issue, I believe this shouldn't really work in cpython, but does because >> str implements the buffer interface. >> On Aug 17, 2014 5:21 PM, "Daniel Fernandez" >> wrote: >> >> Hi All, >> >> I ran into an issue bytearray with encoding. The scenario I am using it >> is with read/writing data over the serial com port. I notice in CPython >> 2.7.8 the following works >> >> >>> bytearray('Michael Gilfix was here\n') >> bytearray(b'Michael Gilfix was here\n') >> >> >> In IronPython 2.7.5 beta I get the following >> >>> b = bytearray('Michael Gilfix was here\n') >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unicode argument without an encoding >> >> I can get it to work if I do the following >> b = bytearray(b'Michael Gilfix was here\n') >> >> does the bytearray in CPython do an implicit encoding if not specific to >> binary? >> >> >> I am trying to use hex with bytearray but I see issues with that as well >> with encoding. Here is an example >> >> CPython 2.7.8 >> >>> hex_string = "deadbeef" >> >>> hex_data = hex_string.decode("hex") >> >>> hex_data >> '\xde\xad\xbe\xef' >> >>> bytearray(hex_data) >> bytearray(b'\xde\xad\xbe\xef') >> >> IronPython 2.7.5 Beta >> >>> hex_string = "deadbeef" >> >>> hex_data = hex_string.decode("hex") >> >>> hex_data >> u'\xde\xad\xbe\xef' >> >>> bytearray(hex_data) >> Traceback (most recent call last): >> File "", line 1, in >> TypeError: unicode argument without an encoding >> >> >>> bytearray(hex_data, 'hex') >> bytearray(b'deadbeef') >> >> >> Thanks >> >> Danny >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> >> > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Mon Aug 18 20:50:33 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Mon, 18 Aug 2014 12:50:33 -0600 Subject: [Ironpython-users] bytearray comparison failure Message-ID: Hi All, I ran into an issue comparing bytearray with a string value. I created an issue 35470 on codeplex. The code snippet that can reproduce the issue isx = bytearray(b'Danny')y = 'Danny'x == y IronPython 2.7.5b3 this is False and CPython 2.7.8 is True. My question is where in the IronPython code does this happen equality operation occur with different types? I tried to follow it and simple got lost in the maze. I thought it would occur in the StringOps.Equals but that didn't happen. I tried putting break points all over the place but no luck. Thanks Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Aug 18 21:49:04 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 18 Aug 2014 12:49:04 -0700 Subject: [Ironpython-users] bytearray comparison failure In-Reply-To: References: Message-ID: ByteArray.cs the Equals method. On Mon, Aug 18, 2014 at 11:50 AM, Daniel Fernandez < fernandez_dan2 at hotmail.com> wrote: > Hi All, > > I ran into an issue comparing bytearray with a string value. I created an > issue 35470 on codeplex. The code snippet that can reproduce the issue is > x = bytearray(b'Danny') > y = 'Danny' > x == y > > IronPython 2.7.5b3 this is False and CPython 2.7.8 is True. > > My question is where in the IronPython code does this happen equality > operation occur with different types? I tried to follow it and simple got > lost in the maze. I thought it would occur in the StringOps.Equals but > that didn't happen. I tried putting break points all over the place but no > luck. > > Thanks > > Danny > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdimatteo at gmail.com Mon Aug 18 21:53:58 2014 From: jdimatteo at gmail.com (John DiMatteo) Date: Mon, 18 Aug 2014 13:53:58 -0600 Subject: [Ironpython-users] Enable Unmanaged Debugging IronPython In-Reply-To: References: Message-ID: Is there any debugger that allows stepping from IronPython to C# to C++? I tried just adding "import pdb; pdb.set_trace()" and running with "ipy64 -X:Tracing -X:FullFrames", but attempting to step into a C# function just stepped right over it. It seems that the PTVS debugger can't handle this either. After reading the documentation at https://pytools.codeplex.com/wikipage?title=Mixed-mode%20debugging , it seems that debugging Python and C++ is not supported with IronPython: "Mixed-mode debugging...is only supported for CPython 2.7 and 3.3+". --- John's business hour MST availability (and John's availability in EST ) On Fri, Jul 25, 2014 at 10:44 AM, John DiMatteo wrote: > FYI, I posted this issue on https://pytools.codeplex.com/workitem/2538 . > > --- > John's business hour MST availability > > (and John's availability in EST > > ) > > > On Wed, Jul 9, 2014 at 6:14 AM, Jeff Hardy wrote: > >> Adding DinoV because this sounds more like a PTVS issue than an >> IronPython issue - from the IronPython side there's nothing that should >> prevent it from working AFAIK. IronPython in VS uses the normal managed >> debugger. >> >> - Jeff >> >> >> On Wed, Jul 9, 2014 at 12:04 AM, John DiMatteo >> wrote: >> >>> Hello, >>> >>> While debugging, with an IronPython startup project, I'm trying to step >>> from IronPython to C# code to unmanaged C/C++ code. Is this possible? >>> >>> I am currently able to step from IronPython to C# when the startup >>> project is IronPython. I'm also currently able to step from C# to >>> unmanaged C/C++ code when the startup project is C#. However, I am not >>> able to step from IronPython to C# to C++ when the startup project is >>> IronPython. >>> >>> Even though there was no relevant gui option I could find, I tried >>> edited the .pyproj file, changing the EnableUnmanagedDebugging field from >>> "false" to "true", but this did not have any noticeable impact. >>> >>> I'm using Visual Studio 2010 and Microsoft Visual Studio 2010 (Version >>> 10.0.40219.1 SP1Rel), Microsoft .NET Framework Version 4.5.50709 SP1Rel, >>> and Python Tools for Visual Studio 2.1.20620.00. >>> >>> I would greatly appreciate any help in this, even if just to confirm it >>> is not possible so that I stop trying. >>> >>> Regards, >>> John >>> >>> _______________________________________________ >>> Ironpython-users mailing list >>> Ironpython-users at python.org >>> https://mail.python.org/mailman/listinfo/ironpython-users >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Mon Aug 18 22:50:20 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Mon, 18 Aug 2014 14:50:20 -0600 Subject: [Ironpython-users] bytearray comparison failure In-Reply-To: References: , Message-ID: HI All, Thanks Alex that was a duh moment for me there. I see the issue the code use the as the operator trying to convert to IList. I simple check if the type is string then convert it to bytes. It works now Here is the snippet public override bool Equals(object other) { IList bytes ; if (other is string) bytes = PythonOps.MakeBytes(((string)other).MakeByteArray()); else if (other is Extensible) bytes = PythonOps.MakeBytes(((Extensible)other).Value.MakeByteArray()); else bytes = other as IList; it works now below. Dany Date: Mon, 18 Aug 2014 12:49:04 -0700 Subject: Re: [Ironpython-users] bytearray comparison failure From: slide.o.mix at gmail.com To: fernandez_dan2 at hotmail.com CC: ironpython-users at python.org ByteArray.cs the Equals method. On Mon, Aug 18, 2014 at 11:50 AM, Daniel Fernandez wrote: Hi All, I ran into an issue comparing bytearray with a string value. I created an issue 35470 on codeplex. The code snippet that can reproduce the issue is x = bytearray(b'Danny')y = 'Danny' x == y IronPython 2.7.5b3 this is False and CPython 2.7.8 is True. My question is where in the IronPython code does this happen equality operation occur with different types? I tried to follow it and simple got lost in the maze. I thought it would occur in the StringOps.Equals but that didn't happen. I tried putting break points all over the place but no luck. Thanks Danny _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Aug 18 22:51:17 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 18 Aug 2014 13:51:17 -0700 Subject: [Ironpython-users] bytearray comparison failure In-Reply-To: References: Message-ID: Can you fork on github and provide a merge request? On Mon, Aug 18, 2014 at 1:50 PM, Daniel Fernandez < fernandez_dan2 at hotmail.com> wrote: > HI All, > > Thanks Alex that was a duh moment for me there. > > I see the issue the code use the as the operator trying to convert to > IList. I simple check if the type is string then convert it to bytes. > It works now > > Here is the snippet > > public override bool Equals(object other) { > IList bytes ; > if (other is string) > bytes = > PythonOps.MakeBytes(((string)other).MakeByteArray()); > else if (other is Extensible) > bytes = > PythonOps.MakeBytes(((Extensible)other).Value.MakeByteArray()); > else > bytes = other as IList; > > > it works now below. > > > Dany > > ------------------------------ > Date: Mon, 18 Aug 2014 12:49:04 -0700 > Subject: Re: [Ironpython-users] bytearray comparison failure > From: slide.o.mix at gmail.com > To: fernandez_dan2 at hotmail.com > CC: ironpython-users at python.org > > > ByteArray.cs the Equals method. > > > On Mon, Aug 18, 2014 at 11:50 AM, Daniel Fernandez < > fernandez_dan2 at hotmail.com> wrote: > > Hi All, > > I ran into an issue comparing bytearray with a string value. I created an > issue 35470 on codeplex. The code snippet that can reproduce the issue is > x = bytearray(b'Danny') > y = 'Danny' > x == y > > IronPython 2.7.5b3 this is False and CPython 2.7.8 is True. > > My question is where in the IronPython code does this happen equality > operation occur with different types? I tried to follow it and simple got > lost in the maze. I thought it would occur in the StringOps.Equals but > that didn't happen. I tried putting break points all over the place but no > luck. > > Thanks > > Danny > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > > > > -- > Website: http://earl-of-code.com > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Mon Aug 18 23:42:26 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Mon, 18 Aug 2014 15:42:26 -0600 Subject: [Ironpython-users] bytearray comparison failure In-Reply-To: References: , , , Message-ID: Hi Alex, Yup I can do that. I also have a fix for translate issue 27904 I ran the test_bytes.py just to make sure I notice it was failing. In the test_zzz_cli_features had this AreEqual(bytearray(b'abc') == 'abc', False) had to change to AreEqual(bytearray(b'abc') == 'abc', True) test_translate had this if is_ironpython: #http://ironpython.codeplex.com/workitem/27904 AssertError(TypeError, bytearray(b'AAA').translate, None, b'A') AssertError(TypeError, bytearray(b'AAA').translate, None) else: replace with just AreEqual(bytearray(b'AAA').translate(None, b'A'), b'')AreEqual(bytearray(b'AAA').translate(None), b'AAA') I just commented this out since it doesn't assert. Should I include the updated test_bytes.py? After that it passes test_bytes unit test. Danny Date: Mon, 18 Aug 2014 13:51:17 -0700 Subject: Re: [Ironpython-users] bytearray comparison failure From: slide.o.mix at gmail.com To: fernandez_dan2 at hotmail.com CC: ironpython-users at python.org Can you fork on github and provide a merge request? On Mon, Aug 18, 2014 at 1:50 PM, Daniel Fernandez wrote: HI All, Thanks Alex that was a duh moment for me there. I see the issue the code use the as the operator trying to convert to IList. I simple check if the type is string then convert it to bytes. It works now Here is the snippet public override bool Equals(object other) { IList bytes ; if (other is string) bytes = PythonOps.MakeBytes(((string)other).MakeByteArray()); else if (other is Extensible) bytes = PythonOps.MakeBytes(((Extensible)other).Value.MakeByteArray()); else bytes = other as IList; it works now below. Dany Date: Mon, 18 Aug 2014 12:49:04 -0700 Subject: Re: [Ironpython-users] bytearray comparison failure From: slide.o.mix at gmail.com To: fernandez_dan2 at hotmail.com CC: ironpython-users at python.org ByteArray.cs the Equals method. On Mon, Aug 18, 2014 at 11:50 AM, Daniel Fernandez wrote: Hi All, I ran into an issue comparing bytearray with a string value. I created an issue 35470 on codeplex. The code snippet that can reproduce the issue is x = bytearray(b'Danny')y = 'Danny' x == y IronPython 2.7.5b3 this is False and CPython 2.7.8 is True. My question is where in the IronPython code does this happen equality operation occur with different types? I tried to follow it and simple got lost in the maze. I thought it would occur in the StringOps.Equals but that didn't happen. I tried putting break points all over the place but no luck. Thanks Danny _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -- Website: http://earl-of-code.com -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdimatteo at gmail.com Tue Aug 19 02:03:33 2014 From: jdimatteo at gmail.com (John DiMatteo) Date: Mon, 18 Aug 2014 18:03:33 -0600 Subject: [Ironpython-users] Enable Unmanaged Debugging IronPython In-Reply-To: References: Message-ID: Hello, If I understand correctly, Zooba (on the Python Tools for Visual Studio team at Microsoft) suggested that IronPython isn't emitting proper debugging information so that the CLR debugger can find the correct lines of source code. Please see this thread: https://pytools.codeplex.com/workitem/2538 and the example stack: https://www.codeplex.com/Download/AttachmentDownload.ashx?ProjectName=pytools&WorkItemId=2538&FileAttachmentId=894946 In VS 2010 Pro, I tried Debug > Attach to Process with both "Managed (v4.0) code, Native code" selected, and attached to my ipy64.exe process. If I understand correctly, this should allow me to see IronPython, C#, and C++ functions in the call stack, but it doesn't work. If someone could confirm that this is supposed to work, I'd appreciate it. Also, please advise if this issue is resolved in later versions of VS (e.g. 2013). Thanks, John --- John's business hour MST availability (and John's availability in EST ) On Mon, Aug 18, 2014 at 1:53 PM, John DiMatteo wrote: > Is there any debugger that allows stepping from IronPython to C# to C++? > I tried just adding "import pdb; pdb.set_trace()" and running with "ipy64 > -X:Tracing -X:FullFrames", but attempting to step into a C# function just > stepped right over it. > > It seems that the PTVS debugger can't handle this either. After reading > the documentation at > https://pytools.codeplex.com/wikipage?title=Mixed-mode%20debugging , it > seems that debugging Python and C++ is not supported with IronPython: > "Mixed-mode debugging...is only supported for CPython 2.7 and 3.3+". > > --- > John's business hour MST availability > > (and John's availability in EST > > ) > > > On Fri, Jul 25, 2014 at 10:44 AM, John DiMatteo > wrote: > >> FYI, I posted this issue on https://pytools.codeplex.com/workitem/2538 . >> >> --- >> John's business hour MST availability >> >> (and John's availability in EST >> >> ) >> >> >> On Wed, Jul 9, 2014 at 6:14 AM, Jeff Hardy wrote: >> >>> Adding DinoV because this sounds more like a PTVS issue than an >>> IronPython issue - from the IronPython side there's nothing that should >>> prevent it from working AFAIK. IronPython in VS uses the normal managed >>> debugger. >>> >>> - Jeff >>> >>> >>> On Wed, Jul 9, 2014 at 12:04 AM, John DiMatteo >>> wrote: >>> >>>> Hello, >>>> >>>> While debugging, with an IronPython startup project, I'm trying to step >>>> from IronPython to C# code to unmanaged C/C++ code. Is this possible? >>>> >>>> I am currently able to step from IronPython to C# when the startup >>>> project is IronPython. I'm also currently able to step from C# to >>>> unmanaged C/C++ code when the startup project is C#. However, I am not >>>> able to step from IronPython to C# to C++ when the startup project is >>>> IronPython. >>>> >>>> Even though there was no relevant gui option I could find, I tried >>>> edited the .pyproj file, changing the EnableUnmanagedDebugging field from >>>> "false" to "true", but this did not have any noticeable impact. >>>> >>>> I'm using Visual Studio 2010 and Microsoft Visual Studio 2010 (Version >>>> 10.0.40219.1 SP1Rel), Microsoft .NET Framework Version 4.5.50709 SP1Rel, >>>> and Python Tools for Visual Studio 2.1.20620.00. >>>> >>>> I would greatly appreciate any help in this, even if just to confirm it >>>> is not possible so that I stop trying. >>>> >>>> Regards, >>>> John >>>> >>>> _______________________________________________ >>>> Ironpython-users mailing list >>>> Ironpython-users at python.org >>>> https://mail.python.org/mailman/listinfo/ironpython-users >>>> >>>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Aug 19 09:22:06 2014 From: no_reply at codeplex.com (CodePlex) Date: 19 Aug 2014 00:22:06 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/18/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] hashlib update really slow 2. [New issue] -X:Tracing argument problem? 3. [New issue] bytearray fails comparison with string value ---------------------------------------------- ISSUES 1. [New comment] hashlib update really slow http://ironpython.codeplex.com/workitem/34022 User paweljasinski has commented on the issue: "

link to mailing list: https://mail.python.org/pipermail/ironpython-users/2014-February/016825.html

"----------------- 2. [New issue] -X:Tracing argument problem? http://ironpython.codeplex.com/workitem/35469 User amgraham has proposed the issue: "IronPython 2.7.5b2 a = compile('2+2', '', 'eval) compiles normally However if the -X:Tracing argument is specified to ipy.exe then the above raises an error. SystemError: Unable to transform LambdaExpression because DebugInfoExpression #0 did not have a valid SymbolDocumentInfo. This seems to be due to the empty string used as the filename argument."----------------- 3. [New issue] bytearray fails comparison with string value http://ironpython.codeplex.com/workitem/35470 User fdanny has proposed the issue: "The bytearray compared to the string with the same value fails in IronPython 2.7.5b3 and passes in CPython 2.7.8 code snippet IronPython 2.7.5.b3 x = bytearray(b'Danny') y = 'Danny' x == y False CPython 2.7.8 x = bytearray(b'Danny') y = 'Danny' x == y True " ---------------------------------------------- ---------------------------------------------- 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: From m.schaber at codesys.com Tue Aug 19 09:34:22 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Tue, 19 Aug 2014 07:34:22 +0000 Subject: [Ironpython-users] IronPython, Daily Digest 8/18/2014 In-Reply-To: References: Message-ID: <727D8E16AE957149B447FE368139F2B539C5D2D2@SERVER10> Hi, Does anyone else experience broken links in those "Daily Digest" mails coming from the codeplex tracker? Especially those cases where parts of html markup tags are mangled into the link? Best regards Markus Schaber CODESYS? a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions ________________________________ 3S-Smart Software Solutions GmbH Dipl.-Inf. Markus Schaber | Product Development Core Technology Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 | Fax +49-831-54031-50 E-Mail: m.schaber at codesys.com | Web: codesys.com | CODESYS store: store.codesys.com CODESYS forum: forum.codesys.com Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 ________________________________ This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Von: Ironpython-users [mailto:ironpython-users-bounces+m.schaber=codesys.com at python.org] Im Auftrag von CodePlex Gesendet: Dienstag, 19. August 2014 09:22 An: ironpython-users at python.org Betreff: [Ironpython-users] IronPython, Daily Digest 8/18/2014 Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest: ISSUES 1. [New comment] hashlib update really slow ? 2. [New issue] -X:Tracing argument problem? ? 3. [New issue] bytearray fails comparison with string value ? ISSUES 1. [New comment] hashlib update really slow view online User paweljasinski has commented on the issue: "

link to mailing list: https://mail.python.org/pipermail/ironpython-users/2014-February/016825.html
>" 2. [New issue] -X:Tracing argument problem? view online User amgraham has proposed the issue: "IronPython 2.7.5b2 a = compile('2+2', '', 'eval) compiles normally However if the -X:Tracing argument is specified to ipy.exe then the above raises an error. SystemError: Unable to transform LambdaExpression because DebugInfoExpression #0 did not have a valid SymbolDocumentInfo. This seems to be due to the empty string used as the filename argument." 3. [New issue] bytearray fails comparison with string value view online User fdanny has proposed the issue: "The bytearray compared to the string with the same value fails in IronPython 2.7.5b3 and passes in CPython 2.7.8 code snippet IronPython 2.7.5.b3 x = bytearray(b'Danny') y = 'Danny' x == y False CPython 2.7.8 x = bytearray(b'Danny') y = 'Danny' x == y True " 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: From jdhardy at gmail.com Tue Aug 19 14:48:05 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 19 Aug 2014 13:48:05 +0100 Subject: [Ironpython-users] IronPython, Daily Digest 8/18/2014 In-Reply-To: <727D8E16AE957149B447FE368139F2B539C5D2D2@SERVER10> References: <727D8E16AE957149B447FE368139F2B539C5D2D2@SERVER10> Message-ID: They always come in fine for me, other than including the HTML tags in the comment contents. Given the CodePlex is basically abandoned I doubt anything will be fixed anytime soon. After 2.7.5 (looking like mid-September now) is out I'll be migrating issues to GitHub instead, where I can use the API to produce more useful weekly digests instead. - Jeff On Tue, Aug 19, 2014 at 8:34 AM, Markus Schaber wrote: > Hi, > > > > Does anyone else experience broken links in those "Daily Digest" mails > coming from the codeplex tracker? > > > > Especially those cases where parts of html markup tags are mangled into the > link? > > > > Best regards > > Markus Schaber > > CODESYS? a trademark of 3S-Smart Software Solutions GmbH > > Inspiring Automation Solutions > > ________________________________ > > 3S-Smart Software Solutions GmbH > Dipl.-Inf. Markus Schaber | Product Development Core Technology > Memminger Str. 151 | 87439 Kempten | Germany > Tel. +49-831-54031-979 | Fax +49-831-54031-50 > > E-Mail: m.schaber at codesys.com | Web: codesys.com | CODESYS store: > store.codesys.com > CODESYS forum: forum.codesys.com > > Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade > register: Kempten HRB 6186 | Tax ID No.: DE 167014915 > > ________________________________ > > This e-mail may contain confidential and/or privileged information. If you > are not the intended recipient (or have received > this e-mail in error) please notify the sender immediately and destroy this > e-mail. Any unauthorised copying, disclosure > or distribution of the material in this e-mail is strictly forbidden. > > Von: Ironpython-users > [mailto:ironpython-users-bounces+m.schaber=codesys.com at python.org] Im > Auftrag von CodePlex > Gesendet: Dienstag, 19. August 2014 09:22 > An: ironpython-users at python.org > Betreff: [Ironpython-users] IronPython, Daily Digest 8/18/2014 > > > > Hi ironpython, > > Here's your Daily Digest of new issues for project "IronPython". > > In today's digest: > > ISSUES > > 1. [New comment] hashlib update really slow ? > > 2. [New issue] -X:Tracing argument problem? ? > > 3. [New issue] bytearray fails comparison with string value ? > > ISSUES > > 1. [New comment] hashlib update really slow view online > > User paweljasinski has commented on the issue: > > "

link to mailing list: > https://mail.python.org/pipermail/ironpython-users/2014-February/016825.html

" > > 2. [New issue] -X:Tracing argument problem? view online > > User amgraham has proposed the issue: > > "IronPython 2.7.5b2 > > a = compile('2+2', '', 'eval) compiles normally > > However if the -X:Tracing argument is specified to ipy.exe then the above > raises an error. > > SystemError: Unable to transform LambdaExpression because > DebugInfoExpression #0 did not have a valid SymbolDocumentInfo. > > This seems to be due to the empty string used as the filename argument." > > 3. [New issue] bytearray fails comparison with string value view online > > User fdanny has proposed the issue: > > "The bytearray compared to the string with the same value fails in > IronPython 2.7.5b3 and passes in CPython 2.7.8 > > code snippet > > IronPython 2.7.5.b3 > > x = bytearray(b'Danny') > y = 'Danny' > x == y > False > > CPython 2.7.8 > > x = bytearray(b'Danny') > y = 'Danny' > x == y > True > > " > > 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. > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > From no_reply at codeplex.com Wed Aug 20 09:23:44 2014 From: no_reply at codeplex.com (CodePlex) Date: 20 Aug 2014 00:23:44 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/19/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] unicode throws when creating a Unicode string from an invalid Unicode string 2. [New comment] Silverlight: modules should only be imported if import syntax matches case of filesystem 3. [New comment] str() or unicode() setting up unicode string, exception occurs. 4. [New comment] Reporlab and IronPython 5. [New comment] ipy.exe crashes when launched from a subst UNC path 6. [New comment] Visual Studio 2010 crashes when Iron Python 2.7A1 is installed and you try to attach process (normal C# desktop program) 7. [New comment] 'x'.replace(u'\uFFFE','') -> ValueError 8. [New comment] Examples presented on http://ironpython.net/ironpython/browser/docs.html do not work 9. [New comment] ipy64.exe compiling assembly 10. [New comment] Quoted IRONPYTHONPATH causes error with "import" 11. [New comment] How to improve the operation efficiency of List or Dictionary than C#? ---------------------------------------------- ISSUES 1. [New comment] unicode throws when creating a Unicode string from an invalid Unicode string http://ironpython.codeplex.com/workitem/356 User slide_o_mix has commented on the issue: "

This works on latest

"----------------- 2. [New comment] Silverlight: modules should only be imported if import syntax matches case of filesystem http://ironpython.codeplex.com/workitem/7050 User slide_o_mix has commented on the issue: "

Will not fix

"----------------- 3. [New comment] str() or unicode() setting up unicode string, exception occurs. http://ironpython.codeplex.com/workitem/15372 User slide_o_mix has commented on the issue: "

This works on latest.

"----------------- 4. [New comment] Reporlab and IronPython http://ironpython.codeplex.com/workitem/28885 User slide_o_mix has commented on the issue: "

This is an IronClad issue, not an IronPython issue.

"----------------- 5. [New comment] ipy.exe crashes when launched from a subst UNC path http://ironpython.codeplex.com/workitem/28905 User slide_o_mix has commented on the issue: "

See MS recommendation: http://support.microsoft.com/kb/941187

"----------------- 6. [New comment] Visual Studio 2010 crashes when Iron Python 2.7A1 is installed and you try to attach process (normal C# desktop program) http://ironpython.codeplex.com/workitem/29021 User slide_o_mix has commented on the issue: "

Cannot reproduce

"----------------- 7. [New comment] 'x'.replace(u'\uFFFE','') -> ValueError http://ironpython.codeplex.com/workitem/29402 User slide_o_mix has commented on the issue: "

This works in latest:

Type "help", "copyright", "credits" or "license" for more information.
>>> 'x'.replace(u'\uFFFe','')
'x'
>>> 'x'.replace(u'\uFFFFE','')
'x'
>>>

"----------------- 8. [New comment] Examples presented on http://ironpython.net/ironpython/browser/docs.html do not work http://ironpython.codeplex.com/workitem/30346 User slide_o_mix has commented on the issue: "

This is a question, not a bug,

"----------------- 9. [New comment] ipy64.exe compiling assembly http://ironpython.codeplex.com/workitem/32946 User slide_o_mix has commented on the issue: "

I think this has to do with the slowness of the 64-bit JIT. We should revisit when RyuJIT is released.

"----------------- 10. [New comment] Quoted IRONPYTHONPATH causes error with "import" http://ironpython.codeplex.com/workitem/34687 User slide_o_mix has commented on the issue: "

This work in latest.

"----------------- 11. [New comment] How to improve the operation efficiency of List or Dictionary than C#? http://ironpython.codeplex.com/workitem/35071 User slide_o_mix has commented on the issue: "

Not enough information.

" ---------------------------------------------- ---------------------------------------------- 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: From fernandez_dan2 at hotmail.com Thu Aug 21 18:37:49 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Thu, 21 Aug 2014 10:37:49 -0600 Subject: [Ironpython-users] requests hang on get or post http request Message-ID: Hi All, I'm using the latest 2.7.5 b3 code and I wanted to see if requests works. I pulled the latest from github. It would hang on simple requests.get or requests.post. It would hang on the reading the http response. I attached the debugger and traced it to PythonBinaryReader:Read method. in the PythonFile.cs It hangs when size = 0. It hangs specifically in this loop int leftCount = size; while (true) { int count = _stream.Read(data, offset, leftCount); if (count <= 0) break; leftCount -= count; if (leftCount <= 0) break; offset += count; } It hangs on the _stream.read where offset is 0 and leftCount is zero and the stream is a NetworkStream. I looked at the PythonTextCRLFReader, PythonTextCRReader, PythonTextLFReader, and PythonUniversalReader in the same PythonFile.cs. It looks like they all have a way to handle when size is equal 0 or less. I ran a quick experiment and just added one line, didn't want to change too much. I changed. int leftCount = size;while (true) { if (leftCount <= 0) break; int count = _stream.Read(data, offset, leftCount); if (count <= 0) break; leftCount -= count; if (leftCount <= 0) break; offset += count; } After this I was able to get all HTTP GETs and POSTs working. I did this with rest type calls and normal web transactions. I was just wanted to check if any ran into this issue before? I'm not sure if this was just a me thing. Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Aug 22 11:44:27 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 22 Aug 2014 10:44:27 +0100 Subject: [Ironpython-users] requests hang on get or post http request In-Reply-To: References: Message-ID: On Thu, Aug 21, 2014 at 5:37 PM, Daniel Fernandez wrote: > Hi All, > > I'm using the latest 2.7.5 b3 code and I wanted to see if requests works. I > pulled the latest from github. It would hang on simple requests.get or > requests.post. It would hang on the reading the http response. I attached > the debugger and traced it to PythonBinaryReader:Read method. in the > PythonFile.cs It hangs when size = 0. It hangs specifically in this loop > > int leftCount = size; > while (true) { > int count = _stream.Read(data, offset, leftCount); > if (count <= 0) break; > leftCount -= count; > if (leftCount <= 0) break; > offset += count; > } > > It hangs on the _stream.read where offset is 0 and leftCount is zero and > the stream is a NetworkStream. That's very odd. What's the result of _stream.Read in this case (i.e. what is count set to)? The docs for NetworkStream.Read[1] don't really specify what should happen if size (leftCount in the code above) is 0. If just says that it returns the number of bytes read, or 0 if there is nothing left to read ... but what if we only ask for 0 bytes, and there's still data left to read? My instinct would be that it should return 0 and then break on the next line, but that's clearly not happening. Also, why does it not break on the `if (leftCount <= 0) break;` line? Unless a size of 0 means for NetworkStream.Read to block and read everything until the stream closes. But the NetworkStream docs don't say that. They don't specify at all what happens when size is 0. And the comments for PythonBinaryReader.Read don't say what should happen when size = 0 either. Playing with the CPython interpreter, though, calling f.read(0) always returns an empty string (f.read(-1) is read-to-end), so that seems like the behaviour. I don't know what's going on with NetworkStream.Read (maybe a bug?) but IP should work around it. [1] http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.read(v=vs.110).aspx > I ran a quick experiment and just added one line, didn't want to change too > much. I changed. > int leftCount = size; > while (true) { > if (leftCount <= 0) break; > int count = _stream.Read(data, offset, leftCount); > if (count <= 0) break; > leftCount -= count; > if (leftCount <= 0) break; > offset += count; > } > > It would be better to move the check out of the loop and check if(size==0) instead. That makes it clearer what case is being handled. You could skip the whole thing and just do if(size == 0) { return string.Empty; } at the start of the function. > After this I was able to get all HTTP GETs and POSTs working. I did this > with rest type calls and normal web transactions. > > I was just wanted to check if any ran into this issue before? I'm not sure > if this was just a me thing. I'd be curious to know which version of the .NET framework you're running on. - Jeff From fernandez_dan2 at hotmail.com Fri Aug 22 14:45:23 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Fri, 22 Aug 2014 06:45:23 -0600 Subject: [Ironpython-users] requests hang on get or post http request In-Reply-To: References: , Message-ID: Hi Jeff, I'm working on .NET 4.0.30319.18444 (32-bit). Yup I like the way you handle the scenario. I did the same thing I couldn't tell from the docs if NetworkStream with size == 0 if it should block or not. Danny > Date: Fri, 22 Aug 2014 10:44:27 +0100 > Subject: Re: [Ironpython-users] requests hang on get or post http request > From: jdhardy at gmail.com > To: fernandez_dan2 at hotmail.com > CC: ironpython-users at python.org > > On Thu, Aug 21, 2014 at 5:37 PM, Daniel Fernandez > wrote: > > Hi All, > > > > I'm using the latest 2.7.5 b3 code and I wanted to see if requests works. I > > pulled the latest from github. It would hang on simple requests.get or > > requests.post. It would hang on the reading the http response. I attached > > the debugger and traced it to PythonBinaryReader:Read method. in the > > PythonFile.cs It hangs when size = 0. It hangs specifically in this loop > > > > int leftCount = size; > > while (true) { > > int count = _stream.Read(data, offset, leftCount); > > if (count <= 0) break; > > leftCount -= count; > > if (leftCount <= 0) break; > > offset += count; > > } > > > > It hangs on the _stream.read where offset is 0 and leftCount is zero and > > the stream is a NetworkStream. > > That's very odd. What's the result of _stream.Read in this case (i.e. > what is count set to)? The docs for NetworkStream.Read[1] don't really > specify what should happen if size (leftCount in the code above) is 0. > If just says that it returns the number of bytes read, or 0 if there > is nothing left to read ... but what if we only ask for 0 bytes, and > there's still data left to read? > > My instinct would be that it should return 0 and then break on the > next line, but that's clearly not happening. Also, why does it not > break on the `if (leftCount <= 0) break;` line? > > Unless a size of 0 means for NetworkStream.Read to block and read > everything until the stream closes. But the NetworkStream docs don't > say that. They don't specify at all what happens when size is 0. And > the comments for PythonBinaryReader.Read don't say what should happen > when size = 0 either. > > Playing with the CPython interpreter, though, calling f.read(0) always > returns an empty string (f.read(-1) is read-to-end), so that seems > like the behaviour. I don't know what's going on with > NetworkStream.Read (maybe a bug?) but IP should work around it. > > [1] http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.read(v=vs.110).aspx > > > I ran a quick experiment and just added one line, didn't want to change too > > much. I changed. > > int leftCount = size; > > while (true) { > > if (leftCount <= 0) break; > > int count = _stream.Read(data, offset, leftCount); > > if (count <= 0) break; > > leftCount -= count; > > if (leftCount <= 0) break; > > offset += count; > > } > > > > > > It would be better to move the check out of the loop and check > if(size==0) instead. That makes it clearer what case is being handled. > You could skip the whole thing and just do > > if(size == 0) { > return string.Empty; > } > > at the start of the function. > > > After this I was able to get all HTTP GETs and POSTs working. I did this > > with rest type calls and normal web transactions. > > > > I was just wanted to check if any ran into this issue before? I'm not sure > > if this was just a me thing. > > I'd be curious to know which version of the .NET framework you're running on. > > - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sun Aug 24 09:26:16 2014 From: no_reply at codeplex.com (CodePlex) Date: 24 Aug 2014 00:26:16 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/23/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] bytearray constructor should accept string ---------------------------------------------- ISSUES 1. [New issue] bytearray constructor should accept string http://ironpython.codeplex.com/workitem/35493 User paweljasinski has proposed the issue: "as reported on mailing list by Daniel Fernandez: CPython 2.7.8 >>> hex_string = "deadbeef" >>> hex_data = hex_string.decode("hex") >>> hex_data '\xde\xad\xbe\xef' >>> bytearray(hex_data) bytearray(b'\xde\xad\xbe\xef') IronPython 2.7.5 Beta >>> hex_string = "deadbeef" >>> hex_data = hex_string.decode("hex") >>> hex_data u'\xde\xad\xbe\xef' >>> bytearray(hex_data) Traceback (most recent call last): File "", line 1, in TypeError: unicode argument without an encoding >>> bytearray(hex_data, 'hex') bytearray(b'deadbeef') " ---------------------------------------------- ---------------------------------------------- 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: From aviberko at gmail.com Sun Aug 24 19:22:36 2014 From: aviberko at gmail.com (Avi Berko) Date: Sun, 24 Aug 2014 20:22:36 +0300 Subject: [Ironpython-users] abstract class/not marked as serializable Message-ID: Hey, We're trying to interface to a testing instrument (agilent VSA) that has a factory function returning an abstract class, which implements some remoting interfaces (MarshalByRef, etc...) The instance is returned, but trying to call any method on it (including __str__/__repr__) results in this error message: Traceback (most recent call last): File "", line 1, in SystemError: Type 'System.Runtime.CompilerServices.CallSite`1[[System.Func`4[[System.Runtime.CompilerServices.CallSite, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[IronPython.Runtime.CodeContext, IronPython, Version=2.7.0.40, Culture=neutral, PublicKeyToken=7f709c5b713576e1],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' in Assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. What can I do to further analyze this problem? Regards, Avi -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Aug 26 09:26:55 2014 From: no_reply at codeplex.com (CodePlex) Date: 26 Aug 2014 00:26:55 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/25/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Failed to load language 'IronPython 2.7.3': The method or operation is not implemented. ---------------------------------------------- ISSUES 1. [New issue] Failed to load language 'IronPython 2.7.3': The method or operation is not implemented. http://ironpython.codeplex.com/workitem/35497 User pkinoc has proposed the issue: "When I run the following unit test manually in Visual Studio 2010 it runs perfectly fine but when I run it as a method in a loadtest I get the following exception. We initially started getting the exception in a much bigger solution so I created a new solution that contains one unit test and only calls CreateEngine(). I also referenced the following DLL's in the .Net40 Platform in the IronPython 2.7.3 installation. I've uninstalled/re-installed IP 2.7.3 several times and I do not have IronRuby installed. I also don't have the Iron Python Visual Studio Tools installed since I don't need the IP IDE as part of VS IronPython IronPython.Modules Microsoft.Dynamic Microsoft.Scripting Microsoft.Scripting.Metadata Test method IronPythonTest.UnitTest1.TestIronPython threw exception: System.Reflection.TargetInvocationException: Failed to load language 'IronPython 2.7.3': The method or operation is not implemented. ---> System.NotImplementedException: The method or operation is not implemented. Microsoft.VisualStudio.TestTools.Common.EqtStringPerThreadWriter.get_Encoding() System.IO.TextWriter.SyncTextWriter.get_Encoding() IronPython.Runtime.PythonFile.InitializeConsole(SharedIO io, ConsoleStreamType type, String name) IronPython.Runtime.PythonContext.SetStandardIO() IronPython.Runtime.PythonContext.InitializeSystemState() IronPython.Runtime.PythonContext..ctor(ScriptDomainManager manager, IDictionary`2 options) Microsoft.Scripting.Runtime.LanguageConfiguration.LoadLanguageContext(ScriptDomainManager domainManager, Boolean& alreadyLoaded) Microsoft.Scripting.Runtime.DlrConfiguration.LoadLanguageContext(ScriptDomainManager manager, LanguageConfiguration config) Microsoft.Scripting.Runtime.DlrConfiguration.TryLoadLanguage(ScriptDomainManager manager, AssemblyQualifiedTypeName providerName, LanguageContext& language) Microsoft.Scripting.Runtime.ScriptDomainManager.GetLanguageByTypeName(String providerAssemblyQualifiedTypeName) Microsoft.Scripting.Hosting.ScriptRuntime.GetEngineByTypeName(String assemblyQualifiedTypeName) IronPython.Hosting.Python.GetEngine(ScriptRuntime runtime) IronPython.Hosting.Python.CreateEngine() IronPythonTest.UnitTest1.TestIronPython() in C:\Users\qascript\Documents\Visual Studio 2010\Projects\IronPythonTest\IronPythonTest\UnitTest1.cs: line 35 [TestMethod] public void TestIronPython() { try { Console.WriteLine("Before CreateEngine"); Console.WriteLine("PATH=" + System.Environment.GetEnvironmentVariable("path")); ScriptEngine m_engine = Python.CreateEngine(); Console.WriteLine("After CreateEngine"); ScriptScope m_scope = null; } catch (Exception ex) { Console.WriteLine("EXCEPTION: " + ex.Message); throw; } } " ---------------------------------------------- ---------------------------------------------- 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: From fernandez_dan2 at hotmail.com Wed Aug 27 01:03:06 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Tue, 26 Aug 2014 17:03:06 -0600 Subject: [Ironpython-users] requests hang on get or post http request In-Reply-To: References: , , , Message-ID: Hi Jeff, Is this something we want to go forward with the change in the PythonBinaryReader:Read if(size == 0) { return string.Empty; } Thanks. Danny From: fernandez_dan2 at hotmail.com To: jdhardy at gmail.com Date: Fri, 22 Aug 2014 06:45:23 -0600 CC: ironpython-users at python.org Subject: Re: [Ironpython-users] requests hang on get or post http request Hi Jeff, I'm working on .NET 4.0.30319.18444 (32-bit). Yup I like the way you handle the scenario. I did the same thing I couldn't tell from the docs if NetworkStream with size == 0 if it should block or not. Danny > Date: Fri, 22 Aug 2014 10:44:27 +0100 > Subject: Re: [Ironpython-users] requests hang on get or post http request > From: jdhardy at gmail.com > To: fernandez_dan2 at hotmail.com > CC: ironpython-users at python.org > > On Thu, Aug 21, 2014 at 5:37 PM, Daniel Fernandez > wrote: > > Hi All, > > > > I'm using the latest 2.7.5 b3 code and I wanted to see if requests works. I > > pulled the latest from github. It would hang on simple requests.get or > > requests.post. It would hang on the reading the http response. I attached > > the debugger and traced it to PythonBinaryReader:Read method. in the > > PythonFile.cs It hangs when size = 0. It hangs specifically in this loop > > > > int leftCount = size; > > while (true) { > > int count = _stream.Read(data, offset, leftCount); > > if (count <= 0) break; > > leftCount -= count; > > if (leftCount <= 0) break; > > offset += count; > > } > > > > It hangs on the _stream.read where offset is 0 and leftCount is zero and > > the stream is a NetworkStream. > > That's very odd. What's the result of _stream.Read in this case (i.e. > what is count set to)? The docs for NetworkStream.Read[1] don't really > specify what should happen if size (leftCount in the code above) is 0. > If just says that it returns the number of bytes read, or 0 if there > is nothing left to read ... but what if we only ask for 0 bytes, and > there's still data left to read? > > My instinct would be that it should return 0 and then break on the > next line, but that's clearly not happening. Also, why does it not > break on the `if (leftCount <= 0) break;` line? > > Unless a size of 0 means for NetworkStream.Read to block and read > everything until the stream closes. But the NetworkStream docs don't > say that. They don't specify at all what happens when size is 0. And > the comments for PythonBinaryReader.Read don't say what should happen > when size = 0 either. > > Playing with the CPython interpreter, though, calling f.read(0) always > returns an empty string (f.read(-1) is read-to-end), so that seems > like the behaviour. I don't know what's going on with > NetworkStream.Read (maybe a bug?) but IP should work around it. > > [1] http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.read(v=vs.110).aspx > > > I ran a quick experiment and just added one line, didn't want to change too > > much. I changed. > > int leftCount = size; > > while (true) { > > if (leftCount <= 0) break; > > int count = _stream.Read(data, offset, leftCount); > > if (count <= 0) break; > > leftCount -= count; > > if (leftCount <= 0) break; > > offset += count; > > } > > > > > > It would be better to move the check out of the loop and check > if(size==0) instead. That makes it clearer what case is being handled. > You could skip the whole thing and just do > > if(size == 0) { > return string.Empty; > } > > at the start of the function. > > > After this I was able to get all HTTP GETs and POSTs working. I did this > > with rest type calls and normal web transactions. > > > > I was just wanted to check if any ran into this issue before? I'm not sure > > if this was just a me thing. > > I'd be curious to know which version of the .NET framework you're running on. > > - Jeff _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Aug 27 09:22:59 2014 From: no_reply at codeplex.com (CodePlex) Date: 27 Aug 2014 00:22:59 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/26/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] "No module named ..." exception in multi threading environment ---------------------------------------------- ISSUES 1. [New issue] "No module named ..." exception in multi threading environment http://ironpython.codeplex.com/workitem/35498 User thomasmischke has proposed the issue: "Hi, we are using IronPython (2.7.4 and before that 2.6.2) in a heavy multi threading environment. There is just one engine, but many threads that execute the same scripts over and over again. We found a race condition when adding references to DLLs. A script that runs fine a hundred times sometimes throws the exception "No module named ..." when trying to execute a line like "from ... import *". We tracked down the problem to the method LoadAssembly in the class ScriptDomainManager. When we extend the "lock" in that method, the problem disappears. Our new method looks like this: public bool LoadAssembly(Assembly assembly) { ContractUtils.RequiresNotNull(assembly, "assembly"); lock (_loadedAssemblies) { if (_loadedAssemblies.Contains(assembly)) { // only deliver the event if we've never added the assembly before return false; } _loadedAssemblies.Add(assembly); EventHandler assmLoaded = AssemblyLoaded; if (assmLoaded != null) { assmLoaded(this, new AssemblyLoadedEventArgs(assembly)); } } return true; } The following things seem to be needed to reproduce the problem: Create a DLL ClassLibrary1 with an empty class Class1. Create a DLL ClassLibrary2 with an empty class Class2. Create a script A as follows: import clr, sys if not "c:\\VisualStudioProjects\\ClassLibrary1\\ClassLibrary1\\bin\\Debug\\" in sys.path: sys.path.append("c:\\VisualStudioProjects\\ClassLibrary1\\ClassLibrary1\\bin\\Debug\\") clr.AddReferenceToFile("ClassLibrary1.dll") from ClassLibrary1 import Class1 Create a script B as follows: import clr, sys if not "c:\\VisualStudioProjects\\ClassLibrary1\\ClassLibrary2\\bin\\Debug\\" in sys.path: sys.path.append("c:\\VisualStudioProjects\\ClassLibrary1\\ClassLibrary2\\bin\\Debug\\") clr.AddReferenceToFile("ClassLibrary2.dll") from ClassLibrary2 import Class2 Create a function Main in C# as follows: static void Main() { while (true) { ScriptEngine _Engine = Python.CreateEngine(); ScriptSource source = _Engine.CreateScriptSourceFromFile(@"script1.py"); ScriptSource source1 = _Engine.CreateScriptSourceFromFile(@"script2.py"); CompiledCode _Code = source.Compile(); CompiledCode _Code1 = source1.Compile(); _Code.Execute(_Engine.CreateScope()); for (int i = 0; i < 10; i++) { Thread t = new Thread(() => { try { _Code1.Execute(_Engine.CreateScope()); } catch (Exception ex) { Console.WriteLine(ex.ToString()); throw; } }); t.Start(); } Thread.Sleep(1000); } } When you run this Main function, depending on your hardware it will take quite a lot of time, until the error occures for the first time. The race condition can be "forced" by adding a sleep in the ScriptDomainManager as follows: public bool LoadAssembly(Assembly assembly) { ContractUtils.RequiresNotNull(assembly, "assembly"); lock (_loadedAssemblies) { if (_loadedAssemblies.Contains(assembly)) { // only deliver the event if we've never added the assembly before return false; } _loadedAssemblies.Add(assembly); } Thread.Sleep(500); EventHandler assmLoaded = AssemblyLoaded; if (assmLoaded != null) { assmLoaded(this, new AssemblyLoadedEventArgs(assembly)); } return true; } Now it takes normally just a few seconds/runs of the program to trigger the error message. With the extended lock as written before, this problem does not occur any more. Initially this issue was reported at GitHub. There I was asked to report it here at codeplex, or fork and ask for a pull request. I do not know the internals of IronPython and the DLR well enough to try the fork solution... Best regards, Thomas Mischke" ---------------------------------------------- ---------------------------------------------- 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: From hfoffani at gmail.com Wed Aug 27 16:53:22 2014 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Wed, 27 Aug 2014 16:53:22 +0200 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. Message-ID: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> Hi, This works on CPython but on IronPython throws an exception in base64.b64encode. from __future__ import print_function import cPickle import bz2 import base64 def serializa(o): s1 = cPickle.dumps(o) s2 = bz2.compress(s1) s = base64.b64encode(s2) return s def deserializa(s): o = cPickle.loads(bz2.decompress(base64.b64decode(s))) return o def procesa(): l1 = [23,4,303,None,'.',32023.03,0] l2 = deserializa(serializa(l1)) print(l1, l2) procesa() C:\> ipy.exe x.py Traceback (most recent call last): File "x.py", line 23, in File "x.py", line 20, in procesa File "x.py", line 10, in serializa File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode TypeError: expected str, got bytes Pythons: Python 2.7.8 (default, Aug 24 2014, 21:26:19) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) Type "help", "copyright", "credits" or "license" for more information. Regards, Hern?n. From slide.o.mix at gmail.com Wed Aug 27 17:17:43 2014 From: slide.o.mix at gmail.com (Slide) Date: Wed, 27 Aug 2014 08:17:43 -0700 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. In-Reply-To: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> References: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> Message-ID: Can you file an issue on ironpython.codeplex.com? On Wed, Aug 27, 2014 at 7:53 AM, Hern?n Foffani wrote: > Hi, > This works on CPython but on IronPython throws an exception in > base64.b64encode. > > from __future__ import print_function > > import cPickle > import bz2 > import base64 > > def serializa(o): > s1 = cPickle.dumps(o) > s2 = bz2.compress(s1) > s = base64.b64encode(s2) > return s > > def deserializa(s): > o = cPickle.loads(bz2.decompress(base64.b64decode(s))) > return o > > def procesa(): > l1 = [23,4,303,None,'.',32023.03,0] > l2 = deserializa(serializa(l1)) > print(l1, l2) > > procesa() > > > > C:\> ipy.exe x.py > Traceback (most recent call last): > File "x.py", line 23, in > File "x.py", line 20, in procesa > File "x.py", line 10, in serializa > File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in > b64encode > TypeError: expected str, got bytes > > > Pythons: > > Python 2.7.8 (default, Aug 24 2014, 21:26:19) > [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin > Type "help", "copyright", "credits" or "license" for more information > > IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) > Type "help", "copyright", "credits" or "license" for more information. > > > > Regards, > Hern?n. > > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfoffani at gmail.com Wed Aug 27 17:42:33 2014 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Wed, 27 Aug 2014 17:42:33 +0200 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. In-Reply-To: References: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> Message-ID: Sure! https://ironpython.codeplex.com/workitem/35507 > Can you file an issue on ironpython.codeplex.com? > > > On Wed, Aug 27, 2014 at 7:53 AM, Hern?n Foffani wrote: > Hi, > This works on CPython but on IronPython throws an exception in base64.b64encode. > > from __future__ import print_function > > import cPickle > import bz2 > import base64 > > def serializa(o): > s1 = cPickle.dumps(o) > s2 = bz2.compress(s1) > s = base64.b64encode(s2) > return s > > def deserializa(s): > o = cPickle.loads(bz2.decompress(base64.b64decode(s))) > return o > > def procesa(): > l1 = [23,4,303,None,'.',32023.03,0] > l2 = deserializa(serializa(l1)) > print(l1, l2) > > procesa() > > > > C:\> ipy.exe x.py > Traceback (most recent call last): > File "x.py", line 23, in > File "x.py", line 20, in procesa > File "x.py", line 10, in serializa > File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode > TypeError: expected str, got bytes > > > Pythons: > > Python 2.7.8 (default, Aug 24 2014, 21:26:19) > [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin > Type "help", "copyright", "credits" or "license" for more information > > IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) > Type "help", "copyright", "credits" or "license" for more information. > > > > Regards, > Hern?n. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Wed Aug 27 17:53:42 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Wed, 27 Aug 2014 17:53:42 +0200 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. In-Reply-To: References: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> Message-ID: BytesConversion on argument fixes it: public static object b2a_base64([BytesConversion]string data) Short term workaround, try adding str() around an argument On Wed, Aug 27, 2014 at 5:17 PM, Slide wrote: > Can you file an issue on ironpython.codeplex.com? > > > On Wed, Aug 27, 2014 at 7:53 AM, Hern?n Foffani > wrote: > >> Hi, >> This works on CPython but on IronPython throws an exception in >> base64.b64encode. >> >> from __future__ import print_function >> >> import cPickle >> import bz2 >> import base64 >> >> def serializa(o): >> s1 = cPickle.dumps(o) >> s2 = bz2.compress(s1) >> s = base64.b64encode(s2) >> return s >> >> def deserializa(s): >> o = cPickle.loads(bz2.decompress(base64.b64decode(s))) >> return o >> >> def procesa(): >> l1 = [23,4,303,None,'.',32023.03,0] >> l2 = deserializa(serializa(l1)) >> print(l1, l2) >> >> procesa() >> >> >> >> C:\> ipy.exe x.py >> Traceback (most recent call last): >> File "x.py", line 23, in >> File "x.py", line 20, in procesa >> File "x.py", line 10, in serializa >> File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in >> b64encode >> TypeError: expected str, got bytes >> >> >> Pythons: >> >> Python 2.7.8 (default, Aug 24 2014, 21:26:19) >> [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin >> Type "help", "copyright", "credits" or "license" for more information >> >> IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) >> Type "help", "copyright", "credits" or "license" for more information. >> >> >> >> Regards, >> Hern?n. >> >> >> >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> > > > > -- > Website: http://earl-of-code.com > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfoffani at gmail.com Wed Aug 27 18:02:29 2014 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Wed, 27 Aug 2014 18:02:29 +0200 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. In-Reply-To: References: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> Message-ID: <92C8B014-0970-499F-B785-47F8859DC18C@gmail.com> Thanks for the str() workaround; haven?t thought of it. Same thing with the output of b64decode. El 27/08/2014, a las 17:53, Pawel Jasinski escribi?: > BytesConversion on argument fixes it: > > public static object b2a_base64([BytesConversion]string data) > > Short term workaround, try adding str() around an argument > > > On Wed, Aug 27, 2014 at 5:17 PM, Slide wrote: > Can you file an issue on ironpython.codeplex.com? > > > On Wed, Aug 27, 2014 at 7:53 AM, Hern?n Foffani wrote: > Hi, > This works on CPython but on IronPython throws an exception in base64.b64encode. > > from __future__ import print_function > > import cPickle > import bz2 > import base64 > > def serializa(o): > s1 = cPickle.dumps(o) > s2 = bz2.compress(s1) > s = base64.b64encode(s2) > return s > > def deserializa(s): > o = cPickle.loads(bz2.decompress(base64.b64decode(s))) > return o > > def procesa(): > l1 = [23,4,303,None,'.',32023.03,0] > l2 = deserializa(serializa(l1)) > print(l1, l2) > > procesa() > > > > C:\> ipy.exe x.py > Traceback (most recent call last): > File "x.py", line 23, in > File "x.py", line 20, in procesa > File "x.py", line 10, in serializa > File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode > TypeError: expected str, got bytes > > > Pythons: > > Python 2.7.8 (default, Aug 24 2014, 21:26:19) > [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin > Type "help", "copyright", "credits" or "license" for more information > > IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) > Type "help", "copyright", "credits" or "license" for more information. > > > > Regards, > Hern?n. > > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > > > -- > Website: http://earl-of-code.com > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hfoffani at gmail.com Wed Aug 27 18:10:16 2014 From: hfoffani at gmail.com (=?iso-8859-1?Q?Hern=E1n_Foffani?=) Date: Wed, 27 Aug 2014 18:10:16 +0200 Subject: [Ironpython-users] b64encode(bz2.compress()) throws exception. In-Reply-To: <92C8B014-0970-499F-B785-47F8859DC18C@gmail.com> References: <75B91702-4129-4158-99ED-35B5DF83ADD2@gmail.com> <92C8B014-0970-499F-B785-47F8859DC18C@gmail.com> Message-ID: <62D3F1D9-4B03-4A0A-A327-1C22A92A2F6F@gmail.com> Sorry, I meant the input of cPickle.loads() El 27/08/2014, a las 18:02, Hern?n Foffani escribi?: > Thanks for the str() workaround; haven?t thought of it. > Same thing with the output of b64decode. > > > El 27/08/2014, a las 17:53, Pawel Jasinski escribi?: > >> BytesConversion on argument fixes it: >> >> public static object b2a_base64([BytesConversion]string data) >> >> Short term workaround, try adding str() around an argument >> >> >> On Wed, Aug 27, 2014 at 5:17 PM, Slide wrote: >> Can you file an issue on ironpython.codeplex.com? >> >> >> On Wed, Aug 27, 2014 at 7:53 AM, Hern?n Foffani wrote: >> Hi, >> This works on CPython but on IronPython throws an exception in base64.b64encode. >> >> from __future__ import print_function >> >> import cPickle >> import bz2 >> import base64 >> >> def serializa(o): >> s1 = cPickle.dumps(o) >> s2 = bz2.compress(s1) >> s = base64.b64encode(s2) >> return s >> >> def deserializa(s): >> o = cPickle.loads(bz2.decompress(base64.b64decode(s))) >> return o >> >> def procesa(): >> l1 = [23,4,303,None,'.',32023.03,0] >> l2 = deserializa(serializa(l1)) >> print(l1, l2) >> >> procesa() >> >> >> >> C:\> ipy.exe x.py >> Traceback (most recent call last): >> File "x.py", line 23, in >> File "x.py", line 20, in procesa >> File "x.py", line 10, in serializa >> File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode >> TypeError: expected str, got bytes >> >> >> Pythons: >> >> Python 2.7.8 (default, Aug 24 2014, 21:26:19) >> [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin >> Type "help", "copyright", "credits" or "license" for more information >> >> IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) >> Type "help", "copyright", "credits" or "license" for more information. >> >> >> >> Regards, >> Hern?n. >> >> >> >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> >> >> >> -- >> Website: http://earl-of-code.com >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Aug 28 09:26:36 2014 From: no_reply at codeplex.com (CodePlex) Date: 28 Aug 2014 00:26:36 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/27/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] "No module named ..." exception in multi threading environment 2. [New issue] import python module 3. [New comment] import python module 4. [New issue] b64encode(bz2.compress()) throws exception. ---------------------------------------------- ISSUES 1. [New comment] "No module named ..." exception in multi threading environment http://ironpython.codeplex.com/workitem/35498 User slide_o_mix has commented on the issue: "

I'm a little concerned by the extension of the lock because it means the lock will be in place during the event handler, who knows how long that will take? I'll see if I can understand better why this occurs.

"----------------- 2. [New issue] import python module http://ironpython.codeplex.com/workitem/35506 User dayian has proposed the issue: "hi my project is ironpython in wpf I can use ironpython module my project is about digital sign and I should use from crypto and PIL python module in it. but i can not. please help me I do not have time and can not change my process.I am new in ironpython please guide me thanks"----------------- 3. [New comment] import python module http://ironpython.codeplex.com/workitem/35506 User dayian has commented on the issue: "

this is my code:
im=Image.FromFile(self.text2.Text)
hashA = SHA512.New('my_picture')
hashA.update(self.txt1.Text)
hashoutA = hashA.hexdigest()
key = DSA.generate(1024)
K = random.StrongRandom().randint(1,key.q-1)
signature = key.sign(hashoutA, K)
seq = asn1.DerSequence()
seq[:] = [ 0, key.p, key.q, key.g, key.y]
exported_key = "-----BEGIN DSA PUBLIC KEY-----\n%s-----END DSA PUBLIC KEY-----" % seq.encode().encode("base64")
im2 = stepic.encode(im, str(signature))
im2.save('Secret.png','PNG')
myFile = open('key.txt','w')
myFile.write(exported_key)
myFile.close()
MessageBox.Show("Process Completed Successfully!")

"----------------- 4. [New issue] b64encode(bz2.compress()) throws exception. http://ironpython.codeplex.com/workitem/35507 User hfoffani has proposed the issue: "This works on CPython but on IronPython throws an exception in base64.b64encode. from __future__ import print_function import cPickle import bz2 import base64 def serializa(o): s1 = cPickle.dumps(o) s2 = bz2.compress(s1) s = base64.b64encode(s2) return s def deserializa(s): o = cPickle.loads(bz2.decompress(base64.b64decode(s))) return o def procesa(): l1 = [23,4,303,None,'.',32023.03,0] l2 = deserializa(serializa(l1)) print(l1, l2) procesa() C:> ipy.exe x.py Traceback (most recent call last): File "x.py", line 23, in File "x.py", line 20, in procesa File "x.py", line 10, in serializa File "C:\Program Files\IronPython 2.7\Lib\base64.py", line 53, in b64encode TypeError: expected str, got bytes Pythons: Python 2.7.8 (default, Aug 24 2014, 21:26:19) [GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin Type "help", "copyright", "credits" or "license" for more information IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18444 (32-bit) Type "help", "copyright", "credits" or "license" for more information." ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Fri Aug 29 09:22:42 2014 From: no_reply at codeplex.com (CodePlex) Date: 29 Aug 2014 00:22:42 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/28/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] import python module ---------------------------------------------- ISSUES 1. [New comment] import python module http://ironpython.codeplex.com/workitem/35506 User slide_o_mix has commented on the issue: "

PIL uses a native module, which won't work on IP.

" ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Sat Aug 30 09:23:53 2014 From: no_reply at codeplex.com (CodePlex) Date: 30 Aug 2014 00:23:53 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/29/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Using Paramiko throws exception TypeError: expected _counter, got _counterStarting ... ---------------------------------------------- ISSUES 1. [New issue] Using Paramiko throws exception TypeError: expected _counter, got _counterStarting ... http://ironpython.codeplex.com/workitem/35514 User jamini has proposed the issue: "Hi Team, From our c# application, we are executing python (32-bit) scripts with the help of clrzmq (32-bit) for inter process communication. From that python scripts we were trying to connect to SSH using paramiko which is of 32-bit. (Application runs in Any CPU mode) We were able to run the python scripts from command prompt without any issues, but when we try to run the same from our c# application it is throwing us the following exception. Traceback (most recent call last): File "C:......\Sample.py", line 39, in File "C:.......\ Sample1.py", line 674, in init File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\paramiko\client.py", line 242, in connect File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\paramiko\transport.py", line 346, in start_client TypeError: expected _counter, got _counterStarting ... The python code which we have written is as follows: Sample.py: .... sys.path.append ("C:\Program Files (x86)\IronPython 2.7\Lib") .... sys.path.append ("C:\..\..\SampleLibrary") import Sample1 d = Sample1.d ..... print 'Initiating Paramiko interface' print 'Starting ...' ......... sshSession = Sample1.SampleSSH ('190.167.22.3', 'abc', 'abc') theResult = sshSession.SSHCommand('...') print "The result ..." print theResult Sample1.py : from array import * sys.path.append("C:\Program Files (x86)\IronPython 2.7\clrzmq.2.2.5") clr.AddReference("clrzmq.dll") from System.Text import Encoding import ZMQ as zmq from ZMQ import SocketType sys.path.append("C:\Program Files (x86)\IronPython 2.7\Lib\site-packages") sys.path.append("C:\Program Files (x86)\IronPython 2.7\DLLs") clr.AddReference("IronPyCrypto.dll") import paramiko ...... class SampleSSH: def __init__(self, IP, user, password): self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.ssh.connect(IP, username=user, password=password) self.retStr='' self.sessionBuffer='' def SSHCommand( self, Command): self.retStr='' d.debug( 'SSHCommand: ' + Command ) stdin,stdout,stderr = self.ssh.exec_command(Command) for line in stdout.readlines(): d.debug( line ) self.retStr = self.retStr + line self.sessionBuffer = self.sessionBuffer + 'Command: ' + Command + '\r\n' self.sessionBuffer = self.sessionBuffer + self.retStr + '\r\n' return self.retStr Could you please suggest us the better approach to be followed to resolve this issue? Thanks, Jamini Mungara." ---------------------------------------------- ---------------------------------------------- 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: From no_reply at codeplex.com Sun Aug 31 09:28:37 2014 From: no_reply at codeplex.com (CodePlex) Date: 31 Aug 2014 00:28:37 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 8/30/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] PYC - Allow the Setting of the Icon if generating EXE 2. [New issue] Paramiko in python script throws exception :TypeError: expected _counter, got _counterStarting ... ---------------------------------------------- ISSUES 1. [New comment] PYC - Allow the Setting of the Icon if generating EXE http://ironpython.codeplex.com/workitem/22138 User slide_o_mix has commented on the issue: "

Implemented in https://github.com/IronLanguages/main/pull/212

"----------------- 2. [New issue] Paramiko in python script throws exception :TypeError: expected _counter, got _counterStarting ... http://ironpython.codeplex.com/workitem/35515 User jamini has proposed the issue: "Hi Team, From our c# application, we are executing python (IronPython Version-2.7, 32-bit) scripts with the help of clrzmq (Version-2.2.5, 32-bit) for inter process communication. From that python scripts we were trying to connect to SSH using paramiko which is of 32-bit (Application runs in Any CPU mode). We were able to run the python scripts from command prompt and connecting to SSH without any issues, but when we try to run the same from our c# application it is throwing us the following exception. Traceback (most recent call last): File "C:......\Sample.py", line 39, in File "C:.......\ Sample1.py", line 674, in init File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\paramiko\client.py", line 242, in connect File "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\paramiko\transport.py", line 346, in start_client TypeError: expected _counter, got _counterStarting ... The python code which we have written is as follows: Sample.py: .... sys.path.append ("C:\Program Files (x86)\IronPython 2.7\Lib") .... sys.path.append ("C:\..\..\SampleLibrary") import Sample1 d = Sample1.d ..... print 'Initiating Paramiko interface' print 'Starting ...' ......... sshSession = Sample1.SampleSSH ('190.167.22.3', 'abc', 'abc') theResult = sshSession.SSHCommand('...') print "The result ..." print theResult Sample1.py : from array import * sys.path.append("C:\Program Files (x86)\IronPython 2.7\clrzmq.2.2.5") clr.AddReference("clrzmq.dll") from System.Text import Encoding import ZMQ as zmq from ZMQ import SocketType sys.path.append("C:\Program Files (x86)\IronPython 2.7\Lib\site-packages") sys.path.append("C:\Program Files (x86)\IronPython 2.7\DLLs") clr.AddReference("IronPyCrypto.dll") import paramiko ...... class SampleSSH: def __init__(self, IP, user, password): self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.ssh.connect(IP, username=user, password=password) self.retStr='' self.sessionBuffer='' def SSHCommand( self, Command): self.retStr='' d.debug( 'SSHCommand: ' + Command ) stdin,stdout,stderr = self.ssh.exec_command(Command) for line in stdout.readlines(): d.debug( line ) self.retStr = self.retStr + line self.sessionBuffer = self.sessionBuffer + 'Command: ' + Command + '\r\n' self.sessionBuffer = self.sessionBuffer + self.retStr + '\r\n' return self.retStr Could you please suggest us the better approach to be followed to resolve this issue? Thanks, Jamini Mungara." ---------------------------------------------- ---------------------------------------------- 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: