When added monkey.patch_all() directly on the top of gearbox, the problem 
vanished. So it seems gearbox is monkey patching too late - urllib2 is 
already imported somewhere and gevent then fails to patch it, as hinted by 
this: https://groups.google.com/forum/#!topic/gevent/JUWbFMcNYEM

Should I create an issue for this?

Juraj

On Wednesday, October 16, 2013 11:37:18 PM UTC+2, Juraj Variny wrote:
>
> Hello, after upgrade to tg 2.3 and set up to use gevent, I am getting 
> exceptions like:
>
> AssertionError: The object popped (<tg.wsgiapp.RequestLocals object at 
> 0x4f12aa0>) is not the same as the object expected 
> (<tg.wsgiapp.RequestLocals object at 0x4cbc398>)
>
> It happens in controller methods that make inline remote JSONRPC calls 
> using jsonrpc-1.2 (which is based on standard urllib2) so I suspect it 
> isn't monkey patched properly . Trying gevent 1.0rc3 did not help. I don't 
> know how to tackle the problem, do you have any ideas please?
>

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to