[MERGE] [0.11] Working bzr+ssh://, make "bzr serve --inet" read-only by default.
Robey Pointer
robey at lag.net
Sun Oct 1 09:59:41 BST 2006
Sorry this took me so long to notice -- I got caught up in work &
life and let email pile up for a few weeks...
On 18 Sep 2006, at 19:49, Andrew Bennetts wrote:
> John Arbash Meinel wrote:
>> The ugly hack that is StubSSHServer...
>>
>> Using 1 thread per file is how subprocess.py does I/O in
>> subprocess.py
>> (if running under windows). So I don't know that there is much
>> else we
>> can do. I know paramiko uses threads as well, so it is easily
>> possible
>> that this is the best we can do.
>
> I'm not so much bothered by the gratuitous threads (which I agree
> are the
> easiest way to do this portably) or even the way it operates on
> single bytes, as
> much as the fact I have to write it at all. I would have thought
> that paramiko
> itself would already have implemented, or at least an example of, a
> non-trivial
> check_channel_exec_request like this. But I could find no code in
> paramiko to
> help me here, which seems to be a strange lack -- surely hooking up
> a subprocess
> to a channel is a common enough use-case? I guess not.
The intent was to make an SSH channel behave exactly like a python
socket (or file, using a helper API). How do python file objects
solve this problem?
I'm willing to add code to paramiko to make this easier, if you have
an API in mind that would be generally useful.
robey
More information about the bazaar
mailing list