=========== Changelog =========== .. currentmodule:: gevent 1.3.7 (2018-10-12) ================== - Formatting run info no longer includes ``gevent.local.local`` objects that have no value in the greenlet. See :issue:`1275`. - Fixed negative length in pywsgi's Input read functions for non chunked body. Reported in :issue:`1274` by tzickel. - Upgrade libuv from 1.22.0 to 1.23.2. - Fix opening files in text mode in CPython 2 on Windows by patching libuv. See :issue:`1282` reported by wiggin15. 1.3.6 (2018-08-17) ================== - gevent now depends on greenlet 0.4.14 or above. gevent binary wheels for 1.3.5 and below must have greenlet 0.4.13 installed on Python 3.7 or they will crash. Reported by Alexey Stepanov in :issue:`1260` and pkittenis in :issue:`1261`. - :class:`gevent.local.local` subclasses correctly supports ``@staticmethod`` functions. Reported by Brendan Powers in :issue:`1266`. 1.3.5 (2018-07-16) ================== - Update the bundled libuv from 1.20.1 to 1.22.0. - Test Python 3.7 on Appveyor. Fix the handling of Popen's ``close_fds`` argument on 3.7. - Update Python versions tested on Travis, including PyPy to 6.0. See :issue:`1195`. - :mod:`gevent.queue` imports ``_PySimpleQueue`` instead of ``SimpleQueue`` so that it doesn't block the event loop. :func:`gevent.monkey.patch_all` makes this same substitution in :mod:`queue`. This fixes issues with :class:`concurrent.futures.ThreadPoolExecutor` as well. Reported in :issue:`1248` by wwqgtxx and :issue:`1251` by pyld. - :meth:`gevent.socket.socket.connect` doesn't pass the port (service) to :func:`socket.getaddrinfo` when it resolves an ``AF_INET`` or ``AF_INET6`` address. (The standard library doesn't either.) This fixes an issue on Solaris. Reported in :issue:`1252` by wiggin15. - :meth:`gevent.socket.socket.connect` works with more address families, notably AF_TIPC, AF_NETLINK, AF_BLUETOOTH, AF_ALG and AF_VSOCK. 1.3.4 (2018-06-20) ================== - Be more careful about issuing ``MonkeyPatchWarning`` for ssl imports. Now, we only issue it if we detect the one specific condition that is known to lead to RecursionError. This may produce false negatives, but should reduce or eliminate false positives. - Based on measurements and discussion in :issue:`1233`, adjust the way :mod:`gevent.pywsgi` generates HTTP chunks. This is intended to reduce network overhead, especially for smaller chunk sizes. - Additional slight performance improvements in :mod:`gevent.pywsgi`. See :pr:`1241`. 1.3.3 (2018-06-08) ================== - :func:`gevent.sleep` updates the loop's notion of the current time before sleeping so that sleep duration corresponds more closely to elapsed (wall clock) time. :class:`gevent.Timeout` does the same. Reported by champax and FoP in :issue:`1227`. - Fix an ``UnboundLocalError`` in SSL servers when wrapping a socket throws an error. Reported in :issue:`1236` by kochelmonster. 1.3.2.post0 (2018-05-30) ======================== - Fix a packaging error in manylinux binary wheels that prevented some imports from working. See :issue:`1219`. 1.3.2 (2018-05-29) ================== - Allow weak refeneces to :class:`gevent.queue.Queue`. Reported in :issue:`1217` by githrdw. 1.3.1 (2018-05-18) ================== - Allow weak references to :class:`gevent.event.Event`. Reported in :issue:`1211` by Matias Guijarro. - Fix embedded uses of :func:`gevent.Greenlet.spawn`, especially under uwsgi. Reported in :issue:`1212` by Kunal Gangakhedkar. - Fix :func:`gevent.os.nb_write` and :func:`gevent.os.nb_read` not always closing the IO event they opened in the event of an exception. This would be a problem especially for libuv. 1.3.0 (2018-05-11) ================== - Python 3.7 passes the automated memory leak checks. See :issue:`1197`. - Update autoconf's config.guess and config.sub to the latest versions for c-ares and libev. - :class:`gevent.local.local` subclasses that mix-in ABCs can be instantiated. Reported in :issue:`1201` by Bob Jordan. 1.3b2 (2018-05-03) ================== - On Windows, CFFI is now a dependency so that the libuv backend really can be used by default. - Fix a bug detecting whether we can use the memory monitoring features when psutil is not installed. - `gevent.subprocess.Popen` uses ``/proc/self/fd`` (on Linux) or ``/dev/fd`` (on BSD, including macOS) to find the file descriptors to close when ``close_fds`` is true. This matches an optimization added to Python 3 (and backports it to Python 2.7), making process spawning up to 9 times faster. Also, on Python 3, since Python 3.3 is no longer supported, we can also optimize the case where ``close_fds`` is false (not the default), making process spawning up to 38 times faster. Initially reported in :issue:`1172` by Ofer Koren. - The bundled libuv is now 1.20.1, up from 1.19.2. See :issue:`1177`. - The long-deprecated and undocumented module ``gevent.wsgi`` was removed. - Add `gevent.util.assert_switches` to build on the monitoring functions. Fixes :issue:`1182`. - A started monitor thread for the active hub now survives a fork. See :issue:`1185`. - The greenlet tracer functions used for the various monitoring capabilities are now compiled with Cython for substantially lower overhead. See :pr:`1190`. - libuv now collects all pending watchers and runs their callbacks at the end of the loop iteration using UV_RUN_ONCE. This eliminates the need to patch libuv to be greenlet-safe. It also means that zero-duration timer watchers are actual timer watchers again (instead of being turned into check watchers); newly added zero-duration timers cannot block the event loop because they won't be run until a safe time. - Python 3.7.0b4 is now the tested and supported version of Python 3.7. PyPy 6.0 has been tested, although CI continues to use 5.10. 1.3b1 (2018-04-13) ================== Dependencies ------------ - Cython 0.28.2 is now used to build gevent from a source checkout. - The bundled libuv is now 1.19.2, up from 1.18.0. Platform Support ---------------- - Travis CI tests on Python 3.7.0b3. - Windows now defaults to the libuv backend if CFFI is installed. See :issue:`1163`. Bug Fixes --------- - On Python 2, when monkey-patching `threading.Event`, also monkey-patch the underlying class, ``threading._Event``. Some code may be type-checking for that. See :issue:`1136`. - Fix libuv io watchers polling for events that only stopped watchers are interested in, reducing CPU usage. Reported in :issue:`1144` by wwqgtxx. Enhancements ------------ - Add additional optimizations for spawning greenlets, making it faster than 1.3a2. - Use strongly typed watcher callbacks in the libuv CFFI extensions. This prevents dozens of compiler warnings. - When gevent prints a timestamp as part of an error message, it is now in UTC format as specified by RFC3339. - Threadpool threads that exit now always destroy their hub (if one was created). This prevents some forms of resource leaks (notably visible as blocking functions reported by the new monitoring abilities). - Hub objects now include the value of their ``name`` attribute in their repr. - Pools for greenlets and threads have lower overhead, especially for ``map``. See :pr:`1153`. - The undocumented, internal implementation classes ``IMap`` and ``IMapUnordered`` classes are now compiled with Cython, further reducing the overhead of ``[Thread]Pool.imap``. - The classes `gevent.event.Event` and `gevent.event.AsyncResult` are compiled with Cython for improved performance, as is the ``gevent.queue`` module and ``gevent.hub.Waiter`` and certain time-sensitive parts of the hub itself. Please report any compatibility issues. - ``python -m gevent.monkey