-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add limits property to SFTPClient and update documentation
This commit exposes the SFTPLimits class and allows SFTP clients to query the limits advertised by a server. It also updates the documentation to reflect that the max read and write lengths will be chosen by default when connecting to servers that advertise these limits.
- Loading branch information
Showing
4 changed files
with
55 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3726,8 +3726,10 @@ async def _send_zero_read_write_len(self, packet): | |
{b'[email protected]': _send_zero_read_write_len}): | ||
async with self.connect() as conn: | ||
async with conn.start_sftp_client() as sftp: | ||
self.assertEqual(sftp.max_read_len, SAFE_SFTP_READ_LEN) | ||
self.assertEqual(sftp.max_write_len, SAFE_SFTP_WRITE_LEN) | ||
self.assertEqual(sftp.limits.max_read_len, | ||
SAFE_SFTP_READ_LEN) | ||
self.assertEqual(sftp.limits.max_write_len, | ||
SAFE_SFTP_WRITE_LEN) | ||
|
||
def test_write_close(self): | ||
"""Test session cleanup in the middle of a write request""" | ||
|