Deprecated coros.Actor, tweaked README and testing docs.
This commit is contained in:
16
README
16
README
@@ -1,14 +1,22 @@
|
||||
Getting Started
|
||||
===============
|
||||
|
||||
There's some good documentation up at: http://eventlet.net/doc/
|
||||
|
||||
Here's something you can try right on the command line:
|
||||
|
||||
% python
|
||||
>>> from eventlet import api
|
||||
>>> help(api)
|
||||
>>> import eventlet
|
||||
>>> from eventlet.green import urllib2
|
||||
>>> gt = eventlet.spawn(urllib2.urlopen, 'http://eventlet.net')
|
||||
>>> gt2 = eventlet.spawn(urllib2.urlopen, 'http://secondlife.com')
|
||||
>>> gt2.wait()
|
||||
>>> gt.wait()
|
||||
|
||||
Also, look at the examples in the examples directory.
|
||||
|
||||
Building the Docs
|
||||
=================
|
||||
Building the Docs Locally
|
||||
=========================
|
||||
|
||||
To build a complete set of HTML documentation, you must have Sphinx, which can be found at http://sphinx.pocoo.org/
|
||||
|
||||
|
@@ -87,7 +87,7 @@ Coverage.py is an awesome tool for evaluating how much code was exercised by uni
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
nosetests --with-coverage
|
||||
nosetests --with-coverage --cover-package=eventlet
|
||||
|
||||
After running the tests to completion, this will emit a huge wodge of module names and line numbers. For some reason, the ``--cover-inclusive`` option breaks everything rather than serving its purpose of limiting the coverage to the local files, so don't use that.
|
||||
|
||||
@@ -95,6 +95,6 @@ The annotate option is quite useful because it generates annotated source files
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
coverage annotate -d annotated --omit tempmod
|
||||
coverage annotate -d annotated --omit='tempmod,<console>'
|
||||
|
||||
(``tempmod`` is omitted because it gets thrown away at the completion of its unit test and coverage.py isn't smart enough to detect this)
|
||||
(``tempmod`` and ``console`` are omitted because they gets thrown away at the completion of their unit tests and coverage.py isn't smart enough to detect this)
|
@@ -317,6 +317,13 @@ class Actor(object):
|
||||
to process concurrently. If it is 1, the actor will process messages
|
||||
serially.
|
||||
"""
|
||||
warnings.warn("We're phasing out the Actor class, so as to get rid of"
|
||||
"the coros module. If you use Actor, please speak up on "
|
||||
"eventletdev@lists.secondlife.com, and we'll come up with a "
|
||||
"transition plan. If no one speaks up, we'll remove Actor "
|
||||
"in a future release of Eventlet.",
|
||||
DeprecationWarning, stacklevel=2)
|
||||
|
||||
self._mailbox = collections.deque()
|
||||
self._event = _event.Event()
|
||||
self._killer = api.spawn(self.run_forever)
|
||||
|
Reference in New Issue
Block a user