Commit Graph

58 Commits (a8dcd53ccca0d6fffc4568bc216ddedeed610474)

Author SHA1 Message Date
Alex Willmer a8dcd53ccc first stage: Remove/dedent else block
Since the above if block ends in a call to os.execv() this block will
only ever run when the if condition was false. Hence putting it in an
else clause is unnecessary.
8 years ago
Alex Willmer 8c085d1ea6 first stage: Use string concatenation 8 years ago
Alex Willmer 0ab6faa8b8 first stage: eliminate whitespace 8 years ago
Alex Willmer 9ee1d13270 first stage: single letter variables 8 years ago
David Wilson 58e30cd117 issue #49: 2.x/3.x compatible decode.
Much uglier command line, but it works across major Python releases.
8 years ago
David Wilson cfb8a38977 Implement Alex's awesome idea of zlibbing the first stage too! Closes #49 8 years ago
David Wilson c83d86f050 importer: Delete _get_module_via_parent entirely
Can't figure out what it's supposed to do any more, and can't find a
version of Ansible before August 2016 (when I wrote that code) that
seems to need it.

Add some more mitigations to avoid sending dylibs.
8 years ago
David Wilson 8439e889ed core: More robust shutdown
Now there is a separate SHUTDOWN message that relies only on being
received by the broker thread, the main thread can be hung horribly and
the process will still eventually receive a SIGTERM.
8 years ago
David Wilson eac5daf28d Fix select_test failure, remove crap old timing_test. 8 years ago
David Wilson eb6afee514 Beginnings of module_finder_test 8 years ago
David Wilson b0e13fefdd Fix 2 call_function_test failures. 8 years ago
David Wilson 0e51aa5cd9 master: hack to avoid executing __main__. 8 years ago
David Wilson 5a71c38fdc We don't support sets, so don't use them in module loader(!) 8 years ago
David Wilson c9e3fbb483 add missing IOLOG, fixes _iter_read/SshTest. 8 years ago
David Wilson 5584dba441 master: include related modules in ModuleResponder response 8 years ago
David Wilson a18ca0f208 iter_read: also treat 0-byte read as disconnection 8 years ago
David Wilson 46c361d4e1 select: fix typo 8 years ago
David Wilson f57a12b3f9 Fix context naming for sudo and via=. 8 years ago
David Wilson 3a883d79f6 More API documentation. 8 years ago
David Wilson 62c9dc6f49 Better document Router API and constructors. 8 years ago
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.
8 years ago
David Wilson 9e2c74eebc importer: Don't respond to non-.py[co] imports. 8 years ago
David Wilson 186d823600 issue #20: tests and fixes for mitogen.master.Select(). 8 years ago
David Wilson 6869292738 issue #20: initial implementation of mitogen.master.Select(). 8 years ago
David Wilson 1bb4a32271 issue #9: log warning when a cross-sibling CALL_FUNCTION occurs
First step to making it a fatal error.
8 years ago
David Wilson 88d01c571f Adjust get_boot_command to match _first_stage change
inspect module includes the staticmethod decorator added by
a8d1dc6730
8 years ago
David Wilson 2092568e7c issue #19: whoops, implement sliding window properly 8 years ago
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.
8 years ago
David Wilson 60ed8525b0 Fix inverted logic. 8 years ago
David Wilson ea3404ce21 Only import compiler when necessary, it's not available in 3.x. 8 years ago
dw a8d1dc6730 Merge pull request #35 from moreati/pylint
Fix some PyLint errors
8 years ago
Alex Willmer c854bec6f6 Handle failure to import the ast module 8 years ago
David Wilson 22dcbf9e48 Document Router.profiling. 8 years ago
Alex Willmer 6b9ac07e65 Declare self-less method as static
Found using pylint
8 years ago
Alex Willmer bc4498e59e Add missing imports: ast, compiler
Found using pylint
8 years ago
David Wilson df1dc41d4f Remove final vestiges of context.key. 8 years ago
David Wilson 3e4cb308d5 core: Support profiling 8 years ago
David Wilson 1ed8bb6924 Document a bunch of mitogen.master and move more docstrings into Sphinx. 8 years ago
David Wilson 5fc59f72cb master: propagate routes for IDs allocated via ALLOCATE_ID
needed for inter-child rsync.
8 years ago
David Wilson 3eda5ec671 core: remove pointless eval() of ARGV0 environment variable. 8 years ago
David Wilson 729356b5f0 master: make write_all() handle O_NONBLOCK and deadlines. 8 years ago
David Wilson be2264f4c1 master: send_await() always unpickles now. 8 years ago
David Wilson 16950a1620 core: Make iter_read() handle deadline (and non-blocking IO) properly 8 years ago
David Wilson 91d766ec81 core: Generalize/duplicate the call/send_await code using Receiver. 8 years ago
David Wilson 4ff1d4e523 master: use decorators rather than call_with_deadline(with_context=..) 8 years ago
David Wilson b7f5bd82bc Replace `with_context` parameter with mitogen.core.takes_econtext decorator 8 years ago
David Wilson d84b4bf72a Keep allocate_id() in the enhanced router class. 8 years ago
David Wilson f3cdb4e050 Fix format string. 8 years ago
David Wilson 491b5ab575 core: add ALLOCATE_ID message for fakessh. 8 years ago
David Wilson 6cfcd6c2c8 Fix proxy connection: pickling changes broke it. 8 years ago