summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-02-22 14:51:47 +0100
committerVictor Stinner <victor.stinner@gmail.com>2016-02-22 14:51:47 +0100
commitffac113995247122fb62ceb172ceb8621dbfc65c (patch)
treeb4434e9cac0d620662ba7a0bd613902141869013
parente10c8555d0b21ed71202596a056ace0fa8386c6e (diff)
downloadaioeventlet-ffac113995247122fb62ceb172ceb8621dbfc65c.tar.gz
Update doc
-rw-r--r--doc/index.rst4
-rw-r--r--doc/openstack.rst6
-rw-r--r--doc/status.rst31
-rw-r--r--doc/using.rst62
4 files changed, 39 insertions, 64 deletions
diff --git a/doc/index.rst b/doc/index.rst
index 6031ade..21e0bef 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -14,8 +14,8 @@ aioeventlet allows to use greenthreads in asyncio coroutines, and to use asyncio
coroutines, tasks and futures in greenthreads: see :func:`yield_future` and
:func:`wrap_greenthread` functions.
-The main visible difference between aioeventlet and trollius is the behaviour of
-``run_forever()``: ``run_forever()`` blocks with trollius, whereas it runs in a
+The main visible difference between aioeventlet and asyncio is the behaviour of
+``run_forever()``: ``run_forever()`` blocks with asyncio, whereas it runs in a
greenthread with aioeventlet. It means that aioeventlet event loop can run in an
greenthread while the Python main thread runs other greenthreads in parallel.
diff --git a/doc/openstack.rst b/doc/openstack.rst
index 7d9b340..bef9111 100644
--- a/doc/openstack.rst
+++ b/doc/openstack.rst
@@ -1,6 +1,12 @@
asyncio in OpenStack
====================
+.. warning::
+ The project of replacing eventlet with trollius using aioeventlet in
+ OpenStack is abandonned. It might done "later" when Python 2 support
+ will be removed from OpenStack which is not going to happen in a near
+ future.
+
First part (in progress): add support for trollius coroutines
-------------------------------------------------------------
diff --git a/doc/status.rst b/doc/status.rst
index 2519c3d..92fd243 100644
--- a/doc/status.rst
+++ b/doc/status.rst
@@ -21,34 +21,5 @@ To do
eventlet and Python 3
=====================
-eventlet 0.16 or newer is recommanded for Python 3 when monkey-patching is
+eventlet 0.17 or newer is recommanded for Python 3 when monkey-patching is
enabled.
-
-eventlet 0.15 is the first release supporting Python 3, its monkey-patching
-does not work with Python 3.
-
-Python 3 pull requests:
-
-* `Fix threading.Condition with monkey-patching on Python 3.3 and newer #187
- <https://github.com/eventlet/eventlet/pull/187>`_
-* `Fix monkey-patched os.open(): add dir_fd parameter #170
- <https://github.com/eventlet/eventlet/pull/170>`_, merged!
-* `Fix monkey_patch() on Python 3 #168
- <https://github.com/eventlet/eventlet/pull/168>`_, merged!
-* `Python 3 compat; Improve WSGI, WS, threading and tests #160
- <https://github.com/eventlet/eventlet/pull/160>`_ (sent the Nov 5, 2014):
- merged!
-* `Fix several issues with python3 thread patching #99
- <https://github.com/eventlet/eventlet/pull/99>`_ (sent the July 3, 2014): not
- merged but it is not more needed (issues fixed by other changes), see the
- `commit
- <https://github.com/therve/eventlet/commit/9c3118162cf1ca1e50be330ba2a289f054c48d3c>`_
-
-Python 3 issues:
-
-* Issue #157: `eventlet hanging
- <https://github.com/eventlet/eventlet/issues/157>`_ (open since Oct 30, 2014)
-* Issue #153: `py3: green.threading.local is not green
- <https://github.com/eventlet/eventlet/issues/153>`_ (closed the Nov 5, 2014)
-* Issue #6: `Support Python 3.3
- <https://github.com/eventlet/eventlet/issues/6>`_ (open since Jan 2013)
diff --git a/doc/using.rst b/doc/using.rst
index 0676268..a87da56 100644
--- a/doc/using.rst
+++ b/doc/using.rst
@@ -1,26 +1,26 @@
Usage
=====
-Use aioeventlet with trollius
------------------------------
-
-aioeventlet can be used with trollius, coroutines written with ``yield
-From(...)``. Using aioeventlet with trollius is a good start to port project
-written for eventlet to trollius.
+Use aioeventlet with asyncio
+----------------------------
-To use aioeventlet with trollius, set the event loop policy before using an event
-loop, example::
+aioeventlet can be used with asyncio, coroutines written with ``yield from ...``.
+To use aioeventlet with asyncio, set the event loop policy before using an event
+loop. Example::
import aioeventlet
- import trollius
+ import asyncio
- trollius.set_event_loop_policy(aioeventlet.EventLoopPolicy())
+ asyncio.set_event_loop_policy(aioeventlet.EventLoopPolicy())
# ....
+Setting the event loop policy should be enough to examples of the asyncio
+documentation with the aioeventlet event loop.
+
Hello World::
import aioeventlet
- import trollius as asyncio
+ import asyncio
def hello_world():
print("Hello World")
@@ -33,36 +33,35 @@ Hello World::
loop.close()
.. seealso::
- `Trollius documentation <http://trollius.readthedocs.org/>`_.
+ The `asyncio documentation
+ <https://docs.python.org/dev/library/asyncio.html>`_.
-Use aioeventlet with asyncio
-----------------------------
+Use aioeventlet with trollius
+-----------------------------
-aioeventlet can be used with asyncio, coroutines written with ``yield from ...``.
-To use aioeventlet with asyncio, set the event loop policy before using an event
-loop. Example::
+.. warning::
+ The `trollius project is now deprecated
+ <http://trollius.readthedocs.org/deprecated.html>`_. It's now recommended to
+ use aioeventlet with asyncio.
- import aioeventlet
- import asyncio
+aioeventlet can be used with trollius, coroutines written with ``yield
+From(...)``. Using aioeventlet with trollius is a good start to port project
+written for eventlet to trollius.
- asyncio.set_event_loop_policy(aioeventlet.EventLoopPolicy())
- # ....
+To use aioeventlet with trollius, set the event loop policy before using an event
+loop, example::
-Setting the event loop policy should be enough to examples of the asyncio
-documentation with the aioeventlet event loop.
+ import aioeventlet
+ import trollius
-.. warning::
- Since aioeventlet relies on eventlet, eventlet port to Python 3 is not complete
- and asyncio requires Python 3.3 or newer: using aioeventlet with asyncio is not
- recommended yet. *Using aioeventlet with trollius should be preferred right
- now*. See the :ref:`status of the eventlet port to Python 3
- <eventlet-py3>`.
+ trollius.set_event_loop_policy(aioeventlet.EventLoopPolicy())
+ # ....
Hello World::
import aioeventlet
- import asyncio
+ import trollius as asyncio
def hello_world():
print("Hello World")
@@ -75,8 +74,7 @@ Hello World::
loop.close()
.. seealso::
- The `asyncio documentation
- <https://docs.python.org/dev/library/asyncio.html>`_.
+ `Trollius documentation <http://trollius.readthedocs.org/>`_.
Threads