From jdhardy at gmail.com Mon Nov 3 14:12:15 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 3 Nov 2014 13:12:15 +0000 Subject: [Ironpython-users] using IronPython with pycrypto In-Reply-To: References: Message-ID: Hi Baron, Sorry for the late reply. You've encountered the biggest issue with IronPython, which is that it can't load Python extensions that are written in C. In this case, the _AES modules (_AES.so) is a C library that depends on CPython's implementation. Unfortunately, if PyCrypto doesn't provide a pure-Python fallback (and it looks like it doesn't, although I may have missed it), there's no way to get it to work in IronPython (there is the old IronClad project, but it hasn't been updated in years and almost certainly would not work with current versions). - Jeff On Wed, Oct 29, 2014 at 10:43 PM, Baron Oldenburg wrote: > Hello! > > > > I?m attempting to import a module (KillerBee) in IronPython. I?ve > encountered a couple of issues along the way, some of which I?ve been able > to fix. I?m hoping the mailing list can help me out with what I haven?t > fixed. Here are the problems I?ve encountered and the steps I?ve taken: > > > > 1. ?Exception during object creation: no module named killerbee? > > a. Per > http://stackoverflow.com/questions/1371994/importing-external-module-in-ironpython, > I added the following which allowed IronPython to recognize killerbee as a > module and let me import it: > > var paths = engine.GetSearchPaths(); > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > engine.SetSearchPaths(paths); > > 2. ?Exception during object creation: cannot import _AES from > Crypto.Cipher? > > a. I tracked this error down to this line in a killerbee file > ?dot154decode.py?: > > ?from Crypto.Cipher import AES? > > and then further to /usr/lib/python2.7/site-packages/Crypto/Cipher/AES.py: > > > ?from Crypto.Cipher import _AES? > > In the same directory as AES.py there is an _AES.so. > > b. If I attempt this from the python interpreter, there are no errors: > > $ python > > Python 2.7.8 (default, Sep 24 2014, 18:26:21) > > [GCC 4.9.1 20140903 (prerelease)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > >>>> from Crypto.Cipher import AES >>>> import Crypto >>>> print Crypto.__version__ > > 2.6.1 > >>>> > > c. If I attempt this from IronPython with the following code (instead > of importing killerbee): > > engine.ImportModule("Crypto.Cipher.AES"); > > I get the same error (?cannot import _AES from Crypto.Cipher?). > > d. If I attempt to just import Crypto.Cipher > (?engine.ImportModule("Crypto.Cipher");?) there are no errors. > > Before I start trying increasingly complicated workarounds, does anyone have > an idea as to the possible root cause? I?ve searched around on the Internet > generally and in outstanding IronPython issues specifically for other people > with this problem, but I?ve only found the following semi-related hits > around IronPython and pycrypto: > > > > ? > http://stackoverflow.com/questions/2365661/how-to-create-a-package-in-c-sharp-for-use-in-ironpython > > ? http://www.pyinstaller.org/ticket/881 > > ? > http://lists.ironpython.com/pipermail/users-ironpython.com/2006-November/018956.html > > ? https://bitbucket.org/mvdk/ironpycrypto > > > > The relevant parts of the source look like this: > > > > using IronPython; > > using IronPython.Hosting; > > using Microsoft.Scripting; > > using Microsoft.Scripting.Hosting; > > > > ScriptEngine engine = Python.CreateEngine(); > > var paths = engine.GetSearchPaths(); > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > engine.SetSearchPaths(paths); > > engine.ImportModule("Crypto.Cipher.AES"); > > > > Thanks for your time! I?m happy to provide any other details or source code > necessary to continue debugging. > > > > Baron > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > From jdhardy at gmail.com Mon Nov 3 14:18:10 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 3 Nov 2014 13:18:10 +0000 Subject: [Ironpython-users] Newbie Mac IronPython Forms Question In-Reply-To: References: Message-ID: On Fri, Oct 31, 2014 at 5:23 PM, Todd Banister wrote: > I am just getting started with IronPython and working my way through the > IronPython In Action book by Manning publishing. So far, I am able to do > all of the examples on my Windows 8 VM on my Mac without any problems > (running the latest 2.7.5 beta 3 version). But I am running into some > issues with generating Forms on the Mac side. > > On my Mac, I am trying to run the following code: > > import clr > clr.AddReference('System.Windows.Forms') > from System.Windows.Forms import Application, Form > form=Form() > Application.Run(form) > > When I try to run this simple code to create a blank form, the command > line interpreter hangs when it gets to the form=Form() line. > I have tried running this code using the built in IronPython (listed as > version 3.0.0.0) in Mono as well as running the 2.7.5 beta 3 version (using > mono /Library/Frameworks/IronPython.framework/Versions/2.7.5/ipy.exe). > > Both seem to hang at the exact same spot. > I get the same result, using a random checkout I have on my Mac. Also, the version that comes with Mono is way out of date (and I thought they stopped including it for that reason). > > What am I missing? Is there something that I have not set up correctly > in my Mac environment? Does this simply not work the way I am trying it? > I'm not sure how good Mono's WinForms implementation is, although something that simple should work. I'd have to hook up a debugger to take a look; it might be some interaction between IronPython and Mono that's causing the issue. > > Sorry for such a simple question. > It's not out of the question that you're the first person to try using IronPython with WinForms on a Mac. Failing that, I believe Gtk# may also be an option. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at codesys.com Mon Nov 3 15:12:36 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Mon, 3 Nov 2014 14:12:36 +0000 Subject: [Ironpython-users] using IronPython with pycrypto In-Reply-To: References: Message-ID: <727D8E16AE957149B447FE368139F2B539D69C93@SERVER10> Hi, Jeff, Von: Jeff Hardy > Sorry for the late reply. You've encountered the biggest issue with > IronPython, which is that it can't load Python extensions that are written in > C. > > In this case, the _AES modules (_AES.so) is a C library that depends on > CPython's implementation. Unfortunately, if PyCrypto doesn't provide a pure- > Python fallback (and it looks like it doesn't, although I may have missed > it), there's no way to get it to work in IronPython (there is the old > IronClad project, but it hasn't been updated in years and almost certainly > would not work with current versions). I see one possibility: one could try to reimplement the _AES module in C#, possibly based on the .NET Crypto APIs, or as a clean room implementation. 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: http://www.codesys.com | CODESYS store: http://store.codesys.com CODESYS forum: http://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. > > On Wed, Oct 29, 2014 at 10:43 PM, Baron Oldenburg > wrote: > > Hello! > > > > > > > > I?m attempting to import a module (KillerBee) in IronPython. I?ve > > encountered a couple of issues along the way, some of which I?ve been > > able to fix. I?m hoping the mailing list can help me out with what I > > haven?t fixed. Here are the problems I?ve encountered and the steps I?ve > taken: > > > > > > > > 1. ?Exception during object creation: no module named killerbee? > > > > a. Per > > http://stackoverflow.com/questions/1371994/importing-external-module-i > > n-ironpython, I added the following which allowed IronPython to > > recognize killerbee as a module and let me import it: > > > > var paths = engine.GetSearchPaths(); > > > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > > > engine.SetSearchPaths(paths); > > > > 2. ?Exception during object creation: cannot import _AES from > > Crypto.Cipher? > > > > a. I tracked this error down to this line in a killerbee file > > ?dot154decode.py?: > > > > ?from Crypto.Cipher import AES? > > > > and then further to /usr/lib/python2.7/site-packages/Crypto/Cipher/AES.py: > > > > > > ?from Crypto.Cipher import _AES? > > > > In the same directory as AES.py there is an _AES.so. > > > > b. If I attempt this from the python interpreter, there are no errors: > > > > $ python > > > > Python 2.7.8 (default, Sep 24 2014, 18:26:21) > > > > [GCC 4.9.1 20140903 (prerelease)] on linux2 > > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>>> from Crypto.Cipher import AES > >>>> import Crypto > >>>> print Crypto.__version__ > > > > 2.6.1 > > > >>>> > > > > c. If I attempt this from IronPython with the following code (instead > > of importing killerbee): > > > > engine.ImportModule("Crypto.Cipher.AES"); > > > > I get the same error (?cannot import _AES from Crypto.Cipher?). > > > > d. If I attempt to just import Crypto.Cipher > > (?engine.ImportModule("Crypto.Cipher");?) there are no errors. > > > > Before I start trying increasingly complicated workarounds, does > > anyone have an idea as to the possible root cause? I?ve searched > > around on the Internet generally and in outstanding IronPython issues > > specifically for other people with this problem, but I?ve only found > > the following semi-related hits around IronPython and pycrypto: > > > > > > > > ? > > http://stackoverflow.com/questions/2365661/how-to-create-a-package-in- > > c-sharp-for-use-in-ironpython > > > > ? http://www.pyinstaller.org/ticket/881 > > > > ? > > http://lists.ironpython.com/pipermail/users-ironpython.com/2006-Novemb > > er/018956.html > > > > ? https://bitbucket.org/mvdk/ironpycrypto > > > > > > > > The relevant parts of the source look like this: > > > > > > > > using IronPython; > > > > using IronPython.Hosting; > > > > using Microsoft.Scripting; > > > > using Microsoft.Scripting.Hosting; > > > > > > > > ScriptEngine engine = Python.CreateEngine(); > > > > var paths = engine.GetSearchPaths(); > > > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > > > engine.SetSearchPaths(paths); > > > > engine.ImportModule("Crypto.Cipher.AES"); > > > > > > > > Thanks for your time! I?m happy to provide any other details or source > > code necessary to continue debugging. > > > > > > > > Baron > > > > > > _______________________________________________ > > 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 From slide.o.mix at gmail.com Mon Nov 3 16:20:13 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 3 Nov 2014 07:20:13 -0800 Subject: [Ironpython-users] using IronPython with pycrypto In-Reply-To: References: Message-ID: This brings up an interesting question. How much of a pure .NET implementation do we want to keep in IronPython? Do we want to try and pull something like IronClad into IronPython to provide compatibility, or implement the important modules in .NET? On Mon, Nov 3, 2014 at 5:12 AM, Jeff Hardy wrote: > Hi Baron, > Sorry for the late reply. You've encountered the biggest issue with > IronPython, which is that it can't load Python extensions that are > written in C. > > In this case, the _AES modules (_AES.so) is a C library that depends > on CPython's implementation. Unfortunately, if PyCrypto doesn't > provide a pure-Python fallback (and it looks like it doesn't, although > I may have missed it), there's no way to get it to work in IronPython > (there is the old IronClad project, but it hasn't been updated in > years and almost certainly would not work with current versions). > > - Jeff > > On Wed, Oct 29, 2014 at 10:43 PM, Baron Oldenburg > wrote: > > Hello! > > > > > > > > I?m attempting to import a module (KillerBee) in IronPython. I?ve > > encountered a couple of issues along the way, some of which I?ve been > able > > to fix. I?m hoping the mailing list can help me out with what I haven?t > > fixed. Here are the problems I?ve encountered and the steps I?ve taken: > > > > > > > > 1. ?Exception during object creation: no module named killerbee? > > > > a. Per > > > http://stackoverflow.com/questions/1371994/importing-external-module-in-ironpython > , > > I added the following which allowed IronPython to recognize killerbee as > a > > module and let me import it: > > > > var paths = engine.GetSearchPaths(); > > > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > > > engine.SetSearchPaths(paths); > > > > 2. ?Exception during object creation: cannot import _AES from > > Crypto.Cipher? > > > > a. I tracked this error down to this line in a killerbee file > > ?dot154decode.py?: > > > > ?from Crypto.Cipher import AES? > > > > and then further to > /usr/lib/python2.7/site-packages/Crypto/Cipher/AES.py: > > > > > > ?from Crypto.Cipher import _AES? > > > > In the same directory as AES.py there is an _AES.so. > > > > b. If I attempt this from the python interpreter, there are no > errors: > > > > $ python > > > > Python 2.7.8 (default, Sep 24 2014, 18:26:21) > > > > [GCC 4.9.1 20140903 (prerelease)] on linux2 > > > > Type "help", "copyright", "credits" or "license" for more information. > > > >>>> from Crypto.Cipher import AES > >>>> import Crypto > >>>> print Crypto.__version__ > > > > 2.6.1 > > > >>>> > > > > c. If I attempt this from IronPython with the following code > (instead > > of importing killerbee): > > > > engine.ImportModule("Crypto.Cipher.AES"); > > > > I get the same error (?cannot import _AES from Crypto.Cipher?). > > > > d. If I attempt to just import Crypto.Cipher > > (?engine.ImportModule("Crypto.Cipher");?) there are no errors. > > > > Before I start trying increasingly complicated workarounds, does anyone > have > > an idea as to the possible root cause? I?ve searched around on the > Internet > > generally and in outstanding IronPython issues specifically for other > people > > with this problem, but I?ve only found the following semi-related hits > > around IronPython and pycrypto: > > > > > > > > ? > > > http://stackoverflow.com/questions/2365661/how-to-create-a-package-in-c-sharp-for-use-in-ironpython > > > > ? http://www.pyinstaller.org/ticket/881 > > > > ? > > > http://lists.ironpython.com/pipermail/users-ironpython.com/2006-November/018956.html > > > > ? https://bitbucket.org/mvdk/ironpycrypto > > > > > > > > The relevant parts of the source look like this: > > > > > > > > using IronPython; > > > > using IronPython.Hosting; > > > > using Microsoft.Scripting; > > > > using Microsoft.Scripting.Hosting; > > > > > > > > ScriptEngine engine = Python.CreateEngine(); > > > > var paths = engine.GetSearchPaths(); > > > > paths.Add(@"/usr/lib/python2.7/site-packages/"); > > > > engine.SetSearchPaths(paths); > > > > engine.ImportModule("Crypto.Cipher.AES"); > > > > > > > > Thanks for your time! I?m happy to provide any other details or source > code > > necessary to continue debugging. > > > > > > > > Baron > > > > > > _______________________________________________ > > 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 Matthew.Love at analog.com Mon Nov 3 15:32:15 2014 From: Matthew.Love at analog.com (Love, Matthew) Date: Mon, 3 Nov 2014 14:32:15 +0000 Subject: [Ironpython-users] Integrating a WPF IPy program with C# Message-ID: Hi IronPython users, I've created a C# program that runs an IronPython script. The script contains a GUI built in WPF. When I call it using the IronPython Engine in C#, I get the following error: "ImportError: No module named wpf" I've pointed the Engine to the system path. System.dll and mscorlib.dll have been loaded using the following code: engine.Runtime.LoadAssembly(typeof(string).Assembly); engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly); Does anyone know where I'm going wrong and how I can sort out this import? I'm on IPy 2.7.4. Regards, Matthew -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Mon Nov 3 18:51:24 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 3 Nov 2014 09:51:24 -0800 Subject: [Ironpython-users] Integrating a WPF IPy program with C# In-Reply-To: References: Message-ID: It might help if you provide some code in a gist or something. Without that, its going to be difficult for anyone to help. On Mon, Nov 3, 2014 at 6:32 AM, Love, Matthew wrote: > Hi IronPython users, > > > > I?ve created a C# program that runs an IronPython script. > > The script contains a GUI built in WPF. > > > > When I call it using the IronPython Engine in C#, > > I get the following error: ?ImportError: No module named wpf? > > > > I?ve pointed the Engine to the system path. > > > > System.dll and mscorlib.dll have been loaded using the following code: > > engine.Runtime.LoadAssembly(typeof(string).Assembly); > > engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly); > > > > Does anyone know where I?m going wrong and how I can sort out this import? > > > > I?m on IPy 2.7.4. > > > > Regards, > > Matthew > > > > _______________________________________________ > 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 no_reply at codeplex.com Tue Nov 4 09:22:53 2014 From: no_reply at codeplex.com (CodePlex) Date: 4 Nov 2014 00:22:53 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/3/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] NotImplementedError: buffer_info not implemented for the array module 2. [New comment] Should sys.getfilesystemencoding() return 'mbcs' now that this is a supported encoding? 3. [New comment] simplify use of .net enumeration ---------------------------------------------- ISSUES 1. [New comment] NotImplementedError: buffer_info not implemented for the array module http://ironpython.codeplex.com/workitem/23778 User jdhardy has commented on the issue: "

slide_o_mix: the method in question in .buffer_in*f*o, not .buffer_in*t*o. Re-opening in case this still needs to be fixed.

"----------------- 2. [New comment] Should sys.getfilesystemencoding() return 'mbcs' now that this is a supported encoding? http://ironpython.codeplex.com/workitem/24220 User jdhardy has commented on the issue: "

CPython uses mbcs on Windows in both 2.7 and 3.3. However, I don't think it works properly on IronPython:

```
IronPython 2.7.5b3 (2.7.5.0) on .NET 4.0.30319.34014 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> x = "euro(?), Latin-2 (L) or Latin-1 (?)"
>>> x
u'euro(\u20ac), Latin-2 (\u0141) or Latin-1 (\xe4)'
>>> x.decode('mbcs')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ironlanguages\External.LCA_RESTRICTED\Languages\IronPython\27\Lib\encodings\mbcs.py", line 21, in decode
UnicodeEncodeError: ('ascii', u'\u20ac', 5, 6, "'ascii' codec can't decode byte 20AC in position 5: ordinal not in range")
>>> with open(x, 'w') as f:
... f.write(x)
...
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
UnicodeEncodeError: ('unknown', '\x00', 0, 1, "'ascii' codec can't encode character '\\u20AC' in position 5")
>>>
```

"----------------- 3. [New comment] simplify use of .net enumeration http://ironpython.codeplex.com/workitem/35650 User jdhardy has commented on the issue: "

Based on what's in the issue I can't really reproduce it:

```
>>> import clr
>>> from System import Enum
>>> from System.Net.Sockets import SocketOptionName
>>> x = SocketOptionName.MaxConnections
>>> int(x)
2147483647
>>> w = Enum.ToObject(SocketOptionName, 2147483647)
>>> x == w
True
```

I had to force them to be different objects (to avoid a trivial `is` match), but it seems to work for me.

" ---------------------------------------------- ---------------------------------------------- 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 Matthew.Love at analog.com Tue Nov 4 10:11:12 2014 From: Matthew.Love at analog.com (Love, Matthew) Date: Tue, 4 Nov 2014 09:11:12 +0000 Subject: [Ironpython-users] Integrating a WPF IPy program with C# In-Reply-To: References: Message-ID: I got it sorted in the end. I?ll post what I did for completion. To run programs that depended on WPF, two things were needed. First, had to load the wpf dll manually into the IronPython engine?s runtime. var wpf_path = @"C:\Program Files (x86)\IronPython 2.7\DLLs\IronPython.Wpf.dll"; var wpf_dll = Assembly.LoadFile(wpf_path); engine.Runtime.LoadAssembly(wpf_dll); Secondly, make the main function a STA Thread. I put this just before Main?s definition. [STAThread] static void Main(string[] args) Hope this helps anyone in the future, Matthew From: Slide [mailto:slide.o.mix at gmail.com] Sent: Monday, November 03, 2014 5:51 PM To: Love, Matthew Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Integrating a WPF IPy program with C# It might help if you provide some code in a gist or something. Without that, its going to be difficult for anyone to help. On Mon, Nov 3, 2014 at 6:32 AM, Love, Matthew > wrote: Hi IronPython users, I?ve created a C# program that runs an IronPython script. The script contains a GUI built in WPF. When I call it using the IronPython Engine in C#, I get the following error: ?ImportError: No module named wpf? I?ve pointed the Engine to the system path. System.dll and mscorlib.dll have been loaded using the following code: engine.Runtime.LoadAssembly(typeof(string).Assembly); engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly); Does anyone know where I?m going wrong and how I can sort out this import? I?m on IPy 2.7.4. Regards, Matthew _______________________________________________ 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 m.schaber at codesys.com Tue Nov 4 12:45:03 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Tue, 4 Nov 2014 11:45:03 +0000 Subject: [Ironpython-users] Integrating a WPF IPy program with C# In-Reply-To: References: Message-ID: <727D8E16AE957149B447FE368139F2B539D69F9F@SERVER10> Hi, Matthew, I think for loading the DLL, you could also use the clr module from python, it has functions like AddReference, AddReferenceToFile, AddReferenceByName and AddReferenceByPartialName. The STA thread is always necessary for WPF and Windows Forms, AFAIK, and it has to be set at the main entry function. There?s nothing one can do later (once the application is running) about this? 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 Love, Matthew Gesendet: Dienstag, 4. November 2014 11:48 An: Slide Cc: ironpython-users at python.org Betreff: Re: [Ironpython-users] Integrating a WPF IPy program with C# I got it sorted in the end. I?ll post what I did for completion. To run programs that depended on WPF, two things were needed. First, had to load the wpf dll manually into the IronPython engine?s runtime. var wpf_path = @"C:\Program Files (x86)\IronPython 2.7\DLLs\IronPython.Wpf.dll"; var wpf_dll = Assembly.LoadFile(wpf_path); engine.Runtime.LoadAssembly(wpf_dll); Secondly, make the main function a STA Thread. I put this just before Main?s definition. [STAThread] static void Main(string[] args) Hope this helps anyone in the future, Matthew From: Slide [mailto:slide.o.mix at gmail.com] Sent: Monday, November 03, 2014 5:51 PM To: Love, Matthew Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Integrating a WPF IPy program with C# It might help if you provide some code in a gist or something. Without that, its going to be difficult for anyone to help. On Mon, Nov 3, 2014 at 6:32 AM, Love, Matthew > wrote: Hi IronPython users, I?ve created a C# program that runs an IronPython script. The script contains a GUI built in WPF. When I call it using the IronPython Engine in C#, I get the following error: ?ImportError: No module named wpf? I?ve pointed the Engine to the system path. System.dll and mscorlib.dll have been loaded using the following code: engine.Runtime.LoadAssembly(typeof(string).Assembly); engine.Runtime.LoadAssembly(typeof(System.Diagnostics.Debug).Assembly); Does anyone know where I?m going wrong and how I can sort out this import? I?m on IPy 2.7.4. Regards, Matthew _______________________________________________ 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 no_reply at codeplex.com Wed Nov 5 09:28:16 2014 From: no_reply at codeplex.com (CodePlex) Date: 5 Nov 2014 00:28:16 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] Specific case causes traceback to be incomplete 2. [New comment] simplify use of .net enumeration 3. [Status update] simplify use of .net enumeration ---------------------------------------------- ISSUES 1. [New comment] Specific case causes traceback to be incomplete http://ironpython.codeplex.com/workitem/35204 User paweljasinski has commented on the issue: "

due to regression I had to roll back this fix. I have overlooked traceback tests.

"----------------- 2. [New comment] simplify use of .net enumeration http://ironpython.codeplex.com/workitem/35650 User paweljasinski has commented on the issue: "

I tried it as well and can not reproduce. It looked like a valid complain. I think the issue reported on stackoverflow is deeper, but the bug is not necessarily in IronPython.
For the reference I have created a complete project https://github.com/paweljasinski/ironsnips/tree/master/dotnetenums

"----------------- 3. [Status update] simplify use of .net enumeration http://ironpython.codeplex.com/workitem/35650 User paweljasinski has updated the issue: Status has changed from Proposed to Closed with the following comment, "can not reproduce" ---------------------------------------------- ---------------------------------------------- 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 Wed Nov 5 13:43:48 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 5 Nov 2014 12:43:48 +0000 Subject: [Ironpython-users] using IronPython with pycrypto In-Reply-To: References: Message-ID: On Mon, Nov 3, 2014 at 3:20 PM, Slide wrote: > This brings up an interesting question. How much of a pure .NET > implementation do we want to keep in IronPython? Do we want to try and pull > something like IronClad into IronPython to provide compatibility, or > implement the important modules in .NET? Anything that ships with Python should be pure .NET (or as close to pure, stuff like msvcrt notwithstanding). I would love to see something like IronClad included but not without a commitment to maintain it. - Jeff From slide.o.mix at gmail.com Wed Nov 5 14:16:12 2014 From: slide.o.mix at gmail.com (Slide) Date: Wed, 05 Nov 2014 13:16:12 +0000 Subject: [Ironpython-users] using IronPython with pycrypto References: Message-ID: That was my feeling as well, just wanted to clarify. I've been looking at IronClad, but the build setup is odd and I haven't had much time. On Wed Nov 05 2014 at 5:43:48 AM Jeff Hardy wrote: > On Mon, Nov 3, 2014 at 3:20 PM, Slide wrote: > > This brings up an interesting question. How much of a pure .NET > > implementation do we want to keep in IronPython? Do we want to try and > pull > > something like IronClad into IronPython to provide compatibility, or > > implement the important modules in .NET? > > Anything that ships with Python should be pure .NET (or as close to > pure, stuff like msvcrt notwithstanding). I would love to see > something like IronClad included but not without a commitment to > maintain it. > > - Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Nov 6 09:21:44 2014 From: no_reply at codeplex.com (CodePlex) Date: 6 Nov 2014 00:21:44 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/5/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] NotImplementedError: buffer_info not implemented for the array module 2. [New comment] NotImplementedError: buffer_info not implemented for the array module 3. [New comment] Ipy Crash...Please help 4. [New comment] % formatting for '%f#...' and '%g#...' are broken 5. [New comment] dict.copy() raises SystemError if None is used as a key ---------------------------------------------- ISSUES 1. [New comment] NotImplementedError: buffer_info not implemented for the array module http://ironpython.codeplex.com/workitem/23778 User slide_o_mix has commented on the issue: "

I hate the font on CodePlex...

"----------------- 2. [New comment] NotImplementedError: buffer_info not implemented for the array module http://ironpython.codeplex.com/workitem/23778 User slide_o_mix has commented on the issue: "

I just checked and buffer_inFo IS implemented in the array module now.

"----------------- 3. [New comment] Ipy Crash...Please help http://ironpython.codeplex.com/workitem/34567 User slide_o_mix has commented on the issue: "

Also, it says a crash report was saved in the LabVIEW folder, can you look at that and attach any useful information?

"----------------- 4. [New comment] % formatting for '%f#...' and '%g#...' are broken http://ironpython.codeplex.com/workitem/35581 User slide_o_mix has commented on the issue: "

That files doesn't seem to exist in the repo.

https://github.com/IronLanguages/main/tree/master/Languages/IronPython/Tests

"----------------- 5. [New comment] dict.copy() raises SystemError if None is used as a key http://ironpython.codeplex.com/workitem/35626 User slide_o_mix has commented on the issue: "

Fixed in 290d0a

" ---------------------------------------------- ---------------------------------------------- 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 Nov 7 09:21:24 2014 From: no_reply at codeplex.com (CodePlex) Date: 7 Nov 2014 00:21:24 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/6/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] Integrate Ironclad 2. [Status update] How To Access from C# python list of multi elements 3. [New comment] Run IronPyhton application as a service 4. [New comment] Missing wiki page: https://github.com/IronLanguages/main/compare/ipy-2.7.4...ipy-2.7.5-b2 5. [New comment] % formatting for '%f#...' and '%g#...' are broken ---------------------------------------------- ISSUES 1. [Status update] Integrate Ironclad http://ironpython.codeplex.com/workitem/33472 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "I'm calling this one a duplicate of cp11333"----------------- 2. [Status update] How To Access from C# python list of multi elements http://ironpython.codeplex.com/workitem/34641 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Please use the mailing list for questions. https://mail.python.org/mailman/listinfo/ironpython-users"----------------- 3. [New comment] Run IronPyhton application as a service http://ironpython.codeplex.com/workitem/34690 User slide_o_mix has commented on the issue: "

Are you looking for some type of service wrapper?

"----------------- 4. [New comment] Missing wiki page: https://github.com/IronLanguages/main/compare/ipy-2.7.4...ipy-2.7.5-b2 http://ironpython.codeplex.com/workitem/35563 User jdhardy has commented on the issue: "

Looks like it's copy-paste error in http://blog.ironpython.net/2014/05/ironpython-275-beta-2-released.html. I'll try to remember to fix it up.

"----------------- 5. [New comment] % formatting for '%f#...' and '%g#...' are broken http://ironpython.codeplex.com/workitem/35581 User paweljasinski has commented on the issue: "

It is still in a pipeline: https://github.com/IronLanguages/main/pull/228

" ---------------------------------------------- ---------------------------------------------- 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 Fri Nov 7 20:11:23 2014 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Fri, 7 Nov 2014 12:11:23 -0700 Subject: [Ironpython-users] Ironpython and Android Message-ID: Hi All, I was wondering if there is a plan to have IronPython supported on Android. I wanted to spend some time to help out in that arena. I am thinking about getting an Xamarin developer license but not sure where I to start. Is there somewhere I can look to see what areas need to be worked on for Android support? I'm just trying to figure out how to help out I'm basically a newb in this area. Thanks Danny -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Sat Nov 8 14:06:25 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Sat, 8 Nov 2014 13:06:25 +0000 Subject: [Ironpython-users] Ironpython and Android In-Reply-To: References: Message-ID: On Fri, Nov 7, 2014 at 7:11 PM, Daniel Fernandez wrote: > Hi All, > > > > I was wondering if there is a plan to have IronPython supported on > Android. I wanted to spend some time to help out in that arena. I am > thinking about getting an Xamarin developer license but not sure where I to > start. Is there somewhere I can look to see what areas need to be worked on > for Android support? I?m just trying to figure out how to help out I?m > basically a newb in this area. > I did some work on it a while back, and it is possible to get it to run. Xamarin has come a long way since then so it's probably even easier now. However to make it really shine there needs to be some work done on the internals (the Platform Adaptation Layer - PAL - is not consistently used and doesn't cover everything) and I was more interested in saving that for IronPython 3. I also want to make the core IronPython libraries PCL-compatible, and have platform assemblies contain all of the platform-specific stuff. If you look in the build scripts (Solutions/Build.IronPython.xml is the starting point) you can see all of the platform-specific accommodations. It would just have to be extended to Android, and the proper FEATURE_ defines added. IronPython 3 (https://github.com/IronLanguages/ironpython3) has a nicer build system that should be a lot easier to work with. I really, really want to see Android and iPhone versions of IronPython, so any way to share the work is more than welcome. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Nov 11 09:21:53 2014 From: no_reply at codeplex.com (CodePlex) Date: 11 Nov 2014 00:21:53 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/10/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] IronPython 2.7.5 B3 does not work with Pyro 4 2. [New issue] ssl default to SSL v2 ---------------------------------------------- ISSUES 1. [New issue] IronPython 2.7.5 B3 does not work with Pyro 4 http://ironpython.codeplex.com/workitem/35667 User yngipy has proposed the issue: "Issue: Using Pyro4 in IronPython 2.7.5 B3 does not work. It works with IronPython 2.7.4. Did we have changes in pickling? Configuration: Windows 8.1 Pro 32-bit Steps to reproduce: Download and install IronPython 2.7.5 B3 Download Serpent (1.7) tar.gz file Extract Serpent Change directory to the extracted location Install Serpent - ipy.exe setup.py install Download Pyro 4 (4.30) tar.gz fie Extract Pyro 4 Change to the extracted folder for Pyro 4. Install Pyro 4 - ipy.exe setup.py install Run attached server.py Run attached client.py Notice that client.py raises TypeError exception, see below: Traceback (most recent call last): File "client2.py", line 8, in File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\core.py", line 231, in getattr File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\core.py", line 475, in _pyroGetMetadata File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\core.py", line 466, in _Proxy__pyroCreateConnection File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\util.py", line 167, in serializeCall File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\util.py", line 449, in dumpsCall File "d:\ipy\lib\site-packages\serpent-1.7-py2.7.egg\serpent.py", line 306, in ser_builtins_tuple File "d:\ipy\lib\site-packages\serpent-1.7-py2.7.egg\serpent.py", line 233, in _serialize File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\core.py", line 483, in _pyroGetMetadata File "d:\ipy\lib\site-packages\pyro4-4.30-py2.7.egg\Pyro4\core.py", line 357, in _pyroInvoke File "d:\ipy\lib\site-packages\serpent-1.7-py2.7.egg\serpent.py", line 67, in dumps File "d:\ipy\lib\site-packages\serpent-1.7-py2.7.egg\serpent.py", line 222, in serialize File "d:\ipy\lib\site-packages\serpent-1.7-py2.7.egg\serpent.py", line 254, in _serialize TypeError: type objects are unhashable"----------------- 2. [New issue] ssl default to SSL v2 http://ironpython.codeplex.com/workitem/35668 User paweljasinski has proposed the issue: "ssl connections defaults to SSL v2. cpython 2.7.8 under linux, cygwin and win32 defaults to TLS 1.2 This causes IOError: System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host during the initial handshake (server drops connection right after Client Hello) more details under: http://stackoverflow.com/questions/26810705/ironpython-urllib2-basic-auth-exceptions-shopify/26847407#26847407" ---------------------------------------------- ---------------------------------------------- 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 Nov 12 09:23:54 2014 From: no_reply at codeplex.com (CodePlex) Date: 12 Nov 2014 00:23:54 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] Silverlight.net links broken 2. [New comment] Run IronPyhton application as a service 3. [New comment] ssl default to SSL v2 4. [New comment] ssl default to SSL v2 5. [New comment] ssl default to SSL v2 ---------------------------------------------- ISSUES 1. [New comment] Silverlight.net links broken http://ironpython.codeplex.com/workitem/33933 User slide_o_mix has commented on the issue: "

Looks like the page in question no longer exists either...

"----------------- 2. [New comment] Run IronPyhton application as a service http://ironpython.codeplex.com/workitem/34690 User javierpr19 has commented on the issue: "

Hi slide_o_mix,

Can you recommend me any service wrapper for Iron Python?

Thanks in advance

"----------------- 3. [New comment] ssl default to SSL v2 http://ironpython.codeplex.com/workitem/35668 User jdhardy has commented on the issue: "

*That's* what that is. I was trying out pip and got the same error. (Seriously, SSLv2? Might as well just use HTTP...)

No way 2.7.5 is going out with this.

"----------------- 4. [New comment] ssl default to SSL v2 http://ironpython.codeplex.com/workitem/35668 User paweljasinski has commented on the issue: "

I have submitted PR: https://github.com/IronLanguages/main/pull/235

"----------------- 5. [New comment] ssl default to SSL v2 http://ironpython.codeplex.com/workitem/35668 User paweljasinski has commented on the issue: "

fixed in 152eccb6a23185a672e99f2738827f42c8965117

" ---------------------------------------------- ---------------------------------------------- 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 Nov 14 09:24:37 2014 From: no_reply at codeplex.com (CodePlex) Date: 14 Nov 2014 00:24:37 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/13/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] UnboundName on invoking member for DynamicObject 2. [New issue] Fail to display WPF window containing TreeView by Python script ---------------------------------------------- ISSUES 1. [New issue] UnboundName on invoking member for DynamicObject http://ironpython.codeplex.com/workitem/35679 User domtop has proposed the issue: "Using IronPython 2.7.4 (nuget) I create a very simple class derived from DynamicObject and set the breakpoint in TryInvokeMember public class TestProxy : DynamicObject { public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result) { return base.TryInvokeMember(binder, args, out result); } } I create a script scope and do scope.SetVariable("test", new TestProxy()); Then I execute the string test.Something() and expected to hit the breakpoint. However it seems that IronPython considers Something is an attribute and call TryGetMember. If test is a regular C# object, everything works as usual so it seems to have difficulty with DynamicObject. As I have been using DynamicObject to create proxies, I cannot use it in a hosted ironpython session..."----------------- 2. [New issue] Fail to display WPF window containing TreeView by Python script http://ironpython.codeplex.com/workitem/35681 User syang has proposed the issue: "IronPython 2.7.4 is used. When a Python script to display a TreeView in a WPF window by calling the method ShowDialog, it could not display the window with Error message "Cannot access Freezable 'System.Windows.Media.SolidColorBrush' across threads because it cannot be frozen". ScriptSource.Execute(ScriptScope) is called to execute the Python script. How does method Execute() handle access of WPF UI Thread?" ---------------------------------------------- ---------------------------------------------- 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 Nov 15 09:28:36 2014 From: no_reply at codeplex.com (CodePlex) Date: 15 Nov 2014 00:28:36 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] UnboundName on invoking member for DynamicObject 2. [New comment] Fail to display WPF window containing TreeView by Python script 3. [New comment] Fail to display WPF window containing TreeView by Python script 4. [New issue] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. ---------------------------------------------- ISSUES 1. [New comment] UnboundName on invoking member for DynamicObject http://ironpython.codeplex.com/workitem/35679 User MarkusSchaber has commented on the issue: "

As far as I know, IronPython always uses TryGetMember, and then tries to invoke what it gets there. This is according to the python semantics, where member access and calling are two separate steps.

Maybe you can appropriately override TryGetMember to support your use case?

"----------------- 2. [New comment] Fail to display WPF window containing TreeView by Python script http://ironpython.codeplex.com/workitem/35681 User MarkusSchaber has commented on the issue: "

As far as I know, not at all.

In other words, the script executes just in the thread which is calling ScriptSource.Execute(). (At least, as long as the script itsself does not spawn other threads...)

But as this is an user question and not a bug report, you should better ask it on the mailing list instead of here.

"----------------- 3. [New comment] Fail to display WPF window containing TreeView by Python script http://ironpython.codeplex.com/workitem/35681 User syang has commented on the issue: "

Thank you MarkusSchaber for your response. ScriptSource.Execute() does not try to access UI even though the Python script could creates a window and display it to the user. Is there anyway to display a WPF window safely and reliably? As the previous message stated, my case could display the window correctly once.

"----------------- 4. [New issue] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has proposed the issue: "After installing IronPython 2.7.5b2 and later 2.7.5b3 we started getting following exception very frequently while running our IronPython build scripts: ValueError: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index Running some of our scripts multiple times with identical input parameters gives very unpredictable results - sometime exception is raised (but almost always in different places in code), sometime script run passes without exception. Prior to version 2.7.5b3, we used IronPython 2.7.3 and never had exception such as "ValueError: Index was out of range..." running the same code that with v2.7.5 throws this type of exception. I am afraid it would be not very useful to provide any more details (code samples, etc), because exception is thrown in various, seemingly totally unrelated, places while running the same piece of code with identical input parameters for every code run. Exception message " Index was out of range. Must be non-negative and less than the size of the collection." indicates that it is thrown from underlying .NET platform, it is not native standard Python exception message. Can someone please take a look at this issue - it is showstopper for IronPython use in our company, as was some other bug in IP 2.7.4 that prevented us to upgrade from version 2.7.3 that we still must use (due to regressions in newer versions)." ---------------------------------------------- ---------------------------------------------- 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 Nov 16 09:24:49 2014 From: no_reply at codeplex.com (CodePlex) Date: 16 Nov 2014 00:24:49 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] IronPython 2.7.5 B3 does not work with Pyro 4 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 5. [New issue] installing pylint with pip produces errors 6. [New comment] installing pylint with pip produces errors ---------------------------------------------- ISSUES 1. [New comment] IronPython 2.7.5 B3 does not work with Pyro 4 http://ironpython.codeplex.com/workitem/35667 User paweljasinski has commented on the issue: "

pylint suffers from the same problem

"----------------- 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

> I am afraid it would be not very useful to provide any more details (code samples, etc), because exception is thrown in various, seemingly totally unrelated, places while running the same piece of code with identical input parameters for every code run.

It is very difficult to fix something without being able to reproduce it.
Any chance to see something what throws the exception, even if it is random?

"----------------- 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

Running pylint over a complex project appears to trigger similar problem:
```
Exception in generator <generator object at 0x000000000000002C> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception in generator <generator object at 0x000000000000002E> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception in generator <generator object at 0x000000000000002F> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
```

"----------------- 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

@s3e3 Can you at least show the stack traces?

"----------------- 5. [New issue] installing pylint with pip produces errors http://ironpython.codeplex.com/workitem/35683 User paweljasinski has proposed the issue: "install appear to work, but the error is confusing $ ~/github/IronLanguages/bin/Debug/Scripts/pip2.7.exe -v install colorama Downloading/unpacking colorama C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no parameters # urllib3/connectionpool.py Using version 0.3.2 (newest of versions: 0.3.2, 0.3.2, 0.3.1, 0.3.1, 0.3.0, 0.2.7, 0.2.7, 0.2.6, 0.2.6, 0.2.5, 0.2.5, 0.2.4, 0.2.4, 0.2.3, 0.2.3, 0.2.2, 0.2.2, 0.2.1, 0.2.1, 0.2.0, 0.2.0, 0.1.18, 0.1.18, 0.1.17, 0.1.17, 0.1.16, 0.1.16, 0.1.15, 0.1.15, 0.1.14, 0.1.14, 0.1.13, 0.1.13, 0.1.12, 0.1.12, 0.1.11, 0.1.11, 0.1.10, 0.1.10, 0.1.9, 0.1.9, 0.1.8, 0.1.8, 0.1.7, 0.1.7, 0.1.6, 0.1.6, 0.1.5, 0.1.5, 0.1.4, 0.1.4, 0.1.3, 0.1.3, 0.1.2, 0.1.2, 0.1.1, 0.1.1, 0.1) Downloading colorama-0.3.2.tar.gz Downloading from URL https://pypi.python.org/packages/source/c/colorama/colorama-0.3.2.tar.gz#md5=2949d760dfe510a74f5bf4287d474f33 (from https://pypi.python.org/simple/colorama/) Running setup.py (path:c:\cygwin64\tmp\pip_build_rejap\colorama\setup.py) egg_info for package colorama Error processing line 1 of C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\lib\site-packages\logilab_common-0.63.0-py2.7-nspkg.pth: Traceback (most recent call last): File "C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site.py", line 164, in addpackage exec line File "", line 1, in AttributeError: 'module' object has no attribute '_getframe' Remainder of file ignored :1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef running egg_info creating pip-egg-info\colorama.egg-info writing dependency_links to pip-egg-info\colorama.egg-info\dependency_links.txt writing pip-egg-info\colorama.egg-info\PKG-INFO writing top-level names to pip-egg-info\colorama.egg-info\top_level.txt writing manifest file 'pip-egg-info\colorama.egg-info\SOURCES.txt' warning: manifest_maker: standard file '-c' not found reading manifest file 'pip-egg-info\colorama.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pip-egg-info\colorama.egg-info\SOURCES.txt' Installing collected packages: colorama Running setup.py install for colorama Error processing line 1 of C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\lib\site-packages\logilab_common-0.63.0-py2.7-nspkg.pth: Traceback (most recent call last): File "C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site.py", line 164, in addpackage exec line File "", line 1, in AttributeError: 'module' object has no attribute '_getframe' Remainder of file ignored :1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef running install running build running build_py creating build creating build\lib creating build\lib\colorama copying colorama\ansi.py -> build\lib\colorama copying colorama\ansitowin32.py -> build\lib\colorama copying colorama\initialise.py -> build\lib\colorama copying colorama\win32.py -> build\lib\colorama copying colorama\winterm.py -> build\lib\colorama copying colorama\__init__.py -> build\lib\colorama warning: build_py: byte-compiling is disabled, skipping. running install_lib creating C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\ansi.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\ansitowin32.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\initialise.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\win32.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\winterm.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama copying build\lib\colorama\__init__.py -> C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama warning: install_lib: byte-compiling is disabled, skipping. running install_egg_info running egg_info writing dependency_links to colorama.egg-info\dependency_links.txt writing colorama.egg-info\PKG-INFO writing top-level names to colorama.egg-info\top_level.txt warning: manifest_maker: standard file '-c' not found reading manifest file 'colorama.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'colorama.egg-info\SOURCES.txt' Copying colorama.egg-info to C:\cygwin64\home\rejap\github\IronLanguages\bin\Debug\Lib\site-packages\colorama-0.3.2-py2.7.egg-info running install_scripts writing list of installed files to 'c:\cygwin64\tmp\pip-xb84lz-record\install-record.txt' Successfully installed colorama Cleaning up... Removing temporary dir c:\cygwin64\tmp\pip_build_rejap... rejap at WIN-CUE1I6EN9JB ~ "----------------- 6. [New comment] installing pylint with pip produces errors http://ironpython.codeplex.com/workitem/35683 User paweljasinski has commented on the issue: "

the problem originates in lib\site-packages\logilab_common-0.63.0-py2.7-nspkg.pth
This pops on any ipy execution without frames enabled once logilab-common is installed.

" ---------------------------------------------- ---------------------------------------------- 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 trinderjohn at talktalk.net Sun Nov 16 22:48:07 2014 From: trinderjohn at talktalk.net (John Trinder) Date: Sun, 16 Nov 2014 21:48:07 +0000 Subject: [Ironpython-users] How to direct print output to the Console in a windows standalone? Message-ID: <54691B97.4090406@talktalk.net> Hi, I didn't know whether this is the correct site for help from the IP community but here goes. I have a DLL written in C# that opens a Console window inside a Windows app. I am utilizing this for use with IronPython when creating a Windows app as a standalone that needs the Console window along with the other windows. It works fine doing for eg, Console.WriteLine() but output from the IP print method is not displayed. How can I tell IP to send output from 'print' to the Console? I'm sure the answer is simple but I'm out of ideas. Thanks for any help given. PS I've attached the .cs file if anyone's interested in how it's done (NB. I didn't create the code) -------------- next part -------------- ?using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; using System.Security; namespace MyConsole { /// /// Do ConsoleManager.Show() followed by Console.WritLine(), etc /// [SuppressUnmanagedCodeSecurity] public static class ConsoleManager { private const string Kernel32_DllName = "kernel32.dll"; [DllImport(Kernel32_DllName)] private static extern bool AllocConsole(); [DllImport(Kernel32_DllName)] private static extern bool FreeConsole(); [DllImport(Kernel32_DllName)] private static extern IntPtr GetConsoleWindow(); [DllImport(Kernel32_DllName)] private static extern int GetConsoleOutputCP(); public static bool HasConsole { get { return GetConsoleWindow() != IntPtr.Zero; } } /// /// Creates a new console instance if the process is not attached to a console already. /// public static void Show() { //#if DEBUG if (!HasConsole) { AllocConsole(); InvalidateOutAndError(); } //#endif } /// /// If the process has a console attached to it, it will be detached and no longer visible. Writing to the System.Console is still possible, but no output will be shown. /// public static void Hide() { //#if DEBUG if (HasConsole) { SetOutAndErrorNull(); FreeConsole(); } //#endif } public static void Toggle() { if (HasConsole) { Hide(); } else { Show(); } } private static void InvalidateOutAndError() { Type type = typeof(System.Console); System.Reflection.FieldInfo _out = type.GetField("_out", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); System.Reflection.FieldInfo _error = type.GetField("_error", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); System.Reflection.MethodInfo _InitializeStdOutError = type.GetMethod("InitializeStdOutError", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic); Debug.Assert(_out != null); Debug.Assert(_error != null); Debug.Assert(_InitializeStdOutError != null); _out.SetValue(null, null); _error.SetValue(null, null); _InitializeStdOutError.Invoke(null, new object[] { true }); } private static void SetOutAndErrorNull() { Console.SetOut(TextWriter.Null); Console.SetError(TextWriter.Null); } } } From pawel.jasinski at gmail.com Sun Nov 16 23:58:14 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Sun, 16 Nov 2014 23:58:14 +0100 Subject: [Ironpython-users] How to direct print output to the Console in a windows standalone? In-Reply-To: <54691B97.4090406@talktalk.net> References: <54691B97.4090406@talktalk.net> Message-ID: hi, On Sun, Nov 16, 2014 at 10:48 PM, John Trinder wrote: > Hi, > I didn't know whether this is the correct site for help from the IP > community but here goes. > > I have a DLL written in C# that opens a Console window inside a Windows app. > I am utilizing this for use with IronPython when creating a Windows app as a > standalone that needs the Console window along with the other windows. > > It works fine doing for eg, Console.WriteLine() but output from the IP print > method is not displayed. > > How can I tell IP to send output from 'print' to the Console? I'm sure the > answer is simple but I'm out of ideas. Just as an inspiration http://stackoverflow.com/questions/24456530/capture-python-print-statements-in-c-sharp/24489136#24489136 > > Thanks for any help given. > > PS I've attached the .cs file if anyone's interested in how it's done (NB. I > didn't create the code) > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > From no_reply at codeplex.com Mon Nov 17 09:21:42 2014 From: no_reply at codeplex.com (CodePlex) Date: 17 Nov 2014 00:21:42 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 2. [New issue] How to direct print output to the Console in a windows standalone? ---------------------------------------------- ISSUES 1. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

This piece of code is run:

```
>>> from config.datastores import datastores
>>> ds = datastores['remote']
>>> p = ds.products[1]
>>> pds = ds.product(p)
>>> from version_number import IncrementalVersionNumber
>>> v2 = IncrementalVersionNumber('14.14.0')
>>> v1 = IncrementalVersionNumber('14.13.0')
>>> r = pds.reports.build_spec_diff(v2, v1)
```

Result of this code ("r" variable) should be build specification difference, i.e. new component versions in a particular product version compared to some older product version.

Build specification difference is calculated by first instantiating build specification objects from build datastore (huge collection of yaml documents) and diff-ing them afterwards.

For one run result is:

```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "D:\Build\lib\datastore\reports.py", line 122, in build_spec_diff
frombuild = self._get_cached_build_spec(fromversion) if fromversion \
File "D:\Build\lib\datastore\reports.py", line 108, in _get_cached_build_spec
bs = self._pdatastore.buildspecs[version]
File "D:\Build\lib\datastore\__init__.py", line 1693, in __getitem__
return self._denormitem(self._normalized_item(path),
File "D:\Build\lib\datastore\__init__.py", line 1703, in _denormitem
item.workitems = self._denorm_work_items(normalized_item.work_item_ids,
File "D:\Build\lib\datastore\__init__.py", line 1712, in _denorm_work_items
return WorkItemsSequence([self._remove_other_builds_dependencies(
File "D:\Build\lib\datastore\reports.py", line 23, in f
depsseq = AutoSortableMutableSequence(deps)
File "D:\Build\lib\coll.py", line 20, in __init__
self._items = sorted(sequence)
File "D:\Build\lib\util.py", line 171, in __lt__
return self._compare(other, operator.lt)
File "D:\Build\lib\util.py", line 177, in _compare
return comparison_func(self._comparison_key,
File "D:\Build\lib\datastore\collitem.py", line 81, in _comparison_key
return self.id
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
```


Result for another run:

```
Exception in generator <generator object at 0x0000000000000040> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
```


For yet another run:

```
Exception in generator <generator object at 0x0000000000000040> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception in generator <generator object at 0x000000000000005F> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Exception in generator <generator object at 0x0000000000000061> ignored
Traceback (most recent call last):
ValueError: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
```


For some other code run there is no exception at all, for another there is different stack trace, etc...

"----------------- 2. [New issue] How to direct print output to the Console in a windows standalone? http://ironpython.codeplex.com/workitem/35688 User johntrinder has proposed the issue: "Hi, I didn't know whether this is the correct site for help from the IP community but here goes. I have a DLL written in C# that opens a Console window inside a Windows app. I am utilizing this for use with IronPython when creating a Windows app as a standalone that needs the Console window along with the other windows. It works fine doing for eg, Console.WriteLine() but output from the IP print method is not displayed. How can I tell IP to send output from 'print' to the Console? I'm sure the answer is simple but I'm out of ideas. Thanks for any help given. PS I've attached the .cs file if anyone's interested in how it's done (NB. I didn't create the code)" ---------------------------------------------- ---------------------------------------------- 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 Nov 18 09:22:41 2014 From: no_reply at codeplex.com (CodePlex) Date: 18 Nov 2014 00:22:41 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 5. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 6. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 7. [New comment] How to direct print output to the Console in a windows standalone? ---------------------------------------------- ISSUES 1. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

this is consistent with what I get out of pylint runs.
Another question. I assume you are using generators. Can you take a look at your code base and tell me what features of generators do you use.
We are looking for all places where `yield` comes up.

Do you use `yield` inside `try`?
Do you use `yield` inside `except`?
Do you use expression returned by `yield`?
Any other particular features of generators out of PEP342?

Thanks in advance


"----------------- 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User jdhardy has commented on the issue: "

One option that might help is to use `-X:ShowClrExceptions -X:ExceptionDetail` if you're using ipy.exe. If you're hosting you can set them as engine options. That might at least give you the CLR stack trace.

It's odd that nothing in the test suite triggers it, but I know we don't have 100% coverage.

"----------------- 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

I think, there is a workaround. Each of your generators must be deleted at the end of its scope.

"----------------- 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

This is caused by generator finalizer, run in the finalizer thread to call indirectly MoveNext.
This happens only if to generator did not hit the end of generator function and didn't get explicit close/delete.

"----------------- 5. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

here is another generator cp, which hints at the problem: https://ironpython.codeplex.com/workitem/17255

"----------------- 6. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

I have checked our codebase, and it seems that:

1. yield is never used inside try or except block
2. values returned by yield are used further in the code
3. features from PEP342 are not used

Here is one example of generator use in our code:

```
class IndexedSpecSequence(SpecSequence):

def __init__(self, sequence):
self._items = []
self._index = {}
for i in sequence:
bisect.insort(self._items, i)
self._add_to_index(i)
```

Here, "sequence" argument in \__init__ is actually generator expression, e.g. ("ComponentVersionsSequence is subclass of "IndexedSpecSequence"):

```
def _denorm_component_versions(self, component_version_ids):
return ComponentVersionsSequence(self._datastore.component_versions[i]
for i in component_version_ids)
```

"----------------- 7. [New comment] How to direct print output to the Console in a windows standalone? http://ironpython.codeplex.com/workitem/35688 User johntrinder has commented on the issue: "

With help from the community I figured out the solution. Basically sys.stdout (which the print statement uses) needs to be modified. I created an IP wrapper module around the DLL that exposes the Console window to a Windows app. It's as follows:

```
import clr
from System import Environment, EnvironmentVariableTarget

_mylib = Environment.GetEnvironmentVariable('IRONPYTHON_MYLIB', EnvironmentVariableTarget.User)
clr.AddReferenceToFileAndPath(_mylib + r"\_CSASSEMBLIES\MyConsole.dll")

from System import Console
import sys
from MyConsole import ConsoleManager

class _proxy():
def __init__(self):
return

def write(self, string):
Console.Write(string)

sys.stdout = _proxy() #global - once set doesn't need resetting
```
Hope someone finds this useful on the odd occasion that it may be needed:)

" ---------------------------------------------- ---------------------------------------------- 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 Nov 19 09:22:55 2014 From: no_reply at codeplex.com (CodePlex) Date: 19 Nov 2014 00:22:55 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] Run IronPyhton application as a service 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 5. [New issue] TypeError: type objects are unhashable ---------------------------------------------- ISSUES 1. [New comment] Run IronPyhton application as a service http://ironpython.codeplex.com/workitem/34690 User slide_o_mix has commented on the issue: "

There are currently no service wrappers for IronPython that I know of.

"----------------- 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

I was wrong, the workaround is to use close not delete.

"----------------- 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

I have created pull request https://github.com/IronLanguages/main/pull/237
Please, read the comments in PR.
@s3e3 - how can we test the patch against your scripts? Are you able to rebuild IronPython from source. If not I can try to make a developer build for you.

"----------------- 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

Sorry for not providing responses more promptly, we are in the middle of very intensive project which consumes almost all of my time these days.

I have downloaded IronLanguages-cp35682.zip, and after I install VS2013 today or tomorrow I will try to build and run patched IronPython, and report the results.

"----------------- 5. [New issue] TypeError: type objects are unhashable http://ironpython.codeplex.com/workitem/35697 User adal has proposed the issue: "The following code fails in IronPython 2.7.5b3, but works in CPython 2.7.7: # Throws TypeError: type objects are unhashable type({}) in {} # Because of the above issue, the following 3rd party library also doesn't work # First install PyYAML - https://pypi.python.org/pypi/PyYAML import yaml yaml.dump({}) " ---------------------------------------------- ---------------------------------------------- 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 andy at britishideas.com Wed Nov 19 23:35:55 2014 From: andy at britishideas.com (Andrew Ayre) Date: Wed, 19 Nov 2014 22:35:55 +0000 Subject: [Ironpython-users] GUI Toolkits Message-ID: <546D1B4B.5060001@britishideas.com> Hi, Which GUI toolkits can be made to work with embedded IronPython? For my users understanding CLR/WinForms/.NET types is too much of a learning curve, so I need something much simpler that uses only python types, for example. This page: https://ironpython-test.readthedocs.org/en/latest/faq/gui.html seems to be for IronPython but the content appears to be generic c-python and doesn't apply. Tcl/Tk would be ideal I think. Thanks, Andy -- Andy PGP Key ID: 0xDC1B5864 From h.kutschbach at ilnumerics.net Thu Nov 20 00:47:01 2014 From: h.kutschbach at ilnumerics.net (Haymo Kutschbach) Date: Thu, 20 Nov 2014 00:47:01 +0100 Subject: [Ironpython-users] GUI Toolkits In-Reply-To: <546D1B4B.5060001@britishideas.com> References: <546D1B4B.5060001@britishideas.com> Message-ID: <037401d00453$1dc8f410$595adc30$@ilnumerics.net> Andy, for my understanding one of the biggest advantage of having IronPython is to actually be able to use things like winforms? As for all systems it will require some learning to begin with, of course. But in fact very little is required in order to get so much more than any of the systems mentioned in your link is able to provide. If you need a very newbee example: I recently had some fun experimenting with IronPython to create interactive scientific 3d plots in less than 10 lines: http://ilnumerics.net/blog/plotting-fun-with-ilnumerics-and-ironpython/ Having winforms and the whole .NET framework in the back, I can hardly imagine to recommend Tcl/TK any time soon... ;) Best, Haymo -- -----Original Message----- From: Ironpython-users [mailto:ironpython-users-bounces+h.kutschbach=ilnumerics.net at python.org] On Behalf Of Andrew Ayre Sent: Mittwoch, 19. November 2014 23:36 To: ironpython-users at python.org Subject: [Ironpython-users] GUI Toolkits Hi, Which GUI toolkits can be made to work with embedded IronPython? For my users understanding CLR/WinForms/.NET types is too much of a learning curve, so I need something much simpler that uses only python types, for example. This page: https://ironpython-test.readthedocs.org/en/latest/faq/gui.html seems to be for IronPython but the content appears to be generic c-python and doesn't apply. Tcl/Tk would be ideal I think. Thanks, Andy -- Andy PGP Key ID: 0xDC1B5864 _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Thu Nov 20 09:27:28 2014 From: no_reply at codeplex.com (CodePlex) Date: 20 Nov 2014 00:27:28 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/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] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 5. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 6. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 7. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 8. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 9. [New issue] os.access when file is missing inconsistent with cpython ---------------------------------------------- ISSUES 1. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User jdhardy has commented on the issue: "

@s3e3: Easiest way to build is to run `make.cmd` from the root of the checkout; then you should have `bin\Debug\ipy.exe`. You may have to run `Scripts\Bat\Dev.bat` to make it work cleanly from a checkout.

"----------------- 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User jdhardy has commented on the issue: "

@paweljasinski: How did you go from "ValueError: Index was out of range..." to generator finalizers? I'm just curious.

"----------------- 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

The actual error `Exception in generator <generator object at 0x0000000000000040> ignored` has only one place in entire IronPython code base, Generator.cs and the method is called HandleFinalizerException
But that was not enough of a hint.

The problem is random, so it is very likely threads or GC finalizer which goes on separate thread.
I looked at some basic stuff in Generator.cs (e.g. recycling of finalizer) but couldn't find anything wrong.

I checked old generator bugs where there is another hint on delayed destructor.

I always assumed that finalizer code is clean and calling 'close' is safe until I drilled it down ... ta da !
Quick fix, test with pylynt and it doesn't happen any more.

But, why?
I also read somewhere, that finalizer goes after GC and that order of finalizer is non deterministic, so it is possible to have an island of objects with generator which gets collected and only after generator finalizer will be called. The references in generator can be pointing to anything.

Reading PEP was also a help (particularly the part about __del__)

The last circumstantial evidence is `index` out of `Parameter name: index`. CurrentValue is a mutable tuple and GetValue of mutable tuple is using `index` as a parameter. But this can be just a coincidence which conveniently fits.

"----------------- 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

I have run make.cmd from the root folder of unpacked archive IronLanguages-cp35682.zip. Resulting bin\Debug\ipy.exe has version 2.7.5.100, while ipy.exe from IP 2.7.5b3 has version 2.7.5.30.

New patched ipy.exe v2.7.5.100 was copied to "C:\Program Files (x86)\IronPython 2.7" overwriting existing ipy.exe v2.7.5.30.

Unfortunatelly, piece of code that previously caused exceptions "Value Error: ..." with version 2.7.5.30, causes also the same exceptions with patched version 2.7.5.100.

"----------------- 5. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

Just to mention and emphasize again that the exception "Value error: Index was out of range..." has never happened to us with IP v2.7.3 (or any of previous IP versions) which we still use very extensively with quite large and diverse codebase.

Maybe this circumstance can help in tracking down breaking change that was introduced somewhere in version interval from 2.7.3 to 2.7.5b2.

"----------------- 6. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

@s3e3 Did you copy all the dlls as well?

probably the safest way is to build using make.cmd

I usually do:

make.cmd release
make.cmd stage-release
make.cmd package

In package folder, there should be msi
First uninstall existing ip, than install using new msi

Any other scenario has a risk of using old dlls from GAC.

"----------------- 7. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

@s3e3 you can pick msi from mydrive.ch
user: tmp1 at pawel.jasinski
pass: 123456

"----------------- 8. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

Sorry, I understood from your comment that only "ipy.exe" file was affected by the patch (bin\Debug\ipy.exe), so only this file was replaced by patched version.

I have installed msi that you provided (and previously deinstalled 2.7.5b3) - after patched version was installed, no exceptions were thrown, just mulitple lines such as:

```
******************
******************
******************
```

were printed. I guess these lines are some debug prints that you used in the code?

Btw, I tried to create msi as you suggested:

make.cmd release
make.cmd stage-release
make.cmd package

but it seems that "package" target does not exist, just "package-release". Also targets "stage-release" and "package-release" produced error:

```
D:\IronLanguages-cp35682\IronLanguages-cp35682\Solutions\Build.IronPython.proj(
130,5): error MSB3680: The source file "D:\IronLanguages-cp35682\IronLanguages-
cp35682\Solutions\..\External.LCA_RESTRICTED\Languages\IronPython\27\Doc\Output
\CHtml\IronPython.chm" does not exist.
```

which prevented creating of msi package.

"----------------- 9. [New issue] os.access when file is missing inconsistent with cpython http://ironpython.codeplex.com/workitem/35700 User paweljasinski has proposed the issue: "cpython returns False when file doesn't exist. IronPython throws. c:\cygwin64\home\rejap\eamod\docgen\extractor>ipy -X:Frames IronPython 2.7.5rc1 (2.7.5.0) on .NET 4.0.30319.18444 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.access('aaa', os.R_OK) Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] Could not find file 'c:\cygwin64\home\rejap\eamod\docgen\extractor\aaa'. >>> os.access('.', os.R_OK) True >>> c:\cygwin64\home\rejap\eamod\docgen\extractor>c:\Python27\python.exe Python 2.7.8 (default, Jun 30 2014, 16:08:48) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.access("aaa", os.R_OK) False >>> os.access(".", os.R_OK) 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 andy at britishideas.com Thu Nov 20 09:30:56 2014 From: andy at britishideas.com (Andrew Ayre) Date: Thu, 20 Nov 2014 08:30:56 +0000 Subject: [Ironpython-users] GUI Toolkits In-Reply-To: <037401d00453$1dc8f410$595adc30$@ilnumerics.net> References: <546D1B4B.5060001@britishideas.com> <037401d00453$1dc8f410$595adc30$@ilnumerics.net> Message-ID: <546DA6C0.6050400@britishideas.com> Hi Haymo, Thanks for responding. Sorry, I should have clarified something. I never run IronPython standalone. I only use it embedded in my C# applications. For me that is the single biggest advantage of IronPython. I understand what you are saying. I'm a professional software developer familiar with all these technologies, so I know what is involved to make it work. However.... The users of my application are non-technical. They need to be gently coaxed into even considering using python for the first time. Of course WinForms is already there in my app for anyone to use from IronPython, but what I need to supplement this is a much simpler GUI system that has an easier learning curve, so my users won't be frightened off. Then they have a choice: - full blown winforms - something simpler and familiar to most python users Thanks, Andy On 11/19/2014 11:47 PM, Haymo Kutschbach wrote: > Andy, for my understanding one of the biggest advantage of having IronPython > is to actually be able to use things like winforms? As for all systems it > will require some learning to begin with, of course. But in fact very little > is required in order to get so much more than any of the systems mentioned > in your link is able to provide. > > If you need a very newbee example: I recently had some fun experimenting > with IronPython to create interactive scientific 3d plots in less than 10 > lines: > > http://ilnumerics.net/blog/plotting-fun-with-ilnumerics-and-ironpython/ > > Having winforms and the whole .NET framework in the back, I can hardly > imagine to recommend Tcl/TK any time soon... ;) > > Best, Haymo > -- Andy PGP Key ID: 0xDC1B5864 From no_reply at codeplex.com Fri Nov 21 09:24:24 2014 From: no_reply at codeplex.com (CodePlex) Date: 21 Nov 2014 00:24:24 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/20/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] IronPython 2.7.5 B3 does not work with Pyro 4 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. 5. [Status update] TypeError: type objects are unhashable 6. [New comment] TypeError: type objects are unhashable ---------------------------------------------- ISSUES 1. [New comment] IronPython 2.7.5 B3 does not work with Pyro 4 http://ironpython.codeplex.com/workitem/35667 User paweljasinski has commented on the issue: "

fixed in ac6025f81ef41696e8f385e58a92cd51f6fbce04

"----------------- 2. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

sorry, forgot to mention. Stars are debug info to indicate the patched code.
Overall this is a good news, the fix will be included in upcoming 2.7.5.
Again, thanks for reporting and testing.

"----------------- 3. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User paweljasinski has commented on the issue: "

fixed in ac6025f81ef41696e8f385e58a92cd51f6fbce04

"----------------- 4. [New comment] ValueError: Index was out of range. Must be non-negative and less than the size of the collection. http://ironpython.codeplex.com/workitem/35682 User s3e3 has commented on the issue: "

Thank you for your help and quick resolution of the issue.
Very much appreciated :-)

"----------------- 5. [Status update] TypeError: type objects are unhashable http://ironpython.codeplex.com/workitem/35697 User paweljasinski has updated the issue: Status has changed from Proposed to Closed with the following comment, "dupplicate with 35667"----------------- 6. [New comment] TypeError: type objects are unhashable http://ironpython.codeplex.com/workitem/35697 User paweljasinski has commented on the issue: "

resolved in ac6025f81ef41696e8f385e58a92cd51f6fbce04

" ---------------------------------------------- ---------------------------------------------- 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 Fri Nov 21 23:17:23 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 21 Nov 2014 22:17:23 +0000 Subject: [Ironpython-users] IronPython 2.7.5 RC 1 Released Message-ID: On behalf of the IronPython team, I'm happy to announce the first release candidate of IronPython 2.7.5 . This release includes everything from IronPython 2.7.4 and earlier. Like all IronPython 2.7-series releases, .NET 4 is required to install it. Installing this release will replace any existing IronPython 2.7-series installation. Assemblies for embedding are provided for .NET 3.5, .NET 4, .NET 4.5, and Silverlight 5. IronPython 2.7.5 is primarily a collection of bug fixes which smooths off many of the remaining rough edges. Thecomplete list of changes is also available. *Note:* *The assembly version of IronPython has changed to 2.7.5.0.* All previous 2.7 versions had the same version (2.7.0.40) which caused issues when different versions were installed. Publisher policy files are used to so that applications don't have to be recompiled, but recompiling is strongly recommended. A huge thanks goes out to Pawel Jasinski , who contributed most of the changes in this release. Thanks is also due to Simon Opelt , Alex Earl , Jeffrey Bester , yngipy hernan , Alexander K?plinger , Vincent Ducros , and fdanny . For Visual Studio integration, check out Python Tools for Visual Studio which has support for IronPython as well as CPython, and many other fantastic features. IronPython 2.7.5 RC 1 is also available for embedding via NuGet . The main package is IronPython, and the standard library is in IronPython.StdLib. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Sat Nov 22 00:28:06 2014 From: slide.o.mix at gmail.com (Slide) Date: Fri, 21 Nov 2014 23:28:06 +0000 Subject: [Ironpython-users] IronPython 2.7.5 RC 1 Released References: Message-ID: Thanks Jeff for all your work! On Fri, Nov 21, 2014, 15:17 Jeff Hardy wrote: > On behalf of the IronPython team, I'm happy to announce the first release > candidate of IronPython 2.7.5 > . This release > includes everything from IronPython 2.7.4 > and earlier. Like > all IronPython 2.7-series releases, .NET 4 is required to install it. > Installing this release will replace any existing IronPython 2.7-series > installation. Assemblies for embedding are provided for .NET 3.5, .NET 4, > .NET 4.5, and Silverlight 5. > > IronPython 2.7.5 is primarily a collection of bug fixes > which smooths off many of the remaining > rough edges. Thecomplete list of changes > is > also available. > > *Note:* *The assembly version of IronPython has changed to 2.7.5.0.* All > previous 2.7 versions had the same version (2.7.0.40) which caused issues > when different versions were installed. Publisher policy files are used to > so that applications don't have to be recompiled, but recompiling is > strongly recommended. > > A huge thanks goes out to Pawel Jasinski > , who contributed most of the changes > in this release. Thanks is also due to Simon Opelt > , Alex Earl , Jeffrey > Bester , yngipy hernan > , Alexander K?plinger > , Vincent Ducros > , and fdanny > . > > For Visual Studio integration, check out Python Tools for Visual Studio > which has support for IronPython as well > as CPython, and many other fantastic features. > > IronPython 2.7.5 RC 1 is also available for embedding via NuGet > . The main package is IronPython, and the standard > library is in IronPython.StdLib. > > - 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 Sun Nov 23 09:22:12 2014 From: no_reply at codeplex.com (CodePlex) Date: 23 Nov 2014 00:22:12 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/22/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] builtin?s compile function inconsistent with CPython ---------------------------------------------- ISSUES 1. [New issue] builtin?s compile function inconsistent with CPython http://ironpython.codeplex.com/workitem/35707 User TalSaiag has proposed the issue: "When using compile to build an AST and then using it again to compile the code, the resulting object?s source is not set. Test function: def test(): import ast PyCF_ONLY_AST = 1024 PyCF_DONT_IMPLY_DEDENT = 512 source = "def f():\n return g()\ndef g():\n x = 0\n return 1 / x\nf()" cmp = compile(source, "", "exec", PyCF_ONLY_AST | PyCF_DONT_IMPLY_DEDENT, 1) index = 1 # g function only node = cmp.body[index] mod = ast.Module([node]) code = compile(mod, "", "exec") return code.co_filename, code.co_firstlineno test() In python the result should be: ('', 3) In IronPython it?s: ('', 1) While trying to solve it myself, I found that the builtin?s compile (Modules\Builtin.cs:297) function doesn?t use the filename parameter given to the function in that case (while passing an AST as the source), and by passing it along to ConvertToPythonAst and in that function to the SourceUnit constructor instead of ?? (Modules_ast.cs:72), the co_filename parameter is fixed. Fixing the location is not as easy, I realized that the Node.SetLoc function is not being called upon creating a new one in Revert functions (in _ast.cs thus the Span is not set) but I?m not familiar with the code that much to find the right place (or places) to call it and with which arguments and I also think that won?t be sufficient for some reason. I?m not even sure I?m in the right track to solve this?" ---------------------------------------------- ---------------------------------------------- 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 starsky62 at gmail.com Sat Nov 22 13:03:12 2014 From: starsky62 at gmail.com (Starsk Lara) Date: Sat, 22 Nov 2014 13:03:12 +0100 Subject: [Ironpython-users] Numpy and iron python Message-ID: Hello my name is starsky. I am interesting in install numpy in ironpython. I fiend some links but nothing helpful. Can somebody help me. Thanks From williamj at tenbase2.com Sat Nov 22 17:12:02 2014 From: williamj at tenbase2.com (William Johnston) Date: Sat, 22 Nov 2014 11:12:02 -0500 Subject: [Ironpython-users] idna for IronPython? Message-ID: <0A83B027359949DA9FFA3B2DA8A13272@leviathan> Hello, Here is another idna module for IronPython question. How do I import idna for use with the request module in an IronPython app? Thanks, William Johnston -------------- next part -------------- An HTML attachment was scrubbed... URL: From williamj at tenbase2.com Sat Nov 22 17:10:11 2014 From: williamj at tenbase2.com (William Johnston) Date: Sat, 22 Nov 2014 11:10:11 -0500 Subject: [Ironpython-users] idna for IronPython? Message-ID: <809948E4615C42408149FA6837318EE6@leviathan> Hello, Here is another idna module for IronPython question. How do I import idna for use with the request module in an IronPython app? Thanks, William Johnston -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Mon Nov 24 12:53:14 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Mon, 24 Nov 2014 12:53:14 +0100 Subject: [Ironpython-users] IronPython 2.7.5 RC 1 Released In-Reply-To: References: Message-ID: On Sat, Nov 22, 2014 at 12:28 AM, Slide wrote: > Thanks Jeff for all your work! +1 From kerray.cz at gmail.com Mon Nov 24 13:53:48 2014 From: kerray.cz at gmail.com (Kerray) Date: Mon, 24 Nov 2014 13:53:48 +0100 Subject: [Ironpython-users] WDB web debugger for IronPython Message-ID: Hi everyone, We're using IronPython to script the insides of SharePoint (ASP.NET on IIS). For quite some time, I've been looking for a comfortable way to debug these scripts without having to install Visual Studio. I've considered using standard PDB, with console redirected over the net by some sort of messaging. This was the least preferable option, as the user comfort is quite low and we'd have to take care of the messaging layer. I also considered using IPython to do this, but despite using https://github.com/paweljasinski/ repositories, I haven't been anywhere close to success. However, recently I've re-visited https://github.com/Kozea/wdb and was surprised how far it has come since I've seen it for the first time. It looked exactly like the debugger I was looking for. I tried playing with it, added small IPy compatibility changes here and there, and the results are promising. I've been attacking this on two fronts: 1) I've tried running the server side in IronPython, but it uses Tornado, and while I can get it to run (using https://github.com/paweljasinski/tornado), on client connect the server fails with Exception in I/O handler for fd 1492 Traceback (most recent call last): File "c:\Program Files (x86)\IronPython 2.7\lib\site-packages\tornado-3.1.1-py2.7.egg\tornado\iostream.py", line 694, in read_from_fd chunk = self.socket.recv(self.read_chunk_size) error: [Errno 10022] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied While the client reports: site-packages\wdb\_compat.py", line 135, in recv_bytes size, = struct.unpack("!i", self._handle.recv(4)) struct.error: unpack requires a string argument of length 4 But seeing my added debug output, the server and the client have successfully communicated over the socket at least once, succesfully sending and receiving a guid, and then crash on the message "ServerBreaks" which should get server breakpoints. Could this be an error with how sockets are handled in IPy/Windows? I've no idea. 2) I've also tried running the server side in Python, and the client in IronPython (as I wouldn't mind doing it like this), but this also fails with File "c:\Program Files (x86)\IronPython 2.7\lib\site-packages\wdb-2.0.7-py2.7.egg\wdb\__init__.py", line 575, in get_trace TypeError: Unable to cast object of type 'System.Linq.Expressions.FieldExpression' to type 'System.Linq.Expressions.BlockExpression'. And I've been unable to get any further from here - the line 575 in question contains startlnos = dis.findlinestarts(code) and even when I take the dis.findlinestarts function, put it into the file in question, and enhance it with debug output, it seem the call doesn't come through to the inside of the function as none of the debug output appears. Both points seem to me more like IronPython issues than an issues with WDB directly, which is why I'm trying to ask here. This is far too deep in the insides for my shallow "expertise", but I'd be grateful for any pointers or ideas as to what to try next. Thanks - and have a nice day Jarom?r Mat??ek -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Mon Nov 24 15:07:50 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Mon, 24 Nov 2014 15:07:50 +0100 Subject: [Ironpython-users] WDB web debugger for IronPython In-Reply-To: References: Message-ID: hi, just to be sure,are you using 2.7.5RC1? If not, please try it. There were quite a few cpython compatibility improvements including socket module. On Mon, Nov 24, 2014 at 1:53 PM, Kerray wrote: > Hi everyone, > We're using IronPython to script the insides of SharePoint (ASP.NET on IIS). > For quite some time, I've been looking for a comfortable way to debug these > scripts without having to install Visual Studio. > > I've considered using standard PDB, with console redirected over the net by > some sort of messaging. This was the least preferable option, as the user > comfort is quite low and we'd have to take care of the messaging layer. > > I also considered using IPython to do this, but despite using > https://github.com/paweljasinski/ repositories, I haven't been anywhere > close to success. > > However, recently I've re-visited https://github.com/Kozea/wdb and was > surprised how far it has come since I've seen it for the first time. It > looked exactly like the debugger I was looking for. I tried playing with it, > added small IPy compatibility changes here and there, and the results are > promising. > > I've been attacking this on two fronts: > > 1) I've tried running the server side in IronPython, but it uses Tornado, > and while I can get it to run (using > https://github.com/paweljasinski/tornado), on client connect the server > fails with > Exception in I/O handler for fd 1492 > Traceback (most recent call last): > File "c:\Program Files (x86)\IronPython > 2.7\lib\site-packages\tornado-3.1.1-py2.7.egg\tornado\iostream.py", line > 694, in read_from_fd > chunk = self.socket.recv(self.read_chunk_size) > error: [Errno 10022] A request to send or receive data was disallowed > because the socket is not connected and (when sending on a datagram socket > using a sendto call) no address was supplied > > While the client reports: > site-packages\wdb\_compat.py", line 135, in recv_bytes > size, = struct.unpack("!i", self._handle.recv(4)) > struct.error: unpack requires a string argument of length 4 > > But seeing my added debug output, the server and the client have > successfully communicated over the socket at least once, succesfully sending > and receiving a guid, and then crash on the message "ServerBreaks" which > should get server breakpoints. > > Could this be an error with how sockets are handled in IPy/Windows? I've no > idea. > > 2) I've also tried running the server side in Python, and the client in > IronPython (as I wouldn't mind doing it like this), but this also fails with > File "c:\Program Files (x86)\IronPython > 2.7\lib\site-packages\wdb-2.0.7-py2.7.egg\wdb\__init__.py", line 575, in > get_trace > TypeError: Unable to cast object of type > 'System.Linq.Expressions.FieldExpression' to type > 'System.Linq.Expressions.BlockExpression'. > > And I've been unable to get any further from here - the line 575 in question > contains > startlnos = dis.findlinestarts(code) > and even when I take the dis.findlinestarts function, put it into the file > in question, and enhance it with debug output, it seem the call doesn't come > through to the inside of the function as none of the debug output appears. > > Both points seem to me more like IronPython issues than an issues with WDB > directly, which is why I'm trying to ask here. > > This is far too deep in the insides for my shallow "expertise", but I'd be > grateful for any pointers or ideas as to what to try next. > > > Thanks - and have a nice day > > Jarom?r Mat??ek > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > From jdimatteo at gmail.com Tue Nov 25 00:25:12 2014 From: jdimatteo at gmail.com (John DiMatteo) Date: Mon, 24 Nov 2014 16:25:12 -0700 Subject: [Ironpython-users] abc.py 0.12% of time errors with "SystemError: Handle is not initialized." Message-ID: I ran a script about 2,500 times last weekend and got the non-reproducible exception "SystemError: Handle is not initialized" 3 times while constructing a ConfigParser.SafeConfigParser like so: import ConfigParser _cfg = ConfigParser.SafeConfigParser(allow_no_value=True) # line 8 of Foo.py Here is the traceback: Traceback (most recent call last): File "MyScriptWithTheNameChanged.py", line 55, in File "d:\MyChangedPath\Bar.py", line 5, in File "d:\MyChangedPath\Foo.py", line 8, in File "c:\Program Files (x86)\IronPython 2.7\Lib\ConfigParser.py", line 228, in __init__ File "c:\Program Files (x86)\IronPython 2.7\Lib\collections.py", line 51, in __init__ File "c:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 151, in __subclasscheck__ File "c:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line 73, in __contains__ SystemError: Handle is not initialized. I cc'ed Vladimir since he posted a similar message on April 1st 2014 (but I couldn't figure out how to respond since I joined the list after that date). This is troubling since it seems like _weakrefset.py is a critical part of IronPython and has a non-reproducible bug that randomly crashes applications using it 0.12% of the time. Please let me know if I can provide any other useful information. I didn't find anything in my Event Viewer for the times when this exception was logged. Unfortunately I can't reproduce this (but I didn't try running the script another 2,500 times). -------------- next part -------------- An HTML attachment was scrubbed... URL: From tpham12345 at yahoo.com Tue Nov 25 02:50:48 2014 From: tpham12345 at yahoo.com (Thinh Pham) Date: Mon, 24 Nov 2014 19:50:48 -0600 Subject: [Ironpython-users] abc.py 0.12% of time errors with "SystemError: Handle is not initialized." In-Reply-To: References: Message-ID: I can confirm that this exception happened to me as well. Cannot reproduce it on any consistent basis. The application will run fine one day without any problem and then something happens the next day to cause the exception. There is no way to recover from the exception except to shut it down and start it again. The library that i use and that causes the exception is ?Mako Templates? and it uses _weakrefset internally to cache templates. If anyone is interested i can send a stacktrace the next time it happened. Thanks, Thinh > On Nov 24, 2014, at 5:25 PM, John DiMatteo wrote: > > I ran a script about 2,500 times last weekend and got the non-reproducible exception "SystemError: Handle is not initialized" 3 times while constructing a ConfigParser.SafeConfigParser like so: > > import ConfigParser > _cfg = ConfigParser.SafeConfigParser(allow_no_value=True) # line 8 of Foo.py > > Here is the traceback: > > Traceback (most recent call last): > File "MyScriptWithTheNameChanged.py", line 55, in > File "d:\MyChangedPath\Bar.py", line 5, in > File "d:\MyChangedPath\Foo.py", line 8, in > File "c:\Program Files (x86)\IronPython 2.7\Lib\ConfigParser.py", line 228, in __init__ > File "c:\Program Files (x86)\IronPython 2.7\Lib\collections.py", line 51, in __init__ > File "c:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 151, in __subclasscheck__ > File "c:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line 73, in __contains__ > SystemError: Handle is not initialized. > > I cc'ed Vladimir since he posted a similar message on April 1st 2014 (but I couldn't figure out how to respond since I joined the list after that date). > > This is troubling since it seems like _weakrefset.py is a critical part of IronPython and has a non-reproducible bug that randomly crashes applications using it 0.12% of the time. > > Please let me know if I can provide any other useful information. I didn't find anything in my Event Viewer for the times when this exception was logged. Unfortunately I can't reproduce this (but I didn't try running the script another 2,500 times). > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users From slide.o.mix at gmail.com Tue Nov 25 03:10:06 2014 From: slide.o.mix at gmail.com (Slide) Date: Tue, 25 Nov 2014 02:10:06 +0000 Subject: [Ironpython-users] abc.py 0.12% of time errors with "SystemError: Handle is not initialized." References: Message-ID: If you are running with ipy.exe, can you add -X:ShowClrExceptions -X:ExceptionDetail to your command line before posting the stacktrace? On Mon Nov 24 2014 at 6:54:12 PM Thinh Pham wrote: > I can confirm that this exception happened to me as well. Cannot reproduce > it on any consistent basis. The application will run fine one day without > any problem and then something happens the next day to cause the exception. > There is no way to recover from the exception except to shut it down and > start it again. > > The library that i use and that causes the exception is ?Mako Templates? > and it uses _weakrefset internally to cache templates. If anyone is > interested i can send a stacktrace the next time it happened. > > Thanks, > Thinh > > > > On Nov 24, 2014, at 5:25 PM, John DiMatteo wrote: > > > > I ran a script about 2,500 times last weekend and got the > non-reproducible exception "SystemError: Handle is not initialized" 3 times > while constructing a ConfigParser.SafeConfigParser like so: > > > > import ConfigParser > > _cfg = ConfigParser.SafeConfigParser(allow_no_value=True) # line 8 of > Foo.py > > > > Here is the traceback: > > > > Traceback (most recent call last): > > File "MyScriptWithTheNameChanged.py", line 55, in > > File "d:\MyChangedPath\Bar.py", line 5, in > > File "d:\MyChangedPath\Foo.py", line 8, in > > File "c:\Program Files (x86)\IronPython 2.7\Lib\ConfigParser.py", line > 228, in __init__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\collections.py", line > 51, in __init__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 151, in > __subclasscheck__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line > 73, in __contains__ > > SystemError: Handle is not initialized. > > > > I cc'ed Vladimir since he posted a similar message on April 1st 2014 > (but I couldn't figure out how to respond since I joined the list after > that date). > > > > This is troubling since it seems like _weakrefset.py is a critical part > of IronPython and has a non-reproducible bug that randomly crashes > applications using it 0.12% of the time. > > > > Please let me know if I can provide any other useful information. I > didn't find anything in my Event Viewer for the times when this exception > was logged. Unfortunately I can't reproduce this (but I didn't try running > the script another 2,500 times). > > _______________________________________________ > > 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 tpham12345 at yahoo.com Tue Nov 25 04:24:18 2014 From: tpham12345 at yahoo.com (Thinh Pham) Date: Mon, 24 Nov 2014 21:24:18 -0600 Subject: [Ironpython-users] abc.py 0.12% of time errors with "SystemError: Handle is not initialized." In-Reply-To: References: Message-ID: I?m not using ipy.exe but creating the engine programatically. But i?ll use those flags in the setup object now and send the stacktrace when the exception happened again. > On Nov 24, 2014, at 8:10 PM, Slide wrote: > > If you are running with ipy.exe, can you add -X:ShowClrExceptions -X:ExceptionDetail to your command line before posting the stacktrace? > > > On Mon Nov 24 2014 at 6:54:12 PM Thinh Pham wrote: > I can confirm that this exception happened to me as well. Cannot reproduce it on any consistent basis. The application will run fine one day without any problem and then something happens the next day to cause the exception. There is no way to recover from the exception except to shut it down and start it again. > > The library that i use and that causes the exception is ?Mako Templates? and it uses _weakrefset internally to cache templates. If anyone is interested i can send a stacktrace the next time it happened. > > Thanks, > Thinh > > > > On Nov 24, 2014, at 5:25 PM, John DiMatteo > wrote: > > > > I ran a script about 2,500 times last weekend and got the non-reproducible exception "SystemError: Handle is not initialized" 3 times while constructing a ConfigParser.SafeConfigParser like so: > > > > import ConfigParser > > _cfg = ConfigParser.SafeConfigParser(allow_no_value=True) # line 8 of Foo.py > > > > Here is the traceback: > > > > Traceback (most recent call last): > > File "MyScriptWithTheNameChanged.py", line 55, in > > File "d:\MyChangedPath\Bar.py", line 5, in > > File "d:\MyChangedPath\Foo.py", line 8, in > > File "c:\Program Files (x86)\IronPython 2.7\Lib\ConfigParser.py", line 228, in __init__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\collections.py", line 51, in __init__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 151, in __subclasscheck__ > > File "c:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line 73, in __contains__ > > SystemError: Handle is not initialized. > > > > I cc'ed Vladimir since he posted a similar message on April 1st 2014 (but I couldn't figure out how to respond since I joined the list after that date). > > > > This is troubling since it seems like _weakrefset.py is a critical part of IronPython and has a non-reproducible bug that randomly crashes applications using it 0.12% of the time. > > > > Please let me know if I can provide any other useful information. I didn't find anything in my Event Viewer for the times when this exception was logged. Unfortunately I can't reproduce this (but I didn't try running the script another 2,500 times). > > _______________________________________________ > > 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 > _______________________________________________ > 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 Nov 25 09:26:24 2014 From: no_reply at codeplex.com (CodePlex) Date: 25 Nov 2014 00:26:24 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/24/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] builtin?s compile function inconsistent with CPython 2. [New comment] builtin?s compile function inconsistent with CPython ---------------------------------------------- ISSUES 1. [New comment] builtin?s compile function inconsistent with CPython http://ironpython.codeplex.com/workitem/35707 User paweljasinski has commented on the issue: "

your diagnostic is spot on.
What are doing with co_firstlineno?

"----------------- 2. [New comment] builtin?s compile function inconsistent with CPython http://ironpython.codeplex.com/workitem/35707 User TalSaiag has commented on the issue: "

I?m debugging my own program using the same method I saw in iPython for executing code in the interpreter and getting the stack trace (hence the need for the temporary file name and the function line in it).

Is it easily solvable?

By the way, although it?s written in the home page, I only realized that the source code moved to the git repository after downloading the source from here and trying to debug it? You might want to consider removing it from here or emphasizing the small line in the home page linking to GitHub. :)

Thanks!
Tal

" ---------------------------------------------- ---------------------------------------------- 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 kerray.cz at gmail.com Tue Nov 25 13:32:21 2014 From: kerray.cz at gmail.com (Kerray) Date: Tue, 25 Nov 2014 13:32:21 +0100 Subject: [Ironpython-users] WDB web debugger for IronPython In-Reply-To: References: Message-ID: Hi, very good point, I've been on beta3. But the upgrade didn't help. I've figured out how to debug the internals in VS, but there's nothing I could be able to fix (or even understand) myself at this point. ad 1) after running wdb.server, Tornado at first says \tornado\netutil.py", line 88, in bind_sockets AttributeError: 'module' object has no attribute 'IPV6_V6ONLY' When I comment the whole if section out, it starts the loop and waits for connections. Running the client, the server reports this and continues listening: Connection received from ('127.0.0.1', 1518) [E 141125 11:51:35 stack_context:1] Exception in I/O handler for fd 1616 Traceback (most recent call last): File "-\tornado\stack_context.py", line 304, in wrapped ret = fn(*args, **kwargs) File "-\tornado\netutil.py", line 154, in accept_handler callback(connection, address) File "-\wdb_server\streams.py", line 95, in handle_connection stream.read_bytes(4, partial(read_uuid_size, stream)) File "-\tornado\iostream.py", line 168, in read_bytes self._try_inline_read() File "-\tornado\iostream.py", line 424, in _try_inline_read if self._read_to_buffer() == 0: File "-\tornado\iostream.py", line 447, in _read_to_buffer chunk = self.read_from_fd() File "-\tornado\iostream.py", line 686, in read_from_fd chunk = self.socket.recv(self.read_chunk_size) error: [Errno 10022] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied And the client crashes with wdb\client\wdb\_compat.py", line 165, in send_bytes socket.error: [Errno 10053] An established connection was aborted by the software in your host machine When trying to debug this in VS, I came to the conclusion that the Tornado server's socket handling (or my commenting out a piece, or something else inside Tornado running under IronPython-) is at fault, since it's not true what I've written previously (that a message gets communicated and then coms fail) - in fact nothing gets communicated, it crashes in the client on trying to send the first message using socket.cs sendallWorker(byte[] buffer, int flags). ad 2) running the server in Python and client in IronPython, I get a bit further, but the error is the same - the client in IronPython reports Launching browser and wait for connection Exception Traceback (most recent call last): File "-\wdb\client\wdb\__init__.py", line 291, in trace_debug_dispatch File "-\wdb\client\wdb\__init__.py", line 250, in trace_dispatch File "-\wdb\client\wdb\__init__.py", line 686, in handle_call File "-\wdb\client\wdb\__init__.py", line 660, in interaction File "-\wdb\client\wdb\ui.py", line 80, in __init__ File "-\wdb\client\wdb\__init__.py", line 575, in get_trace TypeError: Unable to cast object of type 'System.Linq.Expressions.FieldExpression' to type 'System.Linq.Expressions.BlockExpression'. It's the same place and line of code I mentioned in my previous mail: > startlnos = dis.findlinestarts(code) Debugging in VS yields an impressive stack trace, but I don't have any idea where to start with this, so again - I'll be very grateful for any pointers. Thanks - for even reading this far. at Microsoft.Scripting.Ast.GeneratorRewriter.VisitAssign(BinaryExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 831 at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBinary(BinaryExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 876 at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitTry(TryExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 297 at System.Linq.Expressions.TryExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitAssign(BinaryExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 789 at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBinary(BinaryExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 876 at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 nodes) at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression node) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 595 at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.Scripting.Ast.GeneratorRewriter.Reduce() in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line 100 at Microsoft.Scripting.Ast.GeneratorExpression.Reduce() in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorExpression.cs:line 94 at System.Linq.Expressions.Expression.ReduceAndCheck() at System.Linq.Expressions.Expression.ReduceExtensions() at System.Linq.Expressions.Compiler.StackSpiller.RewriteExtensionExpression(Expression expr, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression node, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.RewriteExpressionFreeTemps(Expression expression, Stack stack) at System.Linq.Expressions.Compiler.StackSpiller.Rewrite[T](Expression`1 lambda) at System.Linq.Expressions.Expression`1.Accept(StackSpiller spiller) at System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression lambda, DebugInfoGenerator debugInfoGenerator) at System.Linq.Expressions.LambdaExpression.Compile() at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.CreateFunctionInfo(LambdaExpression generatorFactoryLambda) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line 386 at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.TransformLambda(LambdaExpression lambda) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line 171 at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.Transform(LambdaExpression lambda) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line 111 at Microsoft.Scripting.Debugging.CompilerServices.DebugContext.TransformLambda(LambdaExpression lambda, DebugLambdaInfo lambdaInfo) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebugContext.cs:line 68 at IronPython.Runtime.FunctionCode.<>c__DisplayClass1a.b__19(Expression`1 x) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line 787 at IronPython.Compiler.GeneratorRewriter.Reduce(Boolean shouldInterpret, Boolean emitDebugSymbols, Int32 compilationThreshold, IList`1 parameters, Func`2 bodyConverter) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\GeneratorRewriter.cs:line 147 at IronPython.Runtime.FunctionCode.GetGeneratorOrNormalLambdaTracing(PythonContext context) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line 777 at IronPython.Runtime.FunctionCode.UpdateDelegate(PythonContext context, Boolean forceCreation) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line 717 at IronPython.Runtime.FunctionCode.LazyCompileFirstTarget(PythonFunction function) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line 697 at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line 42 at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\PythonFunction.Generated.cs:line 420 at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at get_trace$495(Closure , PythonFunction , Object , Object , Object ) at IronPython.Compiler.PythonFunctionRecursionCheck3.CallTarget(PythonFunction function, Object arg0, Object arg1, Object arg2) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line 273 at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line 53 at IronPython.Runtime.FunctionCaller`3.Call3(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\PythonFunction.Generated.cs:line 676 at System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) at CallSite.Target(Closure , CallSite , CodeContext , Object , Object , Object , Object ) at IronPython.Runtime.Method.MethodBinding`2.SelfTarget(CallSite site, CodeContext context, Object target, T0 arg0, T1 arg1) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\Method.Generated.cs:line 195 at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\Instructions\DynamicInstructions.Generated.cs:line 218 at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\Interpreter.cs:line 132 at Microsoft.Scripting.Interpreter.LightLambda.Run10[T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9) in c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\LightLambda.Generated.cs:line 417 at IronPython.Compiler.PythonFunctionRecursionCheck9.CallTarget(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line 375 at IronPython.Compiler.PythonCallTargets.OriginalCallTarget9(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) in c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line 83 On Mon, Nov 24, 2014 at 3:07 PM, Pawel Jasinski wrote: > hi, > > just to be sure,are you using 2.7.5RC1? > If not, please try it. There were quite a few cpython compatibility > improvements including socket module. > > On Mon, Nov 24, 2014 at 1:53 PM, Kerray wrote: > > Hi everyone, > > We're using IronPython to script the insides of SharePoint (ASP.NET on > IIS). > > For quite some time, I've been looking for a comfortable way to debug > these > > scripts without having to install Visual Studio. > > > > I've considered using standard PDB, with console redirected over the net > by > > some sort of messaging. This was the least preferable option, as the user > > comfort is quite low and we'd have to take care of the messaging layer. > > > > I also considered using IPython to do this, but despite using > > https://github.com/paweljasinski/ repositories, I haven't been anywhere > > close to success. > > > > However, recently I've re-visited https://github.com/Kozea/wdb and was > > surprised how far it has come since I've seen it for the first time. It > > looked exactly like the debugger I was looking for. I tried playing with > it, > > added small IPy compatibility changes here and there, and the results are > > promising. > > > > I've been attacking this on two fronts: > > > > 1) I've tried running the server side in IronPython, but it uses Tornado, > > and while I can get it to run (using > > https://github.com/paweljasinski/tornado), on client connect the server > > fails with > > Exception in I/O handler for fd 1492 > > Traceback (most recent call last): > > File "c:\Program Files (x86)\IronPython > > 2.7\lib\site-packages\tornado-3.1.1-py2.7.egg\tornado\iostream.py", line > > 694, in read_from_fd > > chunk = self.socket.recv(self.read_chunk_size) > > error: [Errno 10022] A request to send or receive data was disallowed > > because the socket is not connected and (when sending on a datagram > socket > > using a sendto call) no address was supplied > > > > While the client reports: > > site-packages\wdb\_compat.py", line 135, in recv_bytes > > size, = struct.unpack("!i", self._handle.recv(4)) > > struct.error: unpack requires a string argument of length 4 > > > > But seeing my added debug output, the server and the client have > > successfully communicated over the socket at least once, succesfully > sending > > and receiving a guid, and then crash on the message "ServerBreaks" which > > should get server breakpoints. > > > > Could this be an error with how sockets are handled in IPy/Windows? I've > no > > idea. > > > > 2) I've also tried running the server side in Python, and the client in > > IronPython (as I wouldn't mind doing it like this), but this also fails > with > > File "c:\Program Files (x86)\IronPython > > 2.7\lib\site-packages\wdb-2.0.7-py2.7.egg\wdb\__init__.py", line 575, in > > get_trace > > TypeError: Unable to cast object of type > > 'System.Linq.Expressions.FieldExpression' to type > > 'System.Linq.Expressions.BlockExpression'. > > > > And I've been unable to get any further from here - the line 575 in > question > > contains > > startlnos = dis.findlinestarts(code) > > and even when I take the dis.findlinestarts function, put it into the > file > > in question, and enhance it with debug output, it seem the call doesn't > come > > through to the inside of the function as none of the debug output > appears. > > > > Both points seem to me more like IronPython issues than an issues with > WDB > > directly, which is why I'm trying to ask here. > > > > This is far too deep in the insides for my shallow "expertise", but I'd > be > > grateful for any pointers or ideas as to what to try next. > > > > > > Thanks - and have a nice day > > > > Jarom?r Mat??ek > > > > _______________________________________________ > > 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 jdhardy at gmail.com Tue Nov 25 23:11:08 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 25 Nov 2014 22:11:08 +0000 Subject: [Ironpython-users] IronPython 2.7.5 RC 2 Available Message-ID: IronPython 2.7.5 RC 2 is now available[1]. The only change is a couple of late-breaking bug fixes from Pawel. The next release should be the final 2.7.5, barring any mishaps. - Jeff [1] https://ironpython.codeplex.com/releases/view/115611 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Tue Nov 25 23:17:05 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 25 Nov 2014 22:17:05 +0000 Subject: [Ironpython-users] idna for IronPython? In-Reply-To: <0A83B027359949DA9FFA3B2DA8A13272@leviathan> References: <0A83B027359949DA9FFA3B2DA8A13272@leviathan> Message-ID: On Sat, Nov 22, 2014 at 4:12 PM, William Johnston wrote: > > > Hello, > > Here is another idna module for IronPython question. > > How do I import idna for use with the request module in an IronPython app? > `from encodings import idna` should do it. This is the same as CPython. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Nov 26 00:03:34 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 25 Nov 2014 23:03:34 +0000 Subject: [Ironpython-users] WDB web debugger for IronPython In-Reply-To: References: Message-ID: On Tue, Nov 25, 2014 at 12:32 PM, Kerray wrote: > Hi, > very good point, I've been on beta3. But the upgrade didn't help. I've > figured out how to debug the internals in VS, but there's nothing I could > be able to fix (or even understand) myself at this point. > > ad 1) after running wdb.server, Tornado at first says > \tornado\netutil.py", line 88, in bind_sockets > AttributeError: 'module' object has no attribute 'IPV6_V6ONLY' > When I comment the whole if section out, it starts the loop and waits for > connections. > Can you open an issue for this? Should be straightforward, if .NET supports IPv6 only connections. Might have to wait to 2.7.6 though. In the meantime you can add `hasatter(socket, 'IPV6_V6ONLY')` to the if. > > Running the client, the server reports this and continues listening: > Connection received from ('127.0.0.1', 1518) > [E 141125 11:51:35 stack_context:1] Exception in I/O handler for fd 1616 > Traceback (most recent call last): > File "-\tornado\stack_context.py", line 304, in wrapped > ret = fn(*args, **kwargs) > File "-\tornado\netutil.py", line 154, in accept_handler > callback(connection, address) > File "-\wdb_server\streams.py", line 95, in handle_connection > stream.read_bytes(4, partial(read_uuid_size, stream)) > File "-\tornado\iostream.py", line 168, in read_bytes > self._try_inline_read() > File "-\tornado\iostream.py", line 424, in _try_inline_read > if self._read_to_buffer() == 0: > File "-\tornado\iostream.py", line 447, in _read_to_buffer > chunk = self.read_from_fd() > File "-\tornado\iostream.py", line 686, in read_from_fd > chunk = self.socket.recv(self.read_chunk_size) > error: [Errno 10022] A request to send or receive data was disallowed > because the socket is not connected and (when sending on a datagram socket > using a sendto call) no address was supplied > > And the client crashes with > wdb\client\wdb\_compat.py", line 165, in send_bytes > socket.error: [Errno 10053] An established connection was aborted by the > software in your host machine > > When trying to debug this in VS, I came to the conclusion that the Tornado > server's socket handling (or my commenting out a piece, or something else > inside Tornado running under IronPython-) is at fault, since it's not true > what I've written previously (that a message gets communicated and then > coms fail) - in fact nothing gets communicated, it crashes in the client on > trying to send the first message using socket.cs sendallWorker(byte[] > buffer, int flags). > Not sure why it would not be connected, but I presume Tornado tries to configure the sockets as non-blocking; it's possible that gets IronPython confused. > > > ad 2) running the server in Python and client in IronPython, I get a bit > further, but the error is the same - the client in IronPython reports > Launching browser and wait for connection > Exception Traceback (most recent call last): > File "-\wdb\client\wdb\__init__.py", line 291, in trace_debug_dispatch > File "-\wdb\client\wdb\__init__.py", line 250, in trace_dispatch > File "-\wdb\client\wdb\__init__.py", line 686, in handle_call > File "-\wdb\client\wdb\__init__.py", line 660, in interaction > File "-\wdb\client\wdb\ui.py", line 80, in __init__ > File "-\wdb\client\wdb\__init__.py", line 575, in get_trace > TypeError: Unable to cast object of type > 'System.Linq.Expressions.FieldExpression' to type > 'System.Linq.Expressions.BlockExpression'. > > It's the same place and line of code I mentioned in my previous mail: > > startlnos = dis.findlinestarts(code) > > Debugging in VS yields an impressive stack trace, but I don't have any > idea where to start with this, so again - I'll be very grateful for any > pointers. > Looks like one of the generator rewriters has a bug. I can't come up with a simple case to reproduce this, though. It's failing when switching from interpreted to compiled (LambdaExpression.Compile) but I'm not sure how to trip that right now, for if it's specific to the code it's compiling. - Jeff > Thanks - for even reading this far. > > > at > Microsoft.Scripting.Ast.GeneratorRewriter.VisitAssign(BinaryExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 831 > at > Microsoft.Scripting.Ast.GeneratorRewriter.VisitBinary(BinaryExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 876 > at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitTry(TryExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 297 > at System.Linq.Expressions.TryExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at > Microsoft.Scripting.Ast.GeneratorRewriter.VisitAssign(BinaryExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 789 > at > Microsoft.Scripting.Ast.GeneratorRewriter.VisitBinary(BinaryExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 876 > at System.Linq.Expressions.BinaryExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at System.Linq.Expressions.ExpressionVisitor.Visit(ReadOnlyCollection`1 > nodes) > at Microsoft.Scripting.Ast.GeneratorRewriter.VisitBlock(BlockExpression > node) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 595 > at System.Linq.Expressions.BlockExpression.Accept(ExpressionVisitor > visitor) > at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) > at Microsoft.Scripting.Ast.GeneratorRewriter.Reduce() in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorRewriter.cs:line > 100 > at Microsoft.Scripting.Ast.GeneratorExpression.Reduce() in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Ast\GeneratorExpression.cs:line > 94 > at System.Linq.Expressions.Expression.ReduceAndCheck() > at System.Linq.Expressions.Expression.ReduceExtensions() > at > System.Linq.Expressions.Compiler.StackSpiller.RewriteExtensionExpression(Expression > expr, Stack stack) > at > System.Linq.Expressions.Compiler.StackSpiller.RewriteExpression(Expression > node, Stack stack) > at > System.Linq.Expressions.Compiler.StackSpiller.RewriteExpressionFreeTemps(Expression > expression, Stack stack) > at > System.Linq.Expressions.Compiler.StackSpiller.Rewrite[T](Expression`1 > lambda) > at System.Linq.Expressions.Expression`1.Accept(StackSpiller spiller) > at > System.Linq.Expressions.Compiler.LambdaCompiler.Compile(LambdaExpression > lambda, DebugInfoGenerator debugInfoGenerator) > at System.Linq.Expressions.LambdaExpression.Compile() > at > Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.CreateFunctionInfo(LambdaExpression > generatorFactoryLambda) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line > 386 > at > Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.TransformLambda(LambdaExpression > lambda) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line > 171 > at > Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.Transform(LambdaExpression > lambda) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebuggableLambdaBuilder.cs:line > 111 > at > Microsoft.Scripting.Debugging.CompilerServices.DebugContext.TransformLambda(LambdaExpression > lambda, DebugLambdaInfo lambdaInfo) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Debugging\DebugContext.cs:line > 68 > at > IronPython.Runtime.FunctionCode.<>c__DisplayClass1a.b__19(Expression`1 > x) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line > 787 > at IronPython.Compiler.GeneratorRewriter.Reduce(Boolean > shouldInterpret, Boolean emitDebugSymbols, Int32 compilationThreshold, > IList`1 parameters, Func`2 bodyConverter) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\GeneratorRewriter.cs:line > 147 > at > IronPython.Runtime.FunctionCode.GetGeneratorOrNormalLambdaTracing(PythonContext > context) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line > 777 > at IronPython.Runtime.FunctionCode.UpdateDelegate(PythonContext > context, Boolean forceCreation) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line > 717 > at > IronPython.Runtime.FunctionCode.LazyCompileFirstTarget(PythonFunction > function) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\FunctionCode.cs:line > 697 > at > IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction > function, Object arg0) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line > 42 > at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext > context, Object func, T0 arg0) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\PythonFunction.Generated.cs:line > 420 > at > System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2) > at get_trace$495(Closure , PythonFunction , Object , Object , Object ) > at > IronPython.Compiler.PythonFunctionRecursionCheck3.CallTarget(PythonFunction > function, Object arg0, Object arg1, Object arg2) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line > 273 > at > IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction > function, Object arg0, Object arg1, Object arg2) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line > 53 > at IronPython.Runtime.FunctionCaller`3.Call3(CallSite site, CodeContext > context, Object func, T0 arg0, T1 arg1, T2 arg2) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\PythonFunction.Generated.cs:line > 676 > at > System.Dynamic.UpdateDelegates.UpdateAndExecute5[T0,T1,T2,T3,T4,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4) > at CallSite.Target(Closure , CallSite , CodeContext , Object , Object , > Object , Object ) > at IronPython.Runtime.Method.MethodBinding`2.SelfTarget(CallSite site, > CodeContext context, Object target, T0 arg0, T1 arg1) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Runtime\Method.Generated.cs:line > 195 > at > System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) > at > Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame > frame) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\Instructions\DynamicInstructions.Generated.cs:line > 218 > at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame > frame) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\Interpreter.cs:line > 132 > at > Microsoft.Scripting.Interpreter.LightLambda.Run10[T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,TRet](T0 > arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 > arg8, T9 arg9) in > c:\Users\jmatysek\Documents\main\Runtime\Microsoft.Dynamic\Interpreter\LightLambda.Generated.cs:line > 417 > at > IronPython.Compiler.PythonFunctionRecursionCheck9.CallTarget(PythonFunction > function, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, > Object arg5, Object arg6, Object arg7, Object arg8) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line > 375 > at > IronPython.Compiler.PythonCallTargets.OriginalCallTarget9(PythonFunction > function, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, > Object arg5, Object arg6, Object arg7, Object arg8) in > c:\Users\jmatysek\Documents\main\Languages\IronPython\IronPython\Compiler\PythonCallTargets.cs:line > 83 > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Nov 26 09:25:26 2014 From: no_reply at codeplex.com (CodePlex) Date: 26 Nov 2014 00:25:26 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 11/25/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] builtin?s compile function inconsistent with CPython 2. [New comment] builtin?s compile function inconsistent with CPython ---------------------------------------------- ISSUES 1. [New comment] builtin?s compile function inconsistent with CPython http://ironpython.codeplex.com/workitem/35707 User paweljasinski has commented on the issue: "

For the line number issue, I don't see an easy fix inside ironpython.
Can you point me to the ipython code you mentioned?

"----------------- 2. [New comment] builtin?s compile function inconsistent with CPython http://ironpython.codeplex.com/workitem/35707 User TalSaiag has commented on the issue: "

The entire functionality is split across those three functions:
in run_cell & run_ast_nodes functions in the InteractiveShell class (site-packages\IPython\code\interactiveshell.py)
and also in ast_parse in CachingCompiler (site-packages\IPython\core\compilerop.py)
the usage of the co_filename in site-packages\IPython\core\debugger.py
(they are using frame.f_lineno as far as I can tell...)

" ---------------------------------------------- ---------------------------------------------- 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: