Commit e469e3e0 authored by Jason Madden's avatar Jason Madden

Clarify that gevent.pywsgi is the replacement for gevent.wsgi. [skip ci]

Also fix the formatting in changelog_1_0.rst so it renders legibly.
parent 7cbed552
==========================================================
``gevent.wsgi`` -- Historical note only; does not exist
==========================================================
.. warning::
Beginning in gevent 1.3, this module no longer exists.
Starting in gevent 1.0a1 (2011), this module was nothing more than
an alias for :mod:`gevent.pywsgi`, which is what should be used instead.
Prior to gevent 1.0, when gevent was based on libevent,
``gevent.wsgi`` used libevent's http support, but that was dropped
with the introduction of libev. libevent's http support had several
limitations, including not supporting stream, not supporting
pipelining, and not supporting SSL.
......@@ -86,6 +86,7 @@ Deprecated Modules
.. toctree::
gevent.ares
gevent.wsgi
Examples
========
......
......@@ -8,7 +8,8 @@
Release 1.0.2
=============
- Fix LifoQueue.peek() to return correct element. :pr:`456`. Patch by Christine Spang.
- Fix LifoQueue.peek() to return correct element. :pr:`456`. Patch by
Christine Spang.
- Upgrade to libev 4.19
- Remove SSL3 entirely as default TLS protocol
- Import socket on Windows (closes :issue:`459`)
......@@ -18,14 +19,17 @@ Release 1.0.2
Release 1.0.1
=============
- Fix :issue:`423`: Pool's imap/imap_unordered could hang forever. Based on patch and test by Jianfei Wang.
- Fix :issue:`423`: Pool's imap/imap_unordered could hang forever.
Based on patch and test by Jianfei Wang.
Release 1.0 (Nov 26, 2013)
==========================
- pywsgi: Pass copy of error list instead of direct reference. Thanks to Jonathan Kamens, Matt Iversen.
- Ignore the autogenerated doc/gevent.*.rst files. Patch by Matthias Urlichs.
- pywsgi: Pass copy of error list instead of direct reference. Thanks
to Jonathan Kamens, Matt Iversen.
- Ignore the autogenerated doc/gevent.*.rst files. Patch by Matthias
Urlichs.
- Fix cythonpp.py on Windows. Patch by Jeryn Mathew.
- Remove gevent.run (use gevent.wait).
......@@ -33,20 +37,28 @@ Release 1.0 (Nov 26, 2013)
Release 1.0rc3 (Sep 14, 2013)
=============================
- Fix :issue:`251`: crash in gevent.core when accessing destroyed loop.
- Fix :issue:`235`: Replace self._threadpool.close() with self._threadpool.kill() in hub.py. Patch by Jan-Philip Gehrcke.
- Remove unused timeout from select.py (:issue:`254`). Patch by Saúl Ibarra Corretgé.
- Rename Greenlet.link()'s argument to 'callback' (closes :issue:`244`).
- Fix :issue:`251`: crash in gevent.core when accessing destroyed
loop.
- Fix :issue:`235`: Replace self._threadpool.close() with
self._threadpool.kill() in hub.py. Patch by Jan-Philip Gehrcke.
- Remove unused timeout from select.py (:issue:`254`). Patch by Saúl
Ibarra Corretgé.
- Rename Greenlet.link()'s argument to 'callback' (closes
:issue:`244`).
- Fix parallel build (:issue:`193`). Patch by Yichao Yu.
- Fix :issue:`263`: potential UnboundLocalError: 'length' in gevent.pywsgi.
- Simplify psycopg2_pool.py (:issue:`239`). Patch by Alex Gaynor.
- pywsgi: allow Content-Length in GET requests (:issue:`264`). Patch by 陈小玉.
- documentation fixes (:issue:`281`) [philipaconrad].
- Fix old documentation about default blocking behavior of kill, killall (:issue:`306`). Patch by Daniel Farina.
- Fix old documentation about default blocking behavior of kill,
killall (:issue:`306`). Patch by Daniel Farina.
- Fix :issue:`6`: patch sys after thread. Patch by Anton Patrushev.
- subprocess: fix check_output on Py2.6 and older (:issue:`265`). Thanks to Marc Sibson for test.
- Fix :issue:`302`: "python -m gevent.monkey" now sets __file__ properly.
- pywsgi: fix logging when bound on unix socket (:issue:`295`). Thanks to Chris Meyers, Eugene Pankov.
- subprocess: fix check_output on Py2.6 and older (:issue:`265`).
Thanks to Marc Sibson for test.
- Fix :issue:`302`: "python -m gevent.monkey" now sets ``__file__``
properly.
- pywsgi: fix logging when bound on unix socket (:issue:`295`). Thanks
to Chris Meyers, Eugene Pankov.
- pywsgi: readout request data to prevent ECONNRESET
- Fix :issue:`303`: 'requestline' AttributeError in pywsgi. Thanks to Neil Chintomby.
- Fix :issue:`79`: Properly handle HTTP versions. Patch by Luca Wehrstedt.
......@@ -57,7 +69,7 @@ Release 1.0rc2 (Dec 10, 2012)
=============================
- Fixed :issue:`210`: callbacks were not run for non-default loop (bug introduced in 1.0rc1).
- patch_all() no longer patches subprocess unless `subprocess=True` is passed.
- patch_all() no longer patches subprocess unless ``subprocess=True`` is passed.
- Fixed AttributeError in hub.Waiter.
- Fixed :issue:`181`: make hidden imports visible to freezing tools like py2exe. Patch by Ralf Schmitt.
- Fixed :issue:`202`: periodically yield when running callbacks (sleep(0) cannot block the event loop now).
......@@ -66,38 +78,60 @@ Release 1.0rc2 (Dec 10, 2012)
- Fixed bug in --module argument for gevent.monkey. Patch by Örjan Persson.
- Remove warning from threadpool.py about mixing fork() and threads.
- Cleaned up hub.py from code that was needed to support older greenlets. Patch by Saúl Ibarra Corretgé.
- Allow for explicit default loop creation via `get_hub(default=True)`. Patch by Jan-Philip Gehrcke.
- Allow for explicit default loop creation via
``get_hub(default=True)``. Patch by Jan-Philip Gehrcke.
Release 1.0rc1 (Oct 30, 2012)
=============================
- Fixed hub.switch() not to touch stacktrace when switching. greenlet restores the exception information correctly since version 0.3.2. gevent now requires greenlet >= 0.3.2
- 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.
- Reimplemented loop.run_callback with a list and a single prepare watcher; this fixes the order of spawns and improves performance a little.
- Fixes Semaphore/Lock not to init hub in `__init__`, so that it's possible to have module-global locks without initializing the hub. This fixes monkey.patch_all() not to init the hub.
- New implementation of callbacks that executes them in the order they were added. core.loop.callback is removed.
- Fixed hub.switch() not to touch stacktrace when switching. greenlet
restores the exception information correctly since version 0.3.2.
gevent now requires greenlet >= 0.3.2
- 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.
- Reimplemented loop.run_callback with a list and a single prepare
watcher; this fixes the order of spawns and improves performance a
little.
- Fixes Semaphore/Lock not to init hub in ``__init__``, so that it's
possible to have module-global locks without initializing the hub.
This fixes monkey.patch_all() not to init the hub.
- New implementation of callbacks that executes them in the order they
were added. core.loop.callback is removed.
- Fixed 2.5 compatibility.
- Fixed crash on Windows when request 'prev' and 'attr' attributes of 'stat' watcher. The attribute access still fails, but now with an exception.
- 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.
- 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
- Fixed crash on Windows when request 'prev' and 'attr' attributes of
'stat' watcher. The attribute access still fails, but now with an
exception.
- 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.
- 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
- Removed gevent.event.waitall()
- Renamed FileObjectThreadPool -> FileObjectThread
- Greenlet: Fixed :issue:`143`: greenlet links are now executed in the order they were added
- Greenlet: Fixed :issue:`143`: greenlet links are now executed in the
order they were added
- Synchronize access to FileObjectThread with Semaphore
- EINVAL is no longer handled in fileobject.
monkey:
- Fixed :issue:`178`: disable monkey patch os.read/os.write
- Fixed monkey.patch_thread() to patch threading._DummyThread to avoid leak in threading._active. Original patch by Wil Tan.
- Fixed monkey.patch_thread() to patch threading._DummyThread to avoid
leak in threading._active. Original patch by Wil Tan.
- added Event=False argument to patch_all() and patch_thread
- added patch_sys() which patches stdin, stdout, stderr with FileObjectThread wrappers. Experimental / buggy.
- monkey patching everything no longer initializes the hub/event loop.
socket:
- create_connection: do not lookup IPv6 address if IPv6 is unsupported. Patch by Ralf Schmitt.
- create_connection: do not lookup IPv6 address if IPv6 is
unsupported. Patch by Ralf Schmitt.
pywsgi:
......@@ -106,17 +140,25 @@ pywsgi:
subprocess:
- Fixed Windows compatibility. The wait() method now also supports 'timeout' argument on Windows.
- Popen: Added rawlink() method, which makes Popen objects supported by gevent.wait(). Updated examples/processes.py
- Fixed :issue:`148`: read from errpipe_read in small chunks, to avoid trigger EINVAL issue on Mac OS X. Patch by Vitaly Kruglikov
- Do os._exit() in "finally" section to avoid executing unrelated code. Patch by Vitaly Kruglikov.
- Fixed Windows compatibility. The wait() method now also supports
'timeout' argument on Windows.
- Popen: Added rawlink() method, which makes Popen objects supported
by gevent.wait(). Updated examples/processes.py
- Fixed :issue:`148`: read from errpipe_read in small chunks, to avoid
trigger EINVAL issue on Mac OS X. Patch by Vitaly Kruglikov
- Do os._exit() in "finally" section to avoid executing unrelated
code. Patch by Vitaly Kruglikov.
resolver_ares:
- 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.
- 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.
- gevent.ares.channel now accepts strings as arguments
- upgraded c-ares to cares-1_9_1-12-g805c736
- it is now possible to configure resolver_ares directly with environ, like GEVENTARES_SERVERS
- it is now possible to configure resolver_ares directly with environ,
like GEVENTARES_SERVERS
os:
......@@ -131,17 +173,21 @@ hub:
core:
- allow 'callback' property of watcher to be set to None. "del w.callback" no longer works.
- allow 'callback' property of watcher to be set to None. "del
w.callback" no longer works.
- added missing 'noinotify' flag
Misc:
- gevent.thread: allocate_lock is now an alias for LockType/Semaphore. That way it does not fail when being used as class member.
- Updated greentest.py to start timeouts with `ref=False`.
- gevent.thread: allocate_lock is now an alias for LockType/Semaphore.
That way it does not fail when being used as class member.
- Updated greentest.py to start timeouts with ``ref=False``.
- pool: remove unused get_values() function
- setup.py now recognizes GEVENTSETUP_EV_VERIFY env var which sets EV_VERIFY macro when compiling
- setup.py now recognizes GEVENTSETUP_EV_VERIFY env var which sets
EV_VERIFY macro when compiling
- Added a few micro benchmarks
- 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
- 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
- updated util/makedist.py
- the testrunner was completely rewritten.
......@@ -149,11 +195,18 @@ Misc:
Release 1.0b4 (Sep 6, 2012)
===========================
- Added gevent.os module with 'read' and 'write' functions. Patch by Geert Jansen.
- Moved gevent.hub.fork to gevent.os module (it is still available as gevent.fork).
- Fixed :issue:`148`: Made fileobject handle EINVAL, which is randomly raised by os.read/os.write on Mac OS X. Thanks to Mark Hingston.
- Fixed :issue:`150`: gevent.fileobject.SocketAdapter.sendall() could needlessly wait for write event on the descriptor. Original patch by Mark Hingston.
- Fixed AttributeError in baseserver. In case of error, start() would call kill() which was renamed to close(). Thanks to Vitaly Kruglikov.
- Added gevent.os module with 'read' and 'write' functions. Patch by
Geert Jansen.
- Moved gevent.hub.fork to gevent.os module (it is still available as
gevent.fork).
- Fixed :issue:`148`: Made fileobject handle EINVAL, which is randomly
raised by os.read/os.write on Mac OS X. Thanks to Mark Hingston.
- Fixed :issue:`150`: gevent.fileobject.SocketAdapter.sendall() could
needlessly wait for write event on the descriptor. Original patch by
Mark Hingston.
- Fixed AttributeError in baseserver. In case of error, start() would
call kill() which was renamed to close(). Thanks to Vitaly
Kruglikov.
Release 1.0b3 (Jul 27, 2012)
......@@ -161,26 +214,40 @@ Release 1.0b3 (Jul 27, 2012)
- New gevent.subprocess module
- New gevent.fileobject module
- 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.
- 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.
- Fixed :issue:`138`: gevent.pool.Pool().imap_unordered hangs with an empty iterator. Thanks to exproxus.
- Fixed :issue:`127`: ssl.py could raise TypeError in certain cases. Thanks to Johan Mjones.
- Fixed socket.makefile() to keep the timeout setting of the socket instance. Thanks to Colin Marc.
- Fixed :issue:`127`: ssl.py could raise TypeError in certain cases.
Thanks to Johan Mjones.
- Fixed socket.makefile() to keep the timeout setting of the socket
instance. Thanks to Colin Marc.
- Added 'copy()' method to queues.
- The 'nochild' event loop config option is removed. The install_sigchld offer more flexible way of enabling child watchers.
- core: all watchers except for 'child' now accept new 'priority' keyword argument
- gevent.Timeout accepts new arguments: 'ref' and 'priority'. The default priority for Timeout is -1.
- The 'nochild' event loop config option is removed. The
install_sigchld offer more flexible way of enabling child watchers.
- core: all watchers except for 'child' now accept new 'priority'
keyword argument
- gevent.Timeout accepts new arguments: 'ref' and 'priority'. The
default priority for Timeout is -1.
- Hub.wait() uses Waiter now instead of raw switching
- Updated libev to the latest CVS version
- 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
- 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
- Removed pywsgi feature to capitalize the passed headers.
- Fixed util/cythonpp.py to work on python3.2 (:issue:`123`). Patch by Alexandre Kandalintsev.
- Fixed util/cythonpp.py to work on python3.2 (:issue:`123`). Patch by
Alexandre Kandalintsev.
- Added 'closed' readonly property to socket.
- Added 'ref' read/write property to socket.
- setup.py now parses CARES_EMBED and LIBEV_EMBED parameters, in addition to EMBED.
- gevent.reinit() and gevent.fork() only reinit hub if it was created and do not create it themselves
- Fixed setup.py not to add libev and c-ares to include dirs in non-embed mode. Patch by Ralf Schmitt.
- setup.py now parses CARES_EMBED and LIBEV_EMBED parameters, in
addition to EMBED.
- gevent.reinit() and gevent.fork() only reinit hub if it was created
and do not create it themselves
- Fixed setup.py not to add libev and c-ares to include dirs in
non-embed mode. Patch by Ralf Schmitt.
- Renamed util/make_dist.py to util/makedist.py
- testrunner.py now saves more information about the system; the stat printing functionality is moved to a separate util/stat.py script.
- testrunner.py now saves more information about the system; the stat
printing functionality is moved to a separate util/stat.py script.
Release 1.0b2 (Apr 11, 2012)
......@@ -188,8 +255,10 @@ Release 1.0b2 (Apr 11, 2012)
Major and backward-incompatible changes:
- Made the threadpool-based resolver the default. To enable the ares-based resolver, set GEVENT_RESOLVER=ares env var.
- Made the threadpool-based resolver the default. To enable the
ares-based resolver, set GEVENT_RESOLVER=ares env var.
- Added support for child watchers (not available on Windows).
- Libev loop now reaps all children by default.
- If NOCHILD flag is passed to the loop, child watchers and child reaping are disabled.
- Renamed gevent.coros to gevent.lock. The gevent.coros is still available but deprecated.
......@@ -199,16 +268,23 @@ Major and backward-incompatible changes:
- ThreadPool now calls Hub.handle_error for exceptions in worker threads.
- ThreadPool got new method: apply_e.
- Added new extension module gevent._util and moved gevent.core.set_exc_info function there.
- 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.
- 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.
- It is now possible to kill or pre-spawn threads in ThreadPool by setting its 'size' property.
core:
- Make sure the default loop cannot be destroyed more than once, thus crashing the process.
- Make Hub.destroy() method not to destroy the default loop, unless *destroy_loop* is *True*. Non-default loops are still destroyed by default.
- Make Hub.destroy() method not to destroy the default loop, unless
*destroy_loop* is *True*. Non-default loops are still destroyed by
default.
- loop: Removed properties from loop: fdchangecnt, timercnt, asynccnt.
- loop: Added properties: sigfd, origflags, origflags_int
- loop: The EVFLAG_NOENV is now always passed to libev. Thus LIBEV_FLAGS env variable is no longer checked. Use GEVENT_BACKEND.
- loop: The EVFLAG_NOENV is now always passed to libev. Thus
LIBEV_FLAGS env variable is no longer checked. Use GEVENT_BACKEND.
Misc:
......@@ -241,7 +317,11 @@ Release 1.0b1 (Jan 10, 2012)
Backward-incompatible changes:
- Removed "link to greenlet" feature of Greenlet.
- 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.
- 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.
- Some code supporting Python 2.4 has been removed.
Release highlights:
......@@ -251,13 +331,19 @@ Release highlights:
- Added UDP server: gevent.server.DatagramServer
- A "configure" is now run on libev. This fixes a problem of 'kqueue' not being available on Mac OS X.
- Gevent recognizes some environment variables now:
- GEVENT_BACKEND allows passing argument to loop, e.g. "GEVENT_BACKEND=select" for force select backend
- GEVENT_RESOLVER allows choosing resolver class.
- GEVENT_THREADPOOL allows choosing thread pool class.
- Added new examples: portforwarder, psycopg2_pool.py, threadpool.py, udp_server.py
- 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.
- Added new examples: portforwarder, psycopg2_pool.py, threadpool.py,
udp_server.py
- 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.
misc:
- gevent.joinall() method now accepts optional 'count' keyword.
- gevent.fork() only calls reinit() in the child process now.
- gevent.run() now returns False when exiting because of timeout or event (previous None).
......@@ -265,18 +351,28 @@ misc:
- Hub got a new property: threadpool.
ares.pyx:
- Fixed :issue:`104`: made ares_host_result pickable. Thanks to Shaun Cutts.
pywsgi:
- Removed unused deprecated 'wfile' property from WSGIHandler
- Fixed :issue:`92`: raise IOError on truncated POST requests.
- Fixed :issue:`93`: do not sent multiple "100 continue" responses
core:
- Fixed :issue:`97`: the timer watcher now calls ev_now_update() in start() and again() unless 'update' keyword is passed and set to False.
- Fixed :issue:`97`: the timer watcher now calls ev_now_update() in
start() and again() unless 'update' keyword is passed and set to
False.
- add set_syserr_cb() function; it's used by gevent internally.
- 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.
- renamed 'backend_fd' property to 'fileno()' method. (not available if you build gevent against system libev)
- 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.
- renamed 'backend_fd' property to 'fileno()' method. (not available
if you build gevent against system libev)
- added 'asynccnt' property (not available if you build gevent against system libev)
- made loop.__repr__ output a bit more compact
- the watchers check the arguments for validness now (previously invalid argument would crash libev).
......@@ -286,42 +382,53 @@ core:
- libev has been patched to use send()/recv() for evpipe on windows when libev_vfd.h is in effect
resolver_ares:
- Slightly improved compatibility with stdlib's socket in some error cases.
socket:
- Fixed close() method not to reference any globals
- Fixed :issue:`115`: _dummy gets unexpected Timeout arg
- Removed _fileobject used for python 2.4 compatibility in socket.py
- Fixed :issue:`94`: fallback to buffer if memoryview fails in _get_memory on python 2.7
monkey:
- Removed patch_httplib()
- Fixed :issue:`112`: threading._sleep is not patched. Thanks to David LaBissoniere.
- Added get_unpatched() function. However, it is slightly broken at the moment.
backdoor:
- make 'locals()' not spew out __builtin__.__dict__ in backdoor
- add optional banner argument to BackdoorServer
servers:
- add server.DatagramServer;
- StreamServer: 'ssl_enabled' is now a read-only property
- servers no longer have 'kill' method; it has been renamed to 'close'.
- listeners can now be configured as strings, e.g. ':80' or 80
- modify baseserver.BaseServer in such a way that makes it a good base class for both StreamServer and DatagramServer
- modify baseserver.BaseServer in such a way that makes it a good base
class for both StreamServer and DatagramServer
- BaseServer no longer accepts 'backlog' parameter. It is now done by StreamServer.
- BaseServer implements start_accepting() and stop_accepting() methods
- BaseServer now implements "temporarily stop accepting" strategy
- BaseServer now has _do_read method which does everything except for actually calling accept()/recvfrom()
- BaseServer now has _do_read method which does everything except for
actually calling accept()/recvfrom()
- pre_start() method is renamed to init_socket()
- renamed _stopped_event to _stop_event
- 'started' is now a read-only property (which actually reports state of _stop_event)
- 'started' is now a read-only property (which actually reports state
of _stop_event)
- post_stop() method is removed
- close() now sets _stop_event(), thus setting 'started' to False, thus causing serve_forever() to exit
- close() now sets _stop_event(), thus setting 'started' to False,
thus causing serve_forever() to exit
- _tcp_listener() function is moved from baseserver.py to server.py
- added 'fatal_errors' class attribute which is a tuple of all errnos that should kill the server
- added 'fatal_errors' class attribute which is a tuple of all errnos
that should kill the server
coros:
- Semaphore: add _start_notify() method
- Semaphore: avoid copying list of links; rawlink() no longer schedules notification
......@@ -330,10 +437,13 @@ coros:
Release 1.0a3 (Sep 15, 2011)
============================
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.
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.
In all servers, method "kill" was renamed to "close". The old name is available as deprecated alias.
In all servers, method "kill" was renamed to "close". The old name is
available as deprecated alias.
Added a few properties to the loop: backend_fd, fdchangecnt, timercnt.
......@@ -363,19 +473,26 @@ Fixed Hub.join() to return True if Hub was already dead.
Added 'event' argument to Hub.join().
Added `run()` function to gevent top level package.
Added ``run()`` function to gevent top level package.
Fixed Greenlet.start() to exit silently if greenlet was already started rather than raising :exc:`AssertionError`.
Fixed Greenlet.start() to exit silently if greenlet was already
started rather than raising :exc:`AssertionError`.
Fixed Greenlet.start() not to schedule another switch if greenlet is already dead.
Fixed Greenlet.start() not to schedule another switch if greenlet is
already dead.
Fixed gevent.signal() to spawn Greenlet instead of raw greenlet. Also it'll switch into the new greenlet immediately instead of scheduling additional callback.
Fixed gevent.signal() to spawn Greenlet instead of raw greenlet. Also
it'll switch into the new greenlet immediately instead of scheduling
additional callback.
Do monkey patch create_connection() as gevent's version works better with gevent.socket.socket than the standard create_connection.
Do monkey patch create_connection() as gevent's version works better
with gevent.socket.socket than the standard create_connection.
pywsgi: make sure we don't try to read more requests if socket operation failed with EPIPE
pywsgi: make sure we don't try to read more requests if socket
operation failed with EPIPE
pywsgi: if we failed to send the reply, change 'status' to socket error so that the logs mention the error.
pywsgi: if we failed to send the reply, change 'status' to socket
error so that the logs mention the error.
Release 1.0a2 (Aug 2, 2011)
......@@ -390,42 +507,60 @@ Release 1.0a1 (Aug 2, 2011)
Backward-incompatible changes:
- Dropped support for Python 2.4.
- `Queue(0)` is now equivalent to an unbound queue and raises :exc:`DeprecationError`. Use :class:`gevent.queue.Channel` if you need a channel.
- Deprecated ability to pass a greenlet instance to :meth:`Greenlet.link`, :meth:`Greenlet.link_value` and :meth:`Greenlet.link_exception`.
- All of :mod:`gevent.core` has been rewritten and the interface is not compatible.
- :exc:`SystemExit` and :exc:`SystemError` now kill the whole process instead of printing a traceback.
- Removed deprecated :class:`util.lazy_property` property.
- Removed :mod:`gevent.dns` module.
- ``Queue(0)`` is now equivalent to an unbound queue and raises
``DeprecationError``. Use :class:`gevent.queue.Channel` if you
need a channel.
- Deprecated ability to pass a greenlet instance to
:meth:`Greenlet.link`, :meth:`Greenlet.link_value` and
:meth:`Greenlet.link_exception`.
- All of :mod:`gevent.core` has been rewritten and the interface is
not compatible.
- :exc:`SystemExit` and :exc:`SystemError` now kill the whole process
instead of printing a traceback.
- Removed deprecated ``util.lazy_property`` property.
- Removed ``gevent.dns`` module.
- Removed deprecated gevent.sslold module
- Removed deprecated gevent.rawgreenlet module
- Removed deprecated name `GreenletSet` which used to be alias for :class:`Group`.
- Removed deprecated name ``GreenletSet`` which used to be alias for
``Group``.
- ``gevent.wsgi`` is now a deprecated alias for ``gevent.pywsgi``.
Release highlights:
- The :mod:`gevent.core` module now wraps libev's API and is not compatible with gevent 0.x.
- Added a concept of pluggable event loops. By default gevent.core.loop is used, which is a wrapper around libev.
- Added a concept of pluggable name resolvers. By default a resolver based on c-ares library is used.
- Added support for multiple OS threads, each new thread will get its own Hub instance with its own event loop.
- The :mod:`gevent.core` module now wraps libev's API and is not
compatible with gevent 0.x.
- Added a concept of pluggable event loops. By default
gevent.core.loop is used, which is a wrapper around libev.
- Added a concept of pluggable name resolvers. By default a resolver
based on c-ares library is used.
- Added support for multiple OS threads, each new thread will get its
own Hub instance with its own event loop.
- The release now includes and embeds the dependencies: libev and c-ares.
- The standard :mod:`signal` works now as expected.
- The unhandled errors are now handled uniformely by `Hub.handle_error` function.
- Added :class:`Channel` class to :mod:`gevent.queue` module. It is equivalent to `Queue(0)` in gevent 0.x, which is deprecated now.
- Added method :meth:`peek` to :class:`Queue` class.
- Added :func:`idle` function which blocks until the event loop is idle.
- Added a way to gracefully shutdown the application by waiting for all outstanding greenlets/servers/watchers: :meth:`Hub.join`.
- Added new :mod:`gevent.ares` C extension which wraps `c-ares` and provides asynchronous DNS resolver.
- Added new :mod:`gevent.resolver_ares` module provides synchronous API on top of :mod:`gevent.ares`.
- The unhandled errors are now handled uniformely by ``Hub.handle_error`` function.
- Added :class:`gevent.queue.Channel` class to :mod:`gevent.queue` module. It is
equivalent to ``Queue(0)`` in gevent 0.x, which is deprecated now.
- Added method ``peek`` to :class:`gevent.queue.Queue` class.
- Added ``idle`` function which blocks until the event loop is idle.
- Added a way to gracefully shutdown the application by waiting for
all outstanding greenlets/servers/watchers: ``Hub.join``.
- Added new ``gevent.ares`` C extension which wraps ``c-ares`` and
provides asynchronous DNS resolver.
- Added new ``gevent.resolver_ares`` module provides synchronous
API on top of ``gevent.ares``.
The :mod:`gevent.socket` module:
- DNS functions now use c-ares library rather than libevent-dns. This
fixes a number of problems with name resolving:
- Fix :issue:`2`: DNS resolver no longer breaks after `fork()`. You still need to call :func:`gevent.fork` (`os.fork` is monkey
patched with it if `monkey.patch_all()` was called).
- DNS resolver no longer ignores `/etc/resolv.conf` and `/etc/hosts`.
- Fix :issue:`2`: DNS resolver no longer breaks after ``fork()``. You
still need to call :func:`gevent.fork` (`os.fork` is monkey
patched with it if ``monkey.patch_all()`` was called).
- DNS resolver no longer ignores ``/etc/resolv.conf`` and ``/etc/hosts``.
- The following functions were added to socket module
- gethostbyname_ex
- getnameinfo
- gethostbyaddr
......@@ -433,29 +568,36 @@ The :mod:`gevent.socket` module:
- Removed undocumented bind_and_listen and tcp_listener
The :class:`Hub` object:
The :class:`gevent.hub.Hub` object:
- Added :meth:`join` method which waits until the event loop exits or optional timeout expires.
- Added :meth:`wait` method which waits until a watcher has got an event.
- Added :meth:`handle_error` method which is called by all of gevent in case of unhandled exception.
- Added :meth:`print_exception` method which is called by `handle_error` to print the exception traceback.
- Added ``join`` method which waits until the event loop exits or optional timeout expires.
- Added ``wait`` method which waits until a watcher has got an event.
- Added ``handle_error`` method which is called by all of gevent in case of unhandled exception.
- Added ``print_exception`` method which is called by ``handle_error`` to print the exception traceback.
The :class:`Greenlet` objects:
- Added `__nonzero__` implementation that returns `True` after greenlet was started until it's dead.
Previously greenlet was `False` after `start()` until it was first switched to.
- Added ``__nonzero__`` implementation that returns ``True`` after
greenlet was started until it's dead. Previously greenlet was
``False`` after ``start()`` until it was first switched to.
The mod:`gevent.pool` module:
The :mod:`gevent.pool` module:
- It is now possible to add raw greenlets to the pool.
- The :meth:`map` and :meth:`imap` methods now start yielding the results as soon as possible.
- The :meth:`imap_unordered` no longer swallows an exception raised while iterating its argument.
- The ``map`` and ``imap`` methods now start yielding the
results as soon as possible.
- The ``imap_unordered`` no longer swallows an exception raised
while iterating its argument.
Miscellaneous:
- `gevent.sleep(<negative value>)` no longer raises an exception, instead it does `sleep(0)`.
- Added method `clear` to internal `Waiter` class.
- Removed `wait` method from internal `Waiter` class.
- The :class:`WSGIServer` now sets `max_accept` to 1 if `wsgi.multiprocessing` is set to `True`.
- Added :func:`monkey.patch_module` function that monkey patches module using `__implements__` list provided by gevent module.
All of gevent modules that replace stdlib module now have `__implements__` attribute.
- ``gevent.sleep(<negative value>)`` no longer raises an exception,
instead it does ``sleep(0)``.
- Added method ``clear`` to internal ``Waiter`` class.
- Removed ``wait`` method from internal ``Waiter`` class.
- The ``WSGIServer`` now sets ``max_accept`` to 1 if
``wsgi.multiprocessing`` is set to ``True```
- Added :func:`gevent.monkey.patch_module` function that monkey patches
module using ``__implements__`` list provided by gevent module. All of
gevent modules that replace stdlib module now have ``__implements__``
attribute.
......@@ -168,15 +168,21 @@ Compatibility
This release is intended to be compatible with 1.2.x with no changes
to client source code, so long as only non-deprecated and supported
interfaces were used (as always, internal, non-documented
implementation details may have changed).
The :doc:`resolvers <dns>` have been refactored. As a result,
``gevent.ares``, ``gevent.resolver_ares`` and
``gevent.resolver_thread`` have been deprecated. Choosing a resolver
by alias (e.g., 'thread') in the ``GEVENT_RESOLVER`` environment
variable continues to work as before.
The internal module ``gevent._threading`` was significantly
refactored. The long-deprecated module ``gevent.wsgi`` was removed.
implementation details may have changed). Here are some specific
compatibility notes.
- The :doc:`resolvers <dns>` have been refactored. As a result,
``gevent.ares``, ``gevent.resolver_ares`` and
``gevent.resolver_thread`` have been deprecated. Choosing a resolver
by alias (e.g., 'thread') in the ``GEVENT_RESOLVER`` environment
variable continues to work as before.
- The internal module ``gevent._threading`` was significantly
refactored. As the name indicates this is an internal module not
intended as part of the public API, but such uses have been observed.
- The module ``gevent.wsgi`` was removed. Use :mod:`gevent.pywsgi`
instead. ``gevent.wsgi`` was nothing but an alias for
:mod:`gevent.pywsgi` since gevent 1.0a1 (2011).
.. LocalWords: Greenlet
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment