problems with bzr 0.10 and paramiko sftp transfer
Robey Pointer
robey at lag.net
Tue Aug 29 17:13:03 BST 2006
On 29 Aug 2006, at 4:32, Lukáš Lalinský wrote:
> Lukáš Lalinský wrote:
>> Hi,
>>
>> When I tried to run "bzr push" with bzr 0.10 and paramiko 1.6, I get:
>>
> [...]
>> AttributeError: HostKeys instance has no attribute '__setitem__'
>>
>> I upgraded to 1.6.2, where this method was added (with a comment
>> "don't use this
>> please."), but appears to be broken:
>>
> [...]
>> AttributeError: HostKeys instance has no attribute '_keys'
>>
>> So my question is, is there a known version of paramiko that works
>> with bzr 0.10?
>
> Ok, so it seems like paramiko changed the API, and nobody had
> chance to test
> adding a new host key using it :)
The API is the same, but was only introduced in paramiko 1.5.3. bzr
is using the hostkey object directly like a dict because it predates
the HostKeys object, and emulating a dict has proven to be harder
than I thought...
I actually just fixed __setitem__ yesterday, or at least fixed it in
the way that I think it was meant to work. If you use the paramiko
trunk[1] does it work there?
> The second error is obviously a paramiko bug, but still it would be
> nice to use
> the new API instead of accessing the dict-like object. There is a
> simple patch
> in the attachment to fix this.
That would break compatibility with older versions, though, which a
lot of the bzr developers are using. Since 1.6.2 (released only
about a week ago) is the first 1.6 that worked well with bzr, I think
it would be totally unfair to require 1.6 quite yet. I do have a
"paramiko 1.6" branch of bzr, though, if you're interested.[2] It's
at least a few weeks out of date right now.
robey
[1] http://www.lag.net/paramiko/bzr/paramiko/
[2] http://www.lag.net/~robey/code/bzr.dev.paramiko16/
More information about the bazaar
mailing list