[pypy-issue] [issue1521] greenlet compatibility: .switch does not accept **kwargs

Sergey Shepelev tracker at bugs.pypy.org
Fri Jun 28 17:52:28 CEST 2013

New submission from Sergey Shepelev <temotor at gmail.com>:

As greenlet docs say, their switch accepts both *args and **kwargs.


g.switch(*args, **kwargs)

Eventlet relies on that and passes some kwargs. Currently, a lot of Eventlet tests fail like this:

FAIL: test_025_accept_errors (tests.wsgi_test.TestHttpd)
Traceback (most recent call last):
  File "/home/temoto/dev/github.com/eventlet/eventlet/tests/wsgi_test.py", line 762, in 
AssertionError: Traceback (most recent call last):
  File "/home/temoto/dev/github.com/eventlet/eventlet/eventlet/hubs/hub.py", line 346, in fire_timers
  File "/home/temoto/dev/github.com/eventlet/eventlet/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
TypeError: switch() got 4 unexpected keyword arguments

It is so awesome that you guys added stackless support in 2.0; how do you think would it be possible to 
fix this compatibility also?

If someone would briefly describe state of affairs with your unbound_method() here 
https://bitbucket.org/pypy/pypy/src/default/lib_pypy/greenlet.py#cl-81 I could try to it myself.

Thank you.

nosy: +temoto
status: unread -> chatting

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list