docs: Fix index generation everywhere.

pull/45/head
David Wilson 7 years ago
parent 5584dba441
commit 88c82aff6a

@ -27,7 +27,9 @@ This module implements most package functionality, but remains separate from
non-essential code in order to reduce its size, since it is also serves as the non-essential code in order to reduce its size, since it is also serves as the
bootstrap implementation sent to every new slave context. bootstrap implementation sent to every new slave context.
.. function:: mitogen.core.takes_econtext .. currentmodule:: mitogen.core
.. function:: takes_econtext
Decorator that marks a function or class method to automatically receive a Decorator that marks a function or class method to automatically receive a
kwarg named `econtext`, referencing the kwarg named `econtext`, referencing the
@ -38,7 +40,9 @@ bootstrap implementation sent to every new slave context.
When the function is invoked directly, `econtext` must still be passed to it When the function is invoked directly, `econtext` must still be passed to it
explicitly. explicitly.
.. function:: mitogen.core.takes_router .. currentmodule:: mitogen.core
.. function:: takes_router
Decorator that marks a function or class method to automatically receive a Decorator that marks a function or class method to automatically receive a
kwarg named `router`, referencing the :py:class:`econtext.core.Router` kwarg named `router`, referencing the :py:class:`econtext.core.Router`
@ -61,7 +65,9 @@ be sent to any context that will be used to establish additional child
contexts. contexts.
.. class:: mitogen.master.Select (receivers=(), oneshot=True) .. currentmodule:: mitogen.master
.. class:: Select (receivers=(), oneshot=True)
Support scatter/gather asynchronous calls and waiting on multiple Support scatter/gather asynchronous calls and waiting on multiple
receivers, channels, and sub-Selects. Accepts a sequence of receivers, channels, and sub-Selects. Accepts a sequence of
@ -171,14 +177,18 @@ mitogen.fakessh
.. automodule:: mitogen.fakessh .. automodule:: mitogen.fakessh
.. autofunction:: mitogen.fakessh.run .. currentmodule:: mitogen.fakessh
.. autofunction:: run
Router Class Router Class
============ ============
.. class:: mitogen.core.Router .. currentmodule:: mitogen.core
.. class:: Router
Route messages between parent and child contexts, and invoke handlers Route messages between parent and child contexts, and invoke handlers
defined on our parent context. Router.route() straddles the Broker and user defined on our parent context. Router.route() straddles the Broker and user
@ -257,7 +267,9 @@ Router Class
This may be called from any thread. This may be called from any thread.
.. class:: mitogen.master.Router .. currentmodule:: mitogen.master
.. class:: Router
Extend :py:class:`mitogen.core.Router` with functionality useful to Extend :py:class:`mitogen.core.Router` with functionality useful to
masters, and child contexts who later become masters. Currently when this masters, and child contexts who later become masters. Currently when this
@ -393,7 +405,9 @@ Router Class
Context Class Context Class
============= =============
.. class:: mitogen.core.Context .. currentmodule:: mitogen.core
.. class:: Context
Represent a remote context regardless of connection method. Represent a remote context regardless of connection method.
@ -441,7 +455,9 @@ Context Class
No message was received and `deadline` passed. No message was received and `deadline` passed.
.. class:: mitogen.master.Context .. currentmodule:: mitogen.master
.. class:: Context
Extend :py:class:`mitogen.core.Router` with functionality useful to Extend :py:class:`mitogen.core.Router` with functionality useful to
masters, and child contexts who later become masters. Currently when this masters, and child contexts who later become masters. Currently when this
@ -519,7 +535,9 @@ Context Class
Receiver Class Receiver Class
-------------- --------------
.. class:: mitogen.core.Receiver (router, handle=None, persist=True, respondent=None) .. currentmodule:: mitogen.core
.. class:: Receiver (router, handle=None, persist=True, respondent=None)
Receivers are used to wait for pickled responses from another context to be Receivers are used to wait for pickled responses from another context to be
sent to a handle registered in this context. A receiver may be single-use sent to a handle registered in this context. A receiver may be single-use
@ -608,7 +626,9 @@ Receiver Class
Sender Class Sender Class
------------ ------------
.. class:: mitogen.core.Sender (context, dst_handle) .. currentmodule:: mitogen.core
.. class:: Sender (context, dst_handle)
Senders are used to send pickled messages to a handle in another context, Senders are used to send pickled messages to a handle in another context,
it is the inverse of :py:class:`mitogen.core.Sender`. it is the inverse of :py:class:`mitogen.core.Sender`.
@ -631,7 +651,9 @@ Sender Class
Channel Class Channel Class
------------- -------------
.. class:: mitogen.core.Channel (router, context, dst_handle, handle=None) .. currentmodule:: mitogen.core
.. class:: Channel (router, context, dst_handle, handle=None)
A channel inherits from :py:class:`mitogen.core.Sender` and A channel inherits from :py:class:`mitogen.core.Sender` and
`mitogen.core.Receiver` to provide bidirectional functionality. `mitogen.core.Receiver` to provide bidirectional functionality.
@ -645,7 +667,9 @@ Channel Class
Broker Class Broker Class
============ ============
.. autoclass:: mitogen.master.Broker .. currentmodule:: mitogen.master
.. autoclass:: Broker
:members: :members:
:inherited-members: :inherited-members:
@ -660,24 +684,26 @@ Utility Functions
Exceptions Exceptions
========== ==========
.. class:: mitogen.core.Error (fmt, \*args) .. currentmodule:: mitogen.core
.. class:: Error (fmt, \*args)
Base for all exceptions raised by Mitogen. Base for all exceptions raised by Mitogen.
.. class:: mitogen.core.CallError (e) .. class:: CallError (e)
Raised when :py:meth:`Context.call() <mitogen.master.Context.call>` fails. Raised when :py:meth:`Context.call() <mitogen.master.Context.call>` fails.
A copy of the traceback from the external context is appended to the A copy of the traceback from the external context is appended to the
exception message. exception message.
.. class:: mitogen.core.ChannelError (fmt, \*args) .. class:: ChannelError (fmt, \*args)
Raised when a channel dies or has been closed. Raised when a channel dies or has been closed.
.. class:: mitogen.core.StreamError (fmt, \*args) .. class:: StreamError (fmt, \*args)
Raised when a stream cannot be established. Raised when a stream cannot be established.
.. autoclass:: mitogen.core.TimeoutError (fmt, \*args) .. class:: TimeoutError (fmt, \*args)
Raised when a timeout occurs on a stream. Raised when a timeout occurs on a stream.

@ -10,33 +10,48 @@ mitogen.core
Side Class Side Class
---------- ----------
.. autoclass:: mitogen.core.Side .. currentmodule:: mitogen.core
.. autoclass:: Side
:members: :members:
Stream Classes Stream Classes
-------------- --------------
.. autoclass:: mitogen.core.BasicStream .. currentmodule:: mitogen.core
.. autoclass:: BasicStream
:members: :members:
.. autoclass:: mitogen.core.Stream .. autoclass:: Stream
:members: :members:
.. autoclass:: mitogen.master.Stream .. currentmodule:: mitogen.master
.. autoclass:: Stream
:members: :members:
.. autoclass:: mitogen.ssh.Stream .. currentmodule:: mitogen.ssh
.. autoclass:: Stream
:members:
.. currentmodule:: mitogen.sudo
.. autoclass:: Stream
:members: :members:
Other Stream Subclasses Other Stream Subclasses
----------------------- -----------------------
.. autoclass:: mitogen.core.IoLogger .. currentmodule:: mitogen.core
.. autoclass:: IoLogger
:members: :members:
.. autoclass:: mitogen.core.Waker .. autoclass:: Waker
:members: :members:
@ -44,7 +59,9 @@ Other Stream Subclasses
ExternalContext Class ExternalContext Class
--------------------- ---------------------
.. class:: mitogen.core.ExternalContext .. currentmodule:: mitogen.core
.. class:: ExternalContext
External context implementation. External context implementation.
@ -81,7 +98,9 @@ ExternalContext Class
mitogen.master mitogen.master
============== ==============
.. class:: mitogen.master.ProcessMonitor .. currentmodule:: mitogen.master
.. class:: ProcessMonitor
Install a :py:data:`signal.SIGCHLD` handler that generates callbacks when a Install a :py:data:`signal.SIGCHLD` handler that generates callbacks when a
specific child process has exitted. specific child process has exitted.
@ -105,7 +124,9 @@ These functions exist to support the blocking phase of setting up a new
context. They will eventually be replaced with asynchronous equivalents. context. They will eventually be replaced with asynchronous equivalents.
.. function:: mitogen.master.iter_read(fd, deadline=None) .. currentmodule:: mitogen.master
.. function:: iter_read(fd, deadline=None)
Return a generator that arranges for up to 4096-byte chunks to be read at a Return a generator that arranges for up to 4096-byte chunks to be read at a
time from the file descriptor `fd` until the generator is destroyed. time from the file descriptor `fd` until the generator is destroyed.
@ -124,7 +145,9 @@ context. They will eventually be replaced with asynchronous equivalents.
Attempt to read past end of file. Attempt to read past end of file.
.. function:: mitogen.master.write_all (fd, s, deadline=None) .. currentmodule:: mitogen.master
.. function:: write_all (fd, s, deadline=None)
Arrange for all of bytestring `s` to be written to the file descriptor Arrange for all of bytestring `s` to be written to the file descriptor
`fd`. `fd`.
@ -149,7 +172,9 @@ context. They will eventually be replaced with asynchronous equivalents.
Helper Functions Helper Functions
---------------- ----------------
.. function:: mitogen.core.io_op (func, \*args) .. currentmodule:: mitogen.core
.. function:: io_op (func, \*args)
When connected over a TTY (i.e. sudo), disconnection of the remote end is When connected over a TTY (i.e. sudo), disconnection of the remote end is
signalled by EIO, rather than an empty read like sockets or pipes. Ideally signalled by EIO, rather than an empty read like sockets or pipes. Ideally
@ -160,13 +185,17 @@ Helper Functions
ECONNRESET may be triggered by any read or write. ECONNRESET may be triggered by any read or write.
.. function:: mitogen.master.create_child (\*args) .. currentmodule:: mitogen.master
.. function:: create_child (\*args)
Create a child process whose stdin/stdout is connected to a socket, Create a child process whose stdin/stdout is connected to a socket,
returning `(pid, socket_obj)`. returning `(pid, socket_obj)`.
.. function:: mitogen.master.tty_create_child (\*args) .. currentmodule:: mitogen.master
.. function:: tty_create_child (\*args)
Return a file descriptor connected to the master end of a pseudo-terminal, Return a file descriptor connected to the master end of a pseudo-terminal,
whose slave end is connected to stdin/stdout/stderr of a new child process. whose slave end is connected to stdin/stdout/stderr of a new child process.
@ -181,7 +210,9 @@ Helper Functions
`(pid, fd)` `(pid, fd)`
.. function:: mitogen.master.get_child_modules (path, fullname) .. currentmodule:: mitogen.master
.. function:: get_child_modules (path, fullname)
Return the canonical names of all submodules of a package `module`. Return the canonical names of all submodules of a package `module`.
@ -198,7 +229,9 @@ Helper Functions
List of canonical submodule names. List of canonical submodule names.
.. autofunction:: mitogen.master.minimize_source (source) .. currentmodule:: mitogen.master
.. autofunction:: minimize_source (source)
Remove comments and docstrings from Python `source`, preserving line Remove comments and docstrings from Python `source`, preserving line
numbers and syntax of empty blocks. numbers and syntax of empty blocks.

Loading…
Cancel
Save