Thank you Anthony, I added the wsgibase wrapper after my initial post.  I 
was modifying gluon/main.py but I added the wrapper (lambda_handler.py) to 
avoid that.

I confirmed which environ variables are coming through as unicode and 
submitted an issue to zappa.
https://github.com/Miserlou/Zappa/issues/1713

I'll also modify the recipe to make it more clear that this is likely a 
zappa and not a web2py issue.

On Wednesday, November 28, 2018 at 8:39:51 AM UTC-6, Anthony wrote:
>
> On Tuesday, November 27, 2018 at 6:51:54 PM UTC-5, appj...@gmail.com 
> <javascript:> wrote:
>>
>> I've created a first pass at an AWS Lambda deployment recipe which uses 
>> an open-source tool called Zappa.
>>
>> I welcome any comments or suggested improvements.  In particular, step 3 
>> requires modifying gluon/main.py which I would like to avoid.
>>
>
> I wouldn't say that is modifying gluon/main.py -- it is simply providing a 
> wrapper around gluon.main.wsgibase. In fact, the web2py gaehandler.py 
> handler does something very similar: 
> https://github.com/web2py/web2py/blob/master/handlers/gaehandler.py#L83.
>
> Note, according to PEP 3333, strings passed to the server should not be 
> unicode: https://www.python.org/dev/peps/pep-3333/#unicode-issues.
>
> Actually, it looks like Zappa is already handling this here: 
> https://github.com/Miserlou/Zappa/blob/master/zappa/wsgi.py#L110 (see 
> also, https://github.com/Miserlou/Zappa/blob/master/zappa/wsgi.py#L110). 
> Perhaps there is still some unicode getting through from Zappa, so maybe 
> you can open an issue with Zappa.
>
> Anthony
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to