parent: python_path setting depends on local or remote

For local, we want to default to the same Python version as the current
process. For remote, we want whatever is on offer.
pull/295/head
David Wilson 6 years ago
parent db529e8228
commit 0422a8c263

@ -485,7 +485,7 @@ Router Class
:param str python_path: :param str python_path:
Path to the Python interpreter to use for bootstrap. Defaults to Path to the Python interpreter to use for bootstrap. Defaults to
``python2.7``. In future this may default to ``sys.executable``. :data:`sys.executable`. For SSH, defaults to ``python``.
:param bool debug: :param bool debug:
If :data:`True`, arrange for debug logging (:py:meth:`enable_debug`) to If :data:`True`, arrange for debug logging (:py:meth:`enable_debug`) to

@ -672,7 +672,7 @@ class Stream(mitogen.core.Stream):
Base for streams capable of starting new slaves. Base for streams capable of starting new slaves.
""" """
#: The path to the remote Python interpreter. #: The path to the remote Python interpreter.
python_path = 'python' python_path = sys.executable
#: Maximum time to wait for a connection attempt. #: Maximum time to wait for a connection attempt.
connect_timeout = 30.0 connect_timeout = 30.0

@ -103,6 +103,10 @@ class Stream(mitogen.parent.Stream):
create_child = staticmethod(mitogen.parent.hybrid_tty_create_child) create_child = staticmethod(mitogen.parent.hybrid_tty_create_child)
child_is_immediate_subprocess = False child_is_immediate_subprocess = False
#: Default to whatever is available as 'python' on the remote machine,
#: overriding sys.executable use.
python_path = 'python'
#: Number of -v invocations to pass on command line. #: Number of -v invocations to pass on command line.
ssh_debug_level = 0 ssh_debug_level = 0

Loading…
Cancel
Save