Re: running a controller method outside wsgi app

2009-01-20 Thread Wichert Akkerman
Previously Roberto Allende wrote: Wichert Akkerman escribió: Previously Dalius Dobravolskas wrote: Hello, On Mon, Jan 19, 2009 at 7:44 AM, Roberto Allende ro...@menttes.com wrote: My motivation is to write a unit testing but even in other cases it could have sense to

Re: hasattr and context object

2009-01-20 Thread mk
Mike Orr wrote: 'c' -- as well as the other context globals (request, response, session, cache, app_globals, and config) -- are StackedObjectProxy objects. This allows multiple instances of Pylons applications to exist in the same process and share the module globals. With

Re: hasattr and context object

2009-01-20 Thread mk
Mark Hildreth wrote: hasattr returns true because of the way that tmpl_context (c) is implemented. https://www.knowledgetap.com/hg/pylons-dev/file/98d7b9278acd/pylons/util.py#l115 You have ContextObj, and AttribSafeContextObj. By default, Pylons uses AttribSafeContextObj. Looking at the

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Thomas G. Willis
That's it I'm switching to Lisp. L8r suxx0rs! /kidding Tycon wrote: Benchmarks indicate it is taking as much as 20% of request handling time (not including the user action). The question is why is it even necessary to use this registry facility ? Similarly, other request handling

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Alberto Valverde
Tycon wrote: Benchmarks indicate it is taking as much as 20% of request handling time (not including the user action). So, taking into account that 96.7% of the time of a request is inside the user action(empirically proved by the extensive benchmarks I've made which Im not going to

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Ben Bangert
On Jan 19, 2009, at 10:37 PM, Tycon wrote: Benchmarks indicate it is taking as much as 20% of request handling time (not including the user action). Curious, I've done rather extensive benchmarks and never seen the registry middleware as being such a chunk. Can you elaborate? The

Re: memcached beaker support

2009-01-20 Thread Ben Bangert
On Jan 19, 2009, at 11:04 AM, Jonathan Vanasco wrote: any chance the next version of beaker will be better integrated with pylons so it doesn't flush to the datastore on ever save( The current code in trunk does not actually do the 'real' save until the end of the request, no matter how

Book/donation

2009-01-20 Thread Matt Feifarek
Hi Ben (and Pylons list). I've been thinking of buying The Definitive Guide to Pylons from Apress, but am realizing that I'd rather read it on-screen (syntax-highlighting, search, cut-n-paste, etc.) BUT, I know that writing books is one of the ways that contributors to Free Software can make a

Re: Book/donation

2009-01-20 Thread Patrick
I am a bit short of cash at the moment but I too would like to donate at some point. It's amazing how much has gotten done without support. I don't work for free and I don't expect others to do so. Pylons is helping me generate income(or will shortly) -patrick Matt Feifarek wrote: Hi Ben

Re: Book/donation

2009-01-20 Thread Thorsten Lockert
You do realize that Apress also sells the book in electronic (PDF) format, which you can search in, cut and paste from and such, right...? Thorsten On Jan 20, 2009, at 10:06 , Matt Feifarek wrote: Hi Ben (and Pylons list). I've been thinking of buying The Definitive Guide to Pylons from

Re: Book/donation

2009-01-20 Thread Matt Feifarek
No, I did not. But anyway, PDF sucks (no color-coding, no download links, hard to read compared to a browser, etc.) I'm hoping for http://pylonsbook.com/ But if Ben's preference is that we should buy the PDF, I might just do that. I'd just rather a more direct approach. But thanks for the tip.

Re: Book/donation

2009-01-20 Thread Thorsten Lockert
My understanding is that the online version at http://pylonsbook.com/ is in the process of being updated to what was released on paper (and in PDF) as well. That said, PDF can certainly have color-coding and clickable links. I forget whether the Pylons book in PDF format does. Thorsten On

Re: Book/donation

2009-01-20 Thread Wyatt Baldwin
Matt Feifarek wrote: Hi Ben (and Pylons list). I've been thinking of buying The Definitive Guide to Pylons from Apress, but am realizing that I'd rather read it on-screen (syntax-highlighting, search, cut-n-paste, etc.) BUT, I know that writing books is one of the ways that

Re: Book/donation

2009-01-20 Thread Wyatt Baldwin
On Tue, Jan 20, 2009 at 1:09 PM, Thorsten Lockert tlock...@gmail.comwrote: You do realize that Apress also sells the book in electronic (PDF) format, which you can search in, cut and paste from and such, right...? On Jan 20, 10:35 am, Matt Feifarek matt.feifa...@gmail.com wrote: No, I

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Ian Bicking
On Tue, Jan 20, 2009 at 11:36 AM, Ben Bangert b...@groovie.org wrote: Similarly, other request handling operations such as creating the request object may also be redundant, because the user may not be interested in all the attributes of the request object. So wouldn't it be better to provide

Re: Book/donation

2009-01-20 Thread Matt Feifarek
On Tue, Jan 20, 2009 at 2:14 PM, Wyatt Baldwin wyatt.lee.bald...@gmail.comwrote: I haven't seen the PDF, but there's no reason it couldn't have syntax highlighting or download links is there? Does anyone know if it does? The sample-chapter PDF that they have has no code examples, but there's

Re: Book/donation

2009-01-20 Thread Mike Orr
Matt Feifarek wrote: Hi Ben (and Pylons list). I've been thinking of buying The Definitive Guide to Pylons from Apress, but am realizing that I'd rather read it on-screen (syntax-highlighting, search, cut-n-paste, etc.) BUT, I know that writing books is one of the ways that contributors to

Re: Book/donation

2009-01-20 Thread Noah Gift
On Wed, Jan 21, 2009 at 9:05 AM, Mike Orr sluggos...@gmail.com wrote: Matt Feifarek wrote: Hi Ben (and Pylons list). I've been thinking of buying The Definitive Guide to Pylons from Apress, but am realizing that I'd rather read it on-screen (syntax-highlighting, search, cut-n-paste, etc.)

Re: Book/donation

2009-01-20 Thread Mike Orr
On Tue, Jan 20, 2009 at 1:20 PM, Noah Gift noah.g...@gmail.com wrote: On Wed, Jan 21, 2009 at 9:05 AM, Mike Orr sluggos...@gmail.com wrote: Noah has been musing about setting up a nonprofit or leveraging a nonprofit (like the PSF) for the purpose of collecting donations to support

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Tycon
empirical data is that if you comment out the RegistryManager in config/middleware.py, you get much better req/sec (but you cant use any of the gloabals...). In fact, isn't the whole purpose of this registry facility to enable request-local objects (such as the request object) to be accessed as

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Wyatt Baldwin
On Jan 20, 3:49 pm, Tycon adie...@gmail.com wrote: empirical data is that if you comment out the RegistryManager in config/middleware.py, you get much better req/sec (but you cant use any of the gloabals...). Or, to be more precise, the empirical data YOU have is that when YOU comment out the

Re: RegistryMiddleware is a major overhead

2009-01-20 Thread Mike Orr
On Tue, Jan 20, 2009 at 3:49 PM, Tycon adie...@gmail.com wrote: empirical data is that if you comment out the RegistryManager in config/middleware.py, you get much better req/sec (but you cant use any of the gloabals...). In fact, isn't the whole purpose of this registry facility to enable

Re: Exploring ramework futures

2009-01-20 Thread Marcus Cavanaugh
On Jan 19, 10:24 pm, Graham Dumpleton graham.dumple...@gmail.com wrote: I would agree that need to start looking towards WSGI 2.0 and Python 3.0 would be a good trigger for that. +1 on that. If there was ever a time to make a move, this is it, where we have preexisting breaks in backward

Webtest doesn't like 204 response with Content-Type header

2009-01-20 Thread Chris Miles
I have a simple Pylons controller that responds to PUT requests with a 204 (No Content) status and no entity body. For example (stripped down):: class DataController(BaseController): def test_put(self): do_something() response.status = 204 # No content

SQLAlchemy models isn't abstract layer / data model

2009-01-20 Thread Jan Koprowski
In MVC *M*odel should be abstract layer of data and hide data representation and real method access giving: universal, good described, readable and simple interface to manage this data: add, remove, get all, get one etc... methods. Commonly I use Pylons. In the last lesson of my University of

Re: memcached beaker support

2009-01-20 Thread Jonathan Vanasco
woot!!! On Jan 20, 12:38 pm, Ben Bangert b...@groovie.org wrote: On Jan 19, 2009, at 11:04 AM, Jonathan Vanasco wrote: any chance the next version of beaker will be better integrated with pylons so it doesn't flush to the datastore on ever save( The current code in trunk does not