Re: Debugging failed tests with pylons globals

2008-07-13 Thread Alberto Valverde
Justin Tulloss wrote: () In addition, it's very difficult to inspect the object that an SOP refers to since it obfuscates the object's __dict__. This trick can help: req = pylons.request._current_obj() # get current request object wrapped by SOP print dir(req) Again, it's just a matter

Re: Debugging failed tests with pylons globals

2008-07-13 Thread Mike Orr
On Sun, Jul 13, 2008 at 6:16 AM, Alberto Valverde [EMAIL PROTECTED] wrote: Justin Tulloss wrote: () In addition, it's very difficult to inspect the object that an SOP refers to since it obfuscates the object's __dict__. This trick can help: req = pylons.request._current_obj() # get

Re: Debugging failed tests with pylons globals

2008-07-11 Thread Jonathan Vanasco
I don't think that SOPs are the devil... I think the issue has more to do with how and where items are instantiated and stored. I think if the load order were different ( i'm not going to make any suggestions ;) ), and how we get at them, then many of the end-user issues could disappear.

Re: Debugging failed tests with pylons globals

2008-07-11 Thread Justin Tulloss
On Jul 11, 8:23 am, Alberto Valverde [EMAIL PROTECTED] wrote: I honestly don't find them *that* hard to understand, and I'm not that bright either. Granted, I've fought them a lot and have implemented several libraries (one of them is open source, ToscaWidgets) that use them so I probably

Re: Debugging failed tests with pylons globals

2008-07-10 Thread Mike Orr
On Wed, Jul 9, 2008 at 10:42 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: The only reference I can find to SOP and mod_wsgi together is a prior comment by you: I tried to find the original message earlier too but I couldn't. So maybe I misunderstood it, or maybe the original person was

Re: Debugging failed tests with pylons globals

2008-07-10 Thread Mike Orr
Ben, do you remember? Wasn't there an environment that couldn't use SOPs and you added self.request et al to the controllers because of it? Or did I dream the whole thing? -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because

Re: Debugging failed tests with pylons globals

2008-07-10 Thread Ben Bangert
On Jul 10, 2008, at 12:27 AM, Mike Orr wrote: Ben, do you remember? Wasn't there an environment that couldn't use SOPs and you added self.request et al to the controllers because of it? Or did I dream the whole thing? Only async environments can't use SOP's, though since eventlet will

Re: Debugging failed tests with pylons globals

2008-07-10 Thread Justin Tulloss
So SOPs are here to stay for now but nobody thinks they're ideal.  The trouble is, we don't know what would be better. I understand that pylons 1.0 will be breaking backwards compatibility. That might be a good time to look at what might be a better option. If 98% of cases are served by

Re: Debugging failed tests with pylons globals

2008-07-09 Thread Graham Dumpleton
On Jul 9, 6:22 am, Mike Orr [EMAIL PROTECTED] wrote: Having one SOP, pylons.app, containing all the Pylons globals has long been suggested by me.  The value could also be attached to the controller instance -- one attribute instead of several.  That would be for users who object to getting

Re: Debugging failed tests with pylons globals

2008-07-09 Thread Mike Orr
On Wed, Jul 9, 2008 at 7:04 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: On Jul 9, 6:22 am, Mike Orr [EMAIL PROTECTED] wrote: Having one SOP, pylons.app, containing all the Pylons globals has long been suggested by me. The value could also be attached to the controller instance -- one

Re: Debugging failed tests with pylons globals

2008-07-09 Thread Lawrence Oluyede
On Thu, Jul 10, 2008 at 7:12 AM, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Jul 9, 2008 at 7:04 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: On Jul 9, 6:22 am, Mike Orr [EMAIL PROTECTED] wrote: Having one SOP, pylons.app, containing all the Pylons globals has long been suggested by me.

Re: Debugging failed tests with pylons globals

2008-07-09 Thread Graham Dumpleton
On Jul 10, 3:12 pm, Mike Orr [EMAIL PROTECTED] wrote: On Wed, Jul 9, 2008 at 7:04 PM, Graham Dumpleton [EMAIL PROTECTED] wrote: On Jul 9, 6:22 am, Mike Orr [EMAIL PROTECTED] wrote: Having one SOP, pylons.app, containing all the Pylons globals has long been suggested by me. The

Re: Debugging failed tests with pylons globals

2008-07-08 Thread Alberto Valverde
On Mon, Jul 7, 2008 at 10:04 PM, Justin Tulloss [EMAIL PROTECTED] wrote: I have to admit that despite my digging through the source, I do not have a good understanding of the StackedObjectProxy class and am constantly doing battle with it. I don't think there's anybody who doesn't do

Re: Debugging failed tests with pylons globals

2008-07-08 Thread Mike Orr
On Tue, Jul 8, 2008 at 2:18 AM, Alberto Valverde [EMAIL PROTECTED] wrote: StackedObjectProxy might not be the best implementation (although I can't imagine how to improve it since there are so many edge cases involved..., eg: those that have been tripping people over when testing) but it is

Re: Debugging failed tests with pylons globals

2008-07-07 Thread Mike Orr
On Mon, Jul 7, 2008 at 10:04 PM, Justin Tulloss [EMAIL PROTECTED] wrote: I have to admit that despite my digging through the source, I do not have a good understanding of the StackedObjectProxy class and am constantly doing battle with it. I don't think there's anybody who doesn't do battle