Re: [IronPython] IP 2.0 Hosting

2007-12-18 Thread Toni Alatalo
Dino Viehland kirjoitti: > For exposing classes/namespaces/etc... I think we may have a deficiency here > even in the new model. While we do have a global namespace per ScriptRuntime > I don't believe we have a way to say "populate this with these > types/namespaces". I'll bring this up next

[IronPython] static source2handler mapping causing memory leaks

2007-12-18 Thread Kamil Dworakowski
I think I have found what is a design flaw in implementation of events in IronPython that causes memory leaks. This seems to affect both IP 1.1 and IP 2. As far as I understand the code of IP, there is an instance of ReflectedEvent per event in a class (making it effectively static). This Refl

Re: [IronPython] static source2handler mapping causing memory leaks

2007-12-18 Thread Kamil Dworakowski
> > Why not make values of the mapping weak references too? Weak ref for value is bad because that would allow the handler to be garbage collected even though the sender is alive. That problem is harder than I thought initially. Why not store the subscribers on a list attached to the source obje

Re: [IronPython] raw_input seems to hang (for winXP ipy 2.0a6)

2007-12-18 Thread Dino Viehland
This does repro for me on Vista w/ .NET 3.5. Let me dig into it a little more and see what's going on. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Monday, December 17, 2007 6:23 PM To: Discussion of IronPython Subject: Re: [IronPy

Re: [IronPython] File as TextReader

2007-12-18 Thread Dino Viehland
This looks ok to me. Everything is either standard Python or standard .NET. The additional conversions also sound like a good idea. We already support a number of conversions to .NET (e.g. things like lists and tuples can turn into List) but we probably just need to go through a lot of types a

Re: [IronPython] static source2handler mapping causing memory leaks

2007-12-18 Thread Dino Viehland
If I remember correctly we can't just directly hook the events the 'normal' way because then the unhook fails in certain cases. But it looks like we still have some bugs related to that anyway. I tracked down the original bug and the way this came about was we had code like: >>> class C: ...

Re: [IronPython] raw_input seems to hang (for winXP ipy 2.0a6)

2007-12-18 Thread Dino Viehland
Ok, I've tracked this issue down - and thanks for the bug report (sorry we missed it the 1st time). The problem here is that in PythonTextCRLFReader.ReadBuffer (which is used by PythonFile) we call "ReadBlock" instead of "Read". This causes the input to block until a 20-character buffer is exh

Re: [IronPython] Slice assignment in array

2007-12-18 Thread Dino Viehland
Thanks for the bug report - I've opened CodePlex bug #14452. I agree this should work. http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=14452 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sanghyeon Seo Sent: Monday, December 17, 2007 7