gevent.threadpool.ThreadPool.imap
andimap_unordered
now
accept multiple iterables.- (Experimental) Exceptions raised from iterating using the
ThreadPool
orGroup
mapping/application functions should now
have the original traceback. gevent.threadpool.ThreadPool.apply
now raises any exception
raised by the called function, the same as
gevent.pool.Group
/Pool
and the builtinapply
function.
This obsoletes the undocumentedapply_e
function. Original PR
#556 by Robert Estelle.- Monkey-patch the
selectors
module frompatch_all
and
patch_select
on Python 3.4. See #591 . - Additional query functions for the :mod:
gevent.monkey
module
allow knowing what was patched. Discussed in :issue:135
and
implemented in :pr:325
by Nathan Hoad. - In non-monkey-patched environments under Python 2.7.9 or above or
Python 3, using a gevent SSL socket could cause the greenlet to
block. See :issue:597
by David Ford. gevent.socket.socket.sendall
supports arbitrary objects that
implement the buffer protocol (such as ctypes structures), just like
native sockets. Reported in :issue:466
by tzickel.- Added support for the
onerror
attribute present in CFFI 1.2.0
for better signal handling under PyPy. Thanks to Armin Rigo and Omer
Katz. (See https://bitbucket.org/cffi/cffi/issue/152/handling-errors-from-signal-handlers-in) - The
gevent.subprocess
module is closer in behaviour to the
standard library under Python 3, at least on POSIX. The
pass_fds
,restore_signals
, andstart_new_session
arguments are now unimplemented, as are thetimeout
parameters
to various functions. Under Python 2, the previously undocumentedtimeout
parameter toPopen.communicate
raises an exception like its
Python 3 counterpart. - An exception starting a child process with the
gevent.subprocess
module no longer leaks file descriptors. Reported in :pr:374
by 陈小玉. - The example
echoserver.py
no longer binds to the standard X11
TCP port. Reported in :issue:485
by minusf. gevent.iwait
no longer throwsLoopExit
if the caller
switches greenlets between return values. Reported and initial patch
in :pr:467
by Alexey Borzenkov.- The default threadpool and default threaded resolver work in a
forked child process, such as withmultiprocessing.Process
.
Previously the child process would hang indefinitely. Reported in
:issue:230
by Lx Yu. - Fork watchers are more likely to (eventually) get called in a
multi-threaded program. gevent.killall
accepts an arbitrary iterable for the greenlets
to kill. Reported in :issue:404
by Martin Bachwerk; seen in
combination with older versions of simple-requests.gevent.local.local
objects are now eligible for garbage
collection as soon as the greenlet finishes running, matching the
behaviour of the built-inthreading.local
(when implemented
natively). Reported in :issue:387
by AusIV.- Killing a greenlet (with
gevent.kill
or
gevent.greenlet.Greenlet.kill
) before it is actually started and
switched to now prevents the greenlet from ever running, instead of
raising an exception when it is later switched to. See :issue:330
reported by Jonathan Kamens.