Skip to content

Commit 0a14954

Browse files
committed
Removed deprecated async sftp functions and definitions. Updated sftp tests
1 parent 87a0b44 commit 0a14954

File tree

19 files changed

+7793
-8292
lines changed

19 files changed

+7793
-8292
lines changed

ci/integration_tests/test_sftp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ def test_sftp_dir(self):
6060
sftp = self.session.sftp_new()
6161
sftp.init()
6262
_dir = sftp.opendir('.')
63+
self.assertFalse(_dir.closed)
6364
self.assertIsInstance(_dir, SFTPDir)
6465
self.assertFalse(_dir.eof())
6566
self.assertEqual(_dir.closedir(), 0)
67+
self.assertTrue(_dir.closed)
6668
# dir handle from context manager
6769
with sftp.opendir('.') as _dir:
6870
for attr in _dir:
@@ -108,6 +110,7 @@ def test_sftp_file_read(self):
108110
try:
109111
with sftp.open(remote_filename, os.O_RDONLY, 0) as remote_fh:
110112
self.assertIsInstance(remote_fh, SFTPFile)
113+
self.assertFalse(remote_fh.closed)
111114
remote_data = b""
112115
for rc, data in remote_fh:
113116
remote_data += data

ssh/c_sftp.pxd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ cdef extern from "libssh/sftp.h" nogil:
162162
void sftp_file_set_nonblocking(sftp_file handle)
163163
void sftp_file_set_blocking(sftp_file handle)
164164
ssize_t sftp_read(sftp_file file, void *buf, size_t count)
165-
int sftp_async_read_begin(sftp_file file, uint32_t len)
166-
int sftp_async_read(sftp_file file, void *data, uint32_t len, uint32_t id)
167165
ssize_t sftp_write(sftp_file file, const void *buf, size_t count)
168166
int sftp_seek(sftp_file file, uint32_t new_offset)
169167
int sftp_seek64(sftp_file file, uint64_t new_offset)

0 commit comments

Comments
 (0)