Commit Graph

438 Commits

Author SHA1 Message Date
David Wilson 09985204ad docs: with_context element is replaced by a decorator. 2017-09-29 14:14:37 +05:30
David Wilson e057d289e9 Reference Select 2017-09-29 13:42:02 +05:30
David Wilson 1b823dc0b0 Accidentally hecked in incomplete paragraph. 2017-09-29 13:41:40 +05:30
David Wilson ed329fe580 Typo. 2017-09-29 13:37:46 +05:30
David Wilson 8d8096b6d8 docs: fix :return: syntax. 2017-09-29 13:37:11 +05:30
David Wilson 3a883d79f6 More API documentation. 2017-09-29 13:34:19 +05:30
David Wilson 25963736c6 Fix function reference. 2017-09-29 13:14:43 +05:30
David Wilson 0da42a5e90 Typo. 2017-09-29 12:55:04 +05:30
David Wilson 62c9dc6f49 Better document Router API and constructors. 2017-09-29 12:53:52 +05:30
David Wilson 044bfe5f4d Sense of block= parameter was inverted. 2017-09-28 18:09:03 +05:30
David Wilson 126080019d Add mitogen.parent_ids to docs. 2017-09-28 14:57:37 +05:30
David Wilson 1a48e37981 Allow running responder_test with unittest. 2017-09-28 14:37:27 +05:30
David Wilson a5f809cbd9 Tidy up select examples even more. 2017-09-28 14:36:44 +05:30
David Wilson 05d601c315 Document channel class 2017-09-28 14:36:11 +05:30
David Wilson 89220a418a Document Sender and Receiver classes. 2017-09-28 14:14:50 +05:30
David Wilson bc482c6be8 docs: Add spacing between list items in body text. 2017-09-28 14:14:07 +05:30
David Wilson 839a1cbeb1 receiver: only permit one notify callback
There is no point spamming a list for every function call, there is no
use case where multiple notify callbacks would be useful.
2017-09-28 10:58:57 +05:30
David Wilson 39924c432f Tidy up select docs. 2017-09-28 10:49:15 +05:30
David Wilson e7bcbdd068 Remove context.key from preamble_size.py too. 2017-09-27 14:02:01 +05:30
David Wilson 9e2c74eebc importer: Don't respond to non-.py[co] imports. 2017-09-27 13:58:44 +05:30
David Wilson 031c0f3cf4 issue #20: TestCase subclass with a nicer assertRaises 2017-09-27 13:56:19 +05:30
David Wilson 9625e77f87 More concise text. 2017-09-27 13:55:49 +05:30
David Wilson af8890b31f issue #20: fix queue.get() parameter list. 2017-09-27 13:54:15 +05:30
David Wilson 6dc0e13f5f issue #20: Return type fix. 2017-09-27 13:52:05 +05:30
David Wilson 0ef26f250e Package rename cleanup. 2017-09-27 13:51:43 +05:30
David Wilson 186d823600 issue #20: tests and fixes for mitogen.master.Select(). 2017-09-27 13:47:14 +05:30
David Wilson 6869292738 issue #20: initial implementation of mitogen.master.Select(). 2017-09-26 16:56:23 +05:30
David Wilson 1bb4a32271 issue #9: log warning when a cross-sibling CALL_FUNCTION occurs
First step to making it a fatal error.
2017-09-25 14:49:58 +05:30
David Wilson 05c22909b0 issue #9: ensure messages arrive on the expected stream
If no ADD_ROUTE message has been received from the master associating a
stream with a particular context ID, then it is expected messages
originating from that context ID can only be routed via the parent.
2017-09-25 07:08:06 +05:30
David Wilson 88d01c571f Adjust get_boot_command to match _first_stage change
inspect module includes the staticmethod decorator added by
a8d1dc6730
2017-09-25 05:46:28 +05:30
David Wilson d1faf5ba1d Remove set from permitted types. 2017-09-25 05:24:58 +05:30
David Wilson 0db472c97b Fix up importer_test. 2017-09-25 05:20:50 +05:30
David Wilson 2092568e7c issue #19: whoops, implement sliding window properly 2017-09-24 16:18:53 +05:30
David Wilson 231a300649 issue #19: second attempt at import scanner
This version is based on the modulefinder standard library module,
pruned back just to handle modules we know have been loaded already, and
to scan module-level imports only, rather than imports occurring in
class and function scope (crappy heuristic, but assume they are lazy
imports).

The ast and compiler modules were far too slow, whereas this version can
bytecode compile and scan all the imports for django.db.models (58
modules) in around 200ms.. 3.4ms per dependency, it's probably not going
to get much faster than that.
2017-09-23 17:16:59 +05:30
David Wilson 55bdb50d4f Add README.md to tests subdir. 2017-09-22 23:46:35 +05:30
David Wilson 60ed8525b0 Fix inverted logic. 2017-09-22 13:39:20 +05:30
David Wilson d553295135 Syntax error. 2017-09-22 13:37:50 +05:30
David Wilson ea3404ce21 Only import compiler when necessary, it's not available in 3.x. 2017-09-22 13:35:24 +05:30
dw a8d1dc6730 Merge pull request #35 from moreati/pylint
Fix some PyLint errors
2017-09-22 02:54:04 +05:30
Alex Willmer c854bec6f6 Handle failure to import the ast module 2017-09-21 22:12:07 +01:00
David Wilson 57de31344b core: use an output deque rather than string to improve worst case perf
This probably worsens performance in the common case, but it prevents
runaway producers (see e.g. issue #36) from spending all their CPU
copying around huge strings.

It's also a small step towards a solution to issue #6, which will
replace the output buffer with some sort of fancier queue anyway.

This reduces a particular 40 second run of rsync to 1.5 seconds.
2017-09-22 02:06:19 +05:30
David Wilson 22dcbf9e48 Document Router.profiling. 2017-09-22 01:19:57 +05:30
Alex Willmer 81fe37b108 Fix stale references to m.master.connect & m.ssh.connect
I'm fairly sure these updates are correct, but I'm not able to run the
test suite to confirm.
2017-09-21 20:03:51 +01:00
Alex Willmer a8d216eeab Update lingering references to with_broker & run_with_broker
A previous commit renamed run_with_broker() and with_broker() to
run_with_router() and with_router() respctively. Some references were
missed.
2017-09-21 19:59:53 +01:00
Alex Willmer 794a8a7a07 Add missing LOG import
Fixes an undefined variable error found by pylint
2017-09-21 19:52:27 +01:00
Alex Willmer 0384e6189c Use fully qualified Context
Fixes an undefined variable error found by pylint
2017-09-21 19:50:20 +01:00
Alex Willmer 8ac45565a5 Add missing import of AnsibleError
Found with pylint
2017-09-21 19:48:50 +01:00
Alex Willmer 7245d574ef Add missing auth_incorrect_msg used to in exception message
Found using pylint
2017-09-21 19:47:14 +01:00
Alex Willmer 6b9ac07e65 Declare self-less method as static
Found using pylint
2017-09-21 19:45:50 +01:00
Alex Willmer bc4498e59e Add missing imports: ast, compiler
Found using pylint
2017-09-21 19:45:12 +01:00