[RFC] bzr+ssh without paramiko
Martin Pool
mbp at canonical.com
Fri Nov 3 04:22:26 GMT 2006
On 31 Oct 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Theoretically, we don't need paramiko if we have an ssh process that we
> can spawn.
>
> The attached patch changes bzrlib/transport/ssh.py so that if paramiko
> isn't present, it still tries to run.
>
> In simple testing bzr+ssh:// does work.
+1
> I marked this as RFC, because I'm not sure if this is too hackish of a
> fix. Also, I'm not sure how to test this, because it is very environment
> dependent. (You need to not have paramiko installed or it would get
> imported).
It's slightly hacky perhaps but it is a useful improvement; there's no good
reason to require paramiko to use bzr+ssh.
I can't think of a good way to test it within a bzr selftest run, but it can
be done outside - I set PYTHONPATH to something that contains a paramiko.py
that throws an ImportError, simulating a machine without it. We could
possibly do this on the pqm machine, and then re-run the sftp and ssh tests,
i.e.
check:
...
PYTHONPATH=./misc/disable_paramiko:$PYTHONPATH ./bzr selftest sftp ssh
which would catch some other occasional errors.
> Also, things may not fail as nicely as they could when paramiko isn't
> installed. sftp.py still gives the same exception, though. So it
> shouldn't effect those things.
To confirm: sftp urls will still fail reasonably if you have ssh but not
paramiko?
--
Martin
More information about the bazaar
mailing list