Re: [IronPython] HostCodeHeap leakage?

2010-10-18 Thread Ronnie Maor
le. > > > > *From:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Ronnie Maor > *Sent:* Monday, October 18, 2010 1:25 PM > > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] HostCodeHeap leakage? > > > > Can som

Re: [IronPython] HostCodeHeap leakage?

2010-10-18 Thread Ronnie Maor
Can someone from IPy team ack that you saw this? The issue is causing us a lot of trouble, so we'd really appreciate it if you could tell us how to fix - we've already built from source to fix a previous leak, so no problem building with another patch. BTW, the default value in the function defini

Re: [IronPython] bug when overriding __delattr__

2010-06-23 Thread Ronnie Maor
cool On Wed, Jun 23, 2010 at 3:39 PM, Michael Foord wrote: > On 23/06/2010 13:38, Ronnie Maor wrote: > > The following code works in CPython 2.6.2, but is broken in both IPy 2.6 > and 2.6.1 > > >>> class A(object): > ... def __delattr__(self,name): > .

[IronPython] bug when overriding __delattr__

2010-06-23 Thread Ronnie Maor
The following code works in CPython 2.6.2, but is broken in both IPy 2.6 and 2.6.1 >>> class A(object): ... def __delattr__(self,name): ... object.__delattr__(self,name) ... >>> a = A() >>> a.x = 3 >>> del a.x Traceback (most recent call last): File "", line 1, in File "", lin

Re: [IronPython] adodbapi 2.3.0 (the django version) released

2010-05-03 Thread Ronnie Maor
the alpha test version. > Thanks! > --- > > > On Mon, May 3, 2010 at 1:25 PM, Ronnie Maor wrote: > >> I'd like to play with sqlalchemy with IPy 2.6 (currently 2.6.0) and >> talking to MS SQL database. will this package allow me to do th

Re: [IronPython] adodbapi 2.3.0 (the django version) released

2010-05-03 Thread Ronnie Maor
I'd like to play with sqlalchemy with IPy 2.6 (currently 2.6.0) and talking to MS SQL database. will this package allow me to do this? (apologies if this is a silly question - I thought I'd save myself the learning curve for understanding if it's silly or not...) thanks Ronnie On Mon, May 3, 201

Re: [IronPython] pickling python types

2010-03-24 Thread Ronnie Maor
e. > > > > If you don’t open a bug on CodePlex I will. > > > > *From:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Ronnie Maor > *Sent:* Wednesday, March 24, 2010 11:20 AM > *To:* Discussion of IronPython > *Sub

Re: [IronPython] pickling python types

2010-03-24 Thread Ronnie Maor
Don't mean to nag, but it seems the original email was somehow overlooked. We think it's a bug in 2.6.0 On Mon, Mar 22, 2010 at 1:53 PM, Ronnie Maor wrote: > Just a clarification - the GetPythonType below is superfluous > pickle.dumps(Int64) fails the same way > > seems

Re: [IronPython] pickling python types

2010-03-22 Thread Ronnie Maor
Just a clarification - the GetPythonType below is superfluous pickle.dumps(Int64) fails the same way seems that all python types that aren't native (i.e. shadow an existing CLR type) fail that way. Pickling the CLR type (RuntimeType) actually works. On Mon, Mar 22, 2010 at 9:13 AM, Idan Zaltzberg

Re: [IronPython] normalizing parameters from a method call

2010-03-18 Thread Ronnie Maor
users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Ronnie Maor > *Sent:* Thursday, March 18, 2010 10:40 AM > *To:* Discussion of IronPython > *Subject:* [IronPython] normalizing parameters from a method call > > > > I'm writing

[IronPython] normalizing parameters from a method call

2010-03-18 Thread Ronnie Maor
I'm writing a decorator that needs to identify whether the function it's wrapping contains specific variables and if so, what value was passed to them. For example if the function is foo(x,y) and it's called with foo(1,2) I want to have this information - {'x' : 1, 'y' : 2} My problem is that the

Re: [IronPython] abstract base classes

2010-03-18 Thread Ronnie Maor
his more specific bug: > http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26499 > > > > Thanks for the report! > > > > > > *From:* users-boun...@lists.ironpython.com [mailto: > users-boun...@lists.ironpython.com] *On Behalf Of *Ronnie Maor > *Se

[IronPython] abstract base classes

2010-03-17 Thread Ronnie Maor
This is probably something well known, but I just tried using ABCs in IPy 2.6 for first time and saw that they don't enforce anything: from abc import ABCMeta, abstractmethod class A(object): __metaclass__ = ABCMeta @abstractmethod def foo(self, x): pass class B(A): pass # no

[IronPython] minor issue with types in error messages

2010-03-16 Thread Ronnie Maor
CPython: >>> None(3) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not callable on IPy 2.6.0: >>> None(3) Traceback (most recent call last): File "", line 1, in TypeError: DynamicNull is not callable for some reason the type in the error shows up as

[IronPython] result of partial is not callable

2010-03-13 Thread Ronnie Maor
I got this problem with 2.6.0. Haven't tried on 2.6.1 from System.Threading import ThreadStart from functools import partial def foo(x): pass ThreadStart(partial(foo,3)) # TypeError: Object is not callable def mypartial(f,*bind_a,**bind_kw): def wrapped(*a,**kw): all_kw = bind_kw.cop

Re: [IronPython] bug with closure in coroutine

2010-01-27 Thread Ronnie Maor
@lists.ironpython.com] *On Behalf Of *Ronnie Maor > *Sent:* Wednesday, January 27, 2010 8:17 AM > *To:* Discussion of IronPython > *Subject:* [IronPython] bug with closure in coroutine > > > > Hi IronPython team, > > > > Seems IronPython 2.6 has some prob

[IronPython] bug with closure in coroutine

2010-01-27 Thread Ronnie Maor
Hi IronPython team, Seems IronPython 2.6 has some problems with compiling coroutines that contain closures: tmp.py: def coroutine(): x = yield 3 def inner(): print 'x=',x inner() c = coroutine() c.next() c.send(10) with CPython: C:\Temp>python tmp.py x= 10 Traceback (most

Re: [IronPython] SystemError: A specified parameter was not correct (vmware api soap call)

2009-05-24 Thread Ronnie Maor
I think it's a VMware problem, not IronPython - I used to get those during development. Usually it's something silly like trying to retrieve a non-existent property.I'm using TraversalSpec, so if you send the code you're using I can try to help you. On Thu, May 21, 2009 at 7:35 PM, jean-marc pouch

Re: [IronPython] Problem with random module in IPY 1.1.1

2008-10-13 Thread Ronnie Maor
Python step, and is, therefore, > threadsafe" so arguably, this is a bug in the _random module of IronPython. > Please report it to CodePlex. > > On Mon, Oct 13, 2008 at 1:57 PM, Ronnie Maor <[EMAIL PROTECTED]>wrote: > >> problem was caused by calling random fr

Re: [IronPython] Problem with random module in IPY 1.1.1

2008-10-13 Thread Ronnie Maor
problem was caused by calling random from several threads without locking. it reproduces more easily in IPy than in CPython because of the GIL, but it's documented as not thread safe for CPython too. On Sun, Oct 12, 2008 at 11:27 AM, Asaf Kleinbort <[EMAIL PROTECTED]>wrote: > Hi, > > We have enc

Re: [IronPython] IPyb5 performance

2008-09-29 Thread Ronnie Maor
ariables: > > > > source.Compile().Execute(mainScope); > > > > Not sure if that's the case anymore, but it's worth a try. > > > > ~js > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Ronnie Maor > *Sent:* Satu

[IronPython] IPyb5 performance

2008-09-27 Thread Ronnie Maor
Hi all, I've finally managed to get my code running correctly under IPy2b5 - thanks everyone who helped! I'm now left with a performance problem. My code seems to run roughly 2 times slower: * infra tests regressed from 19 seconds in IPy 1.1.1 to 33 seconds in IPy2b5 * application level tests reg

Re: [IronPython] problem compiling extension methods on IPy2b5

2008-09-23 Thread Ronnie Maor
solution that we haven't invented yet? > ;) > > > On Tue, Sep 23, 2008 at 1:58 PM, Ronnie Maor <[EMAIL PROTECTED]>wrote: > >> well, workaround seems to work, so I'm happily stumbling along my way >> again :-) >> thanks. >> >> do you know

Re: [IronPython] problem compiling extension methods on IPy2b5

2008-09-23 Thread Ronnie Maor
rgets.Method | AttributeTargets.Class | > AttributeTargets.Assembly)] > sealed class ExtensionAttribute : Attribute { } > } > > On Tue, Sep 23, 2008 at 8:30 AM, Ronnie Maor <[EMAIL PROTECTED]>wrote: > >> I have an issue with compiling extension methods. I've read the blo

[IronPython] problem compiling extension methods on IPy2b5

2008-09-23 Thread Ronnie Maor
I have an issue with compiling extension methods. I've read the blog on this, but can't get it to work. The symptom is that when I have an extension method in my project, I get the following error: Missing compiler required member

Re: [IronPython] IP2b5 - error in calling bound method from C#?

2008-09-22 Thread Ronnie Maor
'll fix this for the RC. > great. > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Ronnie Maor > *Sent:* Monday, September 22, 2008 6:39 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] IP2b5 - error in calling bound method

Re: [IronPython] IPy2b5 - different types with same name are considered equal

2008-09-22 Thread Ronnie Maor
> X == A > > If you need a temporary workaround for this, you can compare id(type(x)) > instead of the type(x). > > On Mon, Sep 22, 2008 at 7:56 AM, Ronnie Maor <[EMAIL PROTECTED]>wrote: > >> class A(object): >> def foo(self): print "original A" >

[IronPython] IPy2b5 - different types with same name are considered equal

2008-09-22 Thread Ronnie Maor
class A(object): def foo(self): print "original A" orig = A() class A(object): def foo(self): print "new A" new = A() if type(orig) == type(new): print "types are equal" else: print "types are not equal" orig.foo() new.foo() on CPython and IPy 1.1 the output is: types

Re: [IronPython] IP2b5 - error in calling bound method from C#?

2008-09-22 Thread Ronnie Maor
2nd attempt at defining the problem: "problem assigning bound method to delegate?" that's my last try. now someone who actually has a clue needs to look at it :-) On Mon, Sep 22, 2008 at 3:29 PM, Ronnie Maor <[EMAIL PROTECTED]> wrote: > I think this is a bug and not some

[IronPython] IP2b5 - error in calling bound method from C#?

2008-09-22 Thread Ronnie Maor
I think this is a bug and not some silly mistake on my part... not sure exactly which flows this effects, but here is a small repro: import System.Threading def cb(state): print "CB CALLED" class Timer(object): def __init__(self,delay,interval): def _inner_cb(state):

Re: [IronPython] Importing System in IronPython 2 beta 5

2008-09-21 Thread Ronnie Maor
thanks! On Sun, Sep 21, 2008 at 6:23 PM, Serge R <[EMAIL PROTECTED]> wrote: > Works like a charm, thank you. > > > On 9/22/08, Michael Foord <[EMAIL PROTECTED]> wrote: >> >> Ronnie Maor wrote: >> >>> I get the same problem. >>> &g

Re: [IronPython] Importing System in IronPython 2 beta 5

2008-09-21 Thread Ronnie Maor
I get the same problem. Another symptom is that "import System" fails if you don't AddReference first. never needed to do that for IPy 1.1 and don't need to either when running ipy 2.0. It fails with my hosting code, and also reproduces with the "hello world" hosting sample: http://blogs.msdn.com

Re: [IronPython] unicode problem with vmware api

2008-09-12 Thread Ronnie Maor
hi jean-marc, I'm also working with vmware API from ironpython and have written a simple wrapper which makes it easier. you might want to give it a try: http://www.ironpython.info/index.php/VimWrap ronnie On Fri, Sep 12, 2008 at 2:08 AM, jean-marc pouchoulon < [EMAIL PROTECTED]> wrote: > > >> >

Re: [IronPython] Informal Poll: measuring IronPython performance under x64 OSes

2008-08-19 Thread Ronnie Maor
we are currently running it on 32 bit OSes only. Windows 2003 and XP. On Tue, Aug 19, 2008 at 12:42 AM, Dave Fugate <[EMAIL PROTECTED]> wrote: > Hi everyone, one of the things the IronPython test team does daily is run > a set of standardized benchmarks against the latest internal build of > Iro

Re: [IronPython] Performance of IronPython 2 Beta 4 and IronPython 1

2008-08-19 Thread Ronnie Maor
nice! thanks for **kw fix. that was really bugging us. looks like 2.0b5 is where we'll start seriously looking at switching to 2.0. do you know when it's expected? On Tue, Aug 19, 2008 at 7:09 PM, Dino Viehland <[EMAIL PROTECTED]> wrote: > The fixes for these (specifically the ones I said I had

Re: [IronPython] int64/long incompatibility in dictionary lookup

2008-08-12 Thread Ronnie Maor
interop story. > > > > I've filed this as CodePlex bug #17799 ( > http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=17799). > Thanks for the report. > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Ronnie Maor > *Sent:* Tuesday

[IronPython] int64/long incompatibility in dictionary lookup

2008-08-12 Thread Ronnie Maor
Hi all, is the following a known issue? >>> x = System.Int64(8591464408876390743) >>> y = long(x) >>> x == y True >>> d = {x:3} >>> d[x] 3 >>> d[y] Traceback (most recent call last): File "", line 1, in KeyError: 8591464408876390743 happens in both IPy 1.1.2 and 2.0b4 thanks Ronnie _

Re: [IronPython] Partial classes

2008-06-13 Thread Ronnie Maor
you can also add methods to an existing class like this: class A(object): ... def foo(self,x,y): ... A.foo = foo On Fri, Jun 13, 2008 at 3:22 PM, Michael Foord <[EMAIL PROTECTED]> wrote: > Michael Stephens wrote: > >> Our company has a scripting/macro system. Functions are stored in a

Re: [IronPython] RPyC and IronPython

2008-05-22 Thread Ronnie Maor
ution for projecting them onto .NET types. > And currently in 2.0 anything which implements IEnumerable will get an > __iter__ method. > > Thanks for the reports! > > -Original Message- > From: [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] On Behalf Of Sanghyeon Seo >

[IronPython] RPyC and IronPython

2008-05-21 Thread Ronnie Maor
I'm trying to use RPyC (http://rpyc.wikispaces.com), which is a great package for "generic remote control" of remote processes. it basically works, except for small changes I needed to make due to outstanding IPy incompatiblities. wanted to let people know in case you also want to use it (it's rea

Re: [IronPython] precision problem with Int64

2008-05-19 Thread Ronnie Maor
ItemId=16658). > That means we'll consider fixing it for 1.1.2 but I have no clue how simple > the fix will be – mainly because I have no clue how it got fixed in 2.0 J. > Thanks for the report. > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of

[IronPython] precision problem with Int64

2008-05-19 Thread Ronnie Maor
Hi all, Is the following a known bug? (IPy 1.1.1) >>> import System >>> n = 8591464408876390743 >>> x = System.Int64(n) >>> x 8591464408876390400L >>> y = System.Int64(str(n)) >>> y 8591464408876390743L >>> x == y False n is positive and contained in 63 bits, so there shouldn't even be signed/un

Re: [IronPython] Updates for 1.1.2

2008-04-19 Thread Ronnie Maor
how about this one? seems like a trivial fix: (I'm including my original post. don't know if there's an open bug for this) with the following C# class: public class A { public A(int? i, string s1, string s2, string s3, string s4, string s5) { } } the following python code: A(None, 'a', 'a', 'a

Re: [IronPython] FW: IronPython Studio 1.0 for Isolated and Integrated VS Shell

2008-04-10 Thread Ronnie Maor
finally had some time to play with it. To convert projects from VS SDK sample to IronPython Studio, you need to edit the pyproj files and replace the line near the end of the project that reads with On Sun, Apr 6, 2008 at 11:37 AM, Ronnie Maor <[EMAIL PROTECTED]> wrote: >

Re: [IronPython] FW: IronPython Studio 1.0 for Isolated and Integrated VS Shell

2008-04-06 Thread Ronnie Maor
forgot to mention that I'm using IPy 1.1.1 On Sun, Apr 6, 2008 at 11:34 AM, Ronnie Maor <[EMAIL PROTECTED]> wrote: > two answers and some more info :-) > > 1) This is the first version IPy Studio version I've tried. I have VS2008 > Pro, and have been working w

Re: [IronPython] FW: IronPython Studio 1.0 for Isolated and Integrated VS Shell

2008-04-06 Thread Ronnie Maor
RL you included related to web apps, and > AFAIK IPy Studio doesn't include web app development support. > > > > Harry > > > > *From:* [EMAIL PROTECTED] [mailto: > [EMAIL PROTECTED] *On Behalf Of *Ronnie Maor > *Sent:* Saturday, April 05, 2008 2:35 AM

[IronPython] inheriting from "base" generic type

2008-03-17 Thread Ronnie Maor
Hi Dino, asked you about this at pycon. posting it here per our discussion to help track it. I understand it's not high on your priority list (and shouldn't be, considering the other stuff there) details: have a python class (simplified here) that is a wrapper over an event: class Future(object)

[IronPython] IPy1.1 expected Nullable[int] got NoneType

2007-11-16 Thread Ronnie Maor
with the following C# class: public class A { public A(int? i, string s1, string s2, string s3, string s4, string s5) { } } the following python code: A(None, 'a', 'a', 'a', 'a', 'a') fails with: TypeError: expected Nullable[int], got NoneType I don't know exactly when this happens. for exam

[IronPython] (trivial) bug in binding varargs

2007-11-16 Thread Ronnie Maor
I know "fix trivial bugs week" is over, but still... python 2.5: >>> def log(*a,**kw): print 'a=%s, kw=%s' % (a,kw) >>> def foo(*a,**kw): log(a=a,kw=kw) >>> foo(1,2,x=3) a=(), kw={'a': (1, 2), 'kw': {'x': 3}} ironpython 1.1: >>> def log(*a,**kw): ... print 'a=%s, kw

[IronPython] bug with copy.copy of System.Int64?

2007-10-19 Thread Ronnie Maor
I stumbled across the following problem copying System.Int64: C:\>ipy IronPython 1.1 (1.1) on .NET 2.0.50727.832 Copyright (c) Microsoft Corporation. All rights reserved. >>> import copy >>> from System import Int64 >>> x = Int64(3) >>> x 3L >>> copy.copy(x) 0L >>> copy.deepcopy(x) 0L