[pypy-issue] Issue #2768: eventlet.monkey_patch breaks threading.Event.wait (pypy/pypy)

Antonio Cuni issues-reply at bitbucket.org
Thu Mar 1 11:23:57 EST 2018

New issue 2768: eventlet.monkey_patch breaks threading.Event.wait

Antonio Cuni:

This code:
from eventlet import monkey_patch
from threading import Event
ev = Event()

results in this traceback:
Traceback (most recent call last):
  File "eventbug.py", line 5, in <module>
  File "/extra/pypy-release/pypy2-v5.10.0-linux64/lib-python/2.7/threading.py", line 610, in wait
  File "/extra/pypy-release/pypy2-v5.10.0-linux64/lib-python/2.7/threading.py", line 347, in wait
    gotit = waiter._py3k_acquire(True, timeout)
AttributeError: 'Semaphore' object has no attribute '_py3k_acquire'

The call to `_py3k_acquire` was added by commit 8d88f18, but I'm not sure to understand what was the real underlying reason to do so: @arigo , do you remember?

We should either:
1. fix our code so that it doesn't break if `_py3k_acquire` is not present
2. fix it in eventlet and make a PR, hoping they accept it

More information about the pypy-issue mailing list