From a578250bfb4adb6fdb9c73c0288a7232805b2a40 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 29 May 2018 13:05:52 +0100 Subject: [PATCH] ansible: remove indirect master.py imports. Avoids sending 10 modules: 77d76 < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'ansible_mitogen.module_finder') 79d77 < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'ansible_mitogen.services') 81,84d78 < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.compat') < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.compat.collections') < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.compat.functools') < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.compat.tokenize') 86,87d79 < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.master') < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.minify') 89,90d80 < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.select') < _send_load_module(mitogen.ssh.Stream(u'ssh.localhost'), 'mitogen.service') --- ansible_mitogen/runner.py | 1 - ansible_mitogen/target.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/ansible_mitogen/runner.py b/ansible_mitogen/runner.py index 807623f7..c9e6d53b 100644 --- a/ansible_mitogen/runner.py +++ b/ansible_mitogen/runner.py @@ -47,7 +47,6 @@ import sys import tempfile import types -import mitogen.service import ansible_mitogen.target # TODO: circular import try: diff --git a/ansible_mitogen/target.py b/ansible_mitogen/target.py index 090730d8..089e5167 100644 --- a/ansible_mitogen/target.py +++ b/ansible_mitogen/target.py @@ -50,11 +50,9 @@ import traceback import ansible.module_utils.json_utils import ansible_mitogen.runner -import ansible_mitogen.services import mitogen.core import mitogen.fork import mitogen.parent -import mitogen.service LOG = logging.getLogger(__name__)