From a.wilson82 at gmail.com Mon Nov 1 01:29:59 2010 From: a.wilson82 at gmail.com (andrew Wilson) Date: Sun, 31 Oct 2010 17:29:59 -0700 Subject: [IronPython] Testing Controllers in MVC.net via IronPython Message-ID: I was trying to run some tests against the nerd dinner project for some proof of concept code I am working on. In this particular test, I was hoping to test logging into the system via the AccountController. The issue I am running into, however, is that I am getting an access exception to the app_data folder except its looking for it in the IronPython install directory. I thought to check and add another path (in the visual studio tooling) to look at the application root but that had no effect. Looking at the os.getcwd(), it's set to the proper directory. I also tried to manually add the path to sys.path.append() as well. Any thoughts on what is going on? -Andrew -- ?If I had six hours to chop down a tree, I?d spend the first four of them sharpening my axe?. -Abraham Lincoln -------------- next part -------------- An HTML attachment was scrubbed... URL: From LHaynes at Gemcomsoftware.com Wed Nov 3 03:46:07 2010 From: LHaynes at Gemcomsoftware.com (Leighton Haynes) Date: Tue, 2 Nov 2010 19:46:07 -0700 Subject: [IronPython] Problem with 'obsoleted' functions and warnings. Message-ID: <2EFB9E117D333C42A67280E55D2D3578018A5B945CAD@MAILBOX2.gemcomsoftware.priv> Hi Guys, We have a problem that seems to be related to a combination of multi-threaded code, the use of the python standard library and some obsoleted functions in one of our libraries. We have a C# library, call it DeprecatedLib, which has some function marked as [Obsolete] (this should result in warnings at runtime). We have a threaded section of code (running in IronPython) which can result in half a dozen of these method calls happening at the same time. We have the python standard libraries available to our IronPython interpreter. What seems to happen is that IronPython hits the Obsolete attribute, decides it needs to warn, imports warnings.py from the standard library (on 2 threads at the same time) and then it fails with a MissingMemberException of "'module' object has no attribute XXX" where XXX is either '_getframe' or 'warn'. I'm using IronPython 2.6.1 (.net 2 version) for my testing. It fails about 90% of the time in my test app (and much closer to 100% in our real app). The section of IronPython where it imports warnings.py has a fallback method for doing the warning which it uses if it can't find a 'warnings' module. This appears to work fine. It only fails when the standard library is available and it tries to use the CPython warnings.py. What I'm trying to work out is: is this a problem with IronPython or something with the standard warnings.py? I can 'fix' the error just by removing warnings.py from our standard library, but I'm a bit nervous that this might result in me hitting a similar problem in the future when something else triggers parallel imports (I thought this supposed to work in 2.6.1?). I'd appreciate any guidance on this. Regards, Leighton Haynes... Details of my test: My sample python file (tester.py): import System import clr clr.AddReference("DeprecatedLib") import DeprecatedLib class Tester(): def __init__(self): pass def go(self): for i in range(0,100): System.Threading.ThreadPool.QueueUserWorkItem(self.doError, None) def doError(self, object): d = DeprecatedLib.Deprecated() d.DoSomething() t = Tester() t.go() DeprecatedLib is a simple C# dll with a single class: using System; namespace DeprecatedLib { public class Deprecated { [Obsolete] public void DoSomething() { } } } I'm running it using the ipy.exe command line: IronPython 2.6.1 (2.6.10920.0) on .NET 2.0.50727.4952 Type "help", "copyright", "credits" or "license" for more information. >>> import tester >>> warning: DeprecationWarning: Deprecated.DoSomething has been obsoleted. ... And a full stack trace of the error: System.MissingMemberException: 'module' object has no attribute '_getframe' at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at CallSite.Target(Closure , CallSite , CodeContext , Object , Object[] ) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonContext.CallSplat(Object func, Object[] args) at IronPython.Runtime.Operations.PythonOps.Warn(CodeContext context, PythonType category, String message, Object[] args) at IronPython.Runtime.Binding.WarningInfo.<>c__DisplayClass3.b__1(Object[] callArgs, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`1.Call0(CallSite site, CodeContext context, TFuncType func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , CodeContext , Object ) at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonFunction.FunctionCaller`2.Call2(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at _Scripting_(Object[] , Object ) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) If anyone's especially keen, I can provide this as a zip file. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Wed Nov 3 04:10:45 2010 From: dinov at microsoft.com (Dino Viehland) Date: Wed, 3 Nov 2010 03:10:45 +0000 Subject: [IronPython] Problem with 'obsoleted' functions and warnings. In-Reply-To: <2EFB9E117D333C42A67280E55D2D3578018A5B945CAD@MAILBOX2.gemcomsoftware.priv> References: <2EFB9E117D333C42A67280E55D2D3578018A5B945CAD@MAILBOX2.gemcomsoftware.priv> Message-ID: I'd say this is technically a bug in IronPython - but one which people would rather have us not fix (at least naively) simply because they do like parallel import. CPython holds a big lock while doing imports so this problem doesn't exist there - but CPython's importing is much faster so parallelization is less necessary. We could add a per-module lock which is different from CPython but still allows parallel imports. Something where importing a module marks some internal state in a PythonModule object and when we import a module we check for that and block for completion. Of course that could lead to deadlocks in the face of circular imports performed in parallel :( So we could then add some sort of deadlock aware lock and break the deadlock by allowing one module to continue and see uninitialized state - intuitively I think that'll be the same observable behavior as the circular import case in CPython but I'm not a 100% certain. Now someone could try to implement this and contribute it if they were interested :) An alternate workaround to removing warnings.py might be to import warnings on startup (so it's initialized before you hit this issue). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Leighton Haynes Sent: Tuesday, November 02, 2010 7:46 PM To: users at lists.ironpython.com Subject: [IronPython] Problem with 'obsoleted' functions and warnings. Hi Guys, We have a problem that seems to be related to a combination of multi-threaded code, the use of the python standard library and some obsoleted functions in one of our libraries. We have a C# library, call it DeprecatedLib, which has some function marked as [Obsolete] (this should result in warnings at runtime). We have a threaded section of code (running in IronPython) which can result in half a dozen of these method calls happening at the same time. We have the python standard libraries available to our IronPython interpreter. What seems to happen is that IronPython hits the Obsolete attribute, decides it needs to warn, imports warnings.py from the standard library (on 2 threads at the same time) and then it fails with a MissingMemberException of "'module' object has no attribute XXX" where XXX is either '_getframe' or 'warn'. I'm using IronPython 2.6.1 (.net 2 version) for my testing. It fails about 90% of the time in my test app (and much closer to 100% in our real app). The section of IronPython where it imports warnings.py has a fallback method for doing the warning which it uses if it can't find a 'warnings' module. This appears to work fine. It only fails when the standard library is available and it tries to use the CPython warnings.py. What I'm trying to work out is: is this a problem with IronPython or something with the standard warnings.py? I can 'fix' the error just by removing warnings.py from our standard library, but I'm a bit nervous that this might result in me hitting a similar problem in the future when something else triggers parallel imports (I thought this supposed to work in 2.6.1?). I'd appreciate any guidance on this. Regards, Leighton Haynes... Details of my test: My sample python file (tester.py): import System import clr clr.AddReference("DeprecatedLib") import DeprecatedLib class Tester(): def __init__(self): pass def go(self): for i in range(0,100): System.Threading.ThreadPool.QueueUserWorkItem(self.doError, None) def doError(self, object): d = DeprecatedLib.Deprecated() d.DoSomething() t = Tester() t.go() DeprecatedLib is a simple C# dll with a single class: using System; namespace DeprecatedLib { public class Deprecated { [Obsolete] public void DoSomething() { } } } I'm running it using the ipy.exe command line: IronPython 2.6.1 (2.6.10920.0) on .NET 2.0.50727.4952 Type "help", "copyright", "credits" or "license" for more information. >>> import tester >>> warning: DeprecationWarning: Deprecated.DoSomething has been obsoleted. ... And a full stack trace of the error: System.MissingMemberException: 'module' object has no attribute '_getframe' at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at CallSite.Target(Closure , CallSite , CodeContext , Object , Object[] ) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonContext.CallSplat(Object func, Object[] args) at IronPython.Runtime.Operations.PythonOps.Warn(CodeContext context, PythonType category, String message, Object[] args) at IronPython.Runtime.Binding.WarningInfo.<>c__DisplayClass3.b__1(Object[] callArgs, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`1.Call0(CallSite site, CodeContext context, TFuncType func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , CodeContext , Object ) at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonFunction.FunctionCaller`2.Call2(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at _Scripting_(Object[] , Object ) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) If anyone's especially keen, I can provide this as a zip file. -------------- next part -------------- An HTML attachment was scrubbed... URL: From LHaynes at Gemcomsoftware.com Wed Nov 3 06:34:02 2010 From: LHaynes at Gemcomsoftware.com (Leighton Haynes) Date: Tue, 2 Nov 2010 22:34:02 -0700 Subject: [IronPython] Problem with 'obsoleted' functions and warnings. In-Reply-To: References: <2EFB9E117D333C42A67280E55D2D3578018A5B945CAD@MAILBOX2.gemcomsoftware.priv> Message-ID: <2EFB9E117D333C42A67280E55D2D3578018A5B945CB4@MAILBOX2.gemcomsoftware.priv> Thanks for this quick response Dino. You're right that I can work around it by importing it at the start, the problem being that it's imported by the IronPython inner workings in fairly hard to predict ways, so we'd have to add it to the top of basically every python file... and we allow user scripts which could also trigger it. Your post let me do some better googling to get a better handle on it, so thanks for that. Another possible solution that I can think of would be to make it so that code executing during an import can see uninitialized modules and reference them, but 'normal' scripts can only see fully initialized modules (I don't have a good enough handle in the IronPython internals to know if that kind of solution is viable - but it seems conceptually ok from my current understanding). I'm not sure if this would be as correct as your solution. Cheers, Leighton... From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Wednesday, 3 November 2010 11:11 AM To: Discussion of IronPython Subject: Re: [IronPython] Problem with 'obsoleted' functions and warnings. I'd say this is technically a bug in IronPython - but one which people would rather have us not fix (at least naively) simply because they do like parallel import. CPython holds a big lock while doing imports so this problem doesn't exist there - but CPython's importing is much faster so parallelization is less necessary. We could add a per-module lock which is different from CPython but still allows parallel imports. Something where importing a module marks some internal state in a PythonModule object and when we import a module we check for that and block for completion. Of course that could lead to deadlocks in the face of circular imports performed in parallel :( So we could then add some sort of deadlock aware lock and break the deadlock by allowing one module to continue and see uninitialized state - intuitively I think that'll be the same observable behavior as the circular import case in CPython but I'm not a 100% certain. Now someone could try to implement this and contribute it if they were interested :) An alternate workaround to removing warnings.py might be to import warnings on startup (so it's initialized before you hit this issue). From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Leighton Haynes Sent: Tuesday, November 02, 2010 7:46 PM To: users at lists.ironpython.com Subject: [IronPython] Problem with 'obsoleted' functions and warnings. Hi Guys, We have a problem that seems to be related to a combination of multi-threaded code, the use of the python standard library and some obsoleted functions in one of our libraries. We have a C# library, call it DeprecatedLib, which has some function marked as [Obsolete] (this should result in warnings at runtime). We have a threaded section of code (running in IronPython) which can result in half a dozen of these method calls happening at the same time. We have the python standard libraries available to our IronPython interpreter. What seems to happen is that IronPython hits the Obsolete attribute, decides it needs to warn, imports warnings.py from the standard library (on 2 threads at the same time) and then it fails with a MissingMemberException of "'module' object has no attribute XXX" where XXX is either '_getframe' or 'warn'. I'm using IronPython 2.6.1 (.net 2 version) for my testing. It fails about 90% of the time in my test app (and much closer to 100% in our real app). The section of IronPython where it imports warnings.py has a fallback method for doing the warning which it uses if it can't find a 'warnings' module. This appears to work fine. It only fails when the standard library is available and it tries to use the CPython warnings.py. What I'm trying to work out is: is this a problem with IronPython or something with the standard warnings.py? I can 'fix' the error just by removing warnings.py from our standard library, but I'm a bit nervous that this might result in me hitting a similar problem in the future when something else triggers parallel imports (I thought this supposed to work in 2.6.1?). I'd appreciate any guidance on this. Regards, Leighton Haynes... Details of my test: My sample python file (tester.py): import System import clr clr.AddReference("DeprecatedLib") import DeprecatedLib class Tester(): def __init__(self): pass def go(self): for i in range(0,100): System.Threading.ThreadPool.QueueUserWorkItem(self.doError, None) def doError(self, object): d = DeprecatedLib.Deprecated() d.DoSomething() t = Tester() t.go() DeprecatedLib is a simple C# dll with a single class: using System; namespace DeprecatedLib { public class Deprecated { [Obsolete] public void DoSomething() { } } } I'm running it using the ipy.exe command line: IronPython 2.6.1 (2.6.10920.0) on .NET 2.0.50727.4952 Type "help", "copyright", "credits" or "license" for more information. >>> import tester >>> warning: DeprecationWarning: Deprecated.DoSomething has been obsoleted. ... And a full stack trace of the error: System.MissingMemberException: 'module' object has no attribute '_getframe' at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run4[T0,T1,T2,T3,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget3(PythonFunction function, Object arg0, Object arg1, Object arg2) at CallSite.Target(Closure , CallSite , CodeContext , Object , Object[] ) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonContext.CallSplat(Object func, Object[] args) at IronPython.Runtime.Operations.PythonOps.Warn(CodeContext context, PythonType category, String message, Object[] args) at IronPython.Runtime.Binding.WarningInfo.<>c__DisplayClass3.b__1(Object[] callArgs, Boolean& shouldOptimize) at IronPython.Runtime.Types.BuiltinFunction.BuiltinMethodCaller`1.Call0(CallSite site, CodeContext context, TFuncType func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , CodeContext , Object ) at IronPython.Compiler.Ast.CallExpression.Invoke0Instruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) at IronPython.Runtime.PythonFunction.FunctionCaller`2.Call2(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1) at CallSite.Target(Closure , CallSite , Object , Object ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at _Scripting_(Object[] , Object ) at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack) at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state) If anyone's especially keen, I can provide this as a zip file. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcao219 at gmail.com Thu Nov 4 05:32:34 2010 From: jcao219 at gmail.com (Jimmy Cao) Date: Wed, 3 Nov 2010 23:32:34 -0500 Subject: [IronPython] Congratulations to Michael Foord on Receiving the Community Service Award Message-ID: > > The Python Software Foundation has presented the Community Service Award > for the third quarter of 2010 to Michael Foord in > recognition of his incredible work in promoting Python everywhere he could. > > Michael is active on IRC channels, mailing lists, conferences, sprints and > similar events. On the development side, he has been doing incredible work > on unitest and unitest2. Michael also helps maintain the Planet Python RSS > feed and python.org website, and with organizing the Europython meeting > and Summit . > > The Python Software Foundation is pleased to recognize Michael's > contributions to the community. > http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awards.html Well deserved! Thanks for all the hard work, Michael. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Larry.Jones at aspentech.com Thu Nov 4 13:31:56 2010 From: Larry.Jones at aspentech.com (Jones, Larry) Date: Thu, 4 Nov 2010 08:31:56 -0400 Subject: [IronPython] Congratulations to Michael Foord on Receiving theCommunity Service Award In-Reply-To: References: Message-ID: Ditto - and a great book! From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Cao Sent: Wednesday, November 03, 2010 11:33 PM To: Discussion of IronPython Subject: [IronPython] Congratulations to Michael Foord on Receiving theCommunity Service Award The Python Software Foundation has presented the Community Service Award for the third quarter of 2010 to Michael Foord in recognition of his incredible work in promoting Python everywhere he could. Michael is active on IRC channels, mailing lists, conferences, sprints and similar events. On the development side, he has been doing incredible work on unitest and unitest2. Michael also helps maintain the Planet Python RSS feed and python.org website, and with organizing the Europython meeting and Summit . The Python Software Foundation is pleased to recognize Michael's contributions to the community. http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awar ds.html Well deserved! Thanks for all the hard work, Michael. This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Thu Nov 4 13:51:01 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Thu, 4 Nov 2010 09:51:01 -0300 Subject: [IronPython] Congratulations to Michael Foord on Receiving the Community Service Award In-Reply-To: References: Message-ID: Congratulations! Write another book! :) From: jcao219 at gmail.com Date: Wed, 3 Nov 2010 23:32:34 -0500 To: users at lists.ironpython.com Subject: [IronPython] Congratulations to Michael Foord on Receiving the Community Service Award The Python Software Foundation has presented the Community Service Award for the third quarter of 2010 to Michael Foord in recognition of his incredible work in promoting Python everywhere he could. Michael is active on IRC channels, mailing lists, conferences, sprints and similar events. On the development side, he has been doing incredible work on unitest and unitest2. Michael also helps maintain the Planet Python RSS feed and python.org website, and with organizing the Europython meeting and Summit. The Python Software Foundation is pleased to recognize Michael's contributions to the community. http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awards.html Well deserved! Thanks for all the hard work, Michael. _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at voidspace.org.uk Fri Nov 5 17:47:19 2010 From: michael at voidspace.org.uk (Michael Foord) Date: Fri, 05 Nov 2010 16:47:19 +0000 Subject: [IronPython] Congratulations to Michael Foord on Receiving the Community Service Award In-Reply-To: References: Message-ID: <4CD43517.1060208@voidspace.org.uk> On 04/11/2010 12:51, Pablo Dalmazzo wrote: > Congratulations! Write another book! :) > Thanks all. :-) I'll add writing another book to my list of things to do... Michael > ------------------------------------------------------------------------ > From: jcao219 at gmail.com > Date: Wed, 3 Nov 2010 23:32:34 -0500 > To: users at lists.ironpython.com > Subject: [IronPython] Congratulations to Michael Foord on Receiving > the Community Service Award > > The Python Software Foundation has presented the Community Service > Award for the third quarter of 2010 to Michael Foord > in > recognition of his incredible work in promoting Python everywhere > he could. > Michael is active on IRC channels, mailing lists, conferences, > sprints and similar events. On the development side, he has been > doing incredible work on unitest and unitest2. Michael also helps > maintain the Planet Python RSS feed and python.org > website, and with organizing the Europython > meeting and Summit . > The Python Software Foundation is pleased to recognize Michael's > contributions to the community. > > > http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awards.html > > > Well deserved! Thanks for all the hard work, Michael. > > _______________________________________________ Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.voidspace.org.uk/ READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies ("BOGUS AGREEMENTS") that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. -------------- next part -------------- An HTML attachment was scrubbed... URL: From hank at prosysplus.com Fri Nov 5 20:14:54 2010 From: hank at prosysplus.com (Hank Fay) Date: Fri, 5 Nov 2010 15:14:54 -0400 Subject: [IronPython] Congratulations to Michael Foord on Receiving the Community Service Award In-Reply-To: <4CD43517.1060208@voidspace.org.uk> References: <4CD43517.1060208@voidspace.org.uk> Message-ID: I think you're the only author I've seen (except for those who have a team of researchers behind them, as some of the big names do) who didn't respond with fright and alarm to the suggestion of writing another book. Remarkable. Go for it. I'm thinking a dynamic data framework, so dynamic language folks can have a choice other than the static ORM's (EF, NH, etc.). And congratulations on your award (richly deserved) and your book (deservedly praised). Hank On Fri, Nov 5, 2010 at 12:47 PM, Michael Foord wrote: > On 04/11/2010 12:51, Pablo Dalmazzo wrote: > > Congratulations! Write another book! :) > > > Thanks all. :-) > > I'll add writing another book to my list of things to do... > > Michael > > ------------------------------ > From: jcao219 at gmail.com > Date: Wed, 3 Nov 2010 23:32:34 -0500 > To: users at lists.ironpython.com > Subject: [IronPython] Congratulations to Michael Foord on Receiving the > Community Service Award > > The Python Software Foundation has presented the Community Service Award > for the third quarter of 2010 to Michael Foord in > recognition of his incredible work in promoting Python everywhere he could. > Michael is active on IRC channels, mailing lists, conferences, sprints and > similar events. On the development side, he has been doing incredible work > on unitest and unitest2. Michael also helps maintain the Planet Python RSS > feed and python.org website, and with organizing the Europython meeting > and Summit . > The Python Software Foundation is pleased to recognize Michael's > contributions to the community. > > > > http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awards.html > > > Well deserved! Thanks for all the hard work, Michael. > > _______________________________________________ Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.comhttp://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > -- > http://www.voidspace.org.uk/ > > READ CAREFULLY. By accepting and reading this email you agree, > on behalf of your employer, to release me from all obligations > and waivers arising from any and all NON-NEGOTIATED agreements, > licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, > confidentiality, non-disclosure, non-compete and acceptable use > policies (?BOGUS AGREEMENTS?) that I have entered into with your > employer, its partners, licensors, agents and assigns, in > perpetuity, without prejudice to my ongoing rights and privileges. > You further represent that you have the authority to release me > from any BOGUS AGREEMENTS on behalf of your employer. > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From twyatt at ppi.ca Fri Nov 5 21:01:16 2010 From: twyatt at ppi.ca (Tim P. Wyatt) Date: Fri, 5 Nov 2010 13:01:16 -0700 Subject: [IronPython] Tim Wyatt is out of the office Message-ID: I will be out of the office starting 05/11/2010 and will not return until 10/11/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpdesk at ppi.ca) From kfarmer at thuban.org Sat Nov 6 07:53:17 2010 From: kfarmer at thuban.org (Keith J. Farmer) Date: Fri, 5 Nov 2010 23:53:17 -0700 Subject: [IronPython] Congratulations to Michael Foord on Receiving theCommunity Service Award References: Message-ID: awesome job :) ________________________________ From: users-bounces at lists.ironpython.com on behalf of Jimmy Cao Sent: Wed 11/3/2010 9:32 PM To: Discussion of IronPython Subject: [IronPython] Congratulations to Michael Foord on Receiving theCommunity Service Award The Python Software Foundation has presented the Community Service Award for the third quarter of 2010 to Michael Foord in recognition of his incredible work in promoting Python everywhere he could. Michael is active on IRC channels, mailing lists, conferences, sprints and similar events. On the development side, he has been doing incredible work on unitest and unitest2. Michael also helps maintain the Planet Python RSS feed and python.org website, and with organizing the Europython meeting and Summit . The Python Software Foundation is pleased to recognize Michael's contributions to the community. http://pyfound.blogspot.com/2010/11/third-quarter-community-service-awards.html Well deserved! Thanks for all the hard work, Michael. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Sun Nov 7 20:23:52 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 7 Nov 2010 12:23:52 -0700 Subject: [IronPython] bytes and str in 2.7 io module Message-ID: In IronPython 2.7, the io classes are pretty strict that subclasses must return bytes from read(). However, in CPython, bytes is an alias for str, and therefore returning a str is perfectly valid. In particular, the gzip module does this, and trying to fix it to handle bytes is a never-ending journey and could very well break other things. I think changing io to be less strict and accept strings as a result from read() is a better option. Is there anything that likely to be broken by doing so? - Jeff From dinov at microsoft.com Mon Nov 8 18:18:48 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 8 Nov 2010 17:18:48 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> Jeff wrote: > In IronPython 2.7, the io classes are pretty strict that subclasses must return > bytes from read(). However, in CPython, bytes is an alias for str, and > therefore returning a str is perfectly valid. In particular, the gzip module does > this, and trying to fix it to handle bytes is a never-ending journey and could > very well break other things. I think changing io to be less strict and accept > strings as a result from read() is a better option. > > Is there anything that likely to be broken by doing so? I think this will be fine. It will be a binary breaking change (assuming we're talking about just changing the return types on types in the io module to object) but we've always allowed those between major releases. I doubt there's many (if any) callers to these from C# anyway. From jdhardy at gmail.com Mon Nov 8 18:36:47 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 8 Nov 2010 10:36:47 -0700 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: On Mon, Nov 8, 2010 at 10:18 AM, Dino Viehland wrote: > I think this will be fine. ?It will be a binary breaking change (assuming we're talking > about just changing the return types on types in the io module to object) but we've > always allowed those between major releases. ?I doubt there's many (if any) callers to > these from C# anyway. The one function that seems to cause problems (_RawIOBase.read()) already returns object. I think this only crops up when a subclass of io.RawIOBase overrides read() but returns a string - the io module will try to cast the result from object to Bytes, and fail with a TypeError. This is #29378 if anyone else is interested. - Jeff From dinov at microsoft.com Mon Nov 8 18:55:26 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 8 Nov 2010 17:55:26 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Jeff wrote: > The one function that seems to cause problems (_RawIOBase.read()) already > returns object. I think this only crops up when a subclass of io.RawIOBase > overrides read() but returns a string - the io module will try to cast the result > from object to Bytes, and fail with a TypeError. > > This is #29378 if anyone else is interested. Ahh, yeah, we should probably have a helper method in here which will convert the string back to bytes rather than all of these casts to Bytes. It could also be incompatible w/ CPython in that they *might* allow bytearray objects to be returned too which these casts would also prevent. From jdhardy at gmail.com Mon Nov 8 19:55:43 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 8 Nov 2010 11:55:43 -0700 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland wrote: > Ahh, yeah, we should probably have a helper method in here which will convert > the string back to bytes rather than all of these casts to Bytes. ?It could also be > incompatible w/ CPython in that they *might* allow bytearray objects to be returned > too which these casts would also prevent. I'll check what CPython allows (I presume you're still prohibited from looking at the source for it?). I have a patch that checks for strings as well, but I'm not happy with it yet. - Jeff From dinov at microsoft.com Mon Nov 8 20:44:24 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 8 Nov 2010 19:44:24 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E07DCF6@TK5EX14MBXC141.redmond.corp.microsoft.com> Jeff wrote: > On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland > wrote: > > Ahh, yeah, we should probably have a helper method in here which will > > convert the string back to bytes rather than all of these casts to > > Bytes. ?It could also be incompatible w/ CPython in that they *might* > > allow bytearray objects to be returned too which these casts would also > prevent. > > I'll check what CPython allows (I presume you're still prohibited from looking > at the source for it?). I have a patch that checks for strings as well, but I'm not > happy with it yet. I think the answer is yes, we are still prohibited from looking at the code, just because we're generally not supposed to look at open source code at all. From vernondcole at gmail.com Tue Nov 9 03:30:54 2010 From: vernondcole at gmail.com (Vernon Cole) Date: Mon, 8 Nov 2010 19:30:54 -0700 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: Jeff: Make sure to check the Python 3 bindings as well. We don't want to loose ground going in that direction, since IPy already has Python 3's best feature -- all strings are Unicode. Maybe the equivalent of "if sys.version[0] >= '3':" should be buried in the helper so that that wheel will not need to be re-invented in the future. Just a thought. -- Vernon On Mon, Nov 8, 2010 at 11:55 AM, Jeff Hardy wrote: > On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland > wrote: > > Ahh, yeah, we should probably have a helper method in here which will > convert > > the string back to bytes rather than all of these casts to Bytes. It > could also be > > incompatible w/ CPython in that they *might* allow bytearray objects to > be returned > > too which these casts would also prevent. > > I'll check what CPython allows (I presume you're still prohibited from > looking at the source for it?). I have a patch that checks for strings > as well, but I'm not happy with it yet. > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Tue Nov 9 04:16:48 2010 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 9 Nov 2010 03:16:48 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2E082AA6@TK5EX14MBXC141.redmond.corp.microsoft.com> Vernon wrote: Jeff: Make sure to check the Python 3 bindings as well. We don't want to loose ground going in that direction, since IPy already has Python 3's best feature -- all strings are Unicode. Maybe the equivalent of "if sys.version[0] >= '3':" should be buried in the helper so that that wheel will not need to be re-invented in the future. Just a thought. We do this elsewhere but it requires flowing a CodeContext in everywhere if it's not already flowed in or held onto by the object. If we centralize this is one function though we can just remove the extra allowed conversion when going to 3k. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Tue Nov 9 05:41:37 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 8 Nov 2010 21:41:37 -0700 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E082AA6@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E082AA6@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: On Mon, Nov 8, 2010 at 8:16 PM, Dino Viehland wrote: > Vernon wrote: > > Jeff: > ? Make sure to check the Python 3 bindings as well. We don't want to loose > ground going in that direction, since IPy already has Python 3's best > feature -- all strings are Unicode. Maybe the equivalent of "if > sys.version[0] >= '3':" should be buried in the helper so that that wheel > will not need to be re-invented in the future.? Just a thought. > > We do this elsewhere but it requires flowing a CodeContext in everywhere if > it?s not already flowed in or held onto by the object.? If we centralize > this is one function though we can just remove the extra allowed conversion > when going to 3k. That's pretty much what I plan to do :) - Jeff From jdhardy at gmail.com Tue Nov 9 08:32:28 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 9 Nov 2010 00:32:28 -0700 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland wrote: > Ahh, yeah, we should probably have a helper method in here which will convert > the string back to bytes rather than all of these casts to Bytes. Turns out there already was one: PythonIOModule.GetBytes(). I'll revert and make the changes to use it tomorrow (later today, I guess...). - Jeff From fuzzyman at voidspace.org.uk Tue Nov 9 12:12:06 2010 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Tue, 09 Nov 2010 11:12:06 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E07DCF6@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07DCF6@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <4CD92C86.3070901@voidspace.org.uk> On 08/11/2010 19:44, Dino Viehland wrote: > > Jeff wrote: >> On Mon, Nov 8, 2010 at 10:55 AM, Dino Viehland >> wrote: >>> Ahh, yeah, we should probably have a helper method in here which will >>> convert the string back to bytes rather than all of these casts to >>> Bytes. It could also be incompatible w/ CPython in that they *might* >>> allow bytearray objects to be returned too which these casts would also >> prevent. >> >> I'll check what CPython allows (I presume you're still prohibited from looking >> at the source for it?). I have a patch that checks for strings as well, but I'm not >> happy with it yet. > I think the answer is yes, we are still prohibited from looking at the code, just > because we're generally not supposed to look at open source code at all. Ha. :-) Does that mean you're no longer permitted to read the IronPython source code. ;-) Michael > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -- http://www.voidspace.org.uk/ READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (?BOGUS AGREEMENTS?) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. From bruce.bromberek at gmail.com Tue Nov 9 17:45:04 2010 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Tue, 9 Nov 2010 10:45:04 -0600 Subject: [IronPython] 2.7Beta1 Bug in Compile Modules Message-ID: In trying to compile the StdLib for a program, I kept running into an error with BaseHTTPServer.py. I've isolated it down to an issue with Dictionaries and tuples. This code: responses = { 100: ('Continue', 'Request received, please continue'), } Generates this error: Traceback (most recent call last): File "pyc.py", line 159, in File "pyc.py", line 151, in Main SystemError: CompileToMethod cannot compile constant '('Continue', 'Request received, please continue')' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value. However, these constructs work fine: x = ('Continue', 'Request received, please continue') responses = { 100: x, } responses = { 100: ('Continue'), } Is this a known issue? Bruce From dinov at microsoft.com Tue Nov 9 18:17:35 2010 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 9 Nov 2010 17:17:35 +0000 Subject: [IronPython] bytes and str in 2.7 io module In-Reply-To: <4CD92C86.3070901@voidspace.org.uk> References: <6C7ABA8B4E309440B857D74348836F2E07C650@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07CFD8@TK5EX14MBXC141.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2E07DCF6@TK5EX14MBXC141.redmond.corp.microsoft.com> <4CD92C86.3070901@voidspace.org.uk> Message-ID: <6C7ABA8B4E309440B857D74348836F2E085B5F@TK5EX14MBXC141.redmond.corp.microsoft.com> Michael wrote: > > Ha. :-) > > Does that mean you're no longer permitted to read the IronPython source > code. ;-) HA! That's actually a good point - but we got special permission to continue working on IronPython/IronRuby on our own time... It certainly covers writing new code, I'm assuming it covers reading the code as well :) From dinov at microsoft.com Tue Nov 9 18:19:57 2010 From: dinov at microsoft.com (Dino Viehland) Date: Tue, 9 Nov 2010 17:19:57 +0000 Subject: [IronPython] 2.7Beta1 Bug in Compile Modules In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2E085B84@TK5EX14MBXC141.redmond.corp.microsoft.com> Bruce wrote: > In trying to compile the StdLib for a program, I kept running into an error with > BaseHTTPServer.py. I've isolated it down to an issue with Dictionaries and > tuples. > > This code: > > responses = { > 100: ('Continue', 'Request received, please continue'), > } > > Generates this error: > Traceback (most recent call last): > File "pyc.py", line 159, in > File "pyc.py", line 151, in Main > SystemError: CompileToMethod cannot compile constant '('Continue', > 'Request received, please continue')' because it is a non-trivial value, such as > a live object. Instead, create an expression tree that can construct this value. > > However, these constructs work fine: > > x = ('Continue', 'Request received, please continue') responses = { > 100: x, > } > > responses = { > 100: ('Continue'), > } > > Is this a known issue? I don't think this is a known issue, can you open a bug? This regression was probably caused by my addition of the ConstantDictionaryStorage which makes creation of constant dictionaries really fast. This expression probably just needs to be IExpressionSerializable. From bruce.bromberek at gmail.com Tue Nov 9 20:09:37 2010 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Tue, 9 Nov 2010 13:09:37 -0600 Subject: [IronPython] 2.7Beta1 Bug in Compile Modules In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E085B84@TK5EX14MBXC141.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2E085B84@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: Created work Item # 29390. On Tue, Nov 9, 2010 at 11:19 AM, Dino Viehland wrote: > Bruce wrote: >> In trying to compile the StdLib for a program, I kept running into an error with >> BaseHTTPServer.py. ?I've isolated it down to an issue with Dictionaries and >> tuples. >> >> This code: >> >> responses = { >> ? ? 100: ('Continue', 'Request received, please continue'), >> ? ? } >> >> Generates this error: >> Traceback (most recent call last): >> ? File "pyc.py", line 159, in >> ? File "pyc.py", line 151, in Main >> SystemError: CompileToMethod cannot compile constant '('Continue', >> 'Request received, please continue')' because it is a non-trivial value, such as >> a live object. Instead, create an expression tree that can construct this value. >> >> However, these constructs work fine: >> >> x = ('Continue', 'Request received, please continue') responses = { >> ? ? 100: x, >> ? ? } >> >> responses = { >> ? ? 100: ('Continue'), >> ? ? } >> >> Is this a known issue? > > > I don't think this is a known issue, can you open a bug? ?This regression was probably > caused by my addition of the ConstantDictionaryStorage which makes creation of > constant dictionaries really fast. ?This expression probably just needs to be IExpressionSerializable. > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > From jmccampbell at enthought.com Thu Nov 11 00:24:15 2010 From: jmccampbell at enthought.com (Jason McCampbell) Date: Wed, 10 Nov 2010 17:24:15 -0600 Subject: [IronPython] Compatibility issue pickling .NET object stored in PythonTuple Message-ID: Hi everyone, We are working on porting the numpy package to IronPython and I am running into an issue getting the output of cPickle to be compatible between CPython and IronPython. The issue appears to be that PythonTuple doesn't implement __reduce__ and instead relies on .NET serialization. Here is what I am trying to do: I have a .NET class dtype with a full Python interface, including __reduce__. Another class, ndarray, is being pickled and returns a PythonTuple that includes an instance of dtype as one of it's elements. What I was expecting to happen is that is dtype.__reduce__() is called when it comes time to serialize it. However, what I am seeing is either an exception reporting dtype is not serializable is thrown or, if I mark it as serializable, then the instance is serialized using the unity serializer and the dtype.__reduce__ method is not called. For compatibility reasons I can't use the .NET serialization. Can anyone confirm if this is a known issue or if there is something that I am missing? Thanks, Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruce.bromberek at gmail.com Thu Nov 11 21:01:31 2010 From: bruce.bromberek at gmail.com (Bruce Bromberek) Date: Thu, 11 Nov 2010 14:01:31 -0600 Subject: [IronPython] 2.7Beta1 Bug in Compile Modules In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E085B84@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: On a related note: The folllowing modules cannot be compiled due work item #29390: platform.py, pydoc.py and BaseHTTPServer.py CompileToMethod cannot compile constant 'XXXXX' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value Three other modules fail to compile for a different reason. zipfile.py, modulefinder.py and cookielib.py Unable to make a reference to a transient module from a non-transient module. Anyone know why or if this already known? Bruce From danielj at arena.net Thu Nov 11 21:14:55 2010 From: danielj at arena.net (Daniel Jennings) Date: Thu, 11 Nov 2010 12:14:55 -0800 Subject: [IronPython] 2.7Beta1 Bug in Compile Modules In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2E085B84@TK5EX14MBXC141.redmond.corp.microsoft.com> Message-ID: <6D931A4CF4139540BF6621A1E97D493701544E8585AE@wallemail.arena.ncwest.ncsoft.corp> Does it look like it might be cases of this issue? http://ironpython.codeplex.com/workitem/28934 -----Original Message----- From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Bruce Bromberek Sent: Thursday, November 11, 2010 12:02 PM To: Discussion of IronPython Subject: Re: [IronPython] 2.7Beta1 Bug in Compile Modules On a related note: The folllowing modules cannot be compiled due work item #29390: platform.py, pydoc.py and BaseHTTPServer.py CompileToMethod cannot compile constant 'XXXXX' because it is a non-trivial value, such as a live object. Instead, create an expression tree that can construct this value Three other modules fail to compile for a different reason. zipfile.py, modulefinder.py and cookielib.py Unable to make a reference to a transient module from a non-transient module. Anyone know why or if this already known? Bruce _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com From jdhardy at gmail.com Thu Nov 11 22:36:53 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 11 Nov 2010 14:36:53 -0700 Subject: [IronPython] Compatibility issue pickling .NET object stored in PythonTuple In-Reply-To: References: Message-ID: On Wed, Nov 10, 2010 at 4:24 PM, Jason McCampbell wrote: > Hi everyone, > We are working on porting the numpy package to IronPython and I am running > into an issue getting the output of cPickle to be compatible between CPython > and IronPython. ?The issue appears to be that PythonTuple doesn't implement > __reduce__ and instead relies on .NET serialization. For a quick glance, it looks like cPickle has a special case for PythonTuple instances, so PythonTuple shouldn't need a __reduce__ method. It's possible that the tuple elements are not being properly pickled, but I'm not familiar enough with the code to say for sure. Can you create a repro that doesn't depend on numpy and open an issue? - Jeff From saunderl at hotmail.com Fri Nov 12 03:04:26 2010 From: saunderl at hotmail.com (L. Lee Saunders) Date: Thu, 11 Nov 2010 20:04:26 -0600 Subject: [IronPython] calling a named def Message-ID: Everyone, I have a c++/cli application (.net 3.5) that I an adding IronPython to. In C# I can call the def (lets call it MyFunc) with this code: Func obj; if (Scope.TryGetVariable("MyFunc", out obj)) { obj(); } I tried this code: System::Func^ obj; if (scope->TryGetVariable^>("MyFunc", obj)) { obj->Invoke(); } But it seems that .net 3.5 c++/cli does not have Func<>. Is there a way to do this in c++/cli? Can this be done with a standard delegate? (I've searched the web - I found that maybe I could get Func<> from System.Core.dll, but #using mgenerates a compiler error. Seems that System.Core.dll does not exist on my machine.) L. Lee Saunders "It was only a partial solution, of course, as solutions usually are, and addressed only one specific problem, as solutions usually do. But, as was often also true, it opened the door?if only a crack?for the multitude of solutions to follow." 1632 - Eric Flint my blog: http://oldschooldotnet.blogspot.com Taking Dot Net "Old School" - Playing with old ideas/concepts using the newest tools! -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Sun Nov 14 17:27:40 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 14 Nov 2010 09:27:40 -0700 Subject: [IronPython] Use of msvcr100 in msvcrt module Message-ID: In the 2.7 msvcrt module, msvcr100 is currently used as the p/invoke target (which is the VS2010 version of the MS Visual C Runtime). Was this chosen on purpose? I fear that it msvcrt100 probably isn't present on most systems (without installing the redistributable), while plain ol' msvcrt probably is. The problem is that, officially speaking, msvcrt.dll is part of the OS and not to be used by third-party software. In reality, I don't think it's an issue, as it's unlikely that basic C functions are going to change any time soon. So, do we toe the party line and put up with the redistribution hassle, or do we make the distribution easier but risk possible (but unlikely) breakage in the future? - Jeff From dinov at microsoft.com Sun Nov 14 19:51:41 2010 From: dinov at microsoft.com (Dino Viehland) Date: Sun, 14 Nov 2010 18:51:41 +0000 Subject: [IronPython] Use of msvcr100 in msvcrt module In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2EEC1A70@TK5EX14MBXC135.redmond.corp.microsoft.com> Jeff wrote: > In the 2.7 msvcrt module, msvcr100 is currently used as the p/invoke target > (which is the VS2010 version of the MS Visual C Runtime). Was this chosen on > purpose? I fear that it msvcrt100 probably isn't present on most systems > (without installing the redistributable), while plain ol' msvcrt probably is. > > The problem is that, officially speaking, msvcrt.dll is part of the OS and not to > be used by third-party software. In reality, I don't think it's an issue, as it's > unlikely that basic C functions are going to change any time soon. > > So, do we toe the party line and put up with the redistribution hassle, or do > we make the distribution easier but risk possible (but > unlikely) breakage in the future? My thought process here was that msvcr100 should always be on the system because .NET 4.0 is built w/ the VS2010 compilers. It does appear that the CLR is using "msvcr100_clr0400.dll" though so maybe that wasn't 100% correct. I think for the given P/Invoke that it doesn't matter as long as it's present - so msvcrt might be fine. But if we were to actually switch to using msvcr*'s file descriptors instead of our built-in table then it will really start to make a difference when interoperating w/ other native code also using a specific msvcr. From christian2.schmidt at gmx.de Sun Nov 14 21:23:45 2010 From: christian2.schmidt at gmx.de (Christian Schmidt) Date: Sun, 14 Nov 2010 21:23:45 +0100 Subject: [IronPython] calling a named def In-Reply-To: References: Message-ID: <4CE04551.1010707@gmx.de> Hi Lee, I've come across the same problem with C++/CLI and System::Func. IIRC the compiler error is a known bug and it will not be fixed - at least for VS 2008. I worked around the missing/buggy System::Func<>^ by using Delegate^: Delegate^ obj; if (scope->TryGetVariable("MyFunc", obj)) { obj->Invoke(); } Regards, Christian L. Lee Saunders wrote: > Everyone, > > I have a c++/cli application (.net 3.5) that I an adding IronPython to. > > In C# I can call the def (lets call it MyFunc) with this code: > > Func obj; > if(Scope.TryGetVariable("MyFunc", outobj)) { obj(); } > > I tried this code: > > System::Func^ obj; > if (scope->TryGetVariable^>("MyFunc", obj)) > { > obj->Invoke(); > } > > But it seems that .net 3.5 c++/cli does not have Func<>. > > Is there a way to do this in c++/cli? Can this be done with a standard > delegate? (I've searched the web - I found that maybe I could get Func<> > from System.Core.dll, but #using mgenerates a compiler > error. Seems that System.Core.dll does not exist on my machine.) > > L. Lee Saunders From jdhardy at gmail.com Sun Nov 14 22:53:39 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 14 Nov 2010 14:53:39 -0700 Subject: [IronPython] Use of msvcr100 in msvcrt module In-Reply-To: <6C7ABA8B4E309440B857D74348836F2EEC1A70@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2EEC1A70@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: On Sun, Nov 14, 2010 at 11:51 AM, Dino Viehland wrote: > My thought process here was that msvcr100 should always be on the system > because .NET 4.0 is built w/ the VS2010 compilers. ?It does appear that the CLR > is using "msvcr100_clr0400.dll" though so maybe that wasn't 100% correct. I'll have to spin up a bare system with just .NET 4 and see what happens. I would prefer to use the specific version if possible, and who knows what WinSxS is doing behind the scenes. - Jeff From saunderl at hotmail.com Mon Nov 15 04:13:44 2010 From: saunderl at hotmail.com (L. Lee Saunders) Date: Sun, 14 Nov 2010 21:13:44 -0600 Subject: [IronPython] calling a named def In-Reply-To: <4CE04551.1010707@gmx.de> References: , <4CE04551.1010707@gmx.de> Message-ID: Thanks Christian! L. Lee Saunders > Hi Lee, > > I've come across the same problem with C++/CLI and System::Func. IIRC > the compiler error is a known bug and it will not be fixed - at least > for VS 2008. > I worked around the missing/buggy System::Func<>^ by using Delegate^: > > Delegate^ obj; > if (scope->TryGetVariable("MyFunc", obj)) > { > obj->Invoke(); > } > > Regards, > Christian > > L. Lee Saunders wrote: > > Everyone, > > > > I have a c++/cli application (.net 3.5) that I an adding IronPython to. > > > > In C# I can call the def (lets call it MyFunc) with this code: > > > > Func obj; > > if(Scope.TryGetVariable("MyFunc", outobj)) { obj(); } > > > > I tried this code: > > > > System::Func^ obj; > > if (scope->TryGetVariable^>("MyFunc", obj)) > > { > > obj->Invoke(); > > } > > > > But it seems that .net 3.5 c++/cli does not have Func<>. > > > > Is there a way to do this in c++/cli? Can this be done with a standard > > delegate? (I've searched the web - I found that maybe I could get Func<> > > from System.Core.dll, but #using mgenerates a compiler > > error. Seems that System.Core.dll does not exist on my machine.) > > > > L. Lee Saunders > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jmccampbell at enthought.com Mon Nov 15 16:13:57 2010 From: jmccampbell at enthought.com (Jason McCampbell) Date: Mon, 15 Nov 2010 09:13:57 -0600 Subject: [IronPython] Compatibility issue pickling .NET object stored in PythonTuple In-Reply-To: References: Message-ID: Hi Jeff, I played with it a bit more and it does seem to be more specific that just tuples. I'll try to make a repro and submit it. Or hopefully I'll just find a silly mistake on my part. :) Jason On Thu, Nov 11, 2010 at 3:36 PM, Jeff Hardy wrote: > On Wed, Nov 10, 2010 at 4:24 PM, Jason McCampbell > wrote: > > Hi everyone, > > We are working on porting the numpy package to IronPython and I am > running > > into an issue getting the output of cPickle to be compatible between > CPython > > and IronPython. The issue appears to be that PythonTuple doesn't > implement > > __reduce__ and instead relies on .NET serialization. > > For a quick glance, it looks like cPickle has a special case for > PythonTuple instances, so PythonTuple shouldn't need a __reduce__ > method. It's possible that the tuple elements are not being properly > pickled, but I'm not familiar enough with the code to say for sure. > > Can you create a repro that doesn't depend on numpy and open an issue? > > - Jeff > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Mon Nov 15 22:59:21 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Mon, 15 Nov 2010 18:59:21 -0300 Subject: [IronPython] IronPython source code Message-ID: Hi, I was taken a look at the IronPython sourcecode. Is there any aditional resource/documentation/chart to help understand it? I've only coded in an "educational" compiler, you know, those made to teach you programming and even if it had the typical compiler stages it was very far from a real .NET compiler Greetings -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Nov 19 16:52:02 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 19 Nov 2010 08:52:02 -0700 Subject: [IronPython] IronPython source code In-Reply-To: References: Message-ID: Hi Pablo, As far as I know there isn't any detailed documentation, but Dino would know for sure. - Jeff On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo wrote: > Hi, > I was taken a look at the IronPython sourcecode. Is there any aditional > resource/documentation/chart to help understand it? I've only coded in an > "educational" compiler, you know, those made to teach you programming and > even if it had the typical compiler stages it was very far from a real .NET > compiler > Greetings > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From jimmy at schementi.com Fri Nov 19 17:07:40 2010 From: jimmy at schementi.com (Jimmy Schementi) Date: Fri, 19 Nov 2010 11:07:40 -0500 Subject: [IronPython] IronPython source code In-Reply-To: References: Message-ID: You'll have an easier time understanding Sympl, a sample programming language built on the DLR, which is at http://dlr.codeplex.com. The documentation for Sympl and the DLR itself is at http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. >From there you can "upgrade" to IronPython, but then hopefully you'll feel comfortable with just the source code. There are some old docs at http://ironpython.codeplex.com/wikipage?title=More%20Information, but really the source is your best bet. ~Jimmy On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy wrote: > Hi Pablo, > As far as I know there isn't any detailed documentation, but Dino > would know for sure. > > - Jeff > > On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo > wrote: > > Hi, > > I was taken a look at the IronPython sourcecode. Is there any aditional > > resource/documentation/chart to help understand it? I've only coded in an > > "educational" compiler, you know, those made to teach you programming and > > even if it had the typical compiler stages it was very far from a real > .NET > > compiler > > Greetings > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Fri Nov 19 18:12:44 2010 From: dinov at microsoft.com (Dino Viehland) Date: Fri, 19 Nov 2010 17:12:44 +0000 Subject: [IronPython] IronPython source code In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com> Yeah, there's no good comprehensive docs. There's some stuff in the CHM but it's more oriented towards people wanting to extend IronPython than work on it. If there's something particular you're interested in someone can probably chime in on the list. IronPython it's self is pretty abstracted away from generating code now (we generally just generate expression trees everywhere). So if you're interested purely in the compiler side of things you can look at the Tokenizer->Parser->AST transformations but then we're basically done w/ code gen at that point. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Friday, November 19, 2010 8:08 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython source code You'll have an easier time understanding Sympl, a sample programming language built on the DLR, which is at http://dlr.codeplex.com. The documentation for Sympl and the DLR itself is at http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. From there you can "upgrade" to IronPython, but then hopefully you'll feel comfortable with just the source code. There are some old docs at http://ironpython.codeplex.com/wikipage?title=More%20Information, but really the source is your best bet. ~Jimmy On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy > wrote: Hi Pablo, As far as I know there isn't any detailed documentation, but Dino would know for sure. - Jeff On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo > wrote: > Hi, > I was taken a look at the IronPython sourcecode. Is there any aditional > resource/documentation/chart to help understand it? I've only coded in an > "educational" compiler, you know, those made to teach you programming and > even if it had the typical compiler stages it was very far from a real .NET > compiler > Greetings > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Sat Nov 20 17:22:30 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Sat, 20 Nov 2010 13:22:30 -0300 Subject: [IronPython] IronPython source code In-Reply-To: <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com> References: , , , <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: Thanks Dino for the info, Jimmy for the tip and Jeff for the Twitter answer. I'm interested in certain things but I need to read more to make any question understandable :) Also I would like to understand/understand better the reasons behind the important differences certain cool languages have among them, but that doesnt have to do with Python alone BTW, we arent working with the last version of IronPython, because we are working with the one we feel more secure for compatibility/integration issues with Visual Studio 2008 and asp.net, and I havent read all the sourcecode changes report yet, but it would seem IronPython in Visual Studio 2008 Professional doesnt take as valid sentences of this kind: (in factthey are marked as invalid by Visual Studio) "variable = value1 if condition is None else value2". Unless it's a change in the syntax from one Python version to another version? We arent aware of all the Python changes from a version to another. When we use some IronPython modules we get errors in lines like that so we translate them to the verbose version of the sentence for them to work. We move the modules from the IronPython installation to the App_script folder May be we are using IronPython modules from a version with another version of IronPython where that kind of syntax rule was invalid? From: dinov at microsoft.com To: users at lists.ironpython.com Date: Fri, 19 Nov 2010 17:12:44 +0000 Subject: Re: [IronPython] IronPython source code Yeah, there?s no good comprehensive docs. There?s some stuff in the CHM but it?s more oriented towards people wanting to extend IronPython than work on it. If there?s something particular you?re interested in someone can probably chime in on the list. IronPython it?s self is pretty abstracted away from generating code now (we generally just generate expression trees everywhere). So if you?re interested purely in the compiler side of things you can look at the Tokenizer->Parser->AST transformations but then we?re basically done w/ code gen at that point. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Friday, November 19, 2010 8:08 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython source code You'll have an easier time understanding Sympl, a sample programming language built on the DLR, which is at http://dlr.codeplex.com. The documentation for Sympl and the DLR itself is at http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. From there you can "upgrade" to IronPython, but then hopefully you'll feel comfortable with just the source code. There are some old docs at http://ironpython.codeplex.com/wikipage?title=More%20Information, but really the source is your best bet. ~Jimmy On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy wrote: Hi Pablo, As far as I know there isn't any detailed documentation, but Dino would know for sure. - Jeff On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo wrote: > Hi, > I was taken a look at the IronPython sourcecode. Is there any aditional > resource/documentation/chart to help understand it? I've only coded in an > "educational" compiler, you know, those made to teach you programming and > even if it had the typical compiler stages it was very far from a real .NET > compiler > Greetings > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Sat Nov 20 20:32:31 2010 From: dinov at microsoft.com (Dino Viehland) Date: Sat, 20 Nov 2010 19:32:31 +0000 Subject: [IronPython] IronPython source code In-Reply-To: References: , , , <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2EF8E89E@TK5EX14MBXC135.redmond.corp.microsoft.com> Wow, you must still be using IronPython 1.1 or IronPython 1.0. The conditional expression was added in Python 2.5 so it's in IronPython 2.0 (which maps to Python 2.5). I'm guessing the VS 2008 support you're using is IronPythonStudio which I believe is still at 1.0/1.1 as well. We did release the code for the ASP.Net integration (see Jimmy's announcement here http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html) but I don't remember if we included / re-built it for the 2.7B1 release. The reason I bring this up is I think the best possible upgrade path if you want both ASP.NET + VS support would be to move to IronPython 2.7 and VS 2010. If that's not too big of a jump for you I think you'd find it's a much better experience than 1.1 and the VS 2008 integration which is a little lacking in some aspects. But if the conditional expression was the one extra thing you wanted you could also consider back porting it to IronPython 1.1 - it shouldn't be very difficult. The parser side of things won't be much different between 1.1 and 2.7 but the code gen side will require some IL generation which will also give it more of a traditional compiler feel. 1.1 is also a little simpler in some aspects so it might be easier to get a feel of things there and then when you look at 2.x you can see how the DLR has been added in on top of that. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Pablo Dalmazzo Sent: Saturday, November 20, 2010 8:23 AM To: IronPython Mailing list Subject: Re: [IronPython] IronPython source code Thanks Dino for the info, Jimmy for the tip and Jeff for the Twitter answer. I'm interested in certain things but I need to read more to make any question understandable :) Also I would like to understand/understand better the reasons behind the important differences certain cool languages have among them, but that doesnt have to do with Python alone BTW, we arent working with the last version of IronPython, because we are working with the one we feel more secure for compatibility/integration issues with Visual Studio 2008 and asp.net, and I havent read all the sourcecode changes report yet, but it would seem IronPython in Visual Studio 2008 Professional doesnt take as valid sentences of this kind: (in fact they are marked as invalid by Visual Studio) "variable = value1 if condition is None else value2". Unless it's a change in the syntax from one Python version to another version? We arent aware of all the Python changes from a version to another. When we use some IronPython modules we get errors in lines like that so we translate them to the verbose version of the sentence for them to work. We move the modules from the IronPython installation to the App_script folder May be we are using IronPython modules from a version with another version of IronPython where that kind of syntax rule was invalid? ________________________________ From: dinov at microsoft.com To: users at lists.ironpython.com Date: Fri, 19 Nov 2010 17:12:44 +0000 Subject: Re: [IronPython] IronPython source code Yeah, there's no good comprehensive docs. There's some stuff in the CHM but it's more oriented towards people wanting to extend IronPython than work on it. If there's something particular you're interested in someone can probably chime in on the list. IronPython it's self is pretty abstracted away from generating code now (we generally just generate expression trees everywhere). So if you're interested purely in the compiler side of things you can look at the Tokenizer->Parser->AST transformations but then we're basically done w/ code gen at that point. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Friday, November 19, 2010 8:08 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython source code You'll have an easier time understanding Sympl, a sample programming language built on the DLR, which is at http://dlr.codeplex.com. The documentation for Sympl and the DLR itself is at http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. From there you can "upgrade" to IronPython, but then hopefully you'll feel comfortable with just the source code. There are some old docs at http://ironpython.codeplex.com/wikipage?title=More%20Information, but really the source is your best bet. ~Jimmy On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy > wrote: Hi Pablo, As far as I know there isn't any detailed documentation, but Dino would know for sure. - Jeff On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo > wrote: > Hi, > I was taken a look at the IronPython sourcecode. Is there any aditional > resource/documentation/chart to help understand it? I've only coded in an > "educational" compiler, you know, those made to teach you programming and > even if it had the typical compiler stages it was very far from a real .NET > compiler > Greetings > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Sat Nov 20 22:21:43 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Sat, 20 Nov 2010 18:21:43 -0300 Subject: [IronPython] IronPython source code In-Reply-To: <6C7ABA8B4E309440B857D74348836F2EF8E89E@TK5EX14MBXC135.redmond.corp.microsoft.com> References: , , , , , , <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com>, , <6C7ABA8B4E309440B857D74348836F2EF8E89E@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: is possible that syntax rule is shown as error because of the VS 2008 support and not the language version? We arent using IronPython 1.x in any computer unless it's a mistake, Im not there now but I dont remember any asp.net sample folder which came with version 1.x From: dinov at microsoft.com To: users at lists.ironpython.com Date: Sat, 20 Nov 2010 19:32:31 +0000 Subject: Re: [IronPython] IronPython source code Wow, you must still be using IronPython 1.1 or IronPython 1.0. The conditional expression was added in Python 2.5 so it?s in IronPython 2.0 (which maps to Python 2.5). I?m guessing the VS 2008 support you?re using is IronPythonStudio which I believe is still at 1.0/1.1 as well. We did release the code for the ASP.Net integration (see Jimmy?s announcement here http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html) but I don?t remember if we included / re-built it for the 2.7B1 release. The reason I bring this up is I think the best possible upgrade path if you want both ASP.NET + VS support would be to move to IronPython 2.7 and VS 2010. If that?s not too big of a jump for you I think you?d find it?s a much better experience than 1.1 and the VS 2008 integration which is a little lacking in some aspects. But if the conditional expression was the one extra thing you wanted you could also consider back porting it to IronPython 1.1 ? it shouldn?t be very difficult. The parser side of things won?t be much different between 1.1 and 2.7 but the code gen side will require some IL generation which will also give it more of a traditional compiler feel. 1.1 is also a little simpler in some aspects so it might be easier to get a feel of things there and then when you look at 2.x you can see how the DLR has been added in on top of that. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Pablo Dalmazzo Sent: Saturday, November 20, 2010 8:23 AM To: IronPython Mailing list Subject: Re: [IronPython] IronPython source code Thanks Dino for the info, Jimmy for the tip and Jeff for the Twitter answer. I'm interested in certain things but I need to read more to make any question understandable :) Also I would like to understand/understand better the reasons behind the important differences certain cool languages have among them, but that doesnt have to do with Python alone BTW, we arent working with the last version of IronPython, because we are working with the one we feel more secure for compatibility/integration issues with Visual Studio 2008 and asp.net, and I havent read all the sourcecode changes report yet, but it would seem IronPython in Visual Studio 2008 Professional doesnt take as valid sentences of this kind: (in fact they are marked as invalid by Visual Studio) "variable = value1 if condition is None else value2". Unless it's a change in the syntax from one Python version to another version? We arent aware of all the Python changes from a version to another. When we use some IronPython modules we get errors in lines like that so we translate them to the verbose version of the sentence for them to work. We move the modules from the IronPython installation to the App_script folder May be we are using IronPython modules from a version with another version of IronPython where that kind of syntax rule was invalid? From: dinov at microsoft.com To: users at lists.ironpython.com Date: Fri, 19 Nov 2010 17:12:44 +0000 Subject: Re: [IronPython] IronPython source code Yeah, there?s no good comprehensive docs. There?s some stuff in the CHM but it?s more oriented towards people wanting to extend IronPython than work on it. If there?s something particular you?re interested in someone can probably chime in on the list. IronPython it?s self is pretty abstracted away from generating code now (we generally just generate expression trees everywhere). So if you?re interested purely in the compiler side of things you can look at the Tokenizer->Parser->AST transformations but then we?re basically done w/ code gen at that point. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Jimmy Schementi Sent: Friday, November 19, 2010 8:08 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython source code You'll have an easier time understanding Sympl, a sample programming language built on the DLR, which is at http://dlr.codeplex.com. The documentation for Sympl and the DLR itself is at http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. From there you can "upgrade" to IronPython, but then hopefully you'll feel comfortable with just the source code. There are some old docs at http://ironpython.codeplex.com/wikipage?title=More%20Information, but really the source is your best bet. ~Jimmy On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy wrote: Hi Pablo, As far as I know there isn't any detailed documentation, but Dino would know for sure. - Jeff On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo wrote: > Hi, > I was taken a look at the IronPython sourcecode. Is there any aditional > resource/documentation/chart to help understand it? I've only coded in an > "educational" compiler, you know, those made to teach you programming and > even if it had the typical compiler stages it was very far from a real .NET > compiler > Greetings > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ Users mailing list Users at lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimmy at schementi.com Sat Nov 20 22:31:20 2010 From: jimmy at schementi.com (Jimmy Schementi) Date: Sat, 20 Nov 2010 16:31:20 -0500 Subject: [IronPython] IronPython source code In-Reply-To: References: <6C7ABA8B4E309440B857D74348836F2EF8612E@TK5EX14MBXC135.redmond.corp.microsoft.com> <6C7ABA8B4E309440B857D74348836F2EF8E89E@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: On Sat, Nov 20, 2010 at 4:21 PM, Pablo Dalmazzo wrote: > is possible that syntax rule is shown as error because of the VS 2008 > support and not the language version? We arent using IronPython 1.x in any > computer unless it's a mistake, Im not there now but I dont remember any > asp.net sample folder which came with version 1.x > The VS2008 support doesn't understand the conditional expression because it uses IronPython 1.1 to check syntax, regardless of what version of IronPython you run your applications with. > > ------------------------------ > From: dinov at microsoft.com > To: users at lists.ironpython.com > Date: Sat, 20 Nov 2010 19:32:31 +0000 > > Subject: Re: [IronPython] IronPython source code > > Wow, you must still be using IronPython 1.1 or IronPython 1.0. The > conditional expression was added in Python 2.5 so it?s in IronPython 2.0 > (which maps to Python 2.5). I?m guessing the VS 2008 support you?re using > is IronPythonStudio which I believe is still at 1.0/1.1 as well. > > > > We did release the code for the ASP.Net integration (see Jimmy?s > announcement here > http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html) > but I don?t remember if we included / re-built it for the 2.7B1 release. > The reason I bring this up is I think the best possible upgrade path if you > want both ASP.NET + VS support would be to move to IronPython 2.7 and VS > 2010. If that?s not too big of a jump for you I think you?d find it?s a > much better experience than 1.1 and the VS 2008 integration which is a > little lacking in some aspects. > > > > But if the conditional expression was the one extra thing you wanted you > could also consider back porting it to IronPython 1.1 ? it shouldn?t be very > difficult. The parser side of things won?t be much different between 1.1 > and 2.7 but the code gen side will require some IL generation which will > also give it more of a traditional compiler feel. 1.1 is also a little > simpler in some aspects so it might be easier to get a feel of things there > and then when you look at 2.x you can see how the DLR has been added in on > top of that. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Pablo Dalmazzo > *Sent:* Saturday, November 20, 2010 8:23 AM > *To:* IronPython Mailing list > *Subject:* Re: [IronPython] IronPython source code > > > > Thanks Dino for the info, Jimmy for the tip and Jeff for the Twitter > answer. > > > > I'm interested in certain things but I need to read more to make any > question understandable :) Also I would like to understand/understand better > the reasons behind the important differences certain cool languages have > among them, but that doesnt have to do with Python alone > > > > BTW, we arent working with the last version of IronPython, because we are > working with the one we feel more secure for compatibility/integration > issues with Visual Studio 2008 and asp.net, and I havent read all the > sourcecode changes report yet, but it would seem IronPython in Visual Studio > 2008 Professional doesnt take as valid sentences of this kind: (in fact > > they are marked as invalid by Visual Studio) "variable = value1 if > condition is None else value2". > > > > Unless it's a change in the syntax from one Python version to another > version? We arent aware of all the Python changes from a version to another. > When we use some IronPython modules we get errors in lines like that so we > translate them to the verbose version of the sentence for them to work. We > move the modules from the IronPython installation to the App_script folder > > > > May be we are using IronPython modules from a version with another version > of IronPython where that kind of syntax rule was invalid? > > > > > > > > > ------------------------------ > > From: dinov at microsoft.com > To: users at lists.ironpython.com > Date: Fri, 19 Nov 2010 17:12:44 +0000 > Subject: Re: [IronPython] IronPython source code > > Yeah, there?s no good comprehensive docs. There?s some stuff in the CHM > but it?s more oriented towards people wanting to extend IronPython than work > on it. > > > > If there?s something particular you?re interested in someone can probably > chime in on the list. IronPython it?s self is pretty abstracted away from > generating code now (we generally just generate expression trees > everywhere). So if you?re interested purely in the compiler side of things > you can look at the Tokenizer->Parser->AST transformations but then we?re > basically done w/ code gen at that point. > > > > *From:* users-bounces at lists.ironpython.com [mailto: > users-bounces at lists.ironpython.com] *On Behalf Of *Jimmy Schementi > *Sent:* Friday, November 19, 2010 8:08 AM > *To:* Discussion of IronPython > *Subject:* Re: [IronPython] IronPython source code > > > > You'll have an easier time understanding Sympl, a sample programming > language built on the DLR, which is at http://dlr.codeplex.com. The > documentation for Sympl and the DLR itself is at > http://dlr.codeplex.com/wikipage?title=Docs%20and%20specs&referringTitle=Documentation. > From there you can "upgrade" to IronPython, but then hopefully you'll feel > comfortable with just the source code. There are some old docs at > http://ironpython.codeplex.com/wikipage?title=More%20Information, > but really the source is your best bet. > > > ~Jimmy > > On Fri, Nov 19, 2010 at 10:52 AM, Jeff Hardy wrote: > > Hi Pablo, > As far as I know there isn't any detailed documentation, but Dino > would know for sure. > > - Jeff > > > On Mon, Nov 15, 2010 at 2:59 PM, Pablo Dalmazzo > wrote: > > Hi, > > I was taken a look at the IronPython sourcecode. Is there any aditional > > resource/documentation/chart to help understand it? I've only coded in an > > "educational" compiler, you know, those made to teach you programming and > > even if it had the typical compiler stages it was very far from a real > .NET > > compiler > > Greetings > > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Tue Nov 23 08:51:15 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 23 Nov 2010 00:51:15 -0700 Subject: [IronPython] IronPython Sources are now on Github and Bitbucket Message-ID: Good morning all, The coordinators of the the IronRuby and IronPython projects have decided to go with github for the source code and CodePlex for issue tracking. The split is not particularly desirable, but it is the quickest way to move the projects forward without worrying about major migration issues. The git repo is available at https://github.com/ironlanguages/main; it contains the sources for the DLR, IronPython, and IronRuby. Fork away! For those (like myself) who prefer Mercurial, a mirror has been set up on bitbucket at http://bitbucket.org/ironpython/ironlanguages. Fork away! While the git repo is the primary one, the hg repo will be fully supported as long as I'm around, as it's how I plan to work on IronPython. I'm working on some documentation for those unfamiliar with bitbucket, but it works exactly like any other bitbucket repo, except for when I have to handle a pull request - then it gets a bit hairy :). The issue tracker locations are as before: IronPython - http://ironpython.codeplex.com/workitem/list/basic IronRuby - http://ironruby.codeplex.com/workitem/list/basic DLR - http://dlr.codeplex.com/workitem/list/basic - Jeff From jdhardy at gmail.com Wed Nov 24 05:29:10 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 23 Nov 2010 21:29:10 -0700 Subject: [IronPython] IronPython Sources are now on Github and Bitbucket In-Reply-To: References: Message-ID: On Tue, Nov 23, 2010 at 12:51 AM, Jeff Hardy wrote: > I'm working on some documentation for those unfamiliar with bitbucket... And that documentation is now available: https://github.com/IronLanguages/main/wiki/Working-With-Mercurial. - Jeff From jdhardy at gmail.com Wed Nov 24 05:54:00 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 23 Nov 2010 21:54:00 -0700 Subject: [IronPython] Issue Triage Message-ID: There are over 1000 open issues on CodePlex (http://ironpython.codeplex.com/workitem/list/basic), many of them dating back to IronPython 1.0. A few people have wondered what they can do to help IronPython without being familiar with the project. If you're one of those people, then triaging issues would be a great place to start - those issues should be checked against a modern version of IronPython (preferably 2.7b1) to see if they are still valid. Also, I'd like to start getting a list of issues that are blockers for releasing 2.7. If you have an issue that is blocking you in IronPython 2.7b1, report it on this list - I'll bump the priority up to high to make sure it doesn't get missed. Finally, if everyone could vote for this CodePlex issue (http://codeplex.codeplex.com/workitem/25398) it would make it much easier to share the list of blocking bugs. For now, Status = Open, Impact = High, Release = 2.7. The ones already in the list are the ones I plan on fixing myself. - Jeff From pablodalma93 at hotmail.com Sat Nov 27 13:32:41 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Sat, 27 Nov 2010 09:32:41 -0300 Subject: [IronPython] Web application template Message-ID: is there a web application template for asp.net with IronPython? -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Sat Nov 27 15:41:16 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Sat, 27 Nov 2010 11:41:16 -0300 Subject: [IronPython] no compile page model question Message-ID: I'm missing a big part of the picture so forgive me if this question doesnt make any sense to you. In C#, VB.NET, etc the code behind in asp.net page is defined inside a class. Is there any relation betweenIronPython code doesn't get compiled to normal .NET code where you'd have a class at the IL level for each class you have at the source level, and asp.net with IronPython using the no compile page model? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jimmy at schementi.com Sun Nov 28 06:11:17 2010 From: jimmy at schementi.com (Jimmy Schementi) Date: Sun, 28 Nov 2010 00:11:17 -0500 Subject: [IronPython] Web application template In-Reply-To: References: Message-ID: There are no visual studio templates as of today, but there is a sample website template is this release http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html . ~Jimmy On Sat, Nov 27, 2010 at 7:32 AM, Pablo Dalmazzo wrote: > is there a web application template for asp.net with IronPython? > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robinsiebler at 321.net Sun Nov 28 19:47:05 2010 From: robinsiebler at 321.net (robinsiebler) Date: Sun, 28 Nov 2010 10:47:05 -0800 (PST) Subject: [IronPython] Re turning data to a form Message-ID: <30325039.post@talk.nabble.com> I have 2 forms, form a has a button that launches form b. Form b has 2 textboxes and an OK button. When the OK button is clicked, I want the form to close and the data to be returned to form a. How do I do this? -- View this message in context: http://old.nabble.com/Returning-data-to-a-form-tp30325039p30325039.html Sent from the IronPython mailing list archive at Nabble.com. From michael at voidspace.org.uk Sun Nov 28 19:52:10 2010 From: michael at voidspace.org.uk (Michael Foord) Date: Sun, 28 Nov 2010 18:52:10 +0000 Subject: [IronPython] Re turning data to a form In-Reply-To: <30325039.post@talk.nabble.com> References: <30325039.post@talk.nabble.com> Message-ID: <4CF2A4DA.5080203@voidspace.org.uk> On 28/11/2010 18:47, robinsiebler wrote: > I have 2 forms, form a has a button that launches form b. Form b has 2 > textboxes and an OK button. When the OK button is clicked, I want the form > to close and the data to be returned to form a. How do I do this? One way is to show the second form modally (with a call to ShowDialog I believe), this will freeze the first form until the second form exits. Another way would be to hide the first form when the second one is shown. Give the second form a reference to the first one, and in the handler functions for the accept / cancel buttons for the second form re-show the first form. All the best, Michael -- http://www.voidspace.org.uk/ READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (?BOGUS AGREEMENTS?) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer. From jdhardy at gmail.com Sun Nov 28 21:02:40 2010 From: jdhardy at gmail.com (Jeff Hardy) Date: Sun, 28 Nov 2010 13:02:40 -0700 Subject: [IronPython] Web application template In-Reply-To: References: Message-ID: Also, VS 2010 project templates aren't terribly difficult to create, so if you'd like to contribute some we'd be glad to include them. - Jeff On Sat, Nov 27, 2010 at 10:11 PM, Jimmy Schementi wrote: > There are no visual studio templates as of today, but there is a sample > website template is this > release?http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html. > ~Jimmy > > > On Sat, Nov 27, 2010 at 7:32 AM, Pablo Dalmazzo > wrote: >> >> is there a web application template for asp.net with IronPython? >> >> >> _______________________________________________ >> Users mailing list >> Users at lists.ironpython.com >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > From robinsiebler at 321.net Sun Nov 28 22:06:58 2010 From: robinsiebler at 321.net (robinsiebler) Date: Sun, 28 Nov 2010 13:06:58 -0800 (PST) Subject: [IronPython] Re turning data to a form In-Reply-To: <4CF2A4DA.5080203@voidspace.org.uk> References: <30325039.post@talk.nabble.com> <4CF2A4DA.5080203@voidspace.org.uk> Message-ID: <30325848.post@talk.nabble.com> But then I still only have the data in the 2nd (child) form. How do I get it to the 1st (main) form? Michael Foord-3 wrote: > > On 28/11/2010 18:47, robinsiebler wrote: >> I have 2 forms, form a has a button that launches form b. Form b has 2 >> textboxes and an OK button. When the OK button is clicked, I want the >> form >> to close and the data to be returned to form a. How do I do this? > One way is to show the second form modally (with a call to ShowDialog I > believe), this will freeze the first form until the second form exits. > > Another way would be to hide the first form when the second one is > shown. Give the second form a reference to the first one, and in the > handler functions for the accept / cancel buttons for the second form > re-show the first form. > > All the best, > > Michael > > -- > > http://www.voidspace.org.uk/ > > READ CAREFULLY. By accepting and reading this email you agree, > on behalf of your employer, to release me from all obligations > and waivers arising from any and all NON-NEGOTIATED agreements, > licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, > confidentiality, non-disclosure, non-compete and acceptable use > policies (?BOGUS AGREEMENTS?) that I have entered into with your > employer, its partners, licensors, agents and assigns, in > perpetuity, without prejudice to my ongoing rights and privileges. > You further represent that you have the authority to release me > from any BOGUS AGREEMENTS on behalf of your employer. > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > -- View this message in context: http://old.nabble.com/Returning-data-to-a-form-tp30325039p30325848.html Sent from the IronPython mailing list archive at Nabble.com. From fuzzyman at voidspace.org.uk Sun Nov 28 22:12:55 2010 From: fuzzyman at voidspace.org.uk (Michael Foord) Date: Sun, 28 Nov 2010 21:12:55 +0000 Subject: [IronPython] Re turning data to a form In-Reply-To: <30325848.post@talk.nabble.com> References: <30325039.post@talk.nabble.com> <4CF2A4DA.5080203@voidspace.org.uk> <30325848.post@talk.nabble.com> Message-ID: On 28 November 2010 21:06, robinsiebler wrote: > > But then I still only have the data in the 2nd (child) form. How do I get > it > to the 1st (main) form? > > The close handler of the second form has to pass it to the first form - or just set them as attributes on the second form and let the first form look at the values after control has returned to it. (Presumably the first form is responsible for showing the second form, so it already has a reference to it.) All the best, Michael > Michael Foord-3 wrote: > > > > On 28/11/2010 18:47, robinsiebler wrote: > >> I have 2 forms, form a has a button that launches form b. Form b has 2 > >> textboxes and an OK button. When the OK button is clicked, I want the > >> form > >> to close and the data to be returned to form a. How do I do this? > > One way is to show the second form modally (with a call to ShowDialog I > > believe), this will freeze the first form until the second form exits. > > > > Another way would be to hide the first form when the second one is > > shown. Give the second form a reference to the first one, and in the > > handler functions for the accept / cancel buttons for the second form > > re-show the first form. > > > > All the best, > > > > Michael > > > > -- > > > > http://www.voidspace.org.uk/ > > > > READ CAREFULLY. By accepting and reading this email you agree, > > on behalf of your employer, to release me from all obligations > > and waivers arising from any and all NON-NEGOTIATED agreements, > > licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, > > confidentiality, non-disclosure, non-compete and acceptable use > > policies (?BOGUS AGREEMENTS?) that I have entered into with your > > employer, its partners, licensors, agents and assigns, in > > perpetuity, without prejudice to my ongoing rights and privileges. > > You further represent that you have the authority to release me > > from any BOGUS AGREEMENTS on behalf of your employer. > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > > -- > View this message in context: > http://old.nabble.com/Returning-data-to-a-form-tp30325039p30325848.html > Sent from the IronPython mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > -- http://www.voidspace.org.uk -------------- next part -------------- An HTML attachment was scrubbed... URL: From idan at cloudshare.com Mon Nov 29 13:09:35 2010 From: idan at cloudshare.com (Idan Zaltzberg) Date: Mon, 29 Nov 2010 14:09:35 +0200 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Message-ID: Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From pablodalma93 at hotmail.com Mon Nov 29 17:39:42 2010 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Mon, 29 Nov 2010 13:39:42 -0300 Subject: [IronPython] Web application template In-Reply-To: References: , , Message-ID: In IronPythonStudio in the pyproj file for a winforms project, to include a form in the compilation they write Form In VB/C#, for including a webform in the compilation in a webapplication, in the vbproj or csproj file they write ASPXCodeBehind Default.aspx Default.aspx What would I have to write in a pyproj file to include a webform in the compilation , for the aspx file and for the aspx.py file? How would it be the above tags? What would go for the aspx.py it in the "SubType" tag since asp.net IronPython doesnt use codebehind but codefile? > Date: Sun, 28 Nov 2010 13:02:40 -0700> From: jdhardy at gmail.com > To: users at lists.ironpython.com > Subject: Re: [IronPython] Web application template > > Also, VS 2010 project templates aren't terribly difficult to create, > so if you'd like to contribute some we'd be glad to include them. > > - Jeff > > On Sat, Nov 27, 2010 at 10:11 PM, Jimmy Schementi wrote: > > There are no visual studio templates as of today, but there is a sample > > website template is this > > release http://blog.jimmy.schementi.com/2010/07/aspnet-dynamic-language-support-is-open.html. > > ~Jimmy > > > > > > On Sat, Nov 27, 2010 at 7:32 AM, Pablo Dalmazzo > > wrote: > >> > >> is there a web application template for asp.net with IronPython? > >> > >> > >> _______________________________________________ > >> Users mailing list > >> Users at lists.ironpython.com > >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >> > > > > > > _______________________________________________ > > Users mailing list > > Users at lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > > > > > _______________________________________________ > Users mailing list > Users at lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Nov 29 18:40:54 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 29 Nov 2010 17:40:54 +0000 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 In-Reply-To: References: Message-ID: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> Defaultdict is creating a new invoke binder - it should be getting the binder from PythonContext using the Invoke(CallSignature) method. Because it creates a new binder each time we are getting no caching of the rules across defaultdict instances and it'll end up generating a new method to handle the missing call. It is collectible (so not really a leak) but it is really bad from a performance perspective. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Monday, November 29, 2010 4:10 AM To: Discussion of IronPython Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From twyatt at ppi.ca Mon Nov 29 18:43:38 2010 From: twyatt at ppi.ca (Tim P. Wyatt) Date: Mon, 29 Nov 2010 09:43:38 -0800 Subject: [IronPython] Tim Wyatt is out of the office Message-ID: I will be out of the office starting 29/11/2010 and will not return until 01/12/2010. I will be reviewing my email less frequently than usual. For urgent matters please contact the Vancouver Help Desk at 1-800-661-7712 (helpdesk at ppi.ca) From idan at cloudshare.com Mon Nov 29 18:59:20 2010 From: idan at cloudshare.com (Idan Zaltzberg) Date: Mon, 29 Nov 2010 19:59:20 +0200 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 In-Reply-To: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> References: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> Message-ID: <7e83f84c109370e8b45a06e29b30b26e@mail.gmail.com> Thanks. How I suspect there is a leak in the JIT of my application, up until now I thought that if the performance counter for "# of methods jitted" is constantly rising then that means exactly that. From your reply I understand that this is not the case. Can you tell how can I know how many uncollectible JIT objects I have so that I can trace them (preferably without using windbg) Thanks again? *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Dino Viehland *Sent:* Monday, November 29, 2010 7:41 PM *To:* Discussion of IronPython *Subject:* Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Defaultdict is creating a new invoke binder ? it should be getting the binder from PythonContext using the Invoke(CallSignature) method. Because it creates a new binder each time we are getting no caching of the rules across defaultdict instances and it?ll end up generating a new method to handle the missing call. It is collectible (so not really a leak) but it is really bad from a performance perspective. *From:* users-bounces at lists.ironpython.com [mailto: users-bounces at lists.ironpython.com] *On Behalf Of *Idan Zaltzberg *Sent:* Monday, November 29, 2010 4:10 AM *To:* Discussion of IronPython *Subject:* [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From dinov at microsoft.com Mon Nov 29 19:23:24 2010 From: dinov at microsoft.com (Dino Viehland) Date: Mon, 29 Nov 2010 18:23:24 +0000 Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 In-Reply-To: <7e83f84c109370e8b45a06e29b30b26e@mail.gmail.com> References: <6C7ABA8B4E309440B857D74348836F2EFAB270@TK5EX14MBXC135.redmond.corp.microsoft.com> <7e83f84c109370e8b45a06e29b30b26e@mail.gmail.com> Message-ID: <6C7ABA8B4E309440B857D74348836F2EFABCA0@TK5EX14MBXC135.redmond.corp.microsoft.com> The closest non-windbg solution I could think of might be CLR Profiler which can probably report the number of dynamic method objects which are alive. Windbg can also do this when you dump the heap and is probably over all actually easier to use in this case as you can attach, do !DumpHeap -stat, and then detach. Just one more data point which might help you understand what's going on - the JITed methods in this case are probably adding 4k of memory to the cost of each defaultdict instance as long as the defaultdict is alive. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Monday, November 29, 2010 9:59 AM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Thanks. How I suspect there is a leak in the JIT of my application, up until now I thought that if the performance counter for "# of methods jitted" is constantly rising then that means exactly that. From your reply I understand that this is not the case. Can you tell how can I know how many uncollectible JIT objects I have so that I can trace them (preferably without using windbg) Thanks again... From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Dino Viehland Sent: Monday, November 29, 2010 7:41 PM To: Discussion of IronPython Subject: Re: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Defaultdict is creating a new invoke binder - it should be getting the binder from PythonContext using the Invoke(CallSignature) method. Because it creates a new binder each time we are getting no caching of the rules across defaultdict instances and it'll end up generating a new method to handle the missing call. It is collectible (so not really a leak) but it is really bad from a performance perspective. From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Monday, November 29, 2010 4:10 AM To: Discussion of IronPython Subject: [IronPython] Jit leak in defaultdict for Ipy 2.6.2 Hi, I have noticed the following method always adds a jitted method (looking at the ".NET CLR Jit" performance counter) when it is run: def f(): d = defaultdict(int) d[0] I created my own implementation of defaultdict (in ipy): class defaultdict(dict): def __init__(self, cls): super(defaultdict, self).__init__() self.cls = cls def __getitem__(self, key): if key not in self: self[key] = self.cls() return super(defaultdict, self).__getitem__(key) And I noticed that it does not leak JIT and it works 200 times faster when running the method f(). Can you please look why this happens in the current implementation? Also I was wondering if there are any other utility methods that use similar code and probably will have the same problem. Thanks, Idan zalzberg -------------- next part -------------- An HTML attachment was scrubbed... URL: From Tomas.Matousek at microsoft.com Tue Nov 30 21:53:06 2010 From: Tomas.Matousek at microsoft.com (Tomas Matousek) Date: Tue, 30 Nov 2010 20:53:06 +0000 Subject: [IronPython] Language poll Message-ID: In case you'd like to vote for your favorite language :) http://blogs.msdn.com/b/mikeormond/archive/2010/11/26/msdn-flash-poll-13-language-shapes-the-way-we-think.aspx Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: