setup.py
can be run from a directory containing spaces. Reported in issue #319 by Ivan Smirnov.setup.py
can build with newer versions of clang on OS X. They enforce the distinction between CFLAGS and CPPFLAGS.gevent.lock.Semaphore
is atomic on PyPy, just like it is on CPython. This comes at a small performance cost.successful
value to False when killing a greenlet before it ran with a non-default exception. Fixed in pull request #608 by Heungsub Lee.os.waitpid
to become unreliable due to the use of signals on POSIX platforms. This was especially noticeable when using gevent.subprocess
in combination with multiprocessing
. Now, the monkey-patched os
module provides a waitpid
function that seeks to ameliorate this. Reported in issue #600 by champax and issue #452 by Łukasz Kawczyński.select.poll
, provide a gevent-friendly gevent.select.poll
and corresponding monkey-patch. Implemented in pull request #604 by Eddi Linder.gevent.thread.allocate_lock
(and so a monkey-patched standard library allocate_lock
) more closely matches the behaviour of the builtin: an unlocked lock cannot be released, and attempting to do so throws the correct exception (thread.error
on Python 2, RuntimeError
on Python 3). Previously, over-releasing a lock was silently ignored. Reported in issue #308 by Jędrzej Nowak.gevent.fileobject.FileObjectThread
uses the threadpool to close the underling file-like object. Reported in issue #201 by vitaly-krugl.gevent.pywsgi
handler is handled more robustly, resulting in “HTTP 400 bad request” responses instead of a 500 error or, in the worst case, a server-side hang. Reported in issue #229 by Björn Lindqvist.threading
module before using gevent.monkey.patch_all()
no longer causes Python 3.4 to fail to get the repr
of the main thread, and other CPython platforms to return an unjoinable DummyThread. (Note that this is not recommended.) Reported in issue #153.io
package to implement FileObjectPosix
. This unifies the code with the Python 3 implementation, and fixes problems with using seek()
. See issue #151.gevent.spawn
, spawn_raw
and spawn_later
, as well as the Greenlet
constructor, immediately produce useful TypeError``s if asked to run something that cannot be run. Previously, the spawned greenletwould die with an uncaught ``TypeError
the first time it was switched to. Reported in issue #119 by stephan.gevent.threadpool.ThreadPool.apply
no longer raises a LoopExit
error (using ThreadPool.spawn
and then get
on the result still could; you must be careful to use the correct hub). Reported in issue #131 by 8mayday.threading
module is monkey-patched, the module-level lock in the logging
module is made greenlet-aware, as are the instance locks of any configured handlers. This makes it safer to import modules that use the standard pattern of creating a module-level Logger
instance before monkey-patching. Configuring logging
with a basic configuration and then monkey-patching is also safer (but not configurations that involve such things as the SocketHandler
).threading.RLock
under Python 3.RuntimeError
from importlib
. Reported in issue #615 by Daniel Mizyrycki. (The same thing could happen under Python 2 if a threading.RLock
was held around the monkey-patching call; this is less likely but not impossible with import hooks.)pywsgi.WSGIServer
accept a logging.Logger
instance for its log
and (new) error_log
parameters. Take care that the system is fully monkey-patched very early in the process’s lifetime if attempting this, and note that non-file handlers have not been tested. Fixes issue #106.