CINXE.COM

Changes for 1.0 - gevent 24.11.2.dev0 documentation

<!doctype html> <html class="no-js" lang="en" data-content_root="./"> <head><meta charset="utf-8"/> <meta name="viewport" content="width=device-width,initial-scale=1"/> <meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Changes before gevent 1.0" href="changelog_pre.html" /><link rel="prev" title="Changes for 1.1" href="changelog_1_1.html" /> <!-- Generated with Sphinx 8.1.3 and Furo 2024.08.06 --> <title>Changes for 1.0 - gevent 24.11.2.dev0 documentation</title> <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=a3258c64" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=354aac6f" /> <link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=302659d7" /> <link rel="stylesheet" type="text/css" href="_static/custom.css?v=e405f49d" /> <style> body { --color-code-background: #eeeedd; --color-code-foreground: black; --color-brand-primary: #7c9a5e; --color-brand-content: #7c9a5e; --color-foreground-border: #b7d897; --font-stack: "SF Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; --font-stack--monospace: "JetBrainsMono", "JetBrains Mono", "JetBrains Mono Regular", "JetBrainsMono-Regular", ui-monospace, profont, monospace; } @media not print { body[data-theme="dark"] { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } @media (prefers-color-scheme: dark) { body:not([data-theme="light"]) { --color-code-background: #202020; --color-code-foreground: #d0d0d0; } } } </style><script async type="text/javascript" src="/_/static/javascript/readthedocs-addons.js"></script><meta name="readthedocs-project-slug" content="python-gevent" /><meta name="readthedocs-version-slug" content="latest" /><meta name="readthedocs-resolver-filename" content="/changelog_1_0.html" /><meta name="readthedocs-http-status" content="200" /></head> <body> <script> document.body.dataset.theme = localStorage.getItem("theme") || "auto"; </script> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-toc" viewBox="0 0 24 24"> <title>Contents</title> <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024"> <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/> </svg> </symbol> <symbol id="svg-menu" viewBox="0 0 24 24"> <title>Menu</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu"> <line x1="3" y1="12" x2="21" y2="12"></line> <line x1="3" y1="6" x2="21" y2="6"></line> <line x1="3" y1="18" x2="21" y2="18"></line> </svg> </symbol> <symbol id="svg-arrow-right" viewBox="0 0 24 24"> <title>Expand</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right"> <polyline points="9 18 15 12 9 6"></polyline> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24"> <title>Light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24"> <title>Dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" /> </svg> </symbol> <symbol id="svg-sun-with-moon" viewBox="0 0 24 24"> <title>Auto light/dark, in light mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path style="opacity: 50%" d="M 5.411 14.504 C 5.471 14.504 5.532 14.504 5.591 14.504 C 3.639 16.319 4.383 19.569 6.931 20.352 C 7.693 20.586 8.512 20.551 9.25 20.252 C 8.023 23.207 4.056 23.725 2.11 21.184 C 0.166 18.642 1.702 14.949 4.874 14.536 C 5.051 14.512 5.231 14.5 5.411 14.5 L 5.411 14.504 Z"/> <line x1="14.5" y1="3.25" x2="14.5" y2="1.25"/> <line x1="14.5" y1="15.85" x2="14.5" y2="17.85"/> <line x1="10.044" y1="5.094" x2="8.63" y2="3.68"/> <line x1="19" y1="14.05" x2="20.414" y2="15.464"/> <line x1="8.2" y1="9.55" x2="6.2" y2="9.55"/> <line x1="20.8" y1="9.55" x2="22.8" y2="9.55"/> <line x1="10.044" y1="14.006" x2="8.63" y2="15.42"/> <line x1="19" y1="5.05" x2="20.414" y2="3.636"/> <circle cx="14.5" cy="9.55" r="3.6"/> </svg> </symbol> <symbol id="svg-moon-with-sun" viewBox="0 0 24 24"> <title>Auto light/dark, in dark mode</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-custom-derived-from-feather-sun-and-tabler-moon"> <path d="M 8.282 7.007 C 8.385 7.007 8.494 7.007 8.595 7.007 C 5.18 10.184 6.481 15.869 10.942 17.24 C 12.275 17.648 13.706 17.589 15 17.066 C 12.851 22.236 5.91 23.143 2.505 18.696 C -0.897 14.249 1.791 7.786 7.342 7.063 C 7.652 7.021 7.965 7 8.282 7 L 8.282 7.007 Z"/> <line style="opacity: 50%" x1="18" y1="3.705" x2="18" y2="2.5"/> <line style="opacity: 50%" x1="18" y1="11.295" x2="18" y2="12.5"/> <line style="opacity: 50%" x1="15.316" y1="4.816" x2="14.464" y2="3.964"/> <line style="opacity: 50%" x1="20.711" y1="10.212" x2="21.563" y2="11.063"/> <line style="opacity: 50%" x1="14.205" y1="7.5" x2="13.001" y2="7.5"/> <line style="opacity: 50%" x1="21.795" y1="7.5" x2="23" y2="7.5"/> <line style="opacity: 50%" x1="15.316" y1="10.184" x2="14.464" y2="11.036"/> <line style="opacity: 50%" x1="20.711" y1="4.789" x2="21.563" y2="3.937"/> <circle style="opacity: 50%" cx="18" cy="7.5" r="2.169"/> </svg> </symbol> <symbol id="svg-pencil" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-pencil-code"> <path d="M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4" /> <path d="M13.5 6.5l4 4" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> <symbol id="svg-eye" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-eye-code"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0" /> <path d="M11.11 17.958c-3.209 -.307 -5.91 -2.293 -8.11 -5.958c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6c-.21 .352 -.427 .688 -.647 1.008" /> <path d="M20 21l2 -2l-2 -2" /> <path d="M17 17l-2 2l2 2" /> </svg> </symbol> </svg> <input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation"> <input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc"> <label class="overlay sidebar-overlay" for="__navigation"> <div class="visually-hidden">Hide navigation sidebar</div> </label> <label class="overlay toc-overlay" for="__toc"> <div class="visually-hidden">Hide table of contents sidebar</div> </label> <a class="skip-to-content muted-link" href="#furo-main-content">Skip to content</a> <div class="page"> <header class="mobile-header"> <div class="header-left"> <label class="nav-overlay-icon" for="__navigation"> <div class="visually-hidden">Toggle site navigation sidebar</div> <i class="icon"><svg><use href="#svg-menu"></use></svg></i> </label> </div> <div class="header-center"> <a href="contents.html"><div class="brand">gevent 24.11.2.dev0 documentation</div></a> </div> <div class="header-right"> <div class="theme-toggle-container theme-toggle-header"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-header-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> </header> <aside class="sidebar-drawer"> <div class="sidebar-container"> <div class="sidebar-sticky"><a class="sidebar-brand" href="contents.html"> <div class="sidebar-logo-container"> <img class="sidebar-logo" src="_static/5564530.png" alt="Logo"/> </div> </a><form class="sidebar-search-container" method="get" action="search.html" role="search"> <input class="sidebar-search" placeholder="Search" name="q" aria-label="Search"> <input type="hidden" name="check_keywords" value="yes"> <input type="hidden" name="area" value="default"> </form> <div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="install.html">Installation and Requirements</a></li> <li class="toctree-l1 current has-children"><a class="reference internal" href="changelog.html">Changelog</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-1" name="toctree-checkbox-1" role="switch" type="checkbox"/><label for="toctree-checkbox-1"><div class="visually-hidden">Toggle navigation of Changelog</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2"><a class="reference internal" href="changelog_1_5.html">Changes for 1.5</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_4.html">Changes for 1.4</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_3.html">Changes for 1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_2.html">Changes for 1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_1.html">Changes for 1.1</a></li> <li class="toctree-l2 current"><a class="current reference internal" href="#">Changes for 1.0</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_pre.html">Changes before gevent 1.0</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="intro.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="api/gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l1"><a class="reference internal" href="api/gevent.greenlet.html">Greenlet Objects</a></li> <li class="toctree-l1"><a class="reference internal" href="servers.html">Implementing servers</a></li> <li class="toctree-l1 has-children"><a class="reference internal" href="dns.html">Name Resolution (DNS)</a><input class="toctree-checkbox" id="toctree-checkbox-2" name="toctree-checkbox-2" role="switch" type="checkbox"/><label for="toctree-checkbox-2"><div class="visually-hidden">Toggle navigation of Name Resolution (DNS)</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.thread</span></code> – thread based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.ares</span></code> – c-ares based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.dnspython.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.dnspython</span></code> – Pure Python hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.blocking.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.blocking</span></code> – Non-cooperative resolver</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="monitoring.html">Monitoring and Debugging gevent Applications</a></li> <li class="toctree-l1"><a class="reference internal" href="loop_impls.html">Event Loop Implementations: libuv and libev</a></li> <li class="toctree-l1"><a class="reference internal" href="configuration.html">Configuring gevent</a></li> </ul> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="api/index.html">API reference</a><input class="toctree-checkbox" id="toctree-checkbox-3" name="toctree-checkbox-3" role="switch" type="checkbox"/><label for="toctree-checkbox-3"><div class="visually-hidden">Toggle navigation of API reference</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="api/gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.timeout.html">Cooperative Timeouts Using <code class="docutils literal notranslate"><span class="pre">gevent.Timeout</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.greenlet.html">Greenlet Objects</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="api/gevent.socket.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.socket</span></code> – Cooperative low-level networking interface</a><input class="toctree-checkbox" id="toctree-checkbox-4" name="toctree-checkbox-4" role="switch" type="checkbox"/><label for="toctree-checkbox-4"><div class="visually-hidden">Toggle navigation of gevent.socket – Cooperative low-level networking interface</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="api/gevent._socket3.html">Python 3 interface</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.ssl.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code> – Secure Sockets Layer (SSL/TLS) module</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.select.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.select</span></code> – Waiting for I/O completion</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.selectors.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.selectors</span></code> – High-level IO Multiplexing</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.event.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.event</span></code> – Notifications of multiple listeners</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.queue.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.queue</span></code> – Synchronized queues</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.local.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.local</span></code> – Greenlet-local objects</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.lock.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.lock</span></code> – Locking primitives</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.hub.html"><code class="docutils literal notranslate"><span class="pre">gevent.hub</span></code> - The Event Loop and the Hub</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.core.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code> - (deprecated) event loop abstraction</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent</span></code> – common functions</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.backdoor.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.backdoor</span></code> – Interactive greenlet-based network console that can be used in any process</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.baseserver.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.baseserver</span></code> – Base class for implementing servers</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.builtins.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.builtins</span></code> – gevent friendly implementations of builtin functions</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.contextvars.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.contextvars</span></code> – Cooperative <code class="docutils literal notranslate"><span class="pre">contextvars</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.core.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code> - (deprecated) event loop abstraction</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.event.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.event</span></code> – Notifications of multiple listeners</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.events.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.events</span></code> – Publish/subscribe event infrastructure</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.exceptions.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.exceptions</span></code> – Exceptions</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.fileobject.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.fileobject</span></code> – Wrappers to make file-like objects cooperative</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.hub.html"><code class="docutils literal notranslate"><span class="pre">gevent.hub</span></code> - The Event Loop and the Hub</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.local.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.local</span></code> – Greenlet-local objects</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.lock.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.lock</span></code> – Locking primitives</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.monkey.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.monkey</span></code> – Make the standard library cooperative</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.os.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.os</span></code> – Low-level operating system functions from <code class="xref py py-mod docutils literal notranslate"><span class="pre">os</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.pool.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.pool</span></code> – Managing greenlets in a group</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.pywsgi.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.pywsgi</span></code> – A pure-Python, gevent-friendly WSGI server</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.queue.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.queue</span></code> – Synchronized queues</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.ares</span></code> – c-ares based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.blocking.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.blocking</span></code> – Non-cooperative resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.dnspython.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.dnspython</span></code> – Pure Python hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.resolver.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.thread</span></code> – thread based hostname resolver</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.select.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.select</span></code> – Waiting for I/O completion</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.selectors.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.selectors</span></code> – High-level IO Multiplexing</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.server.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.server</span></code> – TCP/SSL server</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.signal.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.signal</span></code> – Cooperative implementation of special cases of <code class="xref py py-func docutils literal notranslate"><span class="pre">signal.signal()</span></code></a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="api/gevent.socket.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.socket</span></code> – Cooperative low-level networking interface</a><input class="toctree-checkbox" id="toctree-checkbox-5" name="toctree-checkbox-5" role="switch" type="checkbox"/><label for="toctree-checkbox-5"><div class="visually-hidden">Toggle navigation of gevent.socket – Cooperative low-level networking interface</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="api/gevent._socket3.html">Python 3 interface</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.ssl.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ssl</span></code> – Secure Sockets Layer (SSL/TLS) module</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.subprocess.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.subprocess</span></code> – Cooperative <code class="docutils literal notranslate"><span class="pre">subprocess</span></code> module</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.thread.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.thread</span></code> – Implementation of the standard <code class="xref py py-mod docutils literal notranslate"><span class="pre">thread</span></code> module that spawns greenlets</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.threading.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.threading</span></code> – Implementation of the standard <code class="xref py py-mod docutils literal notranslate"><span class="pre">threading</span></code> using greenlets</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.threadpool.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.threadpool</span></code> - A pool of native threads</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.time.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.time</span></code> – Makes <em>sleep</em> gevent aware</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.util.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.util</span></code> – Low-level utilities</a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.ares.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.ares</span></code> – Backwards compatibility alias for <code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.resolver.cares</span></code></a></li> <li class="toctree-l2"><a class="reference internal" href="api/gevent.wsgi.html"><code class="docutils literal notranslate"><span class="pre">gevent.wsgi</span></code> – Historical note only; does not exist</a></li> <li class="toctree-l2 has-children"><a class="reference internal" href="examples/index.html">Examples</a><input class="toctree-checkbox" id="toctree-checkbox-6" name="toctree-checkbox-6" role="switch" type="checkbox"/><label for="toctree-checkbox-6"><div class="visually-hidden">Toggle navigation of Examples</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="examples/concurrent_download.html">Example concurrent_download.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/dns_mass_resolve.html">Example dns_mass_resolve.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/echoserver.html">Example echoserver.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/geventsendfile.html">Example geventsendfile.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/portforwarder.html">Example portforwarder.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/processes.html">Example processes.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/psycopg2_pool.html">Example psycopg2_pool.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/threadpool.html">Example threadpool.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/udp_client.html">Example udp_client.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/udp_server.html">Example udp_server.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/unixsocket_client.html">Example unixsocket_client.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/unixsocket_server.html">Example unixsocket_server.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/webproxy.html">Example webproxy.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/webpy.html">Example webpy.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/wsgiserver.html">Example wsgiserver.py</a></li> <li class="toctree-l3"><a class="reference internal" href="examples/wsgiserver_ssl.html">Example wsgiserver_ssl.py</a></li> </ul> </li> </ul> </li> </ul> <ul> <li class="toctree-l1 has-children"><a class="reference internal" href="development/index.html">Development</a><input class="toctree-checkbox" id="toctree-checkbox-7" name="toctree-checkbox-7" role="switch" type="checkbox"/><label for="toctree-checkbox-7"><div class="visually-hidden">Toggle navigation of Development</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l2"><a class="reference internal" href="development/getting_started.html">Getting Started</a></li> <li class="toctree-l2"><a class="reference internal" href="development/installing_from_source.html">Installing From Source</a></li> <li class="toctree-l2"><a class="reference internal" href="development/running_tests.html">Running Tests</a></li> <li class="toctree-l2"><a class="reference internal" href="development/ci.html">Continuous integration</a></li> <li class="toctree-l2"><a class="reference internal" href="development/release_process.html">Release Process</a></li> </ul> </li> </ul> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="success.html">Success stories</a></li> <li class="toctree-l1"><a class="reference internal" href="community.html">Community</a></li> <li class="toctree-l1 current has-children"><a class="reference internal" href="older_releases.html">Information About Older Releases</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-8" name="toctree-checkbox-8" role="switch" type="checkbox"/><label for="toctree-checkbox-8"><div class="visually-hidden">Toggle navigation of Information About Older Releases</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l2 has-children"><a class="reference internal" href="whatsnew_1_5.html">What’s new in gevent 1.5</a><input class="toctree-checkbox" id="toctree-checkbox-9" name="toctree-checkbox-9" role="switch" type="checkbox"/><label for="toctree-checkbox-9"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.5</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="changelog_1_5.html">Changes for 1.5</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="whatsnew_1_4.html">What’s new in gevent 1.4</a><input class="toctree-checkbox" id="toctree-checkbox-10" name="toctree-checkbox-10" role="switch" type="checkbox"/><label for="toctree-checkbox-10"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.4</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="changelog_1_4.html">Changes for 1.4</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="whatsnew_1_3.html">What’s new in gevent 1.3</a><input class="toctree-checkbox" id="toctree-checkbox-11" name="toctree-checkbox-11" role="switch" type="checkbox"/><label for="toctree-checkbox-11"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.3</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="changelog_1_3.html">Changes for 1.3</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="whatsnew_1_2.html">What’s new in gevent 1.2</a><input class="toctree-checkbox" id="toctree-checkbox-12" name="toctree-checkbox-12" role="switch" type="checkbox"/><label for="toctree-checkbox-12"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.2</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="changelog_1_2.html">Changes for 1.2</a></li> </ul> </li> <li class="toctree-l2 has-children"><a class="reference internal" href="whatsnew_1_1.html">What’s new in gevent 1.1</a><input class="toctree-checkbox" id="toctree-checkbox-13" name="toctree-checkbox-13" role="switch" type="checkbox"/><label for="toctree-checkbox-13"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.1</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul> <li class="toctree-l3"><a class="reference internal" href="changelog_1_1.html">Changes for 1.1</a></li> </ul> </li> <li class="toctree-l2 current has-children"><a class="reference internal" href="whatsnew_1_0.html">What’s new in gevent 1.0</a><input checked="" class="toctree-checkbox" id="toctree-checkbox-14" name="toctree-checkbox-14" role="switch" type="checkbox"/><label for="toctree-checkbox-14"><div class="visually-hidden">Toggle navigation of What’s new in gevent 1.0</div><i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i></label><ul class="current"> <li class="toctree-l3 current"><a class="current reference internal" href="#">Changes for 1.0</a></li> </ul> </li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_5.html">Changes for 1.5</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_4.html">Changes for 1.4</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_3.html">Changes for 1.3</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_2.html">Changes for 1.2</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_1_1.html">Changes for 1.1</a></li> <li class="toctree-l2 current current-page"><a class="current reference internal" href="#">Changes for 1.0</a></li> <li class="toctree-l2"><a class="reference internal" href="changelog_pre.html">Changes before gevent 1.0</a></li> </ul> </li> </ul> </div> </div> </div> </div> </aside> <div class="main"> <div class="content"> <div class="article-container"> <a href="#" class="back-to-top muted-link"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> <path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path> </svg> <span>Back to top</span> </a> <div class="content-icon-container"> <div class="theme-toggle-container theme-toggle-content"> <button class="theme-toggle"> <div class="visually-hidden">Toggle Light / Dark / Auto color theme</div> <svg class="theme-icon-when-auto-light"><use href="#svg-sun-with-moon"></use></svg> <svg class="theme-icon-when-auto-dark"><use href="#svg-moon-with-sun"></use></svg> <svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg> </button> </div> <label class="toc-overlay-icon toc-content-icon" for="__toc"> <div class="visually-hidden">Toggle table of contents sidebar</div> <i class="icon"><svg><use href="#svg-toc"></use></svg></i> </label> </div> <article role="main" id="furo-main-content"> <section id="changes-for-1-0"> <h1>Changes for 1.0<a class="headerlink" href="#changes-for-1-0" title="Link to this heading">¶</a></h1> <section id="release-1-0-2"> <h2>Release 1.0.2<a class="headerlink" href="#release-1-0-2" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Fix LifoQueue.peek() to return correct element. <a class="extlink-pr reference external" href="https://github.com/gevent/gevent/pull/456">pull request #456</a>. Patch by Christine Spang.</p></li> <li><p>Upgrade to libev 4.19</p></li> <li><p>Remove SSL3 entirely as default TLS protocol</p></li> <li><p>Import socket on Windows (closes <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/459">issue #459</a>)</p></li> <li><p>Fix C90 syntax error (<a class="extlink-pr reference external" href="https://github.com/gevent/gevent/pull/449">pull request #449</a>)</p></li> <li><p>Add compatibility with Python 2.7.9’s SSL changes. <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/477">issue #477</a>.</p></li> </ul> </section> <section id="release-1-0-1"> <h2>Release 1.0.1<a class="headerlink" href="#release-1-0-1" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/423">issue #423</a>: Pool’s imap/imap_unordered could hang forever. Based on patch and test by Jianfei Wang.</p></li> </ul> </section> <section id="release-1-0-nov-26-2013"> <h2>Release 1.0 (Nov 26, 2013)<a class="headerlink" href="#release-1-0-nov-26-2013" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>pywsgi: Pass copy of error list instead of direct reference. Thanks to Jonathan Kamens, Matt Iversen.</p></li> <li><p>Ignore the autogenerated doc/gevent.*.rst files. Patch by Matthias Urlichs.</p></li> <li><p>Fix cythonpp.py on Windows. Patch by Jeryn Mathew.</p></li> <li><p>Remove gevent.run (use gevent.wait).</p></li> </ul> </section> <section id="release-1-0rc3-sep-14-2013"> <h2>Release 1.0rc3 (Sep 14, 2013)<a class="headerlink" href="#release-1-0rc3-sep-14-2013" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/251">issue #251</a>: crash in gevent.core when accessing destroyed loop.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/235">issue #235</a>: Replace self._threadpool.close() with self._threadpool.kill() in hub.py. Patch by Jan-Philip Gehrcke.</p></li> <li><p>Remove unused timeout from select.py (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/254">issue #254</a>). Patch by Saúl Ibarra Corretgé.</p></li> <li><p>Rename Greenlet.link()’s argument to ‘callback’ (closes <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/244">issue #244</a>).</p></li> <li><p>Fix parallel build (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/193">issue #193</a>). Patch by Yichao Yu.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/263">issue #263</a>: potential UnboundLocalError: ‘length’ in gevent.pywsgi.</p></li> <li><p>Simplify psycopg2_pool.py (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/239">issue #239</a>). Patch by Alex Gaynor.</p></li> <li><p>pywsgi: allow Content-Length in GET requests (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/264">issue #264</a>). Patch by 陈小玉.</p></li> <li><p>documentation fixes (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/281">issue #281</a>) [philipaconrad].</p></li> <li><p>Fix old documentation about default blocking behavior of kill, killall (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/306">issue #306</a>). Patch by Daniel Farina.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/6">issue #6</a>: patch sys after thread. Patch by Anton Patrushev.</p></li> <li><p>subprocess: fix check_output on Py2.6 and older (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/265">issue #265</a>). Thanks to Marc Sibson for test.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/302">issue #302</a>: “python -m gevent.monkey” now sets <code class="docutils literal notranslate"><span class="pre">__file__</span></code> properly.</p></li> <li><p>pywsgi: fix logging when bound on unix socket (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/295">issue #295</a>). Thanks to Chris Meyers, Eugene Pankov.</p></li> <li><p>pywsgi: readout request data to prevent ECONNRESET</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/303">issue #303</a>: ‘requestline’ AttributeError in pywsgi. Thanks to Neil Chintomby.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/79">issue #79</a>: Properly handle HTTP versions. Patch by Luca Wehrstedt.</p></li> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/216">issue #216</a>: propagate errors raised by Pool.map/imap</p></li> </ul> </section> <section id="release-1-0rc2-dec-10-2012"> <h2>Release 1.0rc2 (Dec 10, 2012)<a class="headerlink" href="#release-1-0rc2-dec-10-2012" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/210">issue #210</a>: callbacks were not run for non-default loop (bug introduced in 1.0rc1).</p></li> <li><p>patch_all() no longer patches subprocess unless <code class="docutils literal notranslate"><span class="pre">subprocess=True</span></code> is passed.</p></li> <li><p>Fixed AttributeError in hub.Waiter.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/181">issue #181</a>: make hidden imports visible to freezing tools like py2exe. Patch by Ralf Schmitt.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/202">issue #202</a>: periodically yield when running callbacks (sleep(0) cannot block the event loop now).</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/204">issue #204</a>: os.tp_read/tp_write did not propogate errors to the caller.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/217">issue #217</a>: do not set SO_REUSEADDR on Windows.</p></li> <li><p>Fixed bug in –module argument for gevent.monkey. Patch by Örjan Persson.</p></li> <li><p>Remove warning from threadpool.py about mixing fork() and threads.</p></li> <li><p>Cleaned up hub.py from code that was needed to support older greenlets. Patch by Saúl Ibarra Corretgé.</p></li> <li><p>Allow for explicit default loop creation via <code class="docutils literal notranslate"><span class="pre">get_hub(default=True)</span></code>. Patch by Jan-Philip Gehrcke.</p></li> </ul> </section> <section id="release-1-0rc1-oct-30-2012"> <h2>Release 1.0rc1 (Oct 30, 2012)<a class="headerlink" href="#release-1-0rc1-oct-30-2012" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Fixed hub.switch() not to touch stacktrace when switching. greenlet restores the exception information correctly since version 0.3.2. gevent now requires greenlet &gt;= 0.3.2</p></li> <li><p>Added gevent.wait() and gevent.iwait(). This is like gevent.joinall() but supports more objects, including Greenlet, Event, Semaphore, Popen. Without arguments it waits for the event loop to finish (previously gevent.run() did that). gevent.run will be removed before final release and gevent.joinall() might be deprecated.</p></li> <li><p>Reimplemented loop.run_callback with a list and a single prepare watcher; this fixes the order of spawns and improves performance a little.</p></li> <li><p>Fixes Semaphore/Lock not to init hub in <code class="docutils literal notranslate"><span class="pre">__init__</span></code>, so that it’s possible to have module-global locks without initializing the hub. This fixes monkey.patch_all() not to init the hub.</p></li> <li><p>New implementation of callbacks that executes them in the order they were added. core.loop.callback is removed.</p></li> <li><p>Fixed 2.5 compatibility.</p></li> <li><p>Fixed crash on Windows when request ‘prev’ and ‘attr’ attributes of ‘stat’ watcher. The attribute access still fails, but now with an exception.</p></li> <li><p>Added known_failures.txt that lists all the tests that fail. It can be used by testrunner.py via expected option. It’s used when running the test suite in travis.</p></li> <li><p>Fixed socket, ssl and fileobject to not mask EBADF error - it is now propogated to the caller. Previously EBADF was converted to empty read/write. Thanks to Vitaly Kruglikov</p></li> <li><p>Removed gevent.event.waitall()</p></li> <li><p>Renamed FileObjectThreadPool -&gt; FileObjectThread</p></li> <li><p>Greenlet: Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/143">issue #143</a>: greenlet links are now executed in the order they were added</p></li> <li><p>Synchronize access to FileObjectThread with Semaphore</p></li> <li><p>EINVAL is no longer handled in fileobject.</p></li> </ul> <p>monkey:</p> <ul class="simple"> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/178">issue #178</a>: disable monkey patch os.read/os.write</p></li> <li><p>Fixed monkey.patch_thread() to patch threading._DummyThread to avoid leak in threading._active. Original patch by Wil Tan.</p></li> <li><p>added Event=False argument to patch_all() and patch_thread</p></li> <li><p>added patch_sys() which patches stdin, stdout, stderr with FileObjectThread wrappers. Experimental / buggy.</p></li> <li><p>monkey patching everything no longer initializes the hub/event loop.</p></li> </ul> <p>socket:</p> <ul class="simple"> <li><p>create_connection: do not lookup IPv6 address if IPv6 is unsupported. Patch by Ralf Schmitt.</p></li> </ul> <p>pywsgi:</p> <ul class="simple"> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/86">issue #86</a>: bytearray is now supported. Original patch by Aaron Westendorf.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/116">issue #116</a>: Multiline HTTP headers are now handled properly. Patch by Ralf Schmitt.</p></li> </ul> <p>subprocess:</p> <ul class="simple"> <li><p>Fixed Windows compatibility. The wait() method now also supports ‘timeout’ argument on Windows.</p></li> <li><p>Popen: Added rawlink() method, which makes Popen objects supported by gevent.wait(). Updated examples/processes.py</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/148">issue #148</a>: read from errpipe_read in small chunks, to avoid trigger EINVAL issue on Mac OS X. Patch by Vitaly Kruglikov</p></li> <li><p>Do os._exit() in “finally” section to avoid executing unrelated code. Patch by Vitaly Kruglikov.</p></li> </ul> <p>resolver_ares:</p> <ul class="simple"> <li><p>improve getaddrinfo: For string ports (e.g. “http”) resolver_ares/getaddrinfo previously only checked either getservbyname(port, “tcp”) or getservbyname(port, “udp”), but never both. It now checks both of them.</p></li> <li><p>gevent.ares.channel now accepts strings as arguments</p></li> <li><p>upgraded c-ares to cares-1_9_1-12-g805c736</p></li> <li><p>it is now possible to configure resolver_ares directly with environ, like GEVENTARES_SERVERS</p></li> </ul> <p>os:</p> <ul class="simple"> <li><p>Renamed threadpool_read/write to tp_read/write.</p></li> <li><p>Removed posix_read, posix_write.</p></li> <li><p>Added nb_read, nb_write, make_nonblocking.</p></li> </ul> <p>hub:</p> <ul class="simple"> <li><p>The system error is now raised immediately in main greenlet in all cases.</p></li> <li><p>Dropped support for old greenlet versions (need &gt;= 0.3.2 now)</p></li> </ul> <p>core:</p> <ul class="simple"> <li><p>allow ‘callback’ property of watcher to be set to None. “del w.callback” no longer works.</p></li> <li><p>added missing ‘noinotify’ flag</p></li> </ul> <p>Misc:</p> <ul class="simple"> <li><p>gevent.thread: allocate_lock is now an alias for LockType/Semaphore. That way it does not fail when being used as class member.</p></li> <li><p>Updated greentest.py to start timeouts with <code class="docutils literal notranslate"><span class="pre">ref=False</span></code>.</p></li> <li><p>pool: remove unused get_values() function</p></li> <li><p>setup.py now recognizes GEVENTSETUP_EV_VERIFY env var which sets EV_VERIFY macro when compiling</p></li> <li><p>Added a few micro benchmarks</p></li> <li><p>stdlib tests that we care about are now included in greentest/2.x directories, so we don’t depend on them being installed system-wide</p></li> <li><p>updated util/makedist.py</p></li> <li><p>the testrunner was completely rewritten.</p></li> </ul> </section> <section id="release-1-0b4-sep-6-2012"> <h2>Release 1.0b4 (Sep 6, 2012)<a class="headerlink" href="#release-1-0b4-sep-6-2012" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>Added gevent.os module with ‘read’ and ‘write’ functions. Patch by Geert Jansen.</p></li> <li><p>Moved gevent.hub.fork to gevent.os module (it is still available as gevent.fork).</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/148">issue #148</a>: Made fileobject handle EINVAL, which is randomly raised by os.read/os.write on Mac OS X. Thanks to Mark Hingston.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/150">issue #150</a>: gevent.fileobject.SocketAdapter.sendall() could needlessly wait for write event on the descriptor. Original patch by Mark Hingston.</p></li> <li><p>Fixed AttributeError in baseserver. In case of error, start() would call kill() which was renamed to close(). Thanks to Vitaly Kruglikov.</p></li> </ul> </section> <section id="release-1-0b3-jul-27-2012"> <h2>Release 1.0b3 (Jul 27, 2012)<a class="headerlink" href="#release-1-0b3-jul-27-2012" title="Link to this heading">¶</a></h2> <ul class="simple"> <li><p>New gevent.subprocess module</p></li> <li><p>New gevent.fileobject module</p></li> <li><p>Fixed ThreadPool to discard references of the objects passed to it (function, arguments) asap. Previously they could be stored for unlimited time until the thread gets a new job.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/138">issue #138</a>: gevent.pool.Pool().imap_unordered hangs with an empty iterator. Thanks to exproxus.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/127">issue #127</a>: ssl.py could raise TypeError in certain cases. Thanks to Johan Mjones.</p></li> <li><p>Fixed socket.makefile() to keep the timeout setting of the socket instance. Thanks to Colin Marc.</p></li> <li><p>Added ‘copy()’ method to queues.</p></li> <li><p>The ‘nochild’ event loop config option is removed. The install_sigchld offer more flexible way of enabling child watchers.</p></li> <li><p>core: all watchers except for ‘child’ now accept new ‘priority’ keyword argument</p></li> <li><p>gevent.Timeout accepts new arguments: ‘ref’ and ‘priority’. The default priority for Timeout is -1.</p></li> <li><p>Hub.wait() uses Waiter now instead of raw switching</p></li> <li><p>Updated libev to the latest CVS version</p></li> <li><p>Made pywsgi to raise an AssertionError if non-zero content-length is passed to start_response(204/304) or if non-empty body is attempted to be written for 304/204 response</p></li> <li><p>Removed pywsgi feature to capitalize the passed headers.</p></li> <li><p>Fixed util/cythonpp.py to work on python3.2 (<a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/123">issue #123</a>). Patch by Alexandre Kandalintsev.</p></li> <li><p>Added ‘closed’ readonly property to socket.</p></li> <li><p>Added ‘ref’ read/write property to socket.</p></li> <li><p>setup.py now parses CARES_EMBED and LIBEV_EMBED parameters, in addition to EMBED.</p></li> <li><p>gevent.reinit() and gevent.fork() only reinit hub if it was created and do not create it themselves</p></li> <li><p>Fixed setup.py not to add libev and c-ares to include dirs in non-embed mode. Patch by Ralf Schmitt.</p></li> <li><p>Renamed util/make_dist.py to util/makedist.py</p></li> <li><p>testrunner.py now saves more information about the system; the stat printing functionality is moved to a separate util/stat.py script.</p></li> </ul> </section> <section id="release-1-0b2-apr-11-2012"> <h2>Release 1.0b2 (Apr 11, 2012)<a class="headerlink" href="#release-1-0b2-apr-11-2012" title="Link to this heading">¶</a></h2> <p>Major and backward-incompatible changes:</p> <ul class="simple"> <li><p>Made the threadpool-based resolver the default. To enable the ares-based resolver, set GEVENT_RESOLVER=ares env var.</p></li> <li><p>Added support for child watchers (not available on Windows).</p> <ul> <li><p>Libev loop now reaps all children by default.</p></li> <li><p>If NOCHILD flag is passed to the loop, child watchers and child reaping are disabled.</p></li> </ul> </li> <li><p>Renamed gevent.coros to gevent.lock. The gevent.coros is still available but deprecated.</p></li> <li><p>Added ‘stat’ watchers to loop.</p></li> <li><p>The setup.py now recognizes gevent_embed env var. When set to “no”, bundled c-ares and libev are ignored.</p></li> <li><p>Added optional ‘ref’ argument to sleep(). When ref=false, the watchers created by sleep() do not hold gevent.run() from exiting.</p></li> <li><p>ThreadPool now calls Hub.handle_error for exceptions in worker threads.</p></li> <li><p>ThreadPool got new method: apply_e.</p></li> <li><p>Added new extension module gevent._util and moved gevent.core.set_exc_info function there.</p></li> <li><p>Added new extension module gevent._semaphore. It contains Semaphore class which is imported by gevent.lock as gevent.lock.Semaphore. Providing Semaphore in extension module ensures that trace function set with settrace will not be called during __exit__. Thanks to Ralf Schmitt.</p></li> <li><p>It is now possible to kill or pre-spawn threads in ThreadPool by setting its ‘size’ property.</p></li> </ul> <p>core:</p> <ul class="simple"> <li><p>Make sure the default loop cannot be destroyed more than once, thus crashing the process.</p></li> <li><p>Make Hub.destroy() method not to destroy the default loop, unless <em>destroy_loop</em> is <em>True</em>. Non-default loops are still destroyed by default.</p></li> <li><p>loop: Removed properties from loop: fdchangecnt, timercnt, asynccnt.</p></li> <li><p>loop: Added properties: sigfd, origflags, origflags_int</p></li> <li><p>loop: The EVFLAG_NOENV is now always passed to libev. Thus LIBEV_FLAGS env variable is no longer checked. Use GEVENT_BACKEND.</p></li> </ul> <p>Misc:</p> <ul class="simple"> <li><p>Check that the argument of link() is callable. Raise TypeError when it’s not.</p></li> <li><p>Fixed TypeError in baseserver when parsing an address.</p></li> <li><p>Pool: made add() and discard() usable by external users. Thanks to Danil Eremeev.</p></li> <li><p>When specifying a class to import, it is now possible to use format path/package.module.name</p></li> <li><p>pywsgi: Made sure format_request() does not fail if ‘status’ attribute is not set yet</p></li> <li><p>pywsgi: Added REMOTE_PORT variable to the environment.</p></li> </ul> <p>Examples:</p> <ul class="simple"> <li><p>portforwarder.py now shows how to use gevent.run() to implement graceful shutdown of a server.</p></li> <li><p>psycopg2_pool.py: Changed execute() to return rowcount.</p></li> <li><p>psycopg2_pool.py: Added fetchall() and fetchiter() methods.</p></li> </ul> <p>Developer utilities:</p> <ul class="simple"> <li><p>When building, CYTHON env variable can be used to specify Cython executable to use.</p></li> <li><p>util/make_dist.py now recongizes –fast and –revert options. Previous –rsync option is removed.</p></li> <li><p>Added util/winvbox.py which automates building/testing/making binaries on Windows VM.</p></li> <li><p>Fixed typos in exception handling code in testrunner.py</p></li> <li><p>Fixed patching unittest.runner on Python2.7. This caused the details of test cases run lost.</p></li> <li><p>Made testrunner.py kill the whole process group after test is done.</p></li> </ul> </section> <section id="release-1-0b1-jan-10-2012"> <h2>Release 1.0b1 (Jan 10, 2012)<a class="headerlink" href="#release-1-0b1-jan-10-2012" title="Link to this heading">¶</a></h2> <p>Backward-incompatible changes:</p> <ul class="simple"> <li><p>Removed “link to greenlet” feature of Greenlet.</p></li> <li><p>If greenlet module older than 0.3.2 is used, then greenlet.GreenletExit.__bases__ is monkey patched to derive from BaseException and not Exception. That way gevent.GreenletExit is always derived from BaseException, regardless of installed greenlet version.</p></li> <li><p>Some code supporting Python 2.4 has been removed.</p></li> </ul> <p>Release highlights:</p> <ul class="simple"> <li><p>Added thread pool: gevent.threadpool.ThreadPool.</p></li> <li><p>Added thread pool-based resolver. Enable with GEVENT_RESOLVER=thread.</p></li> <li><p>Added UDP server: gevent.server.DatagramServer</p></li> <li><p>A “configure” is now run on libev. This fixes a problem of ‘kqueue’ not being available on Mac OS X.</p></li> <li><p>Gevent recognizes some environment variables now:</p> <ul> <li><p>GEVENT_BACKEND allows passing argument to loop, e.g. “GEVENT_BACKEND=select” for force select backend</p></li> <li><p>GEVENT_RESOLVER allows choosing resolver class.</p></li> <li><p>GEVENT_THREADPOOL allows choosing thread pool class.</p></li> </ul> </li> <li><p>Added new examples: portforwarder, psycopg2_pool.py, threadpool.py, udp_server.py</p></li> <li><p>Fixed non-embedding build. To build against system libev, remove or rename ‘libev’ directory. To build against system c-ares, remove or rename ‘c-ares’. Thanks to Örjan Persson.</p></li> </ul> <p>misc:</p> <ul class="simple"> <li><p>gevent.joinall() method now accepts optional ‘count’ keyword.</p></li> <li><p>gevent.fork() only calls reinit() in the child process now.</p></li> <li><p>gevent.run() now returns False when exiting because of timeout or event (previous None).</p></li> <li><p>Hub got a new method: destroy().</p></li> <li><p>Hub got a new property: threadpool.</p></li> </ul> <p>ares.pyx:</p> <ul class="simple"> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/104">issue #104</a>: made ares_host_result pickable. Thanks to Shaun Cutts.</p></li> </ul> <p>pywsgi:</p> <ul class="simple"> <li><p>Removed unused deprecated ‘wfile’ property from WSGIHandler</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/92">issue #92</a>: raise IOError on truncated POST requests.</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/93">issue #93</a>: do not sent multiple “100 continue” responses</p></li> </ul> <p>core:</p> <ul class="simple"> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/97">issue #97</a>: the timer watcher now calls ev_now_update() in start() and again() unless ‘update’ keyword is passed and set to False.</p></li> <li><p>add set_syserr_cb() function; it’s used by gevent internally.</p></li> <li><p>gevent now installs syserr callback using libev’s set_syserr_cb. This callback is called when libev encounters an error it cannot recover from. The default action is to print a message and abort. With the callback installed, a SystemError() is now raised in the main greenlet.</p></li> <li><p>renamed ‘backend_fd’ property to ‘fileno()’ method. (not available if you build gevent against system libev)</p></li> <li><p>added ‘asynccnt’ property (not available if you build gevent against system libev)</p></li> <li><p>made loop.__repr__ output a bit more compact</p></li> <li><p>the watchers check the arguments for validness now (previously invalid argument would crash libev).</p></li> <li><p>The ‘async’ watcher now has send() method;</p></li> <li><p>fixed time() function</p></li> <li><p>libev has been upgraded to latest CVS version.</p></li> <li><p>libev has been patched to use send()/recv() for evpipe on windows when libev_vfd.h is in effect</p></li> </ul> <p>resolver_ares:</p> <ul class="simple"> <li><p>Slightly improved compatibility with stdlib’s socket in some error cases.</p></li> </ul> <p>socket:</p> <ul class="simple"> <li><p>Fixed close() method not to reference any globals</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/115">issue #115</a>: _dummy gets unexpected Timeout arg</p></li> <li><p>Removed _fileobject used for python 2.4 compatibility in socket.py</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/94">issue #94</a>: fallback to buffer if memoryview fails in _get_memory on python 2.7</p></li> </ul> <p>monkey:</p> <ul class="simple"> <li><p>Removed patch_httplib()</p></li> <li><p>Fixed <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/112">issue #112</a>: threading._sleep is not patched. Thanks to David LaBissoniere.</p></li> <li><p>Added get_unpatched() function. However, it is slightly broken at the moment.</p></li> </ul> <p>backdoor:</p> <ul class="simple"> <li><p>make ‘locals()’ not spew out __builtin__.__dict__ in backdoor</p></li> <li><p>add optional banner argument to BackdoorServer</p></li> </ul> <p>servers:</p> <ul class="simple"> <li><p>add server.DatagramServer;</p></li> <li><p>StreamServer: ‘ssl_enabled’ is now a read-only property</p></li> <li><p>servers no longer have ‘kill’ method; it has been renamed to ‘close’.</p></li> <li><p>listeners can now be configured as strings, e.g. ‘:80’ or 80</p></li> <li><p>modify baseserver.BaseServer in such a way that makes it a good base class for both StreamServer and DatagramServer</p></li> <li><p>BaseServer no longer accepts ‘backlog’ parameter. It is now done by StreamServer.</p></li> <li><p>BaseServer implements start_accepting() and stop_accepting() methods</p></li> <li><p>BaseServer now implements “temporarily stop accepting” strategy</p></li> <li><p>BaseServer now has _do_read method which does everything except for actually calling accept()/recvfrom()</p></li> <li><p>pre_start() method is renamed to init_socket()</p></li> <li><p>renamed _stopped_event to _stop_event</p></li> <li><p>‘started’ is now a read-only property (which actually reports state of _stop_event)</p></li> <li><p>post_stop() method is removed</p></li> <li><p>close() now sets _stop_event(), thus setting ‘started’ to False, thus causing serve_forever() to exit</p></li> <li><p>_tcp_listener() function is moved from baseserver.py to server.py</p></li> <li><p>added ‘fatal_errors’ class attribute which is a tuple of all errnos that should kill the server</p></li> </ul> <p>coros:</p> <ul class="simple"> <li><p>Semaphore: add _start_notify() method</p></li> <li><p>Semaphore: avoid copying list of links; rawlink() no longer schedules notification</p></li> </ul> </section> <section id="release-1-0a3-sep-15-2011"> <h2>Release 1.0a3 (Sep 15, 2011)<a class="headerlink" href="#release-1-0a3-sep-15-2011" title="Link to this heading">¶</a></h2> <p>Added ‘ref’ property to all watchers. Settings it to False make watcher call ev_unref/ev_ref appropriately so that this watcher does not prevent loop.run()/hub.join()/run() from exiting. Made resolver_ares.Resolver use ‘ref’ property for internal watcher.</p> <p>In all servers, method “kill” was renamed to “close”. The old name is available as deprecated alias.</p> <p>Added a few properties to the loop: backend_fd, fdchangecnt, timercnt.</p> <p>Upgraded c-ares to 1.7.5+patch.</p> <p>Fixed getaddrinfo to return results in the order (::1, IPv4, IPv6).</p> <p>Fixed getaddrinfo() to handle integer of string type. Thanks to kconor.</p> <p>Fixed gethostbyname() to handle ‘’ (empty string).</p> <p>Fixed getaddrinfo() to convert UnicodeEncodeError into error(‘Int or String expected’).</p> <p>Fixed getaddrinfo() to uses the lowest 16 bits of passed port integer similar to built-in _socket.</p> <p>Fixed getnameinfo() to call getaddrinfo() to process arguments similar to built-in _socket.</p> <p>Fixed gethostbyaddr() to use getaddrinfo() to process arguments.</p> <p>version_info is now a 5-tuple.</p> <p>Added handle_system_error() method to Hub (used internally).</p> <p>Fixed Hub’s run() method to never exit. This prevent inappropriate switches into parent greenlet.</p> <p>Fixed Hub.join() to return True if Hub was already dead.</p> <p>Added ‘event’ argument to Hub.join().</p> <p>Added <code class="docutils literal notranslate"><span class="pre">run()</span></code> function to gevent top level package.</p> <p>Fixed Greenlet.start() to exit silently if greenlet was already started rather than raising <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#AssertionError" title="(in Python v3.13)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">AssertionError</span></code></a>.</p> <p>Fixed Greenlet.start() not to schedule another switch if greenlet is already dead.</p> <p>Fixed gevent.signal() to spawn Greenlet instead of raw greenlet. Also it’ll switch into the new greenlet immediately instead of scheduling additional callback.</p> <p>Do monkey patch create_connection() as gevent’s version works better with gevent.socket.socket than the standard create_connection.</p> <p>pywsgi: make sure we don’t try to read more requests if socket operation failed with EPIPE</p> <p>pywsgi: if we failed to send the reply, change ‘status’ to socket error so that the logs mention the error.</p> </section> <section id="release-1-0a2-aug-2-2011"> <h2>Release 1.0a2 (Aug 2, 2011)<a class="headerlink" href="#release-1-0a2-aug-2-2011" title="Link to this heading">¶</a></h2> <p>Fixed a bug in gevent.queue.Channel class. (Thanks to Alexey Borzenkov)</p> </section> <section id="release-1-0a1-aug-2-2011"> <h2>Release 1.0a1 (Aug 2, 2011)<a class="headerlink" href="#release-1-0a1-aug-2-2011" title="Link to this heading">¶</a></h2> <p>Backward-incompatible changes:</p> <ul class="simple"> <li><p>Dropped support for Python 2.4.</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">Queue(0)</span></code> is now equivalent to an unbound queue and raises <code class="docutils literal notranslate"><span class="pre">DeprecationError</span></code>. Use <a class="reference internal" href="api/gevent.queue.html#gevent.queue.Channel" title="gevent.queue.Channel"><code class="xref py py-class docutils literal notranslate"><span class="pre">gevent.queue.Channel</span></code></a> if you need a channel.</p></li> <li><p>Deprecated ability to pass a greenlet instance to <a class="reference internal" href="api/gevent.greenlet.html#gevent.Greenlet.link" title="gevent.Greenlet.link"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Greenlet.link()</span></code></a>, <a class="reference internal" href="api/gevent.greenlet.html#gevent.Greenlet.link_value" title="gevent.Greenlet.link_value"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Greenlet.link_value()</span></code></a> and <a class="reference internal" href="api/gevent.greenlet.html#gevent.Greenlet.link_exception" title="gevent.Greenlet.link_exception"><code class="xref py py-meth docutils literal notranslate"><span class="pre">Greenlet.link_exception()</span></code></a>.</p></li> <li><p>All of <a class="reference internal" href="api/gevent.core.html#module-gevent.core" title="gevent.core"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code></a> has been rewritten and the interface is not compatible.</p></li> <li><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#SystemExit" title="(in Python v3.13)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SystemExit</span></code></a> and <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#SystemError" title="(in Python v3.13)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">SystemError</span></code></a> now kill the whole process instead of printing a traceback.</p></li> <li><p>Removed deprecated <code class="docutils literal notranslate"><span class="pre">util.lazy_property</span></code> property.</p></li> <li><p>Removed <code class="docutils literal notranslate"><span class="pre">gevent.dns</span></code> module.</p></li> <li><p>Removed deprecated gevent.sslold module</p></li> <li><p>Removed deprecated gevent.rawgreenlet module</p></li> <li><p>Removed deprecated name <code class="docutils literal notranslate"><span class="pre">GreenletSet</span></code> which used to be alias for <code class="docutils literal notranslate"><span class="pre">Group</span></code>.</p></li> <li><p><code class="docutils literal notranslate"><span class="pre">gevent.wsgi</span></code> is now a deprecated alias for <code class="docutils literal notranslate"><span class="pre">gevent.pywsgi</span></code>.</p></li> </ul> <p>Release highlights:</p> <ul class="simple"> <li><p>The <a class="reference internal" href="api/gevent.core.html#module-gevent.core" title="gevent.core"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.core</span></code></a> module now wraps libev’s API and is not compatible with gevent 0.x.</p></li> <li><p>Added a concept of pluggable event loops. By default gevent.core.loop is used, which is a wrapper around libev.</p></li> <li><p>Added a concept of pluggable name resolvers. By default a resolver based on c-ares library is used.</p></li> <li><p>Added support for multiple OS threads, each new thread will get its own Hub instance with its own event loop.</p></li> <li><p>The release now includes and embeds the dependencies: libev and c-ares.</p></li> <li><p>The standard <a class="reference external" href="https://docs.python.org/3/library/signal.html#module-signal" title="(in Python v3.13)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">signal</span></code></a> works now as expected.</p></li> <li><p>The unhandled errors are now handled uniformely by <code class="docutils literal notranslate"><span class="pre">Hub.handle_error</span></code> function.</p></li> <li><p>Added <a class="reference internal" href="api/gevent.queue.html#gevent.queue.Channel" title="gevent.queue.Channel"><code class="xref py py-class docutils literal notranslate"><span class="pre">gevent.queue.Channel</span></code></a> class to <a class="reference internal" href="api/gevent.queue.html#module-gevent.queue" title="gevent.queue"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.queue</span></code></a> module. It is equivalent to <code class="docutils literal notranslate"><span class="pre">Queue(0)</span></code> in gevent 0.x, which is deprecated now.</p></li> <li><p>Added method <code class="docutils literal notranslate"><span class="pre">peek</span></code> to <a class="reference internal" href="api/gevent.queue.html#gevent.queue.Queue" title="gevent.queue.Queue"><code class="xref py py-class docutils literal notranslate"><span class="pre">gevent.queue.Queue</span></code></a> class.</p></li> <li><p>Added <code class="docutils literal notranslate"><span class="pre">idle</span></code> function which blocks until the event loop is idle.</p></li> <li><p>Added a way to gracefully shutdown the application by waiting for all outstanding greenlets/servers/watchers: <code class="docutils literal notranslate"><span class="pre">Hub.join</span></code>.</p></li> <li><p>Added new <code class="docutils literal notranslate"><span class="pre">gevent.ares</span></code> C extension which wraps <code class="docutils literal notranslate"><span class="pre">c-ares</span></code> and provides asynchronous DNS resolver.</p></li> <li><p>Added new <code class="docutils literal notranslate"><span class="pre">gevent.resolver_ares</span></code> module provides synchronous API on top of <code class="docutils literal notranslate"><span class="pre">gevent.ares</span></code>.</p></li> </ul> <p>The <a class="reference internal" href="api/gevent.socket.html#module-gevent.socket" title="gevent.socket"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.socket</span></code></a> module:</p> <ul class="simple"> <li><p>DNS functions now use c-ares library rather than libevent-dns. This fixes a number of problems with name resolving:</p> <ul> <li><p>Fix <a class="extlink-issue reference external" href="https://github.com/gevent/gevent/issues/2">issue #2</a>: DNS resolver no longer breaks after <code class="docutils literal notranslate"><span class="pre">fork()</span></code>. You still need to call <a class="reference internal" href="api/gevent.html#gevent.fork" title="gevent.fork"><code class="xref py py-func docutils literal notranslate"><span class="pre">gevent.fork()</span></code></a> (<a class="reference internal" href="api/gevent.os.html#gevent.os.fork" title="gevent.os.fork"><code class="xref py py-obj docutils literal notranslate"><span class="pre">os.fork</span></code></a> is monkey patched with it if <code class="docutils literal notranslate"><span class="pre">monkey.patch_all()</span></code> was called).</p></li> <li><p>DNS resolver no longer ignores <code class="docutils literal notranslate"><span class="pre">/etc/resolv.conf</span></code> and <code class="docutils literal notranslate"><span class="pre">/etc/hosts</span></code>.</p></li> </ul> </li> <li><p>The following functions were added to socket module</p> <ul> <li><p>gethostbyname_ex</p></li> <li><p>getnameinfo</p></li> <li><p>gethostbyaddr</p></li> <li><p>getfqdn</p></li> </ul> </li> <li><p>Removed undocumented bind_and_listen and tcp_listener</p></li> </ul> <p>The <a class="reference internal" href="api/gevent.hub.html#gevent.hub.Hub" title="gevent.hub.Hub"><code class="xref py py-class docutils literal notranslate"><span class="pre">gevent.hub.Hub</span></code></a> object:</p> <ul class="simple"> <li><p>Added <code class="docutils literal notranslate"><span class="pre">join</span></code> method which waits until the event loop exits or optional timeout expires.</p></li> <li><p>Added <code class="docutils literal notranslate"><span class="pre">wait</span></code> method which waits until a watcher has got an event.</p></li> <li><p>Added <code class="docutils literal notranslate"><span class="pre">handle_error</span></code> method which is called by all of gevent in case of unhandled exception.</p></li> <li><p>Added <code class="docutils literal notranslate"><span class="pre">print_exception</span></code> method which is called by <code class="docutils literal notranslate"><span class="pre">handle_error</span></code> to print the exception traceback.</p></li> </ul> <p>The <a class="reference internal" href="api/gevent.greenlet.html#gevent.Greenlet" title="gevent.Greenlet"><code class="xref py py-class docutils literal notranslate"><span class="pre">Greenlet</span></code></a> objects:</p> <ul class="simple"> <li><p>Added <code class="docutils literal notranslate"><span class="pre">__nonzero__</span></code> implementation that returns <code class="docutils literal notranslate"><span class="pre">True</span></code> after greenlet was started until it’s dead. Previously greenlet was <code class="docutils literal notranslate"><span class="pre">False</span></code> after <code class="docutils literal notranslate"><span class="pre">start()</span></code> until it was first switched to.</p></li> </ul> <p>The <a class="reference internal" href="api/gevent.pool.html#module-gevent.pool" title="gevent.pool"><code class="xref py py-mod docutils literal notranslate"><span class="pre">gevent.pool</span></code></a> module:</p> <ul class="simple"> <li><p>It is now possible to add raw greenlets to the pool.</p></li> <li><p>The <code class="docutils literal notranslate"><span class="pre">map</span></code> and <code class="docutils literal notranslate"><span class="pre">imap</span></code> methods now start yielding the results as soon as possible.</p></li> <li><p>The <code class="docutils literal notranslate"><span class="pre">imap_unordered</span></code> no longer swallows an exception raised while iterating its argument.</p></li> </ul> <p>Miscellaneous:</p> <ul class="simple"> <li><p><code class="docutils literal notranslate"><span class="pre">gevent.sleep(&lt;negative</span> <span class="pre">value&gt;)</span></code> no longer raises an exception, instead it does <code class="docutils literal notranslate"><span class="pre">sleep(0)</span></code>.</p></li> <li><p>Added method <code class="docutils literal notranslate"><span class="pre">clear</span></code> to internal <code class="docutils literal notranslate"><span class="pre">Waiter</span></code> class.</p></li> <li><p>Removed <code class="docutils literal notranslate"><span class="pre">wait</span></code> method from internal <code class="docutils literal notranslate"><span class="pre">Waiter</span></code> class.</p></li> <li><p>The <code class="docutils literal notranslate"><span class="pre">WSGIServer</span></code> now sets <code class="docutils literal notranslate"><span class="pre">max_accept</span></code> to 1 if <code class="docutils literal notranslate"><span class="pre">wsgi.multiprocessing</span></code> is set to <code class="docutils literal notranslate"><span class="pre">True`</span></code></p></li> <li><p>Added <a class="reference internal" href="api/gevent.monkey.html#gevent.monkey.patch_module" title="gevent.monkey.patch_module"><code class="xref py py-func docutils literal notranslate"><span class="pre">gevent.monkey.patch_module()</span></code></a> function that monkey patches module using <code class="docutils literal notranslate"><span class="pre">__implements__</span></code> list provided by gevent module. All of gevent modules that replace stdlib module now have <code class="docutils literal notranslate"><span class="pre">__implements__</span></code> attribute.</p></li> </ul> </section> </section> </article> </div> <footer> <div class="related-pages"> <a class="next-page" href="changelog_pre.html"> <div class="page-info"> <div class="context"> <span>Next</span> </div> <div class="title">Changes before gevent 1.0</div> </div> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> </a> <a class="prev-page" href="changelog_1_1.html"> <svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg> <div class="page-info"> <div class="context"> <span>Previous</span> </div> <div class="title">Changes for 1.1</div> </div> </a> </div> <div class="bottom-of-page"> <div class="left-details"> <div class="copyright"> Copyright &#169; 2009-2023, gevent contributors </div> Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s <a href="https://github.com/pradyunsg/furo">Furo</a> </div> <div class="right-details"> </div> </div> </footer> </div> <aside class="toc-drawer"> <div class="toc-sticky toc-scroll"> <div class="toc-title-container"> <span class="toc-title"> On this page </span> </div> <div class="toc-tree-container"> <div class="toc-tree"> <ul> <li><a class="reference internal" href="#">Changes for 1.0</a><ul> <li><a class="reference internal" href="#release-1-0-2">Release 1.0.2</a></li> <li><a class="reference internal" href="#release-1-0-1">Release 1.0.1</a></li> <li><a class="reference internal" href="#release-1-0-nov-26-2013">Release 1.0 (Nov 26, 2013)</a></li> <li><a class="reference internal" href="#release-1-0rc3-sep-14-2013">Release 1.0rc3 (Sep 14, 2013)</a></li> <li><a class="reference internal" href="#release-1-0rc2-dec-10-2012">Release 1.0rc2 (Dec 10, 2012)</a></li> <li><a class="reference internal" href="#release-1-0rc1-oct-30-2012">Release 1.0rc1 (Oct 30, 2012)</a></li> <li><a class="reference internal" href="#release-1-0b4-sep-6-2012">Release 1.0b4 (Sep 6, 2012)</a></li> <li><a class="reference internal" href="#release-1-0b3-jul-27-2012">Release 1.0b3 (Jul 27, 2012)</a></li> <li><a class="reference internal" href="#release-1-0b2-apr-11-2012">Release 1.0b2 (Apr 11, 2012)</a></li> <li><a class="reference internal" href="#release-1-0b1-jan-10-2012">Release 1.0b1 (Jan 10, 2012)</a></li> <li><a class="reference internal" href="#release-1-0a3-sep-15-2011">Release 1.0a3 (Sep 15, 2011)</a></li> <li><a class="reference internal" href="#release-1-0a2-aug-2-2011">Release 1.0a2 (Aug 2, 2011)</a></li> <li><a class="reference internal" href="#release-1-0a1-aug-2-2011">Release 1.0a1 (Aug 2, 2011)</a></li> </ul> </li> </ul> </div> </div> </div> </aside> </div> </div><script src="_static/documentation_options.js?v=32fdf4fc"></script> <script src="_static/doctools.js?v=9bcbadda"></script> <script src="_static/sphinx_highlight.js?v=dc90522c"></script> <script src="_static/scripts/furo.js?v=5fa4622c"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10