librelist archives

« back to archive

falcon 0.2b2 middleware process_request

falcon 0.2b2 middleware process_request

From:
Kenneth Chin
Date:
2015-01-12 @ 14:43
Hi,

I have just installed the latest falcon 0.2b2 and noticed that it is 
complaining that the middleware process_request() from 0.2b1 requires 
additional 'params' argument. The API class documentation states that 
process_request() takes (self, req, resp, params) but the api.py is 
invoking as process_request(req, resp) without the params. It seems that 
the process_request() in 0.2b2 has been updated to drop 'params' 
argument. Shall I raise an issue ticket to update the documentation?

Regards,
Kenneth

Re: [falcon] falcon 0.2b2 middleware process_request

From:
Kurt Griffiths
Date:
2015-01-13 @ 22:54
Nice catch. The middleware feature has gone through several iterations and
it looks like the docstring for falcon.API got out of sync with the code.
I’m already working on a patch to clean up the docs, and will add this in.
Should have a PR submitted in the next couple of days.

Cheers,
Kurt

On 1/12/15, 8:43 AM, "Kenneth Chin" <kenneth.chin@codebless.com> wrote:

>Hi,
>
>I have just installed the latest falcon 0.2b2 and noticed that it is
>complaining that the middleware process_request() from 0.2b1 requires
>additional 'params' argument. The API class documentation states that
>process_request() takes (self, req, resp, params) but the api.py is
>invoking as process_request(req, resp) without the params. It seems that
>the process_request() in 0.2b2 has been updated to drop 'params'
>argument. Shall I raise an issue ticket to update the documentation?
>
>Regards,
>Kenneth