-
Notifications
You must be signed in to change notification settings - Fork 15
asyncssh: loosen upper version limit #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We were using wrong typehints - SSHConnection vs SSHClientConnection. And SFTPFileProtocol.read() is typed as requiring `read` and `offset` explicitly now, which has been updated in the test.
|
|
||
| async with sftp.open("test-repo.git/refs/heads/master") as fobj: | ||
| assert (await fobj.read()).strip() == rev | ||
| assert (await fobj.read(-1, 0)).strip() == rev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SFTPFileProtocol.read requires read and offset to be passed explicitly. This is most likely a bug in typings in asyncssh, but this does not hurt us that much, so just fixing it here.
| class AsyncSSHWrapper(BaseAsyncObject): | ||
| def __init__( | ||
| self, conn: "SSHConnection", proc: "SSHClientProcess", **kwargs | ||
| self, conn: "SSHClientConnection", proc: "SSHClientProcess", **kwargs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were using incorrect type-hints. :)
| ] = _process_public_key_ok_gh | ||
|
|
||
| conn: "SSHClientConnection" = await asyncssh.connect( | ||
| conn = await asyncssh.connect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer required, since asyncssh is now typed. :)
| proc: "SSHClientProcess" = await conn.create_process( | ||
| command, encoding=None | ||
| ) | ||
| proc = await conn.create_process(command, encoding=None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer required, since asyncssh is now typed. :)
Will close #43