Mirror of mitogen
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
David Wilson f9e1905ec6 issue #199: ansible: stop writing temp files for new style modules
While adding support for non-new style module types, NewStyleRunner
began writing modules to a temporary file, and sys.argv was patched to
actually include the script filename. The argv change was never required
to fix any particular bug, and a search of the standard modules reveals
no argv users. Update argv[0] to be '', like an interactive interpreter
would have.

While fixing #210, new style runner began setting __file__ to the
temporary file path in order to allow apt.py to discover the Ansiballz
temporary directory. 5 out of 1,516 standard modules follow this
pattern, but in each case, none actually attempt to access __file__,
they just call dirname on it. Therefore do not write the contents of
file, simply set it to the path as it would exist, within a real
temporary directory.

Finally move temporary directory creation out of runner and into target.
Now a single directory exists for the duration of a run, and is emptied
by runner.py as necessary after each task invocation.

This could be further extended to stop rewriting non-new-style modules
in a with_items loop, but that's another step.

Finally the last bullet point in the documentation almost isn't a lie
again.
7 years ago
.travis tests: Disable host key checking for debops. 7 years ago
ansible_mitogen issue #199: ansible: stop writing temp files for new style modules 7 years ago
docs docs: link signals into internals.rst. 7 years ago
examples examples: import mitogen-fuse.py. 7 years ago
mitogen issue #186: initial version of subtree detachment. 7 years ago
tests issue #199: ansible: stop writing temp files for new style modules 7 years ago
.gitignore docs: fix intensely annoying _prefix, 2 years later. 7 years ago
.lgtm.yml compat: ignore LGTM checks on third party 7 years ago
.travis.yml issue #210: run DebOps under v2.5.1 too. 7 years ago
ChangeLog docs: add initial ChangeLog. 7 years ago
LICENSE Add license text everywhere. 7 years ago
README.md README: move testing bits into tests directory. 7 years ago
dev_requirements.txt tests: Add coverage as a dev requirement 7 years ago
preamble_size.py Add mitogen.service to preamble_size.py 7 years ago
run_tests issue #164: rename 'test' to 'run_tests' to avoid tab complete conflict 7 years ago
setup.cfg tests: Switch to unit2 test runner, with coverage 7 years ago
setup.py Move canonical library version to __init__.py. 7 years ago
tox.ini tests: Switch to unit2 test runner, with coverage 7 years ago

README.md