Commit Graph

34 Commits

Author SHA1 Message Date
David Wilson 8891fda48a docs: getting_started typo 2018-10-26 09:09:54 +00:00
Alex Willmer bf34b383eb docs: Disambiguate references to Context
This addresses an error found while running tox -edocs

Warning, treated as error:
mitogen/docs/api.rst:469:more than one target found for cross-reference
u'Context': mitogen.core.Context, mitogen.parent.Context
2018-10-03 00:22:18 +01:00
David Wilson c5ea7c45a1 comments/docs: correct mitogen.master.Context -> mitogen.parent.Context. 2018-07-23 19:11:23 -07:00
David Wilson 0eb77b5f7c utils: always enable microsecond logging.
It's too useful, and the logs are fairly out of control already, may as
well just capture everything in the first pass.
2018-07-07 14:55:47 +01:00
David Wilson 410016ff47 Initial Python 3.x port work.
* ansible: use unicode_literals everywhere since it only needs to be
  compatible back to 2.6.
* compat/collections.py: delete this entirely and rip out the parts of
  functools that require it.
* Introduce serializable Kwargs dict subclass that translates keys to
  Unicode on instantiation.
* enable_debug_logging() must set _v/_vv globals.
* cStringIO does not exist in 3.x.
* Treat IOLogger and LogForwarder input as latin-1.
* Avoid ResourceWarnings in first stage by explicitly closing fps.
* Fix preamble_size.py syntax errors.
2018-07-07 14:55:47 +01:00
David Wilson 7162c13e05 docs: add more notes for getting_started.rst 2018-05-29 17:30:49 +01:00
David Wilson 61365236ad docs/select: fix up more references, fix headings. 2018-05-25 04:47:59 +01:00
David Wilson cecef992b0 issue #218: core: add Secret and Blob types. 2018-05-04 21:34:11 +01:00
David Wilson 8fc1eac6ae utils: combine MITOGEN_LOG_LEVEL and MITOGEN_LOG_IO.
Saves lots of readline fiddling.
2018-05-02 20:35:17 +01:00
David Wilson 6fb3a76e68 master: annotate LogForwarder messages.
mitogen/master.py:
    Annotate forwarded log entries with their original source, logger
    name, and message.

ansible:
    mark stderr in red with -vvv

    Tempting to make this appaer 100% of the time, but some crappy
    bashrcs may cause lots of junk to be printed.
2018-04-27 03:11:06 +01:00
David Wilson 7c88e4d013 Move _DEAD into header, autogenerate dead messages
This change blocks off 2 common scenarios where a race condition is
upgraded to a hang, when the library could internally do better.

* Since we don't know whether the receiver of a `reply_to` is expecting
  a raw or pickled message, and since in the case of a raw reply, there
  is no way to signal "dead" to the receiver, override the reply_to
  field to explicitly mark a message as dead using a special handle.

  This replaces the serialized _DEAD sentinel value with a slightly
  neater interface, in the form of the reserved IS_DEAD handle, and
  enables an important subsequent change: when a context cannot route a
  message, it can send a generic 'dead' reply back towards the message
  source, ensuring any sleeping thread is woken with ChannelError.

  The use of this field could potentially be extended later on if
  additional flags are needed, but for now this seems to suffice.

* Teach Router._invoke() to reply with a dead message when it receives a
  message for an invalid local handle.

* Teach Router._async_route() to reply with a dead message when it
  receives an unroutable message.
2018-04-22 00:17:27 +01:00
David Wilson 6958b8ff09 docs: More getting started. 2018-03-30 13:05:47 +05:45
David Wilson bbb0f1bbd8 issue #155: fix double-fork behaviour and test it this time. 2018-03-29 23:57:24 +05:45
David Wilson b48d63f33b docs: add to_sender() and update serialization notes 2018-03-29 15:38:44 +05:45
David Wilson 732a610246 docs: add beginnings of section on func decorators 2018-03-23 09:31:29 +05:45
David Wilson 91116810a1 ansible: delete utils.py and promote cast() to mitogen.utils 2018-03-19 21:58:30 +05:45
David Wilson 18eaf14dca ansible: migrate logging variables into utils. 2018-03-19 21:58:30 +05:45
Alex Willmer eb1ad66469 docs: Fix out of date get_data() snippets
As of adc8fe3aed Receiver objects do not
have a get_data() method and Receiver.get() does not unpickle the
message.
2018-03-19 21:58:29 +05:45
David Wilson 58102c8179 docs: waiting on multiple calls 2018-03-19 21:58:27 +05:45
David Wilson fb759f7c16 docs: move Broker docstrings into Sphinx. 2018-03-19 21:58:27 +05:45
David Wilson ac7cada323 docs: more getting started guide 2018-03-19 21:58:27 +05:45
David Wilson ffa063cc01 docs: annother barriage of cross-reference fixes. 2018-03-19 21:58:25 +05:45
David Wilson b3bd075d37 docs: getting started 2018-03-19 21:35:38 +05:45
David Wilson 792e789908 More. 2018-03-19 21:35:37 +05:45
David Wilson c15d227da4 docs: way more appropriate image 2018-03-19 21:35:37 +05:45
David Wilson b94e7b3678 docs: more getting started 2018-03-19 21:35:37 +05:45
David Wilson 709b38c36e docs: Getting started tidyups 2018-03-19 21:35:37 +05:45
David Wilson dcc45bc7de docs: Get started on Getting Started 2018-03-19 21:35:37 +05:45
David Wilson f1d82c7284 More API documentation. 2018-03-19 21:35:36 +05:45
David Wilson 0565784164 Package rename cleanup. 2018-03-19 21:35:36 +05:45
David Wilson abfa85d7da Remove set from permitted types. 2018-03-19 21:35:36 +05:45
David Wilson 092bbef0b3 Reorder table of contents. 2018-03-19 21:35:35 +05:45
David Wilson caa1fde4fb Add serialization rules section. 2018-03-19 21:35:35 +05:45
David Wilson e7ff6259a3 Initial commit. 2018-03-19 21:35:13 +05:45