diff --git a/Changelog.rst b/Changelog.rst index 36aa6a26..79ebe044 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -18,6 +18,9 @@ Changes via the remote host to a third party. * Added new `libssh2` error codes under `ssh2.error_codes`, equivalent Python exceptions under `ssh2.exceptions` and updated error code handling for all functions. +* Removed deprecated `libssh2` `ssh2.channel.Channel` functions `receive_window_adjust`, `handle_extended_data` + and `ignore_extended_data`. +* Removed deprecated `libssh2` `ssh2.session.Session` functions `startup`, `scp_recv` and `scp_send`. Packaging diff --git a/ci/integration_tests/test_session.py b/ci/integration_tests/test_session.py index f1818922..88382540 100644 --- a/ci/integration_tests/test_session.py +++ b/ci/integration_tests/test_session.py @@ -1,7 +1,6 @@ from unittest.mock import MagicMock import os import socket -from unittest import skipUnless from ssh2.channel import Channel from ssh2.error_codes import LIBSSH2_ERROR_EAGAIN @@ -104,8 +103,6 @@ def test_failed_pkey_auth(self): self.user, 'EVEN MORE FAKE FILE', publickey='FAKE FILE') - @skipUnless(hasattr(Session, 'scp_recv2'), - "Function not supported by libssh2") def test_scp_recv2(self): self.assertEqual(self._auth(), 0) test_data = b"data" @@ -132,66 +129,6 @@ def test_scp_recv2(self): os.unlink(remote_filename) self.assertRaises(SCPProtocolError, self.session.scp_recv2, remote_filename) - def test_scp_recv(self): - self.assertEqual(self._auth(), 0) - test_data = b"data" - remote_filename = os.sep.join([os.path.dirname(__file__), - "remote_test_file"]) - with open(remote_filename, 'wb') as fh: - fh.write(test_data) - try: - (file_chan, fileinfo) = self.session.scp_recv(remote_filename) - except TypeError: - os.unlink(remote_filename) - raise - try: - total = 0 - size, data = file_chan.read(size=fileinfo.st_size) - total += size - while total < fileinfo.st_size: - total += size - size, data = file_chan.read() - self.assertEqual(total, fileinfo.st_size) - except Exception: - raise - finally: - os.unlink(remote_filename) - self.assertRaises(SCPProtocolError, self.session.scp_recv, remote_filename) - - def test_scp_send(self): - self.assertEqual(self._auth(), 0) - test_data = b"data" - remote_filename = os.sep.join([os.path.dirname(__file__), - "remote_test_file"]) - to_copy = os.sep.join([os.path.dirname(__file__), - "copied"]) - with open(remote_filename, 'wb') as fh: - fh.write(test_data) - fileinfo = os.stat(remote_filename) - try: - chan = self.session.scp_send( - to_copy, fileinfo.st_mode & 777, fileinfo.st_size) - with open(remote_filename, 'rb') as local_fh: - for data in local_fh: - chan.write(data) - chan.send_eof() - chan.wait_eof() - chan.wait_closed() - self.assertEqual(os.stat(to_copy).st_size, - os.stat(remote_filename).st_size) - except Exception: - raise - finally: - os.unlink(remote_filename) - try: - os.unlink(to_copy) - except OSError: - pass - self.assertRaises(SCPProtocolError, self.session.scp_send, - '/cannot_write', 1 & 777, 1) - - @skipUnless(hasattr(Session, 'scp_send64'), - "Function not supported by libssh2") def test_scp_send64(self): self.assertEqual(self._auth(), 0) test_data = b"data" diff --git a/ssh2/c_ssh2.pxd b/ssh2/c_ssh2.pxd index de702b53..238640b9 100644 --- a/ssh2/c_ssh2.pxd +++ b/ssh2/c_ssh2.pxd @@ -103,7 +103,6 @@ cdef extern from "libssh2.h" nogil: const char *banner) int libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner) - int libssh2_session_startup(LIBSSH2_SESSION *session, int sock) int libssh2_session_handshake(LIBSSH2_SESSION *session, libssh2_socket_t sock) int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session, @@ -288,10 +287,6 @@ cdef extern from "libssh2.h" nogil: unsigned long *read_avail, unsigned long *window_size_initial) unsigned long libssh2_channel_window_read(LIBSSH2_CHANNEL *channel) - unsigned long \ - libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL *channel, - unsigned long adjustment, - unsigned char force) int \ libssh2_channel_receive_window_adjust2(LIBSSH2_CHANNEL *channel, unsigned long adjustment, @@ -316,12 +311,8 @@ cdef extern from "libssh2.h" nogil: void libssh2_session_set_timeout(LIBSSH2_SESSION* session, long timeout) long libssh2_session_get_timeout(LIBSSH2_SESSION* session) - void libssh2_channel_handle_extended_data(LIBSSH2_CHANNEL *channel, - int ignore_mode) int libssh2_channel_handle_extended_data2(LIBSSH2_CHANNEL *channel, int ignore_mode) - int libssh2_channel_ignore_extended_data(LIBSSH2_CHANNEL *channel, - int ignore) int libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel, int streamid) int libssh2_channel_flush(LIBSSH2_CHANNEL *channel) @@ -342,10 +333,6 @@ cdef extern from "libssh2.h" nogil: int libssh2_channel_free(LIBSSH2_CHANNEL *channel) int libssh2_channel_signal_ex(LIBSSH2_CHANNEL *channel, const char *signame, size_t signame_len) - # libssh2_scp_recv is DEPRECATED, do not use! - LIBSSH2_CHANNEL *libssh2_scp_recv(LIBSSH2_SESSION *session, - const char *path, - struct_stat *sb) # Use libssh2_scp_recv2 for large (> 2GB) file support on windows LIBSSH2_CHANNEL *libssh2_scp_recv2(LIBSSH2_SESSION *session, const char *path, @@ -357,10 +344,6 @@ cdef extern from "libssh2.h" nogil: LIBSSH2_CHANNEL *libssh2_scp_send64( LIBSSH2_SESSION *session, const char *path, int mode, libssh2_int64_t size, time_t mtime, time_t atime) - LIBSSH2_CHANNEL *libssh2_scp_send( - LIBSSH2_SESSION *session, - const char *path, int mode, - libssh2_int64_t size) int libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, unsigned int *dest_len, const char *src, unsigned int src_len) diff --git a/ssh2/channel.c b/ssh2/channel.c index f89d66ee..6afa7df9 100644 --- a/ssh2/channel.c +++ b/ssh2/channel.c @@ -2463,7 +2463,6 @@ static const char __pyx_k_A_0_Q_2[] = "\200A\360\024\000\016\017\330\014\027\320 static const char __pyx_k_A_31D_2[] = "\200A\340\r\016\330\014\027\320\0273\2601\260D\270\001\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_A_4AT_2[] = "\200A\340\r\016\330\014\027\320\0274\260A\260T\270\021\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_A_7q_Kq[] = "\200A\340\r\016\330\014\027\320\0277\260q\330\020\024\220K\230q\240\001\330\010\017\320\017!\240\021\240!"; -static const char __pyx_k_A_Q_K_1[] = "\200A\360\006\000\016\017\330\014\027\320\027=\270Q\330\020\024\220K\230|\2501\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_Channel[] = "Channel"; static const char __pyx_k_a_t81_q[] = "\320\004&\240a\360\020\000\t\020\210t\2208\2301\330\014\021\220\026\320\027'\240q"; static const char __pyx_k_b_value[] = "b_value"; @@ -2492,7 +2491,6 @@ static const char __pyx_k_set_name[] = "__set_name__"; static const char __pyx_k_setstate[] = "__setstate__"; static const char __pyx_k_wait_eof[] = "wait_eof"; static const char __pyx_k_write_ex[] = "write_ex"; -static const char __pyx_k_A_7q_Kq_2[] = "\200A\340\r\016\330\0227\260q\330\020\024\220K\230q"; static const char __pyx_k_A_a_K_7_1[] = "\200A\360\006\000\t)\250\001\330\r\016\330\014\027\320\027>\270a\330\020\024\220K\230|\2507\260!\2601\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_b_command[] = "b_command"; @@ -2590,10 +2588,7 @@ static const char __pyx_k_window_size_initial[] = "window_size_initial"; static const char __pyx_k_Channel_flush_stderr[] = "Channel.flush_stderr"; static const char __pyx_k_Channel_window_write[] = "Channel.window_write"; static const char __pyx_k_Channel_write_stderr[] = "Channel.write_stderr"; -static const char __pyx_k_handle_extended_data[] = "handle_extended_data"; -static const char __pyx_k_ignore_extended_data[] = "ignore_extended_data"; static const char __pyx_k_handle_extended_data2[] = "handle_extended_data2"; -static const char __pyx_k_receive_window_adjust[] = "receive_window_adjust"; static const char __pyx_k_Channel_window_read_ex[] = "Channel.window_read_ex"; static const char __pyx_k_receive_window_adjust2[] = "receive_window_adjust2"; static const char __pyx_k_Channel___reduce_cython[] = "Channel.__reduce_cython__"; @@ -2604,11 +2599,8 @@ static const char __pyx_k_Channel_window_write_ex[] = "Channel.window_write_ex"; static const char __pyx_k_Channel___setstate_cython[] = "Channel.__setstate_cython__"; static const char __pyx_k_Channel_poll_channel_read[] = "Channel.poll_channel_read"; static const char __pyx_k_Channel_request_auth_agent[] = "Channel.request_auth_agent"; -static const char __pyx_k_Channel_handle_extended_data[] = "Channel.handle_extended_data"; -static const char __pyx_k_Channel_ignore_extended_data[] = "Channel.ignore_extended_data"; static const char __pyx_k_6a_86_aq_uCq_q_K_s_A_d_A_1_t1[] = "\320\004\"\320\"6\260a\360\026\000\t\032\230\021\360\006\000\016\017\330\014\023\2208\2306\240\021\240,\250a\250q\330\014\017\210u\220C\220q\330\025\026\330\024\025\330\014\027\320\027/\250q\330\020\024\220K\230{\250&\260\001\330\010\t\330\014\017\210s\220\"\220A\330\020\026\220d\230\"\230A\340\014\020\220\001\220\021\330\010\032\230!\2301\330\010\017\210t\2201"; static const char __pyx_k_Channel_handle_extended_data2[] = "Channel.handle_extended_data2"; -static const char __pyx_k_Channel_receive_window_adjust[] = "Channel.receive_window_adjust"; static const char __pyx_k_q_xq_q_a_a_Cq_A_87_q_Cq_7q_Kz[] = "\320\004/\250q\360\030\000\t \230x\240q\250\001\330\010\037\230q\330\010\036\230a\330\010\036\230a\330\010\034\230C\230q\240\001\330\010\034\230A\330\010\013\2108\2207\230!\330\014\030\230\010\240\001\240\021\330\014\027\220q\330\014\024\220C\220q\230\001\340\r\016\330\014\027\320\0277\260q\330\020\024\220K\230z\250\027\260\n\270!\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_Channel_receive_window_adjust2[] = "Channel.receive_window_adjust2"; static const char __pyx_k_A2_81A_Cq_1_A_1_6_3b_c_1_M_1_t1[] = "\200A\3602\000\t\034\2308\2401\240A\330\010 \240\001\330\010$\240C\240q\250\001\330\010#\2401\340\010$\240A\330\r\016\330\014\022\220.\240\002\240!\330\020\033\320\0331\260\021\330\024\030\230\013\2406\250\021\330\020\023\2203\220b\230\002\230$\230c\240\031\250!\340\031\032\330\030\037\320\0371\260\021\260!\330\025\030\230\t\240\021\330\024\025\330\020\030\230\001\330\020!\240\021\330\014\034\230M\250\022\2501\330\010\017\210t\2201"; @@ -2643,22 +2635,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_40window_read_ex(struct __pyx_ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_42window_read(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_44window_write_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_window_size_initial); /* proto */ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_46window_write(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_stream_id, PyObject *__pyx_v_buf); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_screen_number); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_single_connection, char const *__pyx_v_auth_proto, char const *__pyx_v_auth_cookie, int __pyx_v_screen_number); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_request, PyObject *__pyx_v_message); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_extended); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_66handle_extended_data(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_70ignore_extended_data(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_signame); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_76__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_78__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50write(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_stream_id, PyObject *__pyx_v_buf); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_stderr(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56x11_req(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_screen_number); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_single_connection, char const *__pyx_v_auth_proto, char const *__pyx_v_auth_cookie, int __pyx_v_screen_number); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60process_startup(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_request, PyObject *__pyx_v_message); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62poll_channel_read(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_extended); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64handle_extended_data2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_66request_auth_agent(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68signal(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_signame); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_70__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_4ssh2_7channel_Channel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ /* #### Code section: late_includes ### */ /* #### Code section: module_state ### */ @@ -2706,8 +2695,8 @@ typedef struct { PyTypeObject *__pyx_ptype_4ssh2_7channel_Channel; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; PyObject *__pyx_tuple[4]; - PyObject *__pyx_codeobj_tab[38]; - PyObject *__pyx_string_tab[172]; + PyObject *__pyx_codeobj_tab[35]; + PyObject *__pyx_string_tab[166]; PyObject *__pyx_int_0; PyObject *__pyx_int_1024; /* #### Code section: module_state_contents ### */ @@ -2760,165 +2749,159 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_Channel_flush_stderr __pyx_string_tab[10] #define __pyx_n_u_Channel_get_exit_signal __pyx_string_tab[11] #define __pyx_n_u_Channel_get_exit_status __pyx_string_tab[12] -#define __pyx_n_u_Channel_handle_extended_data __pyx_string_tab[13] -#define __pyx_n_u_Channel_handle_extended_data2 __pyx_string_tab[14] -#define __pyx_n_u_Channel_ignore_extended_data __pyx_string_tab[15] -#define __pyx_n_u_Channel_poll_channel_read __pyx_string_tab[16] -#define __pyx_n_u_Channel_process_startup __pyx_string_tab[17] -#define __pyx_n_u_Channel_pty __pyx_string_tab[18] -#define __pyx_n_u_Channel_read __pyx_string_tab[19] -#define __pyx_n_u_Channel_read_ex __pyx_string_tab[20] -#define __pyx_n_u_Channel_read_stderr __pyx_string_tab[21] -#define __pyx_n_u_Channel_receive_window_adjust __pyx_string_tab[22] -#define __pyx_n_u_Channel_receive_window_adjust2 __pyx_string_tab[23] -#define __pyx_n_u_Channel_request_auth_agent __pyx_string_tab[24] -#define __pyx_n_u_Channel_send_eof __pyx_string_tab[25] -#define __pyx_n_u_Channel_setenv __pyx_string_tab[26] -#define __pyx_n_u_Channel_shell __pyx_string_tab[27] -#define __pyx_n_u_Channel_signal __pyx_string_tab[28] -#define __pyx_n_u_Channel_subsystem __pyx_string_tab[29] -#define __pyx_n_u_Channel_wait_closed __pyx_string_tab[30] -#define __pyx_n_u_Channel_wait_eof __pyx_string_tab[31] -#define __pyx_n_u_Channel_window_read __pyx_string_tab[32] -#define __pyx_n_u_Channel_window_read_ex __pyx_string_tab[33] -#define __pyx_n_u_Channel_window_write __pyx_string_tab[34] -#define __pyx_n_u_Channel_window_write_ex __pyx_string_tab[35] -#define __pyx_n_u_Channel_write __pyx_string_tab[36] -#define __pyx_n_u_Channel_write_ex __pyx_string_tab[37] -#define __pyx_n_u_Channel_write_stderr __pyx_string_tab[38] -#define __pyx_n_u_Channel_x11_req __pyx_string_tab[39] -#define __pyx_n_u_Channel_x11_req_ex __pyx_string_tab[40] -#define __pyx_n_u_MemoryError __pyx_string_tab[41] -#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[42] -#define __pyx_n_u_TypeError __pyx_string_tab[43] -#define __pyx_kp_u__2 __pyx_string_tab[44] -#define __pyx_kp_u__3 __pyx_string_tab[45] -#define __pyx_kp_u_add_note __pyx_string_tab[46] -#define __pyx_n_u_adjustment __pyx_string_tab[47] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[48] -#define __pyx_n_u_auth_cookie __pyx_string_tab[49] -#define __pyx_n_u_auth_proto __pyx_string_tab[50] -#define __pyx_n_u_b_buf __pyx_string_tab[51] -#define __pyx_n_u_b_command __pyx_string_tab[52] -#define __pyx_n_u_b_message __pyx_string_tab[53] -#define __pyx_n_u_b_request __pyx_string_tab[54] -#define __pyx_n_u_b_signame __pyx_string_tab[55] -#define __pyx_n_u_b_subsystem __pyx_string_tab[56] -#define __pyx_n_u_b_term __pyx_string_tab[57] -#define __pyx_n_u_b_value __pyx_string_tab[58] -#define __pyx_n_u_b_varname __pyx_string_tab[59] -#define __pyx_n_u_buf __pyx_string_tab[60] -#define __pyx_n_u_buf_2 __pyx_string_tab[61] -#define __pyx_n_u_buf_remainder __pyx_string_tab[62] -#define __pyx_n_u_buf_tot_size __pyx_string_tab[63] -#define __pyx_n_u_bytes_written __pyx_string_tab[64] -#define __pyx_n_u_c_signame __pyx_string_tab[65] -#define __pyx_n_u_cbuf __pyx_string_tab[66] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[67] -#define __pyx_n_u_close __pyx_string_tab[68] -#define __pyx_n_u_command __pyx_string_tab[69] -#define __pyx_n_u_command_2 __pyx_string_tab[70] -#define __pyx_kp_u_disable __pyx_string_tab[71] -#define __pyx_kp_u_enable __pyx_string_tab[72] -#define __pyx_n_u_eof __pyx_string_tab[73] -#define __pyx_n_u_errmsg __pyx_string_tab[74] -#define __pyx_n_u_errmsg_len __pyx_string_tab[75] -#define __pyx_n_u_exceptions __pyx_string_tab[76] -#define __pyx_n_u_execute __pyx_string_tab[77] -#define __pyx_n_u_exitsignal __pyx_string_tab[78] -#define __pyx_n_u_exitsignal_len __pyx_string_tab[79] -#define __pyx_n_u_extended __pyx_string_tab[80] -#define __pyx_n_u_flush __pyx_string_tab[81] -#define __pyx_n_u_flush_ex __pyx_string_tab[82] -#define __pyx_n_u_flush_stderr __pyx_string_tab[83] -#define __pyx_n_u_force __pyx_string_tab[84] -#define __pyx_n_u_func __pyx_string_tab[85] -#define __pyx_kp_u_gc __pyx_string_tab[86] -#define __pyx_n_u_get_exit_signal __pyx_string_tab[87] -#define __pyx_n_u_get_exit_status __pyx_string_tab[88] -#define __pyx_n_u_getstate __pyx_string_tab[89] -#define __pyx_n_u_handle_extended_data __pyx_string_tab[90] -#define __pyx_n_u_handle_extended_data2 __pyx_string_tab[91] -#define __pyx_n_u_ignore_extended_data __pyx_string_tab[92] -#define __pyx_n_u_ignore_mode __pyx_string_tab[93] -#define __pyx_n_u_is_coroutine __pyx_string_tab[94] -#define __pyx_kp_u_isenabled __pyx_string_tab[95] -#define __pyx_n_u_langtag __pyx_string_tab[96] -#define __pyx_n_u_langtag_len __pyx_string_tab[97] -#define __pyx_n_u_m_len __pyx_string_tab[98] -#define __pyx_n_u_main __pyx_string_tab[99] -#define __pyx_n_u_message __pyx_string_tab[100] -#define __pyx_n_u_message_2 __pyx_string_tab[101] -#define __pyx_n_u_module __pyx_string_tab[102] -#define __pyx_n_u_name __pyx_string_tab[103] -#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[104] -#define __pyx_n_u_poll_channel_read __pyx_string_tab[105] -#define __pyx_n_u_pop __pyx_string_tab[106] -#define __pyx_n_u_process_startup __pyx_string_tab[107] -#define __pyx_n_u_pty __pyx_string_tab[108] -#define __pyx_n_u_py_errlen __pyx_string_tab[109] -#define __pyx_n_u_py_errmsg __pyx_string_tab[110] -#define __pyx_n_u_py_exitsignal __pyx_string_tab[111] -#define __pyx_n_u_py_langlen __pyx_string_tab[112] -#define __pyx_n_u_py_langtag __pyx_string_tab[113] -#define __pyx_n_u_py_siglen __pyx_string_tab[114] -#define __pyx_n_u_pyx_state __pyx_string_tab[115] -#define __pyx_n_u_qualname __pyx_string_tab[116] -#define __pyx_n_u_r_len __pyx_string_tab[117] -#define __pyx_n_u_rc __pyx_string_tab[118] -#define __pyx_n_u_read __pyx_string_tab[119] -#define __pyx_n_u_read_avail __pyx_string_tab[120] -#define __pyx_n_u_read_ex __pyx_string_tab[121] -#define __pyx_n_u_read_stderr __pyx_string_tab[122] -#define __pyx_n_u_receive_window_adjust __pyx_string_tab[123] -#define __pyx_n_u_receive_window_adjust2 __pyx_string_tab[124] -#define __pyx_n_u_reduce __pyx_string_tab[125] -#define __pyx_n_u_reduce_cython __pyx_string_tab[126] -#define __pyx_n_u_reduce_ex __pyx_string_tab[127] -#define __pyx_n_u_request __pyx_string_tab[128] -#define __pyx_n_u_request_2 __pyx_string_tab[129] -#define __pyx_n_u_request_auth_agent __pyx_string_tab[130] -#define __pyx_n_u_screen_number __pyx_string_tab[131] -#define __pyx_n_u_self __pyx_string_tab[132] -#define __pyx_n_u_send_eof __pyx_string_tab[133] -#define __pyx_n_u_session __pyx_string_tab[134] -#define __pyx_n_u_set_name __pyx_string_tab[135] -#define __pyx_n_u_setenv __pyx_string_tab[136] -#define __pyx_n_u_setstate __pyx_string_tab[137] -#define __pyx_n_u_setstate_cython __pyx_string_tab[138] -#define __pyx_n_u_shell __pyx_string_tab[139] -#define __pyx_n_u_signal __pyx_string_tab[140] -#define __pyx_n_u_signame __pyx_string_tab[141] -#define __pyx_n_u_signame_len __pyx_string_tab[142] -#define __pyx_n_u_single_connection __pyx_string_tab[143] -#define __pyx_n_u_size __pyx_string_tab[144] -#define __pyx_n_u_ssh2_channel __pyx_string_tab[145] -#define __pyx_kp_u_ssh2_channel_pyx __pyx_string_tab[146] -#define __pyx_n_u_storewindow __pyx_string_tab[147] -#define __pyx_n_u_stream_id __pyx_string_tab[148] -#define __pyx_kp_u_stringsource __pyx_string_tab[149] -#define __pyx_n_u_subsystem __pyx_string_tab[150] -#define __pyx_n_u_subsystem_2 __pyx_string_tab[151] -#define __pyx_n_u_term __pyx_string_tab[152] -#define __pyx_n_u_term_2 __pyx_string_tab[153] -#define __pyx_n_u_test __pyx_string_tab[154] -#define __pyx_n_u_value __pyx_string_tab[155] -#define __pyx_n_u_value_2 __pyx_string_tab[156] -#define __pyx_n_u_varname __pyx_string_tab[157] -#define __pyx_n_u_varname_2 __pyx_string_tab[158] -#define __pyx_n_u_vt100 __pyx_string_tab[159] -#define __pyx_n_u_wait_closed __pyx_string_tab[160] -#define __pyx_n_u_wait_eof __pyx_string_tab[161] -#define __pyx_n_u_window_read __pyx_string_tab[162] -#define __pyx_n_u_window_read_ex __pyx_string_tab[163] -#define __pyx_n_u_window_size_initial __pyx_string_tab[164] -#define __pyx_n_u_window_write __pyx_string_tab[165] -#define __pyx_n_u_window_write_ex __pyx_string_tab[166] -#define __pyx_n_u_write __pyx_string_tab[167] -#define __pyx_n_u_write_ex __pyx_string_tab[168] -#define __pyx_n_u_write_stderr __pyx_string_tab[169] -#define __pyx_n_u_x11_req __pyx_string_tab[170] -#define __pyx_n_u_x11_req_ex __pyx_string_tab[171] +#define __pyx_n_u_Channel_handle_extended_data2 __pyx_string_tab[13] +#define __pyx_n_u_Channel_poll_channel_read __pyx_string_tab[14] +#define __pyx_n_u_Channel_process_startup __pyx_string_tab[15] +#define __pyx_n_u_Channel_pty __pyx_string_tab[16] +#define __pyx_n_u_Channel_read __pyx_string_tab[17] +#define __pyx_n_u_Channel_read_ex __pyx_string_tab[18] +#define __pyx_n_u_Channel_read_stderr __pyx_string_tab[19] +#define __pyx_n_u_Channel_receive_window_adjust2 __pyx_string_tab[20] +#define __pyx_n_u_Channel_request_auth_agent __pyx_string_tab[21] +#define __pyx_n_u_Channel_send_eof __pyx_string_tab[22] +#define __pyx_n_u_Channel_setenv __pyx_string_tab[23] +#define __pyx_n_u_Channel_shell __pyx_string_tab[24] +#define __pyx_n_u_Channel_signal __pyx_string_tab[25] +#define __pyx_n_u_Channel_subsystem __pyx_string_tab[26] +#define __pyx_n_u_Channel_wait_closed __pyx_string_tab[27] +#define __pyx_n_u_Channel_wait_eof __pyx_string_tab[28] +#define __pyx_n_u_Channel_window_read __pyx_string_tab[29] +#define __pyx_n_u_Channel_window_read_ex __pyx_string_tab[30] +#define __pyx_n_u_Channel_window_write __pyx_string_tab[31] +#define __pyx_n_u_Channel_window_write_ex __pyx_string_tab[32] +#define __pyx_n_u_Channel_write __pyx_string_tab[33] +#define __pyx_n_u_Channel_write_ex __pyx_string_tab[34] +#define __pyx_n_u_Channel_write_stderr __pyx_string_tab[35] +#define __pyx_n_u_Channel_x11_req __pyx_string_tab[36] +#define __pyx_n_u_Channel_x11_req_ex __pyx_string_tab[37] +#define __pyx_n_u_MemoryError __pyx_string_tab[38] +#define __pyx_kp_u_Note_that_Cython_is_deliberately __pyx_string_tab[39] +#define __pyx_n_u_TypeError __pyx_string_tab[40] +#define __pyx_kp_u__2 __pyx_string_tab[41] +#define __pyx_kp_u__3 __pyx_string_tab[42] +#define __pyx_kp_u_add_note __pyx_string_tab[43] +#define __pyx_n_u_adjustment __pyx_string_tab[44] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[45] +#define __pyx_n_u_auth_cookie __pyx_string_tab[46] +#define __pyx_n_u_auth_proto __pyx_string_tab[47] +#define __pyx_n_u_b_buf __pyx_string_tab[48] +#define __pyx_n_u_b_command __pyx_string_tab[49] +#define __pyx_n_u_b_message __pyx_string_tab[50] +#define __pyx_n_u_b_request __pyx_string_tab[51] +#define __pyx_n_u_b_signame __pyx_string_tab[52] +#define __pyx_n_u_b_subsystem __pyx_string_tab[53] +#define __pyx_n_u_b_term __pyx_string_tab[54] +#define __pyx_n_u_b_value __pyx_string_tab[55] +#define __pyx_n_u_b_varname __pyx_string_tab[56] +#define __pyx_n_u_buf __pyx_string_tab[57] +#define __pyx_n_u_buf_2 __pyx_string_tab[58] +#define __pyx_n_u_buf_remainder __pyx_string_tab[59] +#define __pyx_n_u_buf_tot_size __pyx_string_tab[60] +#define __pyx_n_u_bytes_written __pyx_string_tab[61] +#define __pyx_n_u_c_signame __pyx_string_tab[62] +#define __pyx_n_u_cbuf __pyx_string_tab[63] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[64] +#define __pyx_n_u_close __pyx_string_tab[65] +#define __pyx_n_u_command __pyx_string_tab[66] +#define __pyx_n_u_command_2 __pyx_string_tab[67] +#define __pyx_kp_u_disable __pyx_string_tab[68] +#define __pyx_kp_u_enable __pyx_string_tab[69] +#define __pyx_n_u_eof __pyx_string_tab[70] +#define __pyx_n_u_errmsg __pyx_string_tab[71] +#define __pyx_n_u_errmsg_len __pyx_string_tab[72] +#define __pyx_n_u_exceptions __pyx_string_tab[73] +#define __pyx_n_u_execute __pyx_string_tab[74] +#define __pyx_n_u_exitsignal __pyx_string_tab[75] +#define __pyx_n_u_exitsignal_len __pyx_string_tab[76] +#define __pyx_n_u_extended __pyx_string_tab[77] +#define __pyx_n_u_flush __pyx_string_tab[78] +#define __pyx_n_u_flush_ex __pyx_string_tab[79] +#define __pyx_n_u_flush_stderr __pyx_string_tab[80] +#define __pyx_n_u_force __pyx_string_tab[81] +#define __pyx_n_u_func __pyx_string_tab[82] +#define __pyx_kp_u_gc __pyx_string_tab[83] +#define __pyx_n_u_get_exit_signal __pyx_string_tab[84] +#define __pyx_n_u_get_exit_status __pyx_string_tab[85] +#define __pyx_n_u_getstate __pyx_string_tab[86] +#define __pyx_n_u_handle_extended_data2 __pyx_string_tab[87] +#define __pyx_n_u_ignore_mode __pyx_string_tab[88] +#define __pyx_n_u_is_coroutine __pyx_string_tab[89] +#define __pyx_kp_u_isenabled __pyx_string_tab[90] +#define __pyx_n_u_langtag __pyx_string_tab[91] +#define __pyx_n_u_langtag_len __pyx_string_tab[92] +#define __pyx_n_u_m_len __pyx_string_tab[93] +#define __pyx_n_u_main __pyx_string_tab[94] +#define __pyx_n_u_message __pyx_string_tab[95] +#define __pyx_n_u_message_2 __pyx_string_tab[96] +#define __pyx_n_u_module __pyx_string_tab[97] +#define __pyx_n_u_name __pyx_string_tab[98] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[99] +#define __pyx_n_u_poll_channel_read __pyx_string_tab[100] +#define __pyx_n_u_pop __pyx_string_tab[101] +#define __pyx_n_u_process_startup __pyx_string_tab[102] +#define __pyx_n_u_pty __pyx_string_tab[103] +#define __pyx_n_u_py_errlen __pyx_string_tab[104] +#define __pyx_n_u_py_errmsg __pyx_string_tab[105] +#define __pyx_n_u_py_exitsignal __pyx_string_tab[106] +#define __pyx_n_u_py_langlen __pyx_string_tab[107] +#define __pyx_n_u_py_langtag __pyx_string_tab[108] +#define __pyx_n_u_py_siglen __pyx_string_tab[109] +#define __pyx_n_u_pyx_state __pyx_string_tab[110] +#define __pyx_n_u_qualname __pyx_string_tab[111] +#define __pyx_n_u_r_len __pyx_string_tab[112] +#define __pyx_n_u_rc __pyx_string_tab[113] +#define __pyx_n_u_read __pyx_string_tab[114] +#define __pyx_n_u_read_avail __pyx_string_tab[115] +#define __pyx_n_u_read_ex __pyx_string_tab[116] +#define __pyx_n_u_read_stderr __pyx_string_tab[117] +#define __pyx_n_u_receive_window_adjust2 __pyx_string_tab[118] +#define __pyx_n_u_reduce __pyx_string_tab[119] +#define __pyx_n_u_reduce_cython __pyx_string_tab[120] +#define __pyx_n_u_reduce_ex __pyx_string_tab[121] +#define __pyx_n_u_request __pyx_string_tab[122] +#define __pyx_n_u_request_2 __pyx_string_tab[123] +#define __pyx_n_u_request_auth_agent __pyx_string_tab[124] +#define __pyx_n_u_screen_number __pyx_string_tab[125] +#define __pyx_n_u_self __pyx_string_tab[126] +#define __pyx_n_u_send_eof __pyx_string_tab[127] +#define __pyx_n_u_session __pyx_string_tab[128] +#define __pyx_n_u_set_name __pyx_string_tab[129] +#define __pyx_n_u_setenv __pyx_string_tab[130] +#define __pyx_n_u_setstate __pyx_string_tab[131] +#define __pyx_n_u_setstate_cython __pyx_string_tab[132] +#define __pyx_n_u_shell __pyx_string_tab[133] +#define __pyx_n_u_signal __pyx_string_tab[134] +#define __pyx_n_u_signame __pyx_string_tab[135] +#define __pyx_n_u_signame_len __pyx_string_tab[136] +#define __pyx_n_u_single_connection __pyx_string_tab[137] +#define __pyx_n_u_size __pyx_string_tab[138] +#define __pyx_n_u_ssh2_channel __pyx_string_tab[139] +#define __pyx_kp_u_ssh2_channel_pyx __pyx_string_tab[140] +#define __pyx_n_u_storewindow __pyx_string_tab[141] +#define __pyx_n_u_stream_id __pyx_string_tab[142] +#define __pyx_kp_u_stringsource __pyx_string_tab[143] +#define __pyx_n_u_subsystem __pyx_string_tab[144] +#define __pyx_n_u_subsystem_2 __pyx_string_tab[145] +#define __pyx_n_u_term __pyx_string_tab[146] +#define __pyx_n_u_term_2 __pyx_string_tab[147] +#define __pyx_n_u_test __pyx_string_tab[148] +#define __pyx_n_u_value __pyx_string_tab[149] +#define __pyx_n_u_value_2 __pyx_string_tab[150] +#define __pyx_n_u_varname __pyx_string_tab[151] +#define __pyx_n_u_varname_2 __pyx_string_tab[152] +#define __pyx_n_u_vt100 __pyx_string_tab[153] +#define __pyx_n_u_wait_closed __pyx_string_tab[154] +#define __pyx_n_u_wait_eof __pyx_string_tab[155] +#define __pyx_n_u_window_read __pyx_string_tab[156] +#define __pyx_n_u_window_read_ex __pyx_string_tab[157] +#define __pyx_n_u_window_size_initial __pyx_string_tab[158] +#define __pyx_n_u_window_write __pyx_string_tab[159] +#define __pyx_n_u_window_write_ex __pyx_string_tab[160] +#define __pyx_n_u_write __pyx_string_tab[161] +#define __pyx_n_u_write_ex __pyx_string_tab[162] +#define __pyx_n_u_write_stderr __pyx_string_tab[163] +#define __pyx_n_u_x11_req __pyx_string_tab[164] +#define __pyx_n_u_x11_req_ex __pyx_string_tab[165] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -2946,8 +2929,8 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_ptype_4ssh2_7channel_Channel); Py_CLEAR(clear_module_state->__pyx_type_4ssh2_7channel_Channel); for (int i=0; i<4; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } - for (int i=0; i<38; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<172; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<35; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<166; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1024); return 0; @@ -2977,8 +2960,8 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void Py_VISIT(traverse_module_state->__pyx_ptype_4ssh2_7channel_Channel); Py_VISIT(traverse_module_state->__pyx_type_4ssh2_7channel_Channel); for (int i=0; i<4; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } - for (int i=0; i<38; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<172; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<35; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<166; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1024); return 0; @@ -7481,7 +7464,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_46window_write(struct __pyx_ob * rc = c_ssh2.libssh2_channel_window_write(self._channel) * return handle_error_codes(rc) # <<<<<<<<<<<<<< * - * def receive_window_adjust(self, unsigned long adjustment, + * def receive_window_adjust2(self, unsigned long adjustment, */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 334, __pyx_L1_error) @@ -7513,22 +7496,22 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_46window_write(struct __pyx_ob /* "ssh2/channel.pyx":336 * return handle_error_codes(rc) * - * def receive_window_adjust(self, unsigned long adjustment, # <<<<<<<<<<<<<< - * unsigned long force): + * def receive_window_adjust2(self, unsigned long adjustment, # <<<<<<<<<<<<<< + * unsigned long force): * cdef unsigned long rc */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust, "Channel.receive_window_adjust(self, unsigned long adjustment, unsigned long force)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_49receive_window_adjust = {"receive_window_adjust", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust2, "Channel.receive_window_adjust2(self, unsigned long adjustment, unsigned long force)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_49receive_window_adjust2 = {"receive_window_adjust2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust2}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -7547,7 +7530,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("receive_window_adjust (wrapper)", 0); + __Pyx_RefNannySetupContext("receive_window_adjust2 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); @@ -7574,9 +7557,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_window_adjust", 0) < 0) __PYX_ERR(0, 336, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_window_adjust2", 0) < 0) __PYX_ERR(0, 336, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_window_adjust", 1, 2, 2, i); __PYX_ERR(0, 336, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_window_adjust2", 1, 2, 2, i); __PYX_ERR(0, 336, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; @@ -7591,195 +7574,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("receive_window_adjust", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 336, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.channel.Channel.receive_window_adjust", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_adjustment, __pyx_v_force); - - /* function exit code */ - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force) { - unsigned long __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("receive_window_adjust", 0); - - /* "ssh2/channel.pyx":339 - * unsigned long force): - * cdef unsigned long rc - * with nogil: # <<<<<<<<<<<<<< - * rc = c_ssh2.libssh2_channel_receive_window_adjust( - * self._channel, adjustment, force) -*/ - { - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - /*try:*/ { - - /* "ssh2/channel.pyx":340 - * cdef unsigned long rc - * with nogil: - * rc = c_ssh2.libssh2_channel_receive_window_adjust( # <<<<<<<<<<<<<< - * self._channel, adjustment, force) - * return handle_error_codes(rc) -*/ - __pyx_v_rc = libssh2_channel_receive_window_adjust(__pyx_v_self->_channel, __pyx_v_adjustment, __pyx_v_force); - } - - /* "ssh2/channel.pyx":339 - * unsigned long force): - * cdef unsigned long rc - * with nogil: # <<<<<<<<<<<<<< - * rc = c_ssh2.libssh2_channel_receive_window_adjust( - * self._channel, adjustment, force) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/channel.pyx":342 - * rc = c_ssh2.libssh2_channel_receive_window_adjust( - * self._channel, adjustment, force) - * return handle_error_codes(rc) # <<<<<<<<<<<<<< - * - * def receive_window_adjust2(self, unsigned long adjustment, -*/ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 342, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "ssh2/channel.pyx":336 - * return handle_error_codes(rc) - * - * def receive_window_adjust(self, unsigned long adjustment, # <<<<<<<<<<<<<< - * unsigned long force): - * cdef unsigned long rc -*/ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("ssh2.channel.Channel.receive_window_adjust", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/channel.pyx":344 - * return handle_error_codes(rc) - * - * def receive_window_adjust2(self, unsigned long adjustment, # <<<<<<<<<<<<<< - * unsigned long force): - * cdef unsigned long rc -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_51receive_window_adjust2(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_50receive_window_adjust2, "Channel.receive_window_adjust2(self, unsigned long adjustment, unsigned long force)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_51receive_window_adjust2 = {"receive_window_adjust2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_51receive_window_adjust2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_50receive_window_adjust2}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_51receive_window_adjust2(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - unsigned long __pyx_v_adjustment; - unsigned long __pyx_v_force; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[2] = {0,0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("receive_window_adjust2 (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_adjustment,&__pyx_mstate_global->__pyx_n_u_force,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 344, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 2: - values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 344, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "receive_window_adjust2", 0) < 0) __PYX_ERR(0, 344, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("receive_window_adjust2", 1, 2, 2, i); __PYX_ERR(0, 344, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 2)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 344, __pyx_L3_error) - values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 344, __pyx_L3_error) - } - __pyx_v_adjustment = __Pyx_PyLong_As_unsigned_long(values[0]); if (unlikely((__pyx_v_adjustment == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 344, __pyx_L3_error) - __pyx_v_force = __Pyx_PyLong_As_unsigned_long(values[1]); if (unlikely((__pyx_v_force == (unsigned long)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error) - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("receive_window_adjust2", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 344, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("receive_window_adjust2", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 336, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7790,7 +7585,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_adjustment, __pyx_v_force); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust2(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_adjustment, __pyx_v_force); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -7800,7 +7595,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_48receive_window_adjust2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, unsigned long __pyx_v_adjustment, unsigned long __pyx_v_force) { unsigned long __pyx_v_rc; unsigned int __pyx_v_storewindow; PyObject *__pyx_r = NULL; @@ -7812,7 +7607,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("receive_window_adjust2", 0); - /* "ssh2/channel.pyx":347 + /* "ssh2/channel.pyx":339 * unsigned long force): * cdef unsigned long rc * cdef unsigned int storewindow = 0 # <<<<<<<<<<<<<< @@ -7821,7 +7616,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc */ __pyx_v_storewindow = 0; - /* "ssh2/channel.pyx":348 + /* "ssh2/channel.pyx":340 * cdef unsigned long rc * cdef unsigned int storewindow = 0 * with nogil: # <<<<<<<<<<<<<< @@ -7835,7 +7630,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":349 + /* "ssh2/channel.pyx":341 * cdef unsigned int storewindow = 0 * with nogil: * rc = c_ssh2.libssh2_channel_receive_window_adjust2( # <<<<<<<<<<<<<< @@ -7845,7 +7640,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc __pyx_v_rc = libssh2_channel_receive_window_adjust2(__pyx_v_self->_channel, __pyx_v_adjustment, __pyx_v_force, (&__pyx_v_storewindow)); } - /* "ssh2/channel.pyx":348 + /* "ssh2/channel.pyx":340 * cdef unsigned long rc * cdef unsigned int storewindow = 0 * with nogil: # <<<<<<<<<<<<<< @@ -7862,7 +7657,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc } } - /* "ssh2/channel.pyx":351 + /* "ssh2/channel.pyx":343 * rc = c_ssh2.libssh2_channel_receive_window_adjust2( * self._channel, adjustment, force, &storewindow) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -7870,14 +7665,14 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc * def write(self, buf not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 351, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":344 + /* "ssh2/channel.pyx":336 * return handle_error_codes(rc) * * def receive_window_adjust2(self, unsigned long adjustment, # <<<<<<<<<<<<<< @@ -7896,7 +7691,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc return __pyx_r; } -/* "ssh2/channel.pyx":353 +/* "ssh2/channel.pyx":345 * return handle_error_codes(rc) * * def write(self, buf not None): # <<<<<<<<<<<<<< @@ -7905,16 +7700,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50receive_window_adjust2(struc */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_53write(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_51write(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_52write, "Channel.write(self, buf)\n\nWrite buffer to stdin.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to ``write``, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_53write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_53write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_52write}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_53write(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_50write, "Channel.write(self, buf)\n\nWrite buffer to stdin.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to ``write``, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_51write = {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_51write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_50write}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_51write(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -7944,32 +7739,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 353, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 345, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 353, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 345, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < 0) __PYX_ERR(0, 353, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write", 0) < 0) __PYX_ERR(0, 345, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, i); __PYX_ERR(0, 353, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, i); __PYX_ERR(0, 345, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 353, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 345, __pyx_L3_error) } __pyx_v_buf = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 353, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 345, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7981,9 +7776,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 353, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 345, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_52write(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_buf); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_50write(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_buf); /* function exit code */ goto __pyx_L0; @@ -8002,7 +7797,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_50write(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_v_b_buf = 0; char const *__pyx_v__buf; size_t __pyx_v_buf_remainder; @@ -8024,19 +7819,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 0); - /* "ssh2/channel.pyx":378 + /* "ssh2/channel.pyx":370 * :rtype: tuple(int, int) * """ * cdef bytes b_buf = to_bytes(buf) # <<<<<<<<<<<<<< * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":379 + /* "ssh2/channel.pyx":371 * """ * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf # <<<<<<<<<<<<<< @@ -8045,12 +7840,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 379, __pyx_L1_error) + __PYX_ERR(0, 371, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 379, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error) __pyx_v__buf = __pyx_t_2; - /* "ssh2/channel.pyx":380 + /* "ssh2/channel.pyx":372 * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) # <<<<<<<<<<<<<< @@ -8059,12 +7854,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 380, __pyx_L1_error) + __PYX_ERR(0, 372, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 380, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 372, __pyx_L1_error) __pyx_v_buf_remainder = __pyx_t_3; - /* "ssh2/channel.pyx":381 + /* "ssh2/channel.pyx":373 * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) * cdef size_t buf_tot_size = buf_remainder # <<<<<<<<<<<<<< @@ -8073,7 +7868,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ __pyx_v_buf_tot_size = __pyx_v_buf_remainder; - /* "ssh2/channel.pyx":383 + /* "ssh2/channel.pyx":375 * cdef size_t buf_tot_size = buf_remainder * cdef ssize_t rc * cdef size_t bytes_written = 0 # <<<<<<<<<<<<<< @@ -8082,7 +7877,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ __pyx_v_bytes_written = 0; - /* "ssh2/channel.pyx":384 + /* "ssh2/channel.pyx":376 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -8096,7 +7891,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":385 + /* "ssh2/channel.pyx":377 * cdef size_t bytes_written = 0 * with nogil: * while buf_remainder > 0: # <<<<<<<<<<<<<< @@ -8107,7 +7902,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 __pyx_t_4 = (__pyx_v_buf_remainder > 0); if (!__pyx_t_4) break; - /* "ssh2/channel.pyx":386 + /* "ssh2/channel.pyx":378 * with nogil: * while buf_remainder > 0: * rc = c_ssh2.libssh2_channel_write( # <<<<<<<<<<<<<< @@ -8116,7 +7911,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ __pyx_v_rc = libssh2_channel_write(__pyx_v_self->_channel, __pyx_v__buf, __pyx_v_buf_remainder); - /* "ssh2/channel.pyx":388 + /* "ssh2/channel.pyx":380 * rc = c_ssh2.libssh2_channel_write( * self._channel, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8134,7 +7929,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 __pyx_L9_bool_binop_done:; if (__pyx_t_4) { - /* "ssh2/channel.pyx":390 + /* "ssh2/channel.pyx":382 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -8145,7 +7940,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); /*try:*/ { - /* "ssh2/channel.pyx":391 + /* "ssh2/channel.pyx":383 * # Error that will raise exception * with gil: * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -8153,15 +7948,15 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 * break */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 391, __pyx_L14_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L14_error) + __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 383, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L13_return; } - /* "ssh2/channel.pyx":390 + /* "ssh2/channel.pyx":382 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -8180,7 +7975,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 } } - /* "ssh2/channel.pyx":388 + /* "ssh2/channel.pyx":380 * rc = c_ssh2.libssh2_channel_write( * self._channel, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8189,7 +7984,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ } - /* "ssh2/channel.pyx":392 + /* "ssh2/channel.pyx":384 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8199,7 +7994,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 __pyx_t_4 = (__pyx_v_rc == LIBSSH2_ERROR_EAGAIN); if (__pyx_t_4) { - /* "ssh2/channel.pyx":393 + /* "ssh2/channel.pyx":385 * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break # <<<<<<<<<<<<<< @@ -8208,7 +8003,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ goto __pyx_L7_break; - /* "ssh2/channel.pyx":392 + /* "ssh2/channel.pyx":384 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8217,7 +8012,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ } - /* "ssh2/channel.pyx":394 + /* "ssh2/channel.pyx":386 * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break * _buf += rc # <<<<<<<<<<<<<< @@ -8226,7 +8021,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ __pyx_v__buf = (__pyx_v__buf + __pyx_v_rc); - /* "ssh2/channel.pyx":395 + /* "ssh2/channel.pyx":387 * break * _buf += rc * buf_remainder -= rc # <<<<<<<<<<<<<< @@ -8237,7 +8032,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 } __pyx_L7_break:; - /* "ssh2/channel.pyx":396 + /* "ssh2/channel.pyx":388 * _buf += rc * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder # <<<<<<<<<<<<<< @@ -8247,7 +8042,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 __pyx_v_bytes_written = (__pyx_v_buf_tot_size - __pyx_v_buf_remainder); } - /* "ssh2/channel.pyx":384 + /* "ssh2/channel.pyx":376 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -8274,7 +8069,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 } } - /* "ssh2/channel.pyx":397 + /* "ssh2/channel.pyx":389 * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder * return rc, bytes_written # <<<<<<<<<<<<<< @@ -8282,23 +8077,23 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 * def write_ex(self, int stream_id, buf not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 397, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 389, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 397, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 389, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":353 + /* "ssh2/channel.pyx":345 * return handle_error_codes(rc) * * def write(self, buf not None): # <<<<<<<<<<<<<< @@ -8320,7 +8115,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 return __pyx_r; } -/* "ssh2/channel.pyx":399 +/* "ssh2/channel.pyx":391 * return rc, bytes_written * * def write_ex(self, int stream_id, buf not None): # <<<<<<<<<<<<<< @@ -8329,16 +8124,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write(struct __pyx_obj_4ssh2 */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_55write_ex(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_53write_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_54write_ex, "Channel.write_ex(self, int stream_id, buf)\n\nWrite buffer to specified stream id.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to the function, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param stream_id: Id of stream to write to\n:type stream_id: int\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_55write_ex = {"write_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_55write_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_54write_ex}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_55write_ex(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_52write_ex, "Channel.write_ex(self, int stream_id, buf)\n\nWrite buffer to specified stream id.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to the function, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param stream_id: Id of stream to write to\n:type stream_id: int\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_53write_ex = {"write_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_53write_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_52write_ex}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_53write_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -8369,39 +8164,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_stream_id,&__pyx_mstate_global->__pyx_n_u_buf,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 399, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 391, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 391, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 391, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_ex", 0) < 0) __PYX_ERR(0, 399, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_ex", 0) < 0) __PYX_ERR(0, 391, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_ex", 1, 2, 2, i); __PYX_ERR(0, 399, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_ex", 1, 2, 2, i); __PYX_ERR(0, 391, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 391, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 399, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 391, __pyx_L3_error) } - __pyx_v_stream_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_stream_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L3_error) + __pyx_v_stream_id = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_stream_id == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 391, __pyx_L3_error) __pyx_v_buf = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_ex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 399, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_ex", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 391, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8413,9 +8208,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 399, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 391, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_54write_ex(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_stream_id, __pyx_v_buf); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_52write_ex(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_stream_id, __pyx_v_buf); /* function exit code */ goto __pyx_L0; @@ -8434,7 +8229,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_stream_id, PyObject *__pyx_v_buf) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_52write_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_stream_id, PyObject *__pyx_v_buf) { PyObject *__pyx_v_b_buf = 0; char const *__pyx_v__buf; size_t __pyx_v_buf_remainder; @@ -8456,19 +8251,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_ex", 0); - /* "ssh2/channel.pyx":426 + /* "ssh2/channel.pyx":418 * :rtype: tuple(int, int) * """ * cdef bytes b_buf = to_bytes(buf) # <<<<<<<<<<<<<< * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":427 + /* "ssh2/channel.pyx":419 * """ * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf # <<<<<<<<<<<<<< @@ -8477,12 +8272,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 427, __pyx_L1_error) + __PYX_ERR(0, 419, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 419, __pyx_L1_error) __pyx_v__buf = __pyx_t_2; - /* "ssh2/channel.pyx":428 + /* "ssh2/channel.pyx":420 * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) # <<<<<<<<<<<<<< @@ -8491,12 +8286,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 428, __pyx_L1_error) + __PYX_ERR(0, 420, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 428, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_v_buf_remainder = __pyx_t_3; - /* "ssh2/channel.pyx":429 + /* "ssh2/channel.pyx":421 * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) * cdef size_t buf_tot_size = buf_remainder # <<<<<<<<<<<<<< @@ -8505,7 +8300,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ __pyx_v_buf_tot_size = __pyx_v_buf_remainder; - /* "ssh2/channel.pyx":431 + /* "ssh2/channel.pyx":423 * cdef size_t buf_tot_size = buf_remainder * cdef ssize_t rc * cdef size_t bytes_written = 0 # <<<<<<<<<<<<<< @@ -8514,7 +8309,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ __pyx_v_bytes_written = 0; - /* "ssh2/channel.pyx":432 + /* "ssh2/channel.pyx":424 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -8528,7 +8323,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":434 + /* "ssh2/channel.pyx":426 * with nogil: * # Write until buffer has been fully written or socket is blocked * while buf_remainder > 0: # <<<<<<<<<<<<<< @@ -8539,7 +8334,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s __pyx_t_4 = (__pyx_v_buf_remainder > 0); if (!__pyx_t_4) break; - /* "ssh2/channel.pyx":435 + /* "ssh2/channel.pyx":427 * # Write until buffer has been fully written or socket is blocked * while buf_remainder > 0: * rc = c_ssh2.libssh2_channel_write_ex( # <<<<<<<<<<<<<< @@ -8548,7 +8343,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ __pyx_v_rc = libssh2_channel_write_ex(__pyx_v_self->_channel, __pyx_v_stream_id, __pyx_v__buf, __pyx_v_buf_remainder); - /* "ssh2/channel.pyx":437 + /* "ssh2/channel.pyx":429 * rc = c_ssh2.libssh2_channel_write_ex( * self._channel, stream_id, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8566,7 +8361,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s __pyx_L9_bool_binop_done:; if (__pyx_t_4) { - /* "ssh2/channel.pyx":439 + /* "ssh2/channel.pyx":431 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -8577,7 +8372,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); /*try:*/ { - /* "ssh2/channel.pyx":440 + /* "ssh2/channel.pyx":432 * # Error that will raise exception * with gil: * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -8585,15 +8380,15 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s * break */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L14_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L14_error) + __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 432, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L13_return; } - /* "ssh2/channel.pyx":439 + /* "ssh2/channel.pyx":431 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -8612,7 +8407,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s } } - /* "ssh2/channel.pyx":437 + /* "ssh2/channel.pyx":429 * rc = c_ssh2.libssh2_channel_write_ex( * self._channel, stream_id, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8621,7 +8416,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ } - /* "ssh2/channel.pyx":441 + /* "ssh2/channel.pyx":433 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8631,7 +8426,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s __pyx_t_4 = (__pyx_v_rc == LIBSSH2_ERROR_EAGAIN); if (__pyx_t_4) { - /* "ssh2/channel.pyx":442 + /* "ssh2/channel.pyx":434 * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break # <<<<<<<<<<<<<< @@ -8640,7 +8435,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ goto __pyx_L7_break; - /* "ssh2/channel.pyx":441 + /* "ssh2/channel.pyx":433 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8649,7 +8444,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ } - /* "ssh2/channel.pyx":443 + /* "ssh2/channel.pyx":435 * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break * _buf += rc # <<<<<<<<<<<<<< @@ -8658,7 +8453,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ __pyx_v__buf = (__pyx_v__buf + __pyx_v_rc); - /* "ssh2/channel.pyx":444 + /* "ssh2/channel.pyx":436 * break * _buf += rc * buf_remainder -= rc # <<<<<<<<<<<<<< @@ -8669,7 +8464,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s } __pyx_L7_break:; - /* "ssh2/channel.pyx":445 + /* "ssh2/channel.pyx":437 * _buf += rc * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder # <<<<<<<<<<<<<< @@ -8679,7 +8474,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s __pyx_v_bytes_written = (__pyx_v_buf_tot_size - __pyx_v_buf_remainder); } - /* "ssh2/channel.pyx":432 + /* "ssh2/channel.pyx":424 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -8706,7 +8501,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s } } - /* "ssh2/channel.pyx":446 + /* "ssh2/channel.pyx":438 * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder * return rc, bytes_written # <<<<<<<<<<<<<< @@ -8714,23 +8509,23 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s * def write_stderr(self, buf not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 446, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 438, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 446, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 438, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":399 + /* "ssh2/channel.pyx":391 * return rc, bytes_written * * def write_ex(self, int stream_id, buf not None): # <<<<<<<<<<<<<< @@ -8752,7 +8547,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s return __pyx_r; } -/* "ssh2/channel.pyx":448 +/* "ssh2/channel.pyx":440 * return rc, bytes_written * * def write_stderr(self, buf not None): # <<<<<<<<<<<<<< @@ -8761,16 +8556,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_ex(struct __pyx_obj_4s */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_57write_stderr(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_55write_stderr(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_56write_stderr, "Channel.write_stderr(self, buf)\n\nWrite buffer to stderr.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to ``write``, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_57write_stderr = {"write_stderr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_57write_stderr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_56write_stderr}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_57write_stderr(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_54write_stderr, "Channel.write_stderr(self, buf)\n\nWrite buffer to stderr.\n\nReturns tuple of (``return_code``, ``bytes_written``).\n\nIn blocking mode ``bytes_written`` will always equal ``len(buf)`` if no\nerrors have occurred which would raise exception.\n\nIn non-blocking mode ``return_code`` can be LIBSSH2_ERROR_EAGAIN and\n``bytes_written`` *can be less than* ``len(buf)``.\n\nClients should resume from that point on next call to ``write``, ie\n``buf[bytes_written_in_last_call:]``.\n\n.. note::\n While this function handles unicode strings for ``buf``\n argument, ``bytes_written`` offset will always be for the *bytes*\n representation thereof as returned by the C function calls which only\n handle byte strings.\n\n:param buf: Buffer to write\n:type buf: str\n\n:rtype: tuple(int, int)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_55write_stderr = {"write_stderr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_55write_stderr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_54write_stderr}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_55write_stderr(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -8800,32 +8595,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_buf,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 448, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 440, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 440, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_stderr", 0) < 0) __PYX_ERR(0, 448, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "write_stderr", 0) < 0) __PYX_ERR(0, 440, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_stderr", 1, 1, 1, i); __PYX_ERR(0, 448, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("write_stderr", 1, 1, 1, i); __PYX_ERR(0, 440, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 448, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 440, __pyx_L3_error) } __pyx_v_buf = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_stderr", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 448, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_stderr", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 440, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8837,9 +8632,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_buf) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 448, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "buf"); __PYX_ERR(0, 440, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_56write_stderr(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_buf); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_54write_stderr(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_buf); /* function exit code */ goto __pyx_L0; @@ -8858,7 +8653,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_54write_stderr(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_buf) { PyObject *__pyx_v_b_buf = 0; char const *__pyx_v__buf; size_t __pyx_v_buf_remainder; @@ -8880,19 +8675,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_stderr", 0); - /* "ssh2/channel.pyx":473 + /* "ssh2/channel.pyx":465 * :rtype: tuple(int, int) * """ * cdef bytes b_buf = to_bytes(buf) # <<<<<<<<<<<<<< * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_buf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_buf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":474 + /* "ssh2/channel.pyx":466 * """ * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf # <<<<<<<<<<<<<< @@ -8901,12 +8696,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 474, __pyx_L1_error) + __PYX_ERR(0, 466, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_buf); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 466, __pyx_L1_error) __pyx_v__buf = __pyx_t_2; - /* "ssh2/channel.pyx":475 + /* "ssh2/channel.pyx":467 * cdef bytes b_buf = to_bytes(buf) * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) # <<<<<<<<<<<<<< @@ -8915,12 +8710,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ if (unlikely(__pyx_v_b_buf == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 475, __pyx_L1_error) + __PYX_ERR(0, 467, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 475, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_buf); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 467, __pyx_L1_error) __pyx_v_buf_remainder = __pyx_t_3; - /* "ssh2/channel.pyx":476 + /* "ssh2/channel.pyx":468 * cdef const char *_buf = b_buf * cdef size_t buf_remainder = len(b_buf) * cdef size_t buf_tot_size = buf_remainder # <<<<<<<<<<<<<< @@ -8929,7 +8724,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ __pyx_v_buf_tot_size = __pyx_v_buf_remainder; - /* "ssh2/channel.pyx":478 + /* "ssh2/channel.pyx":470 * cdef size_t buf_tot_size = buf_remainder * cdef ssize_t rc * cdef size_t bytes_written = 0 # <<<<<<<<<<<<<< @@ -8938,7 +8733,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ __pyx_v_bytes_written = 0; - /* "ssh2/channel.pyx":479 + /* "ssh2/channel.pyx":471 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -8952,7 +8747,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":480 + /* "ssh2/channel.pyx":472 * cdef size_t bytes_written = 0 * with nogil: * while buf_remainder > 0: # <<<<<<<<<<<<<< @@ -8963,7 +8758,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob __pyx_t_4 = (__pyx_v_buf_remainder > 0); if (!__pyx_t_4) break; - /* "ssh2/channel.pyx":481 + /* "ssh2/channel.pyx":473 * with nogil: * while buf_remainder > 0: * rc = c_ssh2.libssh2_channel_write_stderr( # <<<<<<<<<<<<<< @@ -8972,7 +8767,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ __pyx_v_rc = libssh2_channel_write_stderr(__pyx_v_self->_channel, __pyx_v__buf, __pyx_v_buf_remainder); - /* "ssh2/channel.pyx":483 + /* "ssh2/channel.pyx":475 * rc = c_ssh2.libssh2_channel_write_stderr( * self._channel, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -8990,7 +8785,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob __pyx_L9_bool_binop_done:; if (__pyx_t_4) { - /* "ssh2/channel.pyx":485 + /* "ssh2/channel.pyx":477 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -9001,7 +8796,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure(); /*try:*/ { - /* "ssh2/channel.pyx":486 + /* "ssh2/channel.pyx":478 * # Error that will raise exception * with gil: * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -9009,15 +8804,15 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob * break */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 486, __pyx_L14_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L14_error) + __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 478, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L13_return; } - /* "ssh2/channel.pyx":485 + /* "ssh2/channel.pyx":477 * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: * # Error that will raise exception * with gil: # <<<<<<<<<<<<<< @@ -9036,7 +8831,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob } } - /* "ssh2/channel.pyx":483 + /* "ssh2/channel.pyx":475 * rc = c_ssh2.libssh2_channel_write_stderr( * self._channel, _buf, buf_remainder) * if rc < 0 and rc != c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -9045,7 +8840,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ } - /* "ssh2/channel.pyx":487 + /* "ssh2/channel.pyx":479 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -9055,7 +8850,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob __pyx_t_4 = (__pyx_v_rc == LIBSSH2_ERROR_EAGAIN); if (__pyx_t_4) { - /* "ssh2/channel.pyx":488 + /* "ssh2/channel.pyx":480 * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break # <<<<<<<<<<<<<< @@ -9064,7 +8859,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ goto __pyx_L7_break; - /* "ssh2/channel.pyx":487 + /* "ssh2/channel.pyx":479 * with gil: * return handle_error_codes(rc) * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: # <<<<<<<<<<<<<< @@ -9073,7 +8868,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ } - /* "ssh2/channel.pyx":489 + /* "ssh2/channel.pyx":481 * elif rc == c_ssh2.LIBSSH2_ERROR_EAGAIN: * break * _buf += rc # <<<<<<<<<<<<<< @@ -9082,7 +8877,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ __pyx_v__buf = (__pyx_v__buf + __pyx_v_rc); - /* "ssh2/channel.pyx":490 + /* "ssh2/channel.pyx":482 * break * _buf += rc * buf_remainder -= rc # <<<<<<<<<<<<<< @@ -9093,7 +8888,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob } __pyx_L7_break:; - /* "ssh2/channel.pyx":491 + /* "ssh2/channel.pyx":483 * _buf += rc * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder # <<<<<<<<<<<<<< @@ -9103,7 +8898,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob __pyx_v_bytes_written = (__pyx_v_buf_tot_size - __pyx_v_buf_remainder); } - /* "ssh2/channel.pyx":479 + /* "ssh2/channel.pyx":471 * cdef ssize_t rc * cdef size_t bytes_written = 0 * with nogil: # <<<<<<<<<<<<<< @@ -9130,7 +8925,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob } } - /* "ssh2/channel.pyx":492 + /* "ssh2/channel.pyx":484 * buf_remainder -= rc * bytes_written = buf_tot_size - buf_remainder * return rc, bytes_written # <<<<<<<<<<<<<< @@ -9138,23 +8933,23 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob * def x11_req(self, int screen_number): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_1 = PyLong_FromSsize_t(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_bytes_written); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 492, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 492, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 484, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_7); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 492, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7) != (0)) __PYX_ERR(0, 484, __pyx_L1_error); __pyx_t_1 = 0; __pyx_t_7 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":448 + /* "ssh2/channel.pyx":440 * return rc, bytes_written * * def write_stderr(self, buf not None): # <<<<<<<<<<<<<< @@ -9176,7 +8971,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob return __pyx_r; } -/* "ssh2/channel.pyx":494 +/* "ssh2/channel.pyx":486 * return rc, bytes_written * * def x11_req(self, int screen_number): # <<<<<<<<<<<<<< @@ -9185,16 +8980,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56write_stderr(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_59x11_req(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_57x11_req(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_58x11_req, "Channel.x11_req(self, int screen_number)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_59x11_req = {"x11_req", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_59x11_req, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_58x11_req}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_59x11_req(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_56x11_req, "Channel.x11_req(self, int screen_number)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_57x11_req = {"x11_req", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_57x11_req, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_56x11_req}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_57x11_req(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9224,32 +9019,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_screen_number,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 494, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 486, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 494, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "x11_req", 0) < 0) __PYX_ERR(0, 494, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "x11_req", 0) < 0) __PYX_ERR(0, 486, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("x11_req", 1, 1, 1, i); __PYX_ERR(0, 494, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("x11_req", 1, 1, 1, i); __PYX_ERR(0, 486, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 494, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 486, __pyx_L3_error) } - __pyx_v_screen_number = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L3_error) + __pyx_v_screen_number = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 486, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("x11_req", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 494, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("x11_req", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 486, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9260,7 +9055,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_58x11_req(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_screen_number); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_56x11_req(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_screen_number); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -9270,7 +9065,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_screen_number) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_56x11_req(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_screen_number) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9281,7 +9076,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("x11_req", 0); - /* "ssh2/channel.pyx":496 + /* "ssh2/channel.pyx":488 * def x11_req(self, int screen_number): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9295,7 +9090,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":497 + /* "ssh2/channel.pyx":489 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_channel_x11_req( # <<<<<<<<<<<<<< @@ -9305,7 +9100,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss __pyx_v_rc = libssh2_channel_x11_req(__pyx_v_self->_channel, __pyx_v_screen_number); } - /* "ssh2/channel.pyx":496 + /* "ssh2/channel.pyx":488 * def x11_req(self, int screen_number): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9322,7 +9117,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss } } - /* "ssh2/channel.pyx":499 + /* "ssh2/channel.pyx":491 * rc = c_ssh2.libssh2_channel_x11_req( * self._channel, screen_number) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -9330,14 +9125,14 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss * def x11_req_ex(self, int single_connection, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 499, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 491, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":494 + /* "ssh2/channel.pyx":486 * return rc, bytes_written * * def x11_req(self, int screen_number): # <<<<<<<<<<<<<< @@ -9356,7 +9151,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss return __pyx_r; } -/* "ssh2/channel.pyx":501 +/* "ssh2/channel.pyx":493 * return handle_error_codes(rc) * * def x11_req_ex(self, int single_connection, # <<<<<<<<<<<<<< @@ -9365,16 +9160,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req(struct __pyx_obj_4ss */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_61x11_req_ex(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_59x11_req_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_60x11_req_ex, "Channel.x11_req_ex(self, int single_connection, const char *auth_proto, const char *auth_cookie, int screen_number)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_61x11_req_ex = {"x11_req_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_61x11_req_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_60x11_req_ex}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_61x11_req_ex(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_58x11_req_ex, "Channel.x11_req_ex(self, int single_connection, const char *auth_proto, const char *auth_cookie, int screen_number)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_59x11_req_ex = {"x11_req_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_59x11_req_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_58x11_req_ex}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_59x11_req_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9407,53 +9202,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_single_connection,&__pyx_mstate_global->__pyx_n_u_auth_proto,&__pyx_mstate_global->__pyx_n_u_auth_cookie,&__pyx_mstate_global->__pyx_n_u_screen_number,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 501, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 493, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 493, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 493, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 493, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 493, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "x11_req_ex", 0) < 0) __PYX_ERR(0, 501, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "x11_req_ex", 0) < 0) __PYX_ERR(0, 493, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("x11_req_ex", 1, 4, 4, i); __PYX_ERR(0, 501, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("x11_req_ex", 1, 4, 4, i); __PYX_ERR(0, 493, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 493, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 493, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 493, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 501, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 493, __pyx_L3_error) } - __pyx_v_single_connection = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L3_error) - __pyx_v_auth_proto = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_auth_proto) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L3_error) - __pyx_v_auth_cookie = __Pyx_PyObject_AsString(values[2]); if (unlikely((!__pyx_v_auth_cookie) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L3_error) - __pyx_v_screen_number = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L3_error) + __pyx_v_single_connection = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 493, __pyx_L3_error) + __pyx_v_auth_proto = __Pyx_PyObject_AsString(values[1]); if (unlikely((!__pyx_v_auth_proto) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L3_error) + __pyx_v_auth_cookie = __Pyx_PyObject_AsString(values[2]); if (unlikely((!__pyx_v_auth_cookie) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L3_error) + __pyx_v_screen_number = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("x11_req_ex", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 501, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("x11_req_ex", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 493, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9464,7 +9259,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_single_connection, __pyx_v_auth_proto, __pyx_v_auth_cookie, __pyx_v_screen_number); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_58x11_req_ex(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_single_connection, __pyx_v_auth_proto, __pyx_v_auth_cookie, __pyx_v_screen_number); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -9474,7 +9269,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_single_connection, char const *__pyx_v_auth_proto, char const *__pyx_v_auth_cookie, int __pyx_v_screen_number) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_58x11_req_ex(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_single_connection, char const *__pyx_v_auth_proto, char const *__pyx_v_auth_cookie, int __pyx_v_screen_number) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9485,7 +9280,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("x11_req_ex", 0); - /* "ssh2/channel.pyx":506 + /* "ssh2/channel.pyx":498 * int screen_number): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9499,7 +9294,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":507 + /* "ssh2/channel.pyx":499 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_channel_x11_req_ex( # <<<<<<<<<<<<<< @@ -9509,7 +9304,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ __pyx_v_rc = libssh2_channel_x11_req_ex(__pyx_v_self->_channel, __pyx_v_single_connection, __pyx_v_auth_proto, __pyx_v_auth_cookie, __pyx_v_screen_number); } - /* "ssh2/channel.pyx":506 + /* "ssh2/channel.pyx":498 * int screen_number): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9526,7 +9321,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ } } - /* "ssh2/channel.pyx":510 + /* "ssh2/channel.pyx":502 * self._channel, single_connection, * auth_proto, auth_cookie, screen_number) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -9534,14 +9329,14 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ * def process_startup(self, request, message=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 510, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":501 + /* "ssh2/channel.pyx":493 * return handle_error_codes(rc) * * def x11_req_ex(self, int single_connection, # <<<<<<<<<<<<<< @@ -9560,7 +9355,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/channel.pyx":512 +/* "ssh2/channel.pyx":504 * return handle_error_codes(rc) * * def process_startup(self, request, message=None): # <<<<<<<<<<<<<< @@ -9569,16 +9364,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60x11_req_ex(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_63process_startup(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_61process_startup(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_62process_startup, "Channel.process_startup(self, request, message=None)\n\nStartup process on server for request with message.\n\nRequest is a supported SSH subsystem and clients would typically use\none of execute/shell/subsystem functions depending on request type.\n\n:param request: Request type (exec/shell/subsystem).\n:type request: str\n:param message: Request message. Content depends on request type\n and can be ``None``.\n:type message: str or ``None``"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_63process_startup = {"process_startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_63process_startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_62process_startup}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_63process_startup(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_60process_startup, "Channel.process_startup(self, request, message=None)\n\nStartup process on server for request with message.\n\nRequest is a supported SSH subsystem and clients would typically use\none of execute/shell/subsystem functions depending on request type.\n\n:param request: Request type (exec/shell/subsystem).\n:type request: str\n:param message: Request message. Content depends on request type\n and can be ``None``.\n:type message: str or ``None``"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_61process_startup = {"process_startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_61process_startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_60process_startup}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_61process_startup(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9609,35 +9404,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_request,&__pyx_mstate_global->__pyx_n_u_message,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 512, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 504, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 512, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 504, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 512, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_startup", 0) < 0) __PYX_ERR(0, 512, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "process_startup", 0) < 0) __PYX_ERR(0, 504, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_startup", 0, 1, 2, i); __PYX_ERR(0, 512, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("process_startup", 0, 1, 2, i); __PYX_ERR(0, 504, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 512, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 504, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 512, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 504, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -9648,7 +9443,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("process_startup", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 512, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("process_startup", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 504, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9659,7 +9454,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_62process_startup(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_request, __pyx_v_message); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_60process_startup(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_request, __pyx_v_message); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -9669,7 +9464,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_request, PyObject *__pyx_v_message) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_60process_startup(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_request, PyObject *__pyx_v_message) { PyObject *__pyx_v_b_request = 0; PyObject *__pyx_v_b_message = 0; char *__pyx_v__request; @@ -9689,19 +9484,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("process_startup", 0); - /* "ssh2/channel.pyx":524 + /* "ssh2/channel.pyx":516 * :type message: str or ``None`` * """ * cdef bytes b_request = to_bytes(request) # <<<<<<<<<<<<<< * cdef bytes b_message = None * cdef char *_request = b_request */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_request); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_request); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_request = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":525 + /* "ssh2/channel.pyx":517 * """ * cdef bytes b_request = to_bytes(request) * cdef bytes b_message = None # <<<<<<<<<<<<<< @@ -9711,7 +9506,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx __Pyx_INCREF(Py_None); __pyx_v_b_message = ((PyObject*)Py_None); - /* "ssh2/channel.pyx":526 + /* "ssh2/channel.pyx":518 * cdef bytes b_request = to_bytes(request) * cdef bytes b_message = None * cdef char *_request = b_request # <<<<<<<<<<<<<< @@ -9720,12 +9515,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ if (unlikely(__pyx_v_b_request == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 526, __pyx_L1_error) + __PYX_ERR(0, 518, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_request); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_request); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error) __pyx_v__request = __pyx_t_2; - /* "ssh2/channel.pyx":527 + /* "ssh2/channel.pyx":519 * cdef bytes b_message = None * cdef char *_request = b_request * cdef char *_message = NULL # <<<<<<<<<<<<<< @@ -9734,7 +9529,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ __pyx_v__message = NULL; - /* "ssh2/channel.pyx":528 + /* "ssh2/channel.pyx":520 * cdef char *_request = b_request * cdef char *_message = NULL * cdef size_t r_len = len(b_request) # <<<<<<<<<<<<<< @@ -9743,12 +9538,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ if (unlikely(__pyx_v_b_request == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 528, __pyx_L1_error) + __PYX_ERR(0, 520, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_request); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_request); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 520, __pyx_L1_error) __pyx_v_r_len = __pyx_t_3; - /* "ssh2/channel.pyx":529 + /* "ssh2/channel.pyx":521 * cdef char *_message = NULL * cdef size_t r_len = len(b_request) * cdef size_t m_len = 0 # <<<<<<<<<<<<<< @@ -9757,7 +9552,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ __pyx_v_m_len = 0; - /* "ssh2/channel.pyx":530 + /* "ssh2/channel.pyx":522 * cdef size_t r_len = len(b_request) * cdef size_t m_len = 0 * if message is not None: # <<<<<<<<<<<<<< @@ -9767,19 +9562,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx __pyx_t_4 = (__pyx_v_message != Py_None); if (__pyx_t_4) { - /* "ssh2/channel.pyx":531 + /* "ssh2/channel.pyx":523 * cdef size_t m_len = 0 * if message is not None: * b_message = to_bytes(message) # <<<<<<<<<<<<<< * _message = b_message * m_len = len(b_message) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_b_message, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":532 + /* "ssh2/channel.pyx":524 * if message is not None: * b_message = to_bytes(message) * _message = b_message # <<<<<<<<<<<<<< @@ -9788,12 +9583,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ if (unlikely(__pyx_v_b_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 532, __pyx_L1_error) + __PYX_ERR(0, 524, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_message); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_message); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 524, __pyx_L1_error) __pyx_v__message = __pyx_t_2; - /* "ssh2/channel.pyx":533 + /* "ssh2/channel.pyx":525 * b_message = to_bytes(message) * _message = b_message * m_len = len(b_message) # <<<<<<<<<<<<<< @@ -9802,12 +9597,12 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ if (unlikely(__pyx_v_b_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 533, __pyx_L1_error) + __PYX_ERR(0, 525, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_message); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_message); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 525, __pyx_L1_error) __pyx_v_m_len = __pyx_t_3; - /* "ssh2/channel.pyx":530 + /* "ssh2/channel.pyx":522 * cdef size_t r_len = len(b_request) * cdef size_t m_len = 0 * if message is not None: # <<<<<<<<<<<<<< @@ -9816,7 +9611,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ } - /* "ssh2/channel.pyx":535 + /* "ssh2/channel.pyx":527 * m_len = len(b_message) * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9830,7 +9625,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":536 + /* "ssh2/channel.pyx":528 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_channel_process_startup( # <<<<<<<<<<<<<< @@ -9840,7 +9635,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx __pyx_v_rc = libssh2_channel_process_startup(__pyx_v_self->_channel, __pyx_v__request, __pyx_v_r_len, __pyx_v__message, __pyx_v_m_len); } - /* "ssh2/channel.pyx":535 + /* "ssh2/channel.pyx":527 * m_len = len(b_message) * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9857,7 +9652,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx } } - /* "ssh2/channel.pyx":538 + /* "ssh2/channel.pyx":530 * rc = c_ssh2.libssh2_channel_process_startup( * self._channel, _request, r_len, _message, m_len) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -9865,14 +9660,14 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx * def poll_channel_read(self, int extended): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":512 + /* "ssh2/channel.pyx":504 * return handle_error_codes(rc) * * def process_startup(self, request, message=None): # <<<<<<<<<<<<<< @@ -9893,7 +9688,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx return __pyx_r; } -/* "ssh2/channel.pyx":540 +/* "ssh2/channel.pyx":532 * return handle_error_codes(rc) * * def poll_channel_read(self, int extended): # <<<<<<<<<<<<<< @@ -9902,16 +9697,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62process_startup(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_65poll_channel_read(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_63poll_channel_read(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_64poll_channel_read, "Channel.poll_channel_read(self, int extended)\n\nDeprecated - use session.block_directions and socket polling\ninstead"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_65poll_channel_read = {"poll_channel_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_65poll_channel_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_64poll_channel_read}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_65poll_channel_read(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_62poll_channel_read, "Channel.poll_channel_read(self, int extended)\n\nDeprecated - use session.block_directions and socket polling\ninstead"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_63poll_channel_read = {"poll_channel_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_63poll_channel_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_62poll_channel_read}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_63poll_channel_read(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9941,32 +9736,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_extended,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 540, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 532, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 540, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "poll_channel_read", 0) < 0) __PYX_ERR(0, 540, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "poll_channel_read", 0) < 0) __PYX_ERR(0, 532, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("poll_channel_read", 1, 1, 1, i); __PYX_ERR(0, 540, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("poll_channel_read", 1, 1, 1, i); __PYX_ERR(0, 532, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 540, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) } - __pyx_v_extended = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_extended == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L3_error) + __pyx_v_extended = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_extended == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("poll_channel_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 540, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("poll_channel_read", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 532, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9977,7 +9772,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_extended); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_62poll_channel_read(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_extended); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -9987,7 +9782,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_extended) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_62poll_channel_read(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_extended) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9998,7 +9793,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll_channel_read", 0); - /* "ssh2/channel.pyx":544 + /* "ssh2/channel.pyx":536 * instead""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10012,7 +9807,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __p __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":545 + /* "ssh2/channel.pyx":537 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_poll_channel_read(self._channel, extended) # <<<<<<<<<<<<<< @@ -10022,7 +9817,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __p __pyx_v_rc = libssh2_poll_channel_read(__pyx_v_self->_channel, __pyx_v_extended); } - /* "ssh2/channel.pyx":544 + /* "ssh2/channel.pyx":536 * instead""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10039,22 +9834,22 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __p } } - /* "ssh2/channel.pyx":546 + /* "ssh2/channel.pyx":538 * with nogil: * rc = c_ssh2.libssh2_poll_channel_read(self._channel, extended) * return handle_error_codes(rc) # <<<<<<<<<<<<<< * - * def handle_extended_data(self, int ignore_mode): + * def handle_extended_data2(self, int ignore_mode): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 546, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":540 + /* "ssh2/channel.pyx":532 * return handle_error_codes(rc) * * def poll_channel_read(self, int extended): # <<<<<<<<<<<<<< @@ -10073,180 +9868,25 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64poll_channel_read(struct __p return __pyx_r; } -/* "ssh2/channel.pyx":548 - * return handle_error_codes(rc) - * - * def handle_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_67handle_extended_data(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_66handle_extended_data, "Channel.handle_extended_data(self, int ignore_mode)\n\nDeprecated, use handle_extended_data2"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_67handle_extended_data = {"handle_extended_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_67handle_extended_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_66handle_extended_data}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_67handle_extended_data(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - int __pyx_v_ignore_mode; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("handle_extended_data (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ignore_mode,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 548, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 548, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_extended_data", 0) < 0) __PYX_ERR(0, 548, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_extended_data", 1, 1, 1, i); __PYX_ERR(0, 548, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 548, __pyx_L3_error) - } - __pyx_v_ignore_mode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_ignore_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 548, __pyx_L3_error) - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("handle_extended_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 548, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.channel.Channel.handle_extended_data", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_66handle_extended_data(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_ignore_mode); - - /* function exit code */ - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_66handle_extended_data(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("handle_extended_data", 0); - - /* "ssh2/channel.pyx":550 - * def handle_extended_data(self, int ignore_mode): - * """Deprecated, use handle_extended_data2""" - * with nogil: # <<<<<<<<<<<<<< - * c_ssh2.libssh2_channel_handle_extended_data( - * self._channel, ignore_mode) -*/ - { - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - /*try:*/ { - - /* "ssh2/channel.pyx":551 - * """Deprecated, use handle_extended_data2""" - * with nogil: - * c_ssh2.libssh2_channel_handle_extended_data( # <<<<<<<<<<<<<< - * self._channel, ignore_mode) - * -*/ - libssh2_channel_handle_extended_data(__pyx_v_self->_channel, __pyx_v_ignore_mode); - } - - /* "ssh2/channel.pyx":550 - * def handle_extended_data(self, int ignore_mode): - * """Deprecated, use handle_extended_data2""" - * with nogil: # <<<<<<<<<<<<<< - * c_ssh2.libssh2_channel_handle_extended_data( - * self._channel, ignore_mode) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/channel.pyx":548 +/* "ssh2/channel.pyx":540 * return handle_error_codes(rc) * - * def handle_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/channel.pyx":554 - * self._channel, ignore_mode) - * * def handle_extended_data2(self, int ignore_mode): # <<<<<<<<<<<<<< * cdef int rc * with nogil: */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_69handle_extended_data2(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_65handle_extended_data2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_68handle_extended_data2, "Channel.handle_extended_data2(self, int ignore_mode)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_69handle_extended_data2 = {"handle_extended_data2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_69handle_extended_data2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_68handle_extended_data2}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_69handle_extended_data2(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_64handle_extended_data2, "Channel.handle_extended_data2(self, int ignore_mode)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_65handle_extended_data2 = {"handle_extended_data2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_65handle_extended_data2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_64handle_extended_data2}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_65handle_extended_data2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10276,32 +9916,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ignore_mode,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 554, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 540, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 540, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_extended_data2", 0) < 0) __PYX_ERR(0, 554, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "handle_extended_data2", 0) < 0) __PYX_ERR(0, 540, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_extended_data2", 1, 1, 1, i); __PYX_ERR(0, 554, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("handle_extended_data2", 1, 1, 1, i); __PYX_ERR(0, 540, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 554, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 540, __pyx_L3_error) } - __pyx_v_ignore_mode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_ignore_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 554, __pyx_L3_error) + __pyx_v_ignore_mode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_ignore_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 540, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("handle_extended_data2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 554, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("handle_extended_data2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 540, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10312,7 +9952,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_ignore_mode); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_64handle_extended_data2(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_ignore_mode); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -10322,7 +9962,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_64handle_extended_data2(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10333,7 +9973,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("handle_extended_data2", 0); - /* "ssh2/channel.pyx":556 + /* "ssh2/channel.pyx":542 * def handle_extended_data2(self, int ignore_mode): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10347,7 +9987,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":557 + /* "ssh2/channel.pyx":543 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_channel_handle_extended_data2( # <<<<<<<<<<<<<< @@ -10357,7 +9997,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct __pyx_v_rc = libssh2_channel_handle_extended_data2(__pyx_v_self->_channel, __pyx_v_ignore_mode); } - /* "ssh2/channel.pyx":556 + /* "ssh2/channel.pyx":542 * def handle_extended_data2(self, int ignore_mode): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10374,23 +10014,23 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct } } - /* "ssh2/channel.pyx":559 + /* "ssh2/channel.pyx":545 * rc = c_ssh2.libssh2_channel_handle_extended_data2( * self._channel, ignore_mode) * return handle_error_codes(rc) # <<<<<<<<<<<<<< * - * def ignore_extended_data(self, int ignore_mode): + * def request_auth_agent(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 559, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 545, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":554 - * self._channel, ignore_mode) + /* "ssh2/channel.pyx":540 + * return handle_error_codes(rc) * * def handle_extended_data2(self, int ignore_mode): # <<<<<<<<<<<<<< * cdef int rc @@ -10408,180 +10048,25 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68handle_extended_data2(struct return __pyx_r; } -/* "ssh2/channel.pyx":561 - * return handle_error_codes(rc) - * - * def ignore_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_71ignore_extended_data(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_70ignore_extended_data, "Channel.ignore_extended_data(self, int ignore_mode)\n\nDeprecated, use handle_extended_data2"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_71ignore_extended_data = {"ignore_extended_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_71ignore_extended_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_70ignore_extended_data}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_71ignore_extended_data(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - int __pyx_v_ignore_mode; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("ignore_extended_data (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_ignore_mode,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 561, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 561, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "ignore_extended_data", 0) < 0) __PYX_ERR(0, 561, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("ignore_extended_data", 1, 1, 1, i); __PYX_ERR(0, 561, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 561, __pyx_L3_error) - } - __pyx_v_ignore_mode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_ignore_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L3_error) - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("ignore_extended_data", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 561, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.channel.Channel.ignore_extended_data", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_70ignore_extended_data(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_ignore_mode); - - /* function exit code */ - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_70ignore_extended_data(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, int __pyx_v_ignore_mode) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("ignore_extended_data", 0); - - /* "ssh2/channel.pyx":563 - * def ignore_extended_data(self, int ignore_mode): - * """Deprecated, use handle_extended_data2""" - * with nogil: # <<<<<<<<<<<<<< - * c_ssh2.libssh2_channel_handle_extended_data( - * self._channel, ignore_mode) -*/ - { - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - /*try:*/ { - - /* "ssh2/channel.pyx":564 - * """Deprecated, use handle_extended_data2""" - * with nogil: - * c_ssh2.libssh2_channel_handle_extended_data( # <<<<<<<<<<<<<< - * self._channel, ignore_mode) - * -*/ - libssh2_channel_handle_extended_data(__pyx_v_self->_channel, __pyx_v_ignore_mode); - } - - /* "ssh2/channel.pyx":563 - * def ignore_extended_data(self, int ignore_mode): - * """Deprecated, use handle_extended_data2""" - * with nogil: # <<<<<<<<<<<<<< - * c_ssh2.libssh2_channel_handle_extended_data( - * self._channel, ignore_mode) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/channel.pyx":561 +/* "ssh2/channel.pyx":547 * return handle_error_codes(rc) * - * def ignore_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - - /* function exit code */ - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/channel.pyx":567 - * self._channel, ignore_mode) - * * def request_auth_agent(self): # <<<<<<<<<<<<<< * """Request SSH agent authentication forwarding on channel.""" * cdef int rc */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_73request_auth_agent(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_67request_auth_agent(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_72request_auth_agent, "Channel.request_auth_agent(self)\n\nRequest SSH agent authentication forwarding on channel."); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_73request_auth_agent = {"request_auth_agent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_73request_auth_agent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_72request_auth_agent}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_73request_auth_agent(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_66request_auth_agent, "Channel.request_auth_agent(self)\n\nRequest SSH agent authentication forwarding on channel."); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_67request_auth_agent = {"request_auth_agent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_67request_auth_agent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_66request_auth_agent}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_67request_auth_agent(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10607,14 +10092,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("request_auth_agent", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_66request_auth_agent(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_66request_auth_agent(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10625,7 +10110,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_auth_agent", 0); - /* "ssh2/channel.pyx":570 + /* "ssh2/channel.pyx":550 * """Request SSH agent authentication forwarding on channel.""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10639,7 +10124,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":571 + /* "ssh2/channel.pyx":551 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_channel_request_auth_agent(self._channel) # <<<<<<<<<<<<<< @@ -10649,7 +10134,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ __pyx_v_rc = libssh2_channel_request_auth_agent(__pyx_v_self->_channel); } - /* "ssh2/channel.pyx":570 + /* "ssh2/channel.pyx":550 * """Request SSH agent authentication forwarding on channel.""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10666,7 +10151,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ } } - /* "ssh2/channel.pyx":572 + /* "ssh2/channel.pyx":552 * with nogil: * rc = c_ssh2.libssh2_channel_request_auth_agent(self._channel) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -10674,15 +10159,15 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ * def signal(self, signame not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 572, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 552, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":567 - * self._channel, ignore_mode) + /* "ssh2/channel.pyx":547 + * return handle_error_codes(rc) * * def request_auth_agent(self): # <<<<<<<<<<<<<< * """Request SSH agent authentication forwarding on channel.""" @@ -10700,7 +10185,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ return __pyx_r; } -/* "ssh2/channel.pyx":574 +/* "ssh2/channel.pyx":554 * return handle_error_codes(rc) * * def signal(self, signame not None): # <<<<<<<<<<<<<< @@ -10709,16 +10194,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72request_auth_agent(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_75signal(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_69signal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_74signal, "Channel.signal(self, signame)\n\nSend signal to channel.\n\nSigname must be a free form signal name without the leading SIG. Eg 'HUP', 'INT', 'TERM' and so forth.\n\nSee :py:mod:`signal.Signals`.\n\n:param signame: Signal name to send to channel.\n:type signame: str"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_75signal = {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_75signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_74signal}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_75signal(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_68signal, "Channel.signal(self, signame)\n\nSend signal to channel.\n\nSigname must be a free form signal name without the leading SIG. Eg 'HUP', 'INT', 'TERM' and so forth.\n\nSee :py:mod:`signal.Signals`.\n\n:param signame: Signal name to send to channel.\n:type signame: str"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_69signal = {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_69signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_68signal}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_69signal(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10748,32 +10233,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_signame,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 574, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 554, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 574, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 554, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "signal", 0) < 0) __PYX_ERR(0, 574, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "signal", 0) < 0) __PYX_ERR(0, 554, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("signal", 1, 1, 1, i); __PYX_ERR(0, 574, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("signal", 1, 1, 1, i); __PYX_ERR(0, 554, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 574, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 554, __pyx_L3_error) } __pyx_v_signame = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("signal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 574, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("signal", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 554, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10785,9 +10270,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_signame) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "signame"); __PYX_ERR(0, 574, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "signame"); __PYX_ERR(0, 554, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_74signal(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_signame); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_68signal(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v_signame); /* function exit code */ goto __pyx_L0; @@ -10806,7 +10291,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_signame) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_68signal(struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, PyObject *__pyx_v_signame) { int __pyx_v_rc; PyObject *__pyx_v_b_signame = 0; char const *__pyx_v_c_signame; @@ -10822,19 +10307,19 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("signal", 0); - /* "ssh2/channel.pyx":586 + /* "ssh2/channel.pyx":566 * """ * cdef int rc * cdef bytes b_signame = to_bytes(signame) # <<<<<<<<<<<<<< * cdef const char *c_signame = b_signame * cdef int signame_len = len(signame) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_signame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_signame); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_signame = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/channel.pyx":587 + /* "ssh2/channel.pyx":567 * cdef int rc * cdef bytes b_signame = to_bytes(signame) * cdef const char *c_signame = b_signame # <<<<<<<<<<<<<< @@ -10843,22 +10328,22 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh */ if (unlikely(__pyx_v_b_signame == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 587, __pyx_L1_error) + __PYX_ERR(0, 567, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_signame); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_signame); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L1_error) __pyx_v_c_signame = __pyx_t_2; - /* "ssh2/channel.pyx":588 + /* "ssh2/channel.pyx":568 * cdef bytes b_signame = to_bytes(signame) * cdef const char *c_signame = b_signame * cdef int signame_len = len(signame) # <<<<<<<<<<<<<< * with nogil: * rc = c_ssh2.libssh2_channel_signal_ex(self._channel, c_signame, signame_len) */ - __pyx_t_3 = PyObject_Length(__pyx_v_signame); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_3 = PyObject_Length(__pyx_v_signame); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 568, __pyx_L1_error) __pyx_v_signame_len = __pyx_t_3; - /* "ssh2/channel.pyx":589 + /* "ssh2/channel.pyx":569 * cdef const char *c_signame = b_signame * cdef int signame_len = len(signame) * with nogil: # <<<<<<<<<<<<<< @@ -10872,7 +10357,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/channel.pyx":590 + /* "ssh2/channel.pyx":570 * cdef int signame_len = len(signame) * with nogil: * rc = c_ssh2.libssh2_channel_signal_ex(self._channel, c_signame, signame_len) # <<<<<<<<<<<<<< @@ -10881,7 +10366,7 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh __pyx_v_rc = libssh2_channel_signal_ex(__pyx_v_self->_channel, __pyx_v_c_signame, __pyx_v_signame_len); } - /* "ssh2/channel.pyx":589 + /* "ssh2/channel.pyx":569 * cdef const char *c_signame = b_signame * cdef int signame_len = len(signame) * with nogil: # <<<<<<<<<<<<<< @@ -10898,20 +10383,20 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh } } - /* "ssh2/channel.pyx":591 + /* "ssh2/channel.pyx":571 * with nogil: * rc = c_ssh2.libssh2_channel_signal_ex(self._channel, c_signame, signame_len) * return handle_error_codes(rc) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 591, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 571, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/channel.pyx":574 + /* "ssh2/channel.pyx":554 * return handle_error_codes(rc) * * def signal(self, signame not None): # <<<<<<<<<<<<<< @@ -10938,16 +10423,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_74signal(struct __pyx_obj_4ssh */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_77__reduce_cython__(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_71__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_76__reduce_cython__, "Channel.__reduce_cython__(self)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_77__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_77__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_76__reduce_cython__}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_77__reduce_cython__(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_70__reduce_cython__, "Channel.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_71__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_71__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_70__reduce_cython__}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_71__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10973,14 +10458,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_76__reduce_cython__(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_70__reduce_cython__(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_76__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_70__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -11020,16 +10505,16 @@ static PyObject *__pyx_pf_4ssh2_7channel_7Channel_76__reduce_cython__(CYTHON_UNU */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_79__setstate_cython__(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_73__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_78__setstate_cython__, "Channel.__setstate_cython__(self, __pyx_state)"); -static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_79__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_79__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_78__setstate_cython__}; -static PyObject *__pyx_pw_4ssh2_7channel_7Channel_79__setstate_cython__(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7channel_7Channel_72__setstate_cython__, "Channel.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4ssh2_7channel_7Channel_73__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_73__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_72__setstate_cython__}; +static PyObject *__pyx_pw_4ssh2_7channel_7Channel_73__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -11095,7 +10580,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_78__setstate_cython__(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v___pyx_state); + __pyx_r = __pyx_pf_4ssh2_7channel_7Channel_72__setstate_cython__(((struct __pyx_obj_4ssh2_7channel_Channel *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -11105,7 +10590,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7channel_7Channel_78__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_4ssh2_7channel_7Channel_72__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7channel_Channel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -11239,22 +10724,19 @@ static PyMethodDef __pyx_methods_4ssh2_7channel_Channel[] = { {"window_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_43window_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_42window_read}, {"window_write_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_45window_write_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_44window_write_ex}, {"window_write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_47window_write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_46window_write}, - {"receive_window_adjust", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust}, - {"receive_window_adjust2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_51receive_window_adjust2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_50receive_window_adjust2}, - {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_53write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_52write}, - {"write_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_55write_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_54write_ex}, - {"write_stderr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_57write_stderr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_56write_stderr}, - {"x11_req", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_59x11_req, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_58x11_req}, - {"x11_req_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_61x11_req_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_60x11_req_ex}, - {"process_startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_63process_startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_62process_startup}, - {"poll_channel_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_65poll_channel_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_64poll_channel_read}, - {"handle_extended_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_67handle_extended_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_66handle_extended_data}, - {"handle_extended_data2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_69handle_extended_data2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_68handle_extended_data2}, - {"ignore_extended_data", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_71ignore_extended_data, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_70ignore_extended_data}, - {"request_auth_agent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_73request_auth_agent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_72request_auth_agent}, - {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_75signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_74signal}, - {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_77__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_76__reduce_cython__}, - {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_79__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_78__setstate_cython__}, + {"receive_window_adjust2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_49receive_window_adjust2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_48receive_window_adjust2}, + {"write", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_51write, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_50write}, + {"write_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_53write_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_52write_ex}, + {"write_stderr", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_55write_stderr, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_54write_stderr}, + {"x11_req", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_57x11_req, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_56x11_req}, + {"x11_req_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_59x11_req_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_58x11_req_ex}, + {"process_startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_61process_startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_60process_startup}, + {"poll_channel_read", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_63poll_channel_read, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_62poll_channel_read}, + {"handle_extended_data2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_65handle_extended_data2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_64handle_extended_data2}, + {"request_auth_agent", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_67request_auth_agent, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_66request_auth_agent}, + {"signal", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_69signal, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_68signal}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_71__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_70__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7channel_7Channel_73__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7channel_7Channel_72__setstate_cython__}, {0, 0, 0, 0} }; @@ -12106,170 +11588,134 @@ __Pyx_RefNannySetupContext("PyInit_channel", 0); /* "ssh2/channel.pyx":336 * return handle_error_codes(rc) * - * def receive_window_adjust(self, unsigned long adjustment, # <<<<<<<<<<<<<< - * unsigned long force): - * cdef unsigned long rc -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_49receive_window_adjust, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_receive_window_adjust, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_receive_window_adjust, __pyx_t_3) < 0) __PYX_ERR(0, 336, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/channel.pyx":344 - * return handle_error_codes(rc) - * * def receive_window_adjust2(self, unsigned long adjustment, # <<<<<<<<<<<<<< * unsigned long force): * cdef unsigned long rc */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_51receive_window_adjust2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_receive_window_adjust2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_49receive_window_adjust2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_receive_window_adjust2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_receive_window_adjust2, __pyx_t_3) < 0) __PYX_ERR(0, 344, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_receive_window_adjust2, __pyx_t_3) < 0) __PYX_ERR(0, 336, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":353 + /* "ssh2/channel.pyx":345 * return handle_error_codes(rc) * * def write(self, buf not None): # <<<<<<<<<<<<<< * """Write buffer to stdin. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_53write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 353, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_51write, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_3) < 0) __PYX_ERR(0, 353, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write, __pyx_t_3) < 0) __PYX_ERR(0, 345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":399 + /* "ssh2/channel.pyx":391 * return rc, bytes_written * * def write_ex(self, int stream_id, buf not None): # <<<<<<<<<<<<<< * """Write buffer to specified stream id. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_55write_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_53write_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write_ex, __pyx_t_3) < 0) __PYX_ERR(0, 399, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write_ex, __pyx_t_3) < 0) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":448 + /* "ssh2/channel.pyx":440 * return rc, bytes_written * * def write_stderr(self, buf not None): # <<<<<<<<<<<<<< * """Write buffer to stderr. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_57write_stderr, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write_stderr, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_55write_stderr, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_write_stderr, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write_stderr, __pyx_t_3) < 0) __PYX_ERR(0, 448, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_write_stderr, __pyx_t_3) < 0) __PYX_ERR(0, 440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":494 + /* "ssh2/channel.pyx":486 * return rc, bytes_written * * def x11_req(self, int screen_number): # <<<<<<<<<<<<<< * cdef int rc * with nogil: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_59x11_req, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_x11_req, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_57x11_req, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_x11_req, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_x11_req, __pyx_t_3) < 0) __PYX_ERR(0, 494, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_x11_req, __pyx_t_3) < 0) __PYX_ERR(0, 486, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":501 + /* "ssh2/channel.pyx":493 * return handle_error_codes(rc) * * def x11_req_ex(self, int single_connection, # <<<<<<<<<<<<<< * const char *auth_proto, * const char *auth_cookie, */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_61x11_req_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_x11_req_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_59x11_req_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_x11_req_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_x11_req_ex, __pyx_t_3) < 0) __PYX_ERR(0, 501, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_x11_req_ex, __pyx_t_3) < 0) __PYX_ERR(0, 493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":512 + /* "ssh2/channel.pyx":504 * return handle_error_codes(rc) * * def process_startup(self, request, message=None): # <<<<<<<<<<<<<< * """Startup process on server for request with message. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_63process_startup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_process_startup, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_61process_startup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_process_startup, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_process_startup, __pyx_t_3) < 0) __PYX_ERR(0, 512, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_process_startup, __pyx_t_3) < 0) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":540 + /* "ssh2/channel.pyx":532 * return handle_error_codes(rc) * * def poll_channel_read(self, int extended): # <<<<<<<<<<<<<< * """Deprecated - use session.block_directions and socket polling * instead""" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_65poll_channel_read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_poll_channel_read, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_63poll_channel_read, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_poll_channel_read, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_poll_channel_read, __pyx_t_3) < 0) __PYX_ERR(0, 540, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_poll_channel_read, __pyx_t_3) < 0) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":548 + /* "ssh2/channel.pyx":540 * return handle_error_codes(rc) * - * def handle_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_67handle_extended_data, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_handle_extended_data, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_handle_extended_data, __pyx_t_3) < 0) __PYX_ERR(0, 548, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/channel.pyx":554 - * self._channel, ignore_mode) - * * def handle_extended_data2(self, int ignore_mode): # <<<<<<<<<<<<<< * cdef int rc * with nogil: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_69handle_extended_data2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_handle_extended_data2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_65handle_extended_data2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_handle_extended_data2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_handle_extended_data2, __pyx_t_3) < 0) __PYX_ERR(0, 554, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_handle_extended_data2, __pyx_t_3) < 0) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":561 + /* "ssh2/channel.pyx":547 * return handle_error_codes(rc) * - * def ignore_extended_data(self, int ignore_mode): # <<<<<<<<<<<<<< - * """Deprecated, use handle_extended_data2""" - * with nogil: -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_71ignore_extended_data, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_ignore_extended_data, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_ignore_extended_data, __pyx_t_3) < 0) __PYX_ERR(0, 561, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/channel.pyx":567 - * self._channel, ignore_mode) - * * def request_auth_agent(self): # <<<<<<<<<<<<<< * """Request SSH agent authentication forwarding on channel.""" * cdef int rc */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_73request_auth_agent, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_request_auth_agent, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_67request_auth_agent, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_request_auth_agent, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_request_auth_agent, __pyx_t_3) < 0) __PYX_ERR(0, 567, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_request_auth_agent, __pyx_t_3) < 0) __PYX_ERR(0, 547, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/channel.pyx":574 + /* "ssh2/channel.pyx":554 * return handle_error_codes(rc) * * def signal(self, signame not None): # <<<<<<<<<<<<<< * """ * Send signal to channel. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_75signal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_signal, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 574, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_69signal, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel_signal, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_signal, __pyx_t_3) < 0) __PYX_ERR(0, 574, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7channel_Channel, __pyx_mstate_global->__pyx_n_u_signal, __pyx_t_3) < 0) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 @@ -12277,7 +11723,7 @@ __Pyx_RefNannySetupContext("PyInit_channel", 0); * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_77__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_71__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12288,7 +11734,7 @@ __Pyx_RefNannySetupContext("PyInit_channel", 0); * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_79__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7channel_7Channel_73__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Channel___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_channel, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12375,16 +11821,13 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_Channel_flush_stderr, sizeof(__pyx_k_Channel_flush_stderr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_flush_stderr */ {__pyx_k_Channel_get_exit_signal, sizeof(__pyx_k_Channel_get_exit_signal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_get_exit_signal */ {__pyx_k_Channel_get_exit_status, sizeof(__pyx_k_Channel_get_exit_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_get_exit_status */ - {__pyx_k_Channel_handle_extended_data, sizeof(__pyx_k_Channel_handle_extended_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_handle_extended_data */ {__pyx_k_Channel_handle_extended_data2, sizeof(__pyx_k_Channel_handle_extended_data2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_handle_extended_data2 */ - {__pyx_k_Channel_ignore_extended_data, sizeof(__pyx_k_Channel_ignore_extended_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_ignore_extended_data */ {__pyx_k_Channel_poll_channel_read, sizeof(__pyx_k_Channel_poll_channel_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_poll_channel_read */ {__pyx_k_Channel_process_startup, sizeof(__pyx_k_Channel_process_startup), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_process_startup */ {__pyx_k_Channel_pty, sizeof(__pyx_k_Channel_pty), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_pty */ {__pyx_k_Channel_read, sizeof(__pyx_k_Channel_read), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_read */ {__pyx_k_Channel_read_ex, sizeof(__pyx_k_Channel_read_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_read_ex */ {__pyx_k_Channel_read_stderr, sizeof(__pyx_k_Channel_read_stderr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_read_stderr */ - {__pyx_k_Channel_receive_window_adjust, sizeof(__pyx_k_Channel_receive_window_adjust), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_receive_window_adjust */ {__pyx_k_Channel_receive_window_adjust2, sizeof(__pyx_k_Channel_receive_window_adjust2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_receive_window_adjust2 */ {__pyx_k_Channel_request_auth_agent, sizeof(__pyx_k_Channel_request_auth_agent), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_request_auth_agent */ {__pyx_k_Channel_send_eof, sizeof(__pyx_k_Channel_send_eof), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Channel_send_eof */ @@ -12452,9 +11895,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_get_exit_signal, sizeof(__pyx_k_get_exit_signal), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_exit_signal */ {__pyx_k_get_exit_status, sizeof(__pyx_k_get_exit_status), 0, 1, 1}, /* PyObject cname: __pyx_n_u_get_exit_status */ {__pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 1, 1}, /* PyObject cname: __pyx_n_u_getstate */ - {__pyx_k_handle_extended_data, sizeof(__pyx_k_handle_extended_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_extended_data */ {__pyx_k_handle_extended_data2, sizeof(__pyx_k_handle_extended_data2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_handle_extended_data2 */ - {__pyx_k_ignore_extended_data, sizeof(__pyx_k_ignore_extended_data), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ignore_extended_data */ {__pyx_k_ignore_mode, sizeof(__pyx_k_ignore_mode), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ignore_mode */ {__pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 1, 1}, /* PyObject cname: __pyx_n_u_is_coroutine */ {__pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_isenabled */ @@ -12485,7 +11926,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_read_avail, sizeof(__pyx_k_read_avail), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read_avail */ {__pyx_k_read_ex, sizeof(__pyx_k_read_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read_ex */ {__pyx_k_read_stderr, sizeof(__pyx_k_read_stderr), 0, 1, 1}, /* PyObject cname: __pyx_n_u_read_stderr */ - {__pyx_k_receive_window_adjust, sizeof(__pyx_k_receive_window_adjust), 0, 1, 1}, /* PyObject cname: __pyx_n_u_receive_window_adjust */ {__pyx_k_receive_window_adjust2, sizeof(__pyx_k_receive_window_adjust2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_receive_window_adjust2 */ {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */ @@ -12589,14 +12029,14 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); - /* "ssh2/channel.pyx":512 + /* "ssh2/channel.pyx":504 * return handle_error_codes(rc) * * def process_startup(self, request, message=None): # <<<<<<<<<<<<<< * """Startup process on server for request with message. * */ - __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_RefNannyFinishContext(); @@ -12754,84 +12194,69 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_window_write, __pyx_k_A_4AT_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 336, 34}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_adjustment, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_receive_window_adjust, __pyx_k_A_Q_K_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 344, 43}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 336, 43}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_adjustment, __pyx_mstate->__pyx_n_u_force, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_storewindow}; - __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_receive_window_adjust2, __pyx_k_A_a_K_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_receive_window_adjust2, __pyx_k_A_a_K_7_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 353, 132}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 345, 132}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_b_buf, __pyx_mstate->__pyx_n_u_buf_2, __pyx_mstate->__pyx_n_u_buf_remainder, __pyx_mstate->__pyx_n_u_buf_tot_size, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_bytes_written}; - __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_k_A2_81A_Cq_1_A_1_6_3b_c_1_M_1_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write, __pyx_k_A2_81A_Cq_1_A_1_6_3b_c_1_M_1_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 399, 134}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 391, 134}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_stream_id, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_b_buf, __pyx_mstate->__pyx_n_u_buf_2, __pyx_mstate->__pyx_n_u_buf_remainder, __pyx_mstate->__pyx_n_u_buf_tot_size, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_bytes_written}; - __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write_ex, __pyx_k_A6_81A_Cq_1_A_4A_fA_3b_c_1_M_1_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write_ex, __pyx_k_A6_81A_Cq_1_A_4A_fA_3b_c_1_M_1_t, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 448, 132}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 440, 132}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_buf, __pyx_mstate->__pyx_n_u_b_buf, __pyx_mstate->__pyx_n_u_buf_2, __pyx_mstate->__pyx_n_u_buf_remainder, __pyx_mstate->__pyx_n_u_buf_tot_size, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_bytes_written}; - __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write_stderr, __pyx_k_A2_81A_Cq_1_A_8_6_3b_c_1_M_1_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_write_stderr, __pyx_k_A2_81A_Cq_1_A_8_6_3b_c_1_M_1_t1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 494, 30}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 486, 30}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_screen_number, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_x11_req, __pyx_k_A_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_x11_req, __pyx_k_A_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 501, 39}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 493, 39}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_single_connection, __pyx_mstate->__pyx_n_u_auth_proto, __pyx_mstate->__pyx_n_u_auth_cookie, __pyx_mstate->__pyx_n_u_screen_number, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_x11_req_ex, __pyx_k_A_2_Kq_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_x11_req_ex, __pyx_k_A_2_Kq_M, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 512, 111}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 504, 111}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_request, __pyx_mstate->__pyx_n_u_message, __pyx_mstate->__pyx_n_u_b_request, __pyx_mstate->__pyx_n_u_b_message, __pyx_mstate->__pyx_n_u_request_2, __pyx_mstate->__pyx_n_u_message_2, __pyx_mstate->__pyx_n_u_r_len, __pyx_mstate->__pyx_n_u_m_len, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_process_startup, __pyx_k_q_xq_q_a_a_Cq_A_87_q_Cq_7q_Kz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_process_startup, __pyx_k_q_xq_q_a_a_Cq_A_87_q_Cq_7q_Kz, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 540, 31}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 532, 31}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_extended, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_poll_channel_read, __pyx_k_A_1_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_poll_channel_read, __pyx_k_A_1_k, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 548, 17}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ignore_mode}; - __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_handle_extended_data, __pyx_k_A_7q_Kq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 554, 30}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 540, 30}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ignore_mode, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_handle_extended_data2, __pyx_k_A_Q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 561, 17}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_ignore_mode}; - __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_ignore_extended_data, __pyx_k_A_7q_Kq_2, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_handle_extended_data2, __pyx_k_A_Q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 567, 29}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 547, 29}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_request_auth_agent, __pyx_k_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_request_auth_agent, __pyx_k_A_4q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 574, 56}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 554, 56}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_signame, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_signame, __pyx_mstate->__pyx_n_u_c_signame, __pyx_mstate->__pyx_n_u_signame_len}; - __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_signal, __pyx_k_A_xq_Q_s_1_1_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_channel_pyx, __pyx_mstate->__pyx_n_u_signal, __pyx_k_A_xq_Q_s_1_1_k_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; - __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; - __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; diff --git a/ssh2/channel.pyx b/ssh2/channel.pyx index 95116336..f736d732 100644 --- a/ssh2/channel.pyx +++ b/ssh2/channel.pyx @@ -333,14 +333,6 @@ cdef class Channel: rc = c_ssh2.libssh2_channel_window_write(self._channel) return handle_error_codes(rc) - def receive_window_adjust(self, unsigned long adjustment, - unsigned long force): - cdef unsigned long rc - with nogil: - rc = c_ssh2.libssh2_channel_receive_window_adjust( - self._channel, adjustment, force) - return handle_error_codes(rc) - def receive_window_adjust2(self, unsigned long adjustment, unsigned long force): cdef unsigned long rc @@ -545,12 +537,6 @@ cdef class Channel: rc = c_ssh2.libssh2_poll_channel_read(self._channel, extended) return handle_error_codes(rc) - def handle_extended_data(self, int ignore_mode): - """Deprecated, use handle_extended_data2""" - with nogil: - c_ssh2.libssh2_channel_handle_extended_data( - self._channel, ignore_mode) - def handle_extended_data2(self, int ignore_mode): cdef int rc with nogil: @@ -558,12 +544,6 @@ cdef class Channel: self._channel, ignore_mode) return handle_error_codes(rc) - def ignore_extended_data(self, int ignore_mode): - """Deprecated, use handle_extended_data2""" - with nogil: - c_ssh2.libssh2_channel_handle_extended_data( - self._channel, ignore_mode) - def request_auth_agent(self): """Request SSH agent authentication forwarding on channel.""" cdef int rc diff --git a/ssh2/session.c b/ssh2/session.c index c31e4776..d19f0968 100644 --- a/ssh2/session.c +++ b/ssh2/session.c @@ -1786,7 +1786,7 @@ struct __pyx_obj_4ssh2_7session_FlagType { }; -/* "ssh2/session.pyx":345 +/* "ssh2/session.pyx":339 * :type password: str * """ * def passwd(*args, password=password): # <<<<<<<<<<<<<< @@ -2846,7 +2846,6 @@ static const char __pyx_k_key_len[] = "key_len"; static const char __pyx_k_methods[] = "methods"; static const char __pyx_k_seconds[] = "seconds"; static const char __pyx_k_shost_2[] = "_shost"; -static const char __pyx_k_startup[] = "startup"; static const char __pyx_k_timeout[] = "timeout"; static const char __pyx_k_FlagType[] = "FlagType"; static const char __pyx_k_add_note[] = "add_note"; @@ -2864,11 +2863,8 @@ static const char __pyx_k_listener[] = "listener"; static const char __pyx_k_msg_size[] = "msg_size"; static const char __pyx_k_password[] = "password"; static const char __pyx_k_qualname[] = "__qualname__"; -static const char __pyx_k_scp_recv[] = "scp_recv"; -static const char __pyx_k_scp_send[] = "scp_send"; static const char __pyx_k_set_name[] = "__set_name__"; static const char __pyx_k_setstate[] = "__setstate__"; -static const char __pyx_k_statinfo[] = "statinfo"; static const char __pyx_k_username[] = "username"; static const char __pyx_k_A_1_a_6_A[] = "\200A\360\010\000\016\017\330\014\032\320\0321\260\021\260$\260a\330\010\013\2106\220\023\220A\330\014\022\220!\330\010\017\320\017 \240\001\240\027\250\001"; static const char __pyx_k_A_4AT_t1A[] = "\200A\360\n\000\016\017\330\014\027\320\0274\260A\260T\270\021\330\010\017\210t\2201\220A"; @@ -2907,7 +2903,6 @@ static const char __pyx_k_pubkeydata[] = "pubkeydata"; static const char __pyx_k_scp_send64[] = "scp_send64"; static const char __pyx_k_username_2[] = "_username"; static const char __pyx_k_want_reply[] = "want_reply"; -static const char __pyx_k_A_2_1_4AT_A[] = "\200A\340\010\031\320\0312\260!\2601\330\010\034\320\0344\260A\260T\270\033\300A\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_A_Jat1_wawa[] = "\200A\360\014\000\016\017\330\014\024\220J\230a\230t\2401\330\010\017\210w\220a\220w\230a"; static const char __pyx_k_A_q_S_2_K_a[] = "\200A\360\026\000\t!\240\010\250\001\250\021\330\010\037\230q\330\010*\250!\330\010%\240S\250\001\250\021\330\r\016\330\014\027\320\0272\260!\330\020\024\220K\230{\250!\330\020 \240\006\240a\330\010\017\320\017!\240\021\240!"; static const char __pyx_k_MemoryError[] = "MemoryError"; @@ -2956,14 +2951,11 @@ static const char __pyx_k_A_1_Q_at_aq_1_q[] = "\200A\360\014\000\t\034\2301\330\ static const char __pyx_k_A_haq_Q_6a_Ky_q[] = "\200A\330\010\036\230h\240a\240q\330\010\035\230Q\340\r\016\330\014\027\320\0276\260a\330\020\024\220K\230y\250\001\330\010\017\210q"; static const char __pyx_k_Session_hostkey[] = "Session.hostkey"; static const char __pyx_k_Session_methods[] = "Session.methods"; -static const char __pyx_k_Session_startup[] = "Session.startup"; static const char __pyx_k_direct_tcpip_ex[] = "direct_tcpip_ex"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_6_uD_a_AQ_AT_D_1[] = "\320\004*\250!\3606\000\t\033\230!\330\010\017\210u\220D\320\030.\250a\330\014\022\220*\230A\230Q\330\035\036\330\r\016\330\014\027\320\027,\250A\250T\260\033\270D\300\010\310\001\330\010\032\230!\2301"; static const char __pyx_k_A4_q_1_8_4A_4q_a[] = "\200A\3604\000\t!\240\010\250\001\250\021\330\010\037\230q\330\010+\2501\330\0108\270\001\330\0104\260A\330\010\020\320\020\"\240!\2404\240q\330\r\016\330\014\026\220a\220{\240!"; static const char __pyx_k_A_XQa_1_31_K_1_q[] = "\200A\360\036\000\t\036\230X\240Q\240a\330\010#\2401\340\r\016\330\014\027\320\0273\2601\330\020\024\220K\230{\250(\260!\330\010\032\230!\2301\330\010\017\210q"; -static const char __pyx_k_Session_scp_recv[] = "Session.scp_recv"; -static const char __pyx_k_Session_scp_send[] = "Session.scp_send"; static const char __pyx_k_block_directions[] = "block_directions"; static const char __pyx_k_keepalive_config[] = "keepalive_config"; static const char __pyx_k_ssh2_session_pyx[] = "ssh2/session.pyx"; @@ -3043,8 +3035,6 @@ static const char __pyx_k_FlagType___setstate_cython[] = "FlagType.__setstate_cy static const char __pyx_k_MethodType___reduce_cython[] = "MethodType.__reduce_cython__"; static const char __pyx_k_Session_userauth_publickey[] = "Session.userauth_publickey"; static const char __pyx_k_A_31_1_q_Q_a_q_S_WA_S_Q_K_A[] = "\200A\340\0273\2601\340\010 \240\010\250\001\250\021\330\010\"\240(\250!\2501\330\010\037\230q\330\010!\240\021\330\010(\250\001\330\010)\250\021\340\010%\240Q\330\010\026\220a\330\014\017\210q\220\r\230S\240\001\240\021\330\010\013\320\013\035\230W\240A\330\014!\240\021\330\014\035\230S\240\001\240\021\330\r\016\330\014\027\320\027=\270Q\330\020\024\220K\230{\250.\270\001\330\020 \240\001\330\020$\240A\330\010\017\320\017!\240\021\240!"; -static const char __pyx_k_A_HAQ_1_Q_KwfA_83a_W_Gq_A_y[] = "\200A\360\026\000\t\035\230H\240A\240Q\330\010\033\2301\340\r\016\330\014\034\320\034-\250Q\330\020\024\220K\230w\240f\250A\330\010\013\2108\2203\220a\330\014\023\320\023%\240W\320,G\300q\330\020\024\220A\330\010\017\210y\230\001\230\031\240!"; -static const char __pyx_k_A_HAQ_1_Q_Kwha_83a_W_Gq_A_y[] = "\200A\360\024\000\t\035\230H\240A\240Q\330\010\033\2301\330\010!\240\030\250\021\340\r\016\330\014\034\320\034-\250Q\330\020\024\220K\230w\240h\250a\330\010\013\2108\2203\220a\330\014\023\320\023%\240W\320,G\300q\330\020\024\220A\330\010\017\210y\230\001\230\031\240'\250\021"; static const char __pyx_k_A_HAQ_1_a_Kwha_83a_W_Gq_A_y[] = "\200A\360\020\000\t\"\240\030\250\021\330\010\034\230H\240A\240Q\330\010\033\2301\340\r\016\330\014\034\320\034.\250a\330\020\024\220K\230w\240h\250a\330\010\013\2108\2203\220a\330\014\023\320\023%\240W\320,G\300q\330\020\024\220A\330\010\017\210y\230\001\230\031\240'\250\021"; static const char __pyx_k_A_HAQ_1_q_KwfF_83a_W_Gq_A_y[] = "\200A\360\030\000\t\035\230H\240A\240Q\330\010\033\2301\340\r\016\330\014\034\320\034/\250q\330\020\024\220K\230w\240f\250F\260'\270\021\330\010\013\2108\2203\220a\330\014\023\320\023%\240W\320,G\300q\330\020\024\220A\330\010\017\210y\230\001\230\031\240!"; static const char __pyx_k_LIBSSH2_HOSTKEY_HASH_SHA256[] = "LIBSSH2_HOSTKEY_HASH_SHA256"; @@ -3090,53 +3080,50 @@ static int __pyx_pf_4ssh2_7session_7Session___cinit__(struct __pyx_obj_4ssh2_7se static void __pyx_pf_4ssh2_7session_7Session_2__dealloc__(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4ssh2_7session_7Session_4disconnect(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4ssh2_7session_7Session_6handshake(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_sock); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_8startup(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_sock); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_blocking); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, long __pyx_v_timeout); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickey); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_pubkeydata); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_hostname, PyObject *__pyx_v_publickey, PyObject *__pyx_v_passphrase); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemory(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekeyfiledata, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickeyfiledata); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_8set_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_blocking); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_10get_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_12set_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, long __pyx_v_timeout); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_14get_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_16userauth_authenticated(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_list(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_publickey_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickey); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_pubkeydata); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_hostbased_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_hostname, PyObject *__pyx_v_publickey, PyObject *__pyx_v_passphrase); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_publickey_frommemory(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekeyfiledata, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickeyfiledata); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_password(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password); /* proto */ static PyObject *__pyx_pf_4ssh2_7session___defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_keyboardinteractive_passwd(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_password, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_callback); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port, PyObject *__pyx_v_shost, int __pyx_v_sport); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_socket_path, PyObject *__pyx_v_shost, int __pyx_v_sport); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_FlagType *__pyx_v_flag, PyObject *__pyx_v_enabled); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_port); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_queue_maxsize, PyObject *__pyx_v_host, int __pyx_v_port); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, size_t __pyx_v_msg_size); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_62set_last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_errcode, PyObject *__pyx_v_errmsg); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_64scp_recv(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_66scp_recv2(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, size_t __pyx_v_size); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, libssh2_uint64_t __pyx_v_size, time_t __pyx_v_mtime, time_t __pyx_v_atime); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_hash_type); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_want_reply, unsigned int __pyx_v_interval); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type, PyObject *__pyx_v_prefs); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_keyboardinteractive(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_callback); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_34agent_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_auth(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_38open_session(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_40direct_tcpip_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port, PyObject *__pyx_v_shost, int __pyx_v_sport); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_streamlocal_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_socket_path, PyObject *__pyx_v_shost, int __pyx_v_sport); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_46block_directions(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_48flag(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_FlagType *__pyx_v_flag, PyObject *__pyx_v_enabled); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_50forward_listen(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_port); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_queue_maxsize, PyObject *__pyx_v_host, int __pyx_v_port); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_54sftp_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_56last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, size_t __pyx_v_msg_size); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_errno(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_60set_last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_errcode, PyObject *__pyx_v_errmsg); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_62scp_recv2(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_64scp_send64(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, libssh2_uint64_t __pyx_v_size, time_t __pyx_v_mtime, time_t __pyx_v_atime); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_66publickey_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_68hostkey_hash(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_hash_type); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_70hostkey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_72knownhost_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_74keepalive_config(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_want_reply, unsigned int __pyx_v_interval); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_76keepalive_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_78supported_algs(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_80methods(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_82method_pref(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type, PyObject *__pyx_v_prefs); /* proto */ static PyObject *__pyx_pf_4ssh2_7session_7Session_4sock___get__(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_4ssh2_7session_7Session_13_kbd_callback___get__(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_90__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_92__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_84__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_4ssh2_7session_7Session_86__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_tp_new_4ssh2_7session_Session(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4ssh2_7session_MethodType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_4ssh2_7session_FlagType(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ @@ -3200,8 +3187,8 @@ typedef struct { PyTypeObject *__pyx_ptype_4ssh2_7session___pyx_defaults; __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_pop; PyObject *__pyx_tuple[5]; - PyObject *__pyx_codeobj_tab[50]; - PyObject *__pyx_string_tab[264]; + PyObject *__pyx_codeobj_tab[47]; + PyObject *__pyx_string_tab[257]; PyObject *__pyx_int_0; PyObject *__pyx_int_1024; /* #### Code section: module_state_contents ### */ @@ -3310,201 +3297,194 @@ static __pyx_mstatetype * const __pyx_mstate_global = &__pyx_mstate_global_stati #define __pyx_n_u_Session_methods __pyx_string_tab[66] #define __pyx_n_u_Session_open_session __pyx_string_tab[67] #define __pyx_n_u_Session_publickey_init __pyx_string_tab[68] -#define __pyx_n_u_Session_scp_recv __pyx_string_tab[69] -#define __pyx_n_u_Session_scp_recv2 __pyx_string_tab[70] -#define __pyx_n_u_Session_scp_send __pyx_string_tab[71] -#define __pyx_n_u_Session_scp_send64 __pyx_string_tab[72] -#define __pyx_n_u_Session_set_blocking __pyx_string_tab[73] -#define __pyx_n_u_Session_set_last_error __pyx_string_tab[74] -#define __pyx_n_u_Session_set_timeout __pyx_string_tab[75] -#define __pyx_n_u_Session_sftp_init __pyx_string_tab[76] -#define __pyx_n_u_Session_startup __pyx_string_tab[77] -#define __pyx_n_u_Session_supported_algs __pyx_string_tab[78] -#define __pyx_n_u_Session_userauth_authenticated __pyx_string_tab[79] -#define __pyx_n_u_Session_userauth_hostbased_fromf __pyx_string_tab[80] -#define __pyx_n_u_Session_userauth_keyboardinterac __pyx_string_tab[81] -#define __pyx_n_u_Session_userauth_keyboardinterac_2 __pyx_string_tab[82] -#define __pyx_n_u_Session_userauth_list __pyx_string_tab[83] -#define __pyx_n_u_Session_userauth_password __pyx_string_tab[84] -#define __pyx_n_u_Session_userauth_publickey __pyx_string_tab[85] -#define __pyx_n_u_Session_userauth_publickey_fromf __pyx_string_tab[86] -#define __pyx_n_u_Session_userauth_publickey_fromm __pyx_string_tab[87] -#define __pyx_n_u_TypeError __pyx_string_tab[88] -#define __pyx_n_u_ValueError __pyx_string_tab[89] -#define __pyx_kp_b__2 __pyx_string_tab[90] -#define __pyx_kp_u__2 __pyx_string_tab[91] -#define __pyx_kp_u__3 __pyx_string_tab[92] -#define __pyx_kp_u__4 __pyx_string_tab[93] -#define __pyx_kp_u_add_note __pyx_string_tab[94] -#define __pyx_n_u_agent __pyx_string_tab[95] -#define __pyx_n_u_agent_auth __pyx_string_tab[96] -#define __pyx_n_u_agent_init __pyx_string_tab[97] -#define __pyx_n_u_algs __pyx_string_tab[98] -#define __pyx_n_u_args __pyx_string_tab[99] -#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[100] -#define __pyx_n_u_atime __pyx_string_tab[101] -#define __pyx_n_u_auth __pyx_string_tab[102] -#define __pyx_n_u_auth_2 __pyx_string_tab[103] -#define __pyx_n_u_b_errmsg __pyx_string_tab[104] -#define __pyx_n_u_b_hash __pyx_string_tab[105] -#define __pyx_n_u_b_host __pyx_string_tab[106] -#define __pyx_n_u_b_hostname __pyx_string_tab[107] -#define __pyx_n_u_b_passphrase __pyx_string_tab[108] -#define __pyx_n_u_b_password __pyx_string_tab[109] -#define __pyx_n_u_b_path __pyx_string_tab[110] -#define __pyx_n_u_b_prefs __pyx_string_tab[111] -#define __pyx_n_u_b_privatekey __pyx_string_tab[112] -#define __pyx_n_u_b_publickey __pyx_string_tab[113] -#define __pyx_n_u_b_shost __pyx_string_tab[114] -#define __pyx_n_u_b_socket_path __pyx_string_tab[115] -#define __pyx_n_u_b_username __pyx_string_tab[116] -#define __pyx_n_u_block_directions __pyx_string_tab[117] -#define __pyx_n_u_blocking __pyx_string_tab[118] -#define __pyx_n_u_bound_port __pyx_string_tab[119] -#define __pyx_n_u_c_algs __pyx_string_tab[120] -#define __pyx_n_u_c_prefs __pyx_string_tab[121] -#define __pyx_n_u_c_seconds __pyx_string_tab[122] -#define __pyx_n_u_c_shost __pyx_string_tab[123] -#define __pyx_n_u_c_socket_path __pyx_string_tab[124] -#define __pyx_n_u_callback __pyx_string_tab[125] -#define __pyx_n_u_channel __pyx_string_tab[126] -#define __pyx_n_u_cline_in_traceback __pyx_string_tab[127] -#define __pyx_n_u_direct_streamlocal_ex __pyx_string_tab[128] -#define __pyx_n_u_direct_tcpip __pyx_string_tab[129] -#define __pyx_n_u_direct_tcpip_ex __pyx_string_tab[130] -#define __pyx_kp_u_disable __pyx_string_tab[131] -#define __pyx_n_u_disconnect __pyx_string_tab[132] -#define __pyx_kp_u_enable __pyx_string_tab[133] -#define __pyx_n_u_enabled __pyx_string_tab[134] -#define __pyx_n_u_errcode __pyx_string_tab[135] -#define __pyx_n_u_errmsg __pyx_string_tab[136] -#define __pyx_n_u_errmsg_2 __pyx_string_tab[137] -#define __pyx_n_u_errmsg_len __pyx_string_tab[138] -#define __pyx_n_u_error_msg __pyx_string_tab[139] -#define __pyx_n_u_exceptions __pyx_string_tab[140] -#define __pyx_n_u_fileinfo __pyx_string_tab[141] -#define __pyx_n_u_flag __pyx_string_tab[142] -#define __pyx_n_u_forward_listen __pyx_string_tab[143] -#define __pyx_n_u_forward_listen_ex __pyx_string_tab[144] -#define __pyx_n_u_func __pyx_string_tab[145] -#define __pyx_kp_u_gc __pyx_string_tab[146] -#define __pyx_n_u_get_blocking __pyx_string_tab[147] -#define __pyx_n_u_get_timeout __pyx_string_tab[148] -#define __pyx_n_u_getstate __pyx_string_tab[149] -#define __pyx_n_u_handshake __pyx_string_tab[150] -#define __pyx_n_u_hash __pyx_string_tab[151] -#define __pyx_n_u_hash_type __pyx_string_tab[152] -#define __pyx_n_u_host __pyx_string_tab[153] -#define __pyx_n_u_host_2 __pyx_string_tab[154] -#define __pyx_n_u_hostkey __pyx_string_tab[155] -#define __pyx_n_u_hostkey_hash __pyx_string_tab[156] -#define __pyx_n_u_hostname __pyx_string_tab[157] -#define __pyx_n_u_hostname_2 __pyx_string_tab[158] -#define __pyx_n_u_i __pyx_string_tab[159] -#define __pyx_n_u_identity __pyx_string_tab[160] -#define __pyx_n_u_interval __pyx_string_tab[161] -#define __pyx_n_u_is_coroutine __pyx_string_tab[162] -#define __pyx_kp_u_isenabled __pyx_string_tab[163] -#define __pyx_n_u_keepalive_config __pyx_string_tab[164] -#define __pyx_n_u_keepalive_send __pyx_string_tab[165] -#define __pyx_n_u_key __pyx_string_tab[166] -#define __pyx_n_u_key_2 __pyx_string_tab[167] -#define __pyx_n_u_key_len __pyx_string_tab[168] -#define __pyx_n_u_key_type __pyx_string_tab[169] -#define __pyx_n_u_known_hosts __pyx_string_tab[170] -#define __pyx_n_u_knownhost_init __pyx_string_tab[171] -#define __pyx_n_u_last_errno __pyx_string_tab[172] -#define __pyx_n_u_last_error __pyx_string_tab[173] -#define __pyx_n_u_listener __pyx_string_tab[174] -#define __pyx_n_u_main __pyx_string_tab[175] -#define __pyx_n_u_method_pref __pyx_string_tab[176] -#define __pyx_n_u_method_type __pyx_string_tab[177] -#define __pyx_n_u_methods __pyx_string_tab[178] -#define __pyx_n_u_mode __pyx_string_tab[179] -#define __pyx_n_u_module __pyx_string_tab[180] -#define __pyx_n_u_msg __pyx_string_tab[181] -#define __pyx_n_u_msg_size __pyx_string_tab[182] -#define __pyx_n_u_mtime __pyx_string_tab[183] -#define __pyx_n_u_name __pyx_string_tab[184] -#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[185] -#define __pyx_n_u_open_session __pyx_string_tab[186] -#define __pyx_n_u_passphrase __pyx_string_tab[187] -#define __pyx_n_u_passphrase_2 __pyx_string_tab[188] -#define __pyx_n_u_passwd __pyx_string_tab[189] -#define __pyx_n_u_password __pyx_string_tab[190] -#define __pyx_n_u_password_2 __pyx_string_tab[191] -#define __pyx_n_u_path __pyx_string_tab[192] -#define __pyx_n_u_path_2 __pyx_string_tab[193] -#define __pyx_n_u_pkey __pyx_string_tab[194] -#define __pyx_n_u_pop __pyx_string_tab[195] -#define __pyx_n_u_port __pyx_string_tab[196] -#define __pyx_n_u_prefs __pyx_string_tab[197] -#define __pyx_n_u_prev __pyx_string_tab[198] -#define __pyx_n_u_privatekey __pyx_string_tab[199] -#define __pyx_n_u_privatekey_2 __pyx_string_tab[200] -#define __pyx_n_u_privatekeydata_len __pyx_string_tab[201] -#define __pyx_n_u_privatekeyfiledata __pyx_string_tab[202] -#define __pyx_n_u_privatekeyfiledata_2 __pyx_string_tab[203] -#define __pyx_n_u_pubkeydata __pyx_string_tab[204] -#define __pyx_n_u_pubkeydata_2 __pyx_string_tab[205] -#define __pyx_n_u_pubkeydata_len __pyx_string_tab[206] -#define __pyx_n_u_publickey __pyx_string_tab[207] -#define __pyx_n_u_publickey_2 __pyx_string_tab[208] -#define __pyx_n_u_publickey_init __pyx_string_tab[209] -#define __pyx_n_u_publickeyfiledata __pyx_string_tab[210] -#define __pyx_n_u_publickeyfiledata_2 __pyx_string_tab[211] -#define __pyx_n_u_pyx_state __pyx_string_tab[212] -#define __pyx_n_u_qualname __pyx_string_tab[213] -#define __pyx_n_u_queue_maxsize __pyx_string_tab[214] -#define __pyx_n_u_range __pyx_string_tab[215] -#define __pyx_n_u_rc __pyx_string_tab[216] -#define __pyx_n_u_reduce __pyx_string_tab[217] -#define __pyx_n_u_reduce_cython __pyx_string_tab[218] -#define __pyx_n_u_reduce_ex __pyx_string_tab[219] -#define __pyx_n_u_scp_recv __pyx_string_tab[220] -#define __pyx_n_u_scp_recv2 __pyx_string_tab[221] -#define __pyx_n_u_scp_send __pyx_string_tab[222] -#define __pyx_n_u_scp_send64 __pyx_string_tab[223] -#define __pyx_n_u_seconds __pyx_string_tab[224] -#define __pyx_n_u_self __pyx_string_tab[225] -#define __pyx_n_u_set_blocking __pyx_string_tab[226] -#define __pyx_n_u_set_last_error __pyx_string_tab[227] -#define __pyx_n_u_set_name __pyx_string_tab[228] -#define __pyx_n_u_set_timeout __pyx_string_tab[229] -#define __pyx_n_u_setstate __pyx_string_tab[230] -#define __pyx_n_u_setstate_cython __pyx_string_tab[231] -#define __pyx_n_u_sftp __pyx_string_tab[232] -#define __pyx_n_u_sftp_init __pyx_string_tab[233] -#define __pyx_n_u_shost __pyx_string_tab[234] -#define __pyx_n_u_shost_2 __pyx_string_tab[235] -#define __pyx_n_u_size __pyx_string_tab[236] -#define __pyx_n_u_sock __pyx_string_tab[237] -#define __pyx_n_u_sock_2 __pyx_string_tab[238] -#define __pyx_n_u_socket_path __pyx_string_tab[239] -#define __pyx_n_u_sport __pyx_string_tab[240] -#define __pyx_n_u_ssh2_session __pyx_string_tab[241] -#define __pyx_kp_u_ssh2_session_pyx __pyx_string_tab[242] -#define __pyx_n_u_startup __pyx_string_tab[243] -#define __pyx_n_u_statinfo __pyx_string_tab[244] -#define __pyx_kp_u_stringsource __pyx_string_tab[245] -#define __pyx_n_u_supported_algs __pyx_string_tab[246] -#define __pyx_n_u_test __pyx_string_tab[247] -#define __pyx_n_u_timeout __pyx_string_tab[248] -#define __pyx_n_u_userauth_authenticated __pyx_string_tab[249] -#define __pyx_n_u_userauth_hostbased_fromfile __pyx_string_tab[250] -#define __pyx_n_u_userauth_keyboardinteractive __pyx_string_tab[251] -#define __pyx_n_u_userauth_keyboardinteractive_cal __pyx_string_tab[252] -#define __pyx_n_u_userauth_keyboardinteractive_loc __pyx_string_tab[253] -#define __pyx_n_u_userauth_list __pyx_string_tab[254] -#define __pyx_n_u_userauth_password __pyx_string_tab[255] -#define __pyx_n_u_userauth_publickey __pyx_string_tab[256] -#define __pyx_n_u_userauth_publickey_fromfile __pyx_string_tab[257] -#define __pyx_n_u_userauth_publickey_frommemory __pyx_string_tab[258] -#define __pyx_n_u_username __pyx_string_tab[259] -#define __pyx_n_u_username_2 __pyx_string_tab[260] -#define __pyx_n_u_username_len __pyx_string_tab[261] -#define __pyx_n_u_value __pyx_string_tab[262] -#define __pyx_n_u_want_reply __pyx_string_tab[263] +#define __pyx_n_u_Session_scp_recv2 __pyx_string_tab[69] +#define __pyx_n_u_Session_scp_send64 __pyx_string_tab[70] +#define __pyx_n_u_Session_set_blocking __pyx_string_tab[71] +#define __pyx_n_u_Session_set_last_error __pyx_string_tab[72] +#define __pyx_n_u_Session_set_timeout __pyx_string_tab[73] +#define __pyx_n_u_Session_sftp_init __pyx_string_tab[74] +#define __pyx_n_u_Session_supported_algs __pyx_string_tab[75] +#define __pyx_n_u_Session_userauth_authenticated __pyx_string_tab[76] +#define __pyx_n_u_Session_userauth_hostbased_fromf __pyx_string_tab[77] +#define __pyx_n_u_Session_userauth_keyboardinterac __pyx_string_tab[78] +#define __pyx_n_u_Session_userauth_keyboardinterac_2 __pyx_string_tab[79] +#define __pyx_n_u_Session_userauth_list __pyx_string_tab[80] +#define __pyx_n_u_Session_userauth_password __pyx_string_tab[81] +#define __pyx_n_u_Session_userauth_publickey __pyx_string_tab[82] +#define __pyx_n_u_Session_userauth_publickey_fromf __pyx_string_tab[83] +#define __pyx_n_u_Session_userauth_publickey_fromm __pyx_string_tab[84] +#define __pyx_n_u_TypeError __pyx_string_tab[85] +#define __pyx_n_u_ValueError __pyx_string_tab[86] +#define __pyx_kp_b__2 __pyx_string_tab[87] +#define __pyx_kp_u__2 __pyx_string_tab[88] +#define __pyx_kp_u__3 __pyx_string_tab[89] +#define __pyx_kp_u__4 __pyx_string_tab[90] +#define __pyx_kp_u_add_note __pyx_string_tab[91] +#define __pyx_n_u_agent __pyx_string_tab[92] +#define __pyx_n_u_agent_auth __pyx_string_tab[93] +#define __pyx_n_u_agent_init __pyx_string_tab[94] +#define __pyx_n_u_algs __pyx_string_tab[95] +#define __pyx_n_u_args __pyx_string_tab[96] +#define __pyx_n_u_asyncio_coroutines __pyx_string_tab[97] +#define __pyx_n_u_atime __pyx_string_tab[98] +#define __pyx_n_u_auth __pyx_string_tab[99] +#define __pyx_n_u_auth_2 __pyx_string_tab[100] +#define __pyx_n_u_b_errmsg __pyx_string_tab[101] +#define __pyx_n_u_b_hash __pyx_string_tab[102] +#define __pyx_n_u_b_host __pyx_string_tab[103] +#define __pyx_n_u_b_hostname __pyx_string_tab[104] +#define __pyx_n_u_b_passphrase __pyx_string_tab[105] +#define __pyx_n_u_b_password __pyx_string_tab[106] +#define __pyx_n_u_b_path __pyx_string_tab[107] +#define __pyx_n_u_b_prefs __pyx_string_tab[108] +#define __pyx_n_u_b_privatekey __pyx_string_tab[109] +#define __pyx_n_u_b_publickey __pyx_string_tab[110] +#define __pyx_n_u_b_shost __pyx_string_tab[111] +#define __pyx_n_u_b_socket_path __pyx_string_tab[112] +#define __pyx_n_u_b_username __pyx_string_tab[113] +#define __pyx_n_u_block_directions __pyx_string_tab[114] +#define __pyx_n_u_blocking __pyx_string_tab[115] +#define __pyx_n_u_bound_port __pyx_string_tab[116] +#define __pyx_n_u_c_algs __pyx_string_tab[117] +#define __pyx_n_u_c_prefs __pyx_string_tab[118] +#define __pyx_n_u_c_seconds __pyx_string_tab[119] +#define __pyx_n_u_c_shost __pyx_string_tab[120] +#define __pyx_n_u_c_socket_path __pyx_string_tab[121] +#define __pyx_n_u_callback __pyx_string_tab[122] +#define __pyx_n_u_channel __pyx_string_tab[123] +#define __pyx_n_u_cline_in_traceback __pyx_string_tab[124] +#define __pyx_n_u_direct_streamlocal_ex __pyx_string_tab[125] +#define __pyx_n_u_direct_tcpip __pyx_string_tab[126] +#define __pyx_n_u_direct_tcpip_ex __pyx_string_tab[127] +#define __pyx_kp_u_disable __pyx_string_tab[128] +#define __pyx_n_u_disconnect __pyx_string_tab[129] +#define __pyx_kp_u_enable __pyx_string_tab[130] +#define __pyx_n_u_enabled __pyx_string_tab[131] +#define __pyx_n_u_errcode __pyx_string_tab[132] +#define __pyx_n_u_errmsg __pyx_string_tab[133] +#define __pyx_n_u_errmsg_2 __pyx_string_tab[134] +#define __pyx_n_u_errmsg_len __pyx_string_tab[135] +#define __pyx_n_u_error_msg __pyx_string_tab[136] +#define __pyx_n_u_exceptions __pyx_string_tab[137] +#define __pyx_n_u_fileinfo __pyx_string_tab[138] +#define __pyx_n_u_flag __pyx_string_tab[139] +#define __pyx_n_u_forward_listen __pyx_string_tab[140] +#define __pyx_n_u_forward_listen_ex __pyx_string_tab[141] +#define __pyx_n_u_func __pyx_string_tab[142] +#define __pyx_kp_u_gc __pyx_string_tab[143] +#define __pyx_n_u_get_blocking __pyx_string_tab[144] +#define __pyx_n_u_get_timeout __pyx_string_tab[145] +#define __pyx_n_u_getstate __pyx_string_tab[146] +#define __pyx_n_u_handshake __pyx_string_tab[147] +#define __pyx_n_u_hash __pyx_string_tab[148] +#define __pyx_n_u_hash_type __pyx_string_tab[149] +#define __pyx_n_u_host __pyx_string_tab[150] +#define __pyx_n_u_host_2 __pyx_string_tab[151] +#define __pyx_n_u_hostkey __pyx_string_tab[152] +#define __pyx_n_u_hostkey_hash __pyx_string_tab[153] +#define __pyx_n_u_hostname __pyx_string_tab[154] +#define __pyx_n_u_hostname_2 __pyx_string_tab[155] +#define __pyx_n_u_i __pyx_string_tab[156] +#define __pyx_n_u_identity __pyx_string_tab[157] +#define __pyx_n_u_interval __pyx_string_tab[158] +#define __pyx_n_u_is_coroutine __pyx_string_tab[159] +#define __pyx_kp_u_isenabled __pyx_string_tab[160] +#define __pyx_n_u_keepalive_config __pyx_string_tab[161] +#define __pyx_n_u_keepalive_send __pyx_string_tab[162] +#define __pyx_n_u_key __pyx_string_tab[163] +#define __pyx_n_u_key_2 __pyx_string_tab[164] +#define __pyx_n_u_key_len __pyx_string_tab[165] +#define __pyx_n_u_key_type __pyx_string_tab[166] +#define __pyx_n_u_known_hosts __pyx_string_tab[167] +#define __pyx_n_u_knownhost_init __pyx_string_tab[168] +#define __pyx_n_u_last_errno __pyx_string_tab[169] +#define __pyx_n_u_last_error __pyx_string_tab[170] +#define __pyx_n_u_listener __pyx_string_tab[171] +#define __pyx_n_u_main __pyx_string_tab[172] +#define __pyx_n_u_method_pref __pyx_string_tab[173] +#define __pyx_n_u_method_type __pyx_string_tab[174] +#define __pyx_n_u_methods __pyx_string_tab[175] +#define __pyx_n_u_mode __pyx_string_tab[176] +#define __pyx_n_u_module __pyx_string_tab[177] +#define __pyx_n_u_msg __pyx_string_tab[178] +#define __pyx_n_u_msg_size __pyx_string_tab[179] +#define __pyx_n_u_mtime __pyx_string_tab[180] +#define __pyx_n_u_name __pyx_string_tab[181] +#define __pyx_kp_u_no_default___reduce___due_to_non __pyx_string_tab[182] +#define __pyx_n_u_open_session __pyx_string_tab[183] +#define __pyx_n_u_passphrase __pyx_string_tab[184] +#define __pyx_n_u_passphrase_2 __pyx_string_tab[185] +#define __pyx_n_u_passwd __pyx_string_tab[186] +#define __pyx_n_u_password __pyx_string_tab[187] +#define __pyx_n_u_password_2 __pyx_string_tab[188] +#define __pyx_n_u_path __pyx_string_tab[189] +#define __pyx_n_u_path_2 __pyx_string_tab[190] +#define __pyx_n_u_pkey __pyx_string_tab[191] +#define __pyx_n_u_pop __pyx_string_tab[192] +#define __pyx_n_u_port __pyx_string_tab[193] +#define __pyx_n_u_prefs __pyx_string_tab[194] +#define __pyx_n_u_prev __pyx_string_tab[195] +#define __pyx_n_u_privatekey __pyx_string_tab[196] +#define __pyx_n_u_privatekey_2 __pyx_string_tab[197] +#define __pyx_n_u_privatekeydata_len __pyx_string_tab[198] +#define __pyx_n_u_privatekeyfiledata __pyx_string_tab[199] +#define __pyx_n_u_privatekeyfiledata_2 __pyx_string_tab[200] +#define __pyx_n_u_pubkeydata __pyx_string_tab[201] +#define __pyx_n_u_pubkeydata_2 __pyx_string_tab[202] +#define __pyx_n_u_pubkeydata_len __pyx_string_tab[203] +#define __pyx_n_u_publickey __pyx_string_tab[204] +#define __pyx_n_u_publickey_2 __pyx_string_tab[205] +#define __pyx_n_u_publickey_init __pyx_string_tab[206] +#define __pyx_n_u_publickeyfiledata __pyx_string_tab[207] +#define __pyx_n_u_publickeyfiledata_2 __pyx_string_tab[208] +#define __pyx_n_u_pyx_state __pyx_string_tab[209] +#define __pyx_n_u_qualname __pyx_string_tab[210] +#define __pyx_n_u_queue_maxsize __pyx_string_tab[211] +#define __pyx_n_u_range __pyx_string_tab[212] +#define __pyx_n_u_rc __pyx_string_tab[213] +#define __pyx_n_u_reduce __pyx_string_tab[214] +#define __pyx_n_u_reduce_cython __pyx_string_tab[215] +#define __pyx_n_u_reduce_ex __pyx_string_tab[216] +#define __pyx_n_u_scp_recv2 __pyx_string_tab[217] +#define __pyx_n_u_scp_send64 __pyx_string_tab[218] +#define __pyx_n_u_seconds __pyx_string_tab[219] +#define __pyx_n_u_self __pyx_string_tab[220] +#define __pyx_n_u_set_blocking __pyx_string_tab[221] +#define __pyx_n_u_set_last_error __pyx_string_tab[222] +#define __pyx_n_u_set_name __pyx_string_tab[223] +#define __pyx_n_u_set_timeout __pyx_string_tab[224] +#define __pyx_n_u_setstate __pyx_string_tab[225] +#define __pyx_n_u_setstate_cython __pyx_string_tab[226] +#define __pyx_n_u_sftp __pyx_string_tab[227] +#define __pyx_n_u_sftp_init __pyx_string_tab[228] +#define __pyx_n_u_shost __pyx_string_tab[229] +#define __pyx_n_u_shost_2 __pyx_string_tab[230] +#define __pyx_n_u_size __pyx_string_tab[231] +#define __pyx_n_u_sock __pyx_string_tab[232] +#define __pyx_n_u_sock_2 __pyx_string_tab[233] +#define __pyx_n_u_socket_path __pyx_string_tab[234] +#define __pyx_n_u_sport __pyx_string_tab[235] +#define __pyx_n_u_ssh2_session __pyx_string_tab[236] +#define __pyx_kp_u_ssh2_session_pyx __pyx_string_tab[237] +#define __pyx_kp_u_stringsource __pyx_string_tab[238] +#define __pyx_n_u_supported_algs __pyx_string_tab[239] +#define __pyx_n_u_test __pyx_string_tab[240] +#define __pyx_n_u_timeout __pyx_string_tab[241] +#define __pyx_n_u_userauth_authenticated __pyx_string_tab[242] +#define __pyx_n_u_userauth_hostbased_fromfile __pyx_string_tab[243] +#define __pyx_n_u_userauth_keyboardinteractive __pyx_string_tab[244] +#define __pyx_n_u_userauth_keyboardinteractive_cal __pyx_string_tab[245] +#define __pyx_n_u_userauth_keyboardinteractive_loc __pyx_string_tab[246] +#define __pyx_n_u_userauth_list __pyx_string_tab[247] +#define __pyx_n_u_userauth_password __pyx_string_tab[248] +#define __pyx_n_u_userauth_publickey __pyx_string_tab[249] +#define __pyx_n_u_userauth_publickey_fromfile __pyx_string_tab[250] +#define __pyx_n_u_userauth_publickey_frommemory __pyx_string_tab[251] +#define __pyx_n_u_username __pyx_string_tab[252] +#define __pyx_n_u_username_2 __pyx_string_tab[253] +#define __pyx_n_u_username_len __pyx_string_tab[254] +#define __pyx_n_u_value __pyx_string_tab[255] +#define __pyx_n_u_want_reply __pyx_string_tab[256] /* #### Code section: module_state_clear ### */ #if CYTHON_USE_MODULE_STATE static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { @@ -3545,8 +3525,8 @@ static CYTHON_SMALL_CODE int __pyx_m_clear(PyObject *m) { Py_CLEAR(clear_module_state->__pyx_ptype_4ssh2_7session___pyx_defaults); Py_CLEAR(clear_module_state->__pyx_type_4ssh2_7session___pyx_defaults); for (int i=0; i<5; ++i) { Py_CLEAR(clear_module_state->__pyx_tuple[i]); } - for (int i=0; i<50; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<264; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } + for (int i=0; i<47; ++i) { Py_CLEAR(clear_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<257; ++i) { Py_CLEAR(clear_module_state->__pyx_string_tab[i]); } Py_CLEAR(clear_module_state->__pyx_int_0); Py_CLEAR(clear_module_state->__pyx_int_1024); return 0; @@ -3589,8 +3569,8 @@ static CYTHON_SMALL_CODE int __pyx_m_traverse(PyObject *m, visitproc visit, void Py_VISIT(traverse_module_state->__pyx_ptype_4ssh2_7session___pyx_defaults); Py_VISIT(traverse_module_state->__pyx_type_4ssh2_7session___pyx_defaults); for (int i=0; i<5; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_tuple[i]); } - for (int i=0; i<50; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } - for (int i=0; i<264; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } + for (int i=0; i<47; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_codeobj_tab[i]); } + for (int i=0; i<257; ++i) { __Pyx_VISIT_CONST(traverse_module_state->__pyx_string_tab[i]); } __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_0); __Pyx_VISIT_CONST(traverse_module_state->__pyx_int_1024); return 0; @@ -5397,7 +5377,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_6handshake(struct __pyx_obj_4s * self.sock = sock * return handle_error_codes(rc) # <<<<<<<<<<<<<< * - * def startup(self, sock): + * def set_blocking(self, bint blocking): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 153, __pyx_L1_error) @@ -5427,165 +5407,6 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_6handshake(struct __pyx_obj_4s } /* "ssh2/session.pyx":155 - * return handle_error_codes(rc) - * - * def startup(self, sock): # <<<<<<<<<<<<<< - * """Deprecated - use self.handshake""" - * cdef int _sock = PyObject_AsFileDescriptor(sock) -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_9startup(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_8startup, "Session.startup(self, sock)\n\nDeprecated - use self.handshake"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_9startup = {"startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_9startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_8startup}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_9startup(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_sock = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("startup (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_sock,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 155, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "startup", 0) < 0) __PYX_ERR(0, 155, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("startup", 1, 1, 1, i); __PYX_ERR(0, 155, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) - } - __pyx_v_sock = values[0]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("startup", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.session.Session.startup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_8startup(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_sock); - - /* function exit code */ - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7session_7Session_8startup(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_sock) { - int __pyx_v__sock; - int __pyx_v_rc; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("startup", 0); - - /* "ssh2/session.pyx":157 - * def startup(self, sock): - * """Deprecated - use self.handshake""" - * cdef int _sock = PyObject_AsFileDescriptor(sock) # <<<<<<<<<<<<<< - * cdef int rc = c_ssh2.libssh2_session_startup(self._session, _sock) - * return handle_error_codes(rc) -*/ - __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_sock); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 157, __pyx_L1_error) - __pyx_v__sock = __pyx_t_1; - - /* "ssh2/session.pyx":158 - * """Deprecated - use self.handshake""" - * cdef int _sock = PyObject_AsFileDescriptor(sock) - * cdef int rc = c_ssh2.libssh2_session_startup(self._session, _sock) # <<<<<<<<<<<<<< - * return handle_error_codes(rc) - * -*/ - __pyx_v_rc = libssh2_session_startup(__pyx_v_self->_session, __pyx_v__sock); - - /* "ssh2/session.pyx":159 - * cdef int _sock = PyObject_AsFileDescriptor(sock) - * cdef int rc = c_ssh2.libssh2_session_startup(self._session, _sock) - * return handle_error_codes(rc) # <<<<<<<<<<<<<< - * - * def set_blocking(self, bint blocking): -*/ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 159, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - - /* "ssh2/session.pyx":155 - * return handle_error_codes(rc) - * - * def startup(self, sock): # <<<<<<<<<<<<<< - * """Deprecated - use self.handshake""" - * cdef int _sock = PyObject_AsFileDescriptor(sock) -*/ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("ssh2.session.Session.startup", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/session.pyx":161 * return handle_error_codes(rc) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< @@ -5594,16 +5415,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_8startup(struct __pyx_obj_4ssh */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_11set_blocking(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_9set_blocking(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_10set_blocking, "Session.set_blocking(self, bool blocking)\n\nSet session blocking mode on/off.\n\n:param blocking: ``False`` for non-blocking, ``True`` for blocking.\n Session default is blocking unless set otherwise.\n:type blocking: bool"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_11set_blocking = {"set_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_11set_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_10set_blocking}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_11set_blocking(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_8set_blocking, "Session.set_blocking(self, bool blocking)\n\nSet session blocking mode on/off.\n\n:param blocking: ``False`` for non-blocking, ``True`` for blocking.\n Session default is blocking unless set otherwise.\n:type blocking: bool"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_9set_blocking = {"set_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_9set_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_8set_blocking}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_9set_blocking(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -5633,32 +5454,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_blocking,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 161, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 155, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_blocking", 0) < 0) __PYX_ERR(0, 161, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_blocking", 0) < 0) __PYX_ERR(0, 155, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_blocking", 1, 1, 1, i); __PYX_ERR(0, 161, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_blocking", 1, 1, 1, i); __PYX_ERR(0, 155, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 161, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 155, __pyx_L3_error) } - __pyx_v_blocking = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 161, __pyx_L3_error) + __pyx_v_blocking = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 155, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_blocking", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 161, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_blocking", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 155, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5669,7 +5490,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_10set_blocking(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_blocking); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_8set_blocking(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_blocking); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -5679,12 +5500,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_blocking) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_8set_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_blocking) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh2/session.pyx":167 + /* "ssh2/session.pyx":161 * Session default is blocking unless set otherwise. * :type blocking: bool""" * with nogil: # <<<<<<<<<<<<<< @@ -5698,7 +5519,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":168 + /* "ssh2/session.pyx":162 * :type blocking: bool""" * with nogil: * c_ssh2.libssh2_session_set_blocking( # <<<<<<<<<<<<<< @@ -5708,7 +5529,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_ob libssh2_session_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh2/session.pyx":167 + /* "ssh2/session.pyx":161 * Session default is blocking unless set otherwise. * :type blocking: bool""" * with nogil: # <<<<<<<<<<<<<< @@ -5725,7 +5546,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_ob } } - /* "ssh2/session.pyx":161 + /* "ssh2/session.pyx":155 * return handle_error_codes(rc) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< @@ -5740,7 +5561,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_ob return __pyx_r; } -/* "ssh2/session.pyx":171 +/* "ssh2/session.pyx":165 * self._session, blocking) * * def get_blocking(self): # <<<<<<<<<<<<<< @@ -5749,16 +5570,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_10set_blocking(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_13get_blocking(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_11get_blocking(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_12get_blocking, "Session.get_blocking(self)\n\nGet session blocking mode enabled True/False.\n\n:rtype: bool"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_13get_blocking = {"get_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_13get_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_12get_blocking}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_13get_blocking(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_10get_blocking, "Session.get_blocking(self)\n\nGet session blocking mode enabled True/False.\n\n:rtype: bool"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_11get_blocking = {"get_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_11get_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_10get_blocking}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_11get_blocking(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -5784,14 +5605,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_blocking", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_12get_blocking(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_10get_blocking(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_10get_blocking(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -5802,7 +5623,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_blocking", 0); - /* "ssh2/session.pyx":176 + /* "ssh2/session.pyx":170 * :rtype: bool""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5816,7 +5637,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":177 + /* "ssh2/session.pyx":171 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_get_blocking(self._session) # <<<<<<<<<<<<<< @@ -5826,7 +5647,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob __pyx_v_rc = libssh2_session_get_blocking(__pyx_v_self->_session); } - /* "ssh2/session.pyx":176 + /* "ssh2/session.pyx":170 * :rtype: bool""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5843,7 +5664,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob } } - /* "ssh2/session.pyx":178 + /* "ssh2/session.pyx":172 * with nogil: * rc = c_ssh2.libssh2_session_get_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5851,17 +5672,17 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob * def set_timeout(self, long timeout): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":171 + /* "ssh2/session.pyx":165 * self._session, blocking) * * def get_blocking(self): # <<<<<<<<<<<<<< @@ -5880,7 +5701,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob return __pyx_r; } -/* "ssh2/session.pyx":180 +/* "ssh2/session.pyx":174 * return bool(rc) * * def set_timeout(self, long timeout): # <<<<<<<<<<<<<< @@ -5889,16 +5710,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_12get_blocking(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_15set_timeout(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_13set_timeout(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_14set_timeout, "Session.set_timeout(self, long timeout)\n\nSet the timeout in milliseconds for how long a blocking\ncall may wait until the situation is considered an error and\n:py:class:`ssh2.error_codes.LIBSSH2_ERROR_TIMEOUT` is returned.\n\nBy default or if timeout set is zero, blocking calls do not\ntime out.\n:param timeout: Milliseconds to wait before timeout."); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_15set_timeout = {"set_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_15set_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_14set_timeout}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_15set_timeout(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_12set_timeout, "Session.set_timeout(self, long timeout)\n\nSet the timeout in milliseconds for how long a blocking\ncall may wait until the situation is considered an error and\n:py:class:`ssh2.error_codes.LIBSSH2_ERROR_TIMEOUT` is returned.\n\nBy default or if timeout set is zero, blocking calls do not\ntime out.\n:param timeout: Milliseconds to wait before timeout."); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_13set_timeout = {"set_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_13set_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_12set_timeout}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_13set_timeout(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -5928,32 +5749,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_timeout,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 180, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 174, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 180, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 174, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_timeout", 0) < 0) __PYX_ERR(0, 180, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_timeout", 0) < 0) __PYX_ERR(0, 174, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_timeout", 1, 1, 1, i); __PYX_ERR(0, 180, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_timeout", 1, 1, 1, i); __PYX_ERR(0, 174, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 180, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 174, __pyx_L3_error) } - __pyx_v_timeout = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_timeout == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 180, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyLong_As_long(values[0]); if (unlikely((__pyx_v_timeout == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_timeout", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 180, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_timeout", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 174, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5964,7 +5785,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_14set_timeout(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_timeout); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_12set_timeout(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_timeout); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -5974,12 +5795,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, long __pyx_v_timeout) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_12set_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, long __pyx_v_timeout) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_timeout", 0); - /* "ssh2/session.pyx":188 + /* "ssh2/session.pyx":182 * time out. * :param timeout: Milliseconds to wait before timeout.""" * with nogil: # <<<<<<<<<<<<<< @@ -5993,7 +5814,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":189 + /* "ssh2/session.pyx":183 * :param timeout: Milliseconds to wait before timeout.""" * with nogil: * c_ssh2.libssh2_session_set_timeout(self._session, timeout) # <<<<<<<<<<<<<< @@ -6003,7 +5824,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj libssh2_session_set_timeout(__pyx_v_self->_session, __pyx_v_timeout); } - /* "ssh2/session.pyx":188 + /* "ssh2/session.pyx":182 * time out. * :param timeout: Milliseconds to wait before timeout.""" * with nogil: # <<<<<<<<<<<<<< @@ -6020,7 +5841,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj } } - /* "ssh2/session.pyx":180 + /* "ssh2/session.pyx":174 * return bool(rc) * * def set_timeout(self, long timeout): # <<<<<<<<<<<<<< @@ -6035,7 +5856,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh2/session.pyx":191 +/* "ssh2/session.pyx":185 * c_ssh2.libssh2_session_set_timeout(self._session, timeout) * * def get_timeout(self): # <<<<<<<<<<<<<< @@ -6044,16 +5865,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_14set_timeout(struct __pyx_obj */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_17get_timeout(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_15get_timeout(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_16get_timeout, "Session.get_timeout(self)\n\nGet current session timeout setting"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_17get_timeout = {"get_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_17get_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_16get_timeout}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_17get_timeout(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_14get_timeout, "Session.get_timeout(self)\n\nGet current session timeout setting"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_15get_timeout = {"get_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_15get_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_14get_timeout}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_15get_timeout(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -6079,14 +5900,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("get_timeout", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_16get_timeout(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_14get_timeout(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_14get_timeout(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { long __pyx_v_timeout; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6096,7 +5917,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_timeout", 0); - /* "ssh2/session.pyx":194 + /* "ssh2/session.pyx":188 * """Get current session timeout setting""" * cdef long timeout * with nogil: # <<<<<<<<<<<<<< @@ -6110,7 +5931,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":195 + /* "ssh2/session.pyx":189 * cdef long timeout * with nogil: * timeout = c_ssh2.libssh2_session_get_timeout(self._session) # <<<<<<<<<<<<<< @@ -6120,7 +5941,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj __pyx_v_timeout = libssh2_session_get_timeout(__pyx_v_self->_session); } - /* "ssh2/session.pyx":194 + /* "ssh2/session.pyx":188 * """Get current session timeout setting""" * cdef long timeout * with nogil: # <<<<<<<<<<<<<< @@ -6137,7 +5958,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj } } - /* "ssh2/session.pyx":196 + /* "ssh2/session.pyx":190 * with nogil: * timeout = c_ssh2.libssh2_session_get_timeout(self._session) * return timeout # <<<<<<<<<<<<<< @@ -6145,13 +5966,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj * def userauth_authenticated(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_long(__pyx_v_timeout); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":191 + /* "ssh2/session.pyx":185 * c_ssh2.libssh2_session_set_timeout(self._session, timeout) * * def get_timeout(self): # <<<<<<<<<<<<<< @@ -6170,7 +5991,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh2/session.pyx":198 +/* "ssh2/session.pyx":192 * return timeout * * def userauth_authenticated(self): # <<<<<<<<<<<<<< @@ -6179,16 +6000,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_16get_timeout(struct __pyx_obj */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_19userauth_authenticated(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_17userauth_authenticated(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_18userauth_authenticated, "Session.userauth_authenticated(self)\n\nTrue/False for is user authenticated or not.\n\n:rtype: bool"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_19userauth_authenticated = {"userauth_authenticated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_19userauth_authenticated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_18userauth_authenticated}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_19userauth_authenticated(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_16userauth_authenticated, "Session.userauth_authenticated(self)\n\nTrue/False for is user authenticated or not.\n\n:rtype: bool"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_17userauth_authenticated = {"userauth_authenticated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_17userauth_authenticated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_16userauth_authenticated}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_17userauth_authenticated(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -6214,14 +6035,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("userauth_authenticated", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_16userauth_authenticated(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_16userauth_authenticated(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6232,7 +6053,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_authenticated", 0); - /* "ssh2/session.pyx":203 + /* "ssh2/session.pyx":197 * :rtype: bool""" * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -6246,7 +6067,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":204 + /* "ssh2/session.pyx":198 * cdef bint rc * with nogil: * rc = c_ssh2.libssh2_userauth_authenticated(self._session) # <<<<<<<<<<<<<< @@ -6256,7 +6077,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc __pyx_v_rc = libssh2_userauth_authenticated(__pyx_v_self->_session); } - /* "ssh2/session.pyx":203 + /* "ssh2/session.pyx":197 * :rtype: bool""" * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -6273,7 +6094,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc } } - /* "ssh2/session.pyx":205 + /* "ssh2/session.pyx":199 * with nogil: * rc = c_ssh2.libssh2_userauth_authenticated(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -6282,13 +6103,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __pyx_v_rc; - __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":198 + /* "ssh2/session.pyx":192 * return timeout * * def userauth_authenticated(self): # <<<<<<<<<<<<<< @@ -6307,7 +6128,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc return __pyx_r; } -/* "ssh2/session.pyx":207 +/* "ssh2/session.pyx":201 * return bool(rc) * * def userauth_list(self, username not None): # <<<<<<<<<<<<<< @@ -6316,16 +6137,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_authenticated(struc */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_21userauth_list(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_19userauth_list(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_20userauth_list, "Session.userauth_list(self, username)\n\nRetrieve available authentication methodslist.\n\n:rtype: list"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_21userauth_list = {"userauth_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_21userauth_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_20userauth_list}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_21userauth_list(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_18userauth_list, "Session.userauth_list(self, username)\n\nRetrieve available authentication methodslist.\n\n:rtype: list"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_19userauth_list = {"userauth_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_19userauth_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_18userauth_list}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_19userauth_list(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -6355,32 +6176,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 207, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 201, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 201, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_list", 0) < 0) __PYX_ERR(0, 207, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_list", 0) < 0) __PYX_ERR(0, 201, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_list", 1, 1, 1, i); __PYX_ERR(0, 207, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_list", 1, 1, 1, i); __PYX_ERR(0, 201, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 207, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 201, __pyx_L3_error) } __pyx_v_username = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 207, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_list", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 201, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6392,9 +6213,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 207, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 201, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_20userauth_list(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_18userauth_list(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username); /* function exit code */ goto __pyx_L0; @@ -6413,7 +6234,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_18userauth_list(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username) { PyObject *__pyx_v_b_username = 0; char *__pyx_v__username; size_t __pyx_v_username_len; @@ -6430,19 +6251,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh2/session.pyx":211 + /* "ssh2/session.pyx":205 * * :rtype: list""" * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef size_t username_len = len(b_username) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":212 + /* "ssh2/session.pyx":206 * :rtype: list""" * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -6451,12 +6272,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 212, __pyx_L1_error) + __PYX_ERR(0, 206, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":213 + /* "ssh2/session.pyx":207 * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username * cdef size_t username_len = len(b_username) # <<<<<<<<<<<<<< @@ -6465,12 +6286,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 213, __pyx_L1_error) + __PYX_ERR(0, 207, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_username); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_username); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 207, __pyx_L1_error) __pyx_v_username_len = __pyx_t_3; - /* "ssh2/session.pyx":216 + /* "ssh2/session.pyx":210 * cdef char *_auth * cdef str auth * with nogil: # <<<<<<<<<<<<<< @@ -6484,7 +6305,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":217 + /* "ssh2/session.pyx":211 * cdef str auth * with nogil: * _auth = c_ssh2.libssh2_userauth_list( # <<<<<<<<<<<<<< @@ -6494,7 +6315,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o __pyx_v__auth = libssh2_userauth_list(__pyx_v_self->_session, __pyx_v__username, __pyx_v_username_len); } - /* "ssh2/session.pyx":216 + /* "ssh2/session.pyx":210 * cdef char *_auth * cdef str auth * with nogil: # <<<<<<<<<<<<<< @@ -6511,7 +6332,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o } } - /* "ssh2/session.pyx":219 + /* "ssh2/session.pyx":213 * _auth = c_ssh2.libssh2_userauth_list( * self._session, _username, username_len) * if _auth is NULL: # <<<<<<<<<<<<<< @@ -6521,7 +6342,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o __pyx_t_4 = (__pyx_v__auth == NULL); if (__pyx_t_4) { - /* "ssh2/session.pyx":220 + /* "ssh2/session.pyx":214 * self._session, _username, username_len) * if _auth is NULL: * return # <<<<<<<<<<<<<< @@ -6532,7 +6353,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh2/session.pyx":219 + /* "ssh2/session.pyx":213 * _auth = c_ssh2.libssh2_userauth_list( * self._session, _username, username_len) * if _auth is NULL: # <<<<<<<<<<<<<< @@ -6541,20 +6362,20 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o */ } - /* "ssh2/session.pyx":221 + /* "ssh2/session.pyx":215 * if _auth is NULL: * return * auth = to_str(_auth) # <<<<<<<<<<<<<< * return auth.split(',') * */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_str(__pyx_v__auth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_str(__pyx_v__auth); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 221, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_t_1))) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_v_auth = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":222 + /* "ssh2/session.pyx":216 * return * auth = to_str(_auth) * return auth.split(',') # <<<<<<<<<<<<<< @@ -6564,15 +6385,15 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_auth == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 222, __pyx_L1_error) + __PYX_ERR(0, 216, __pyx_L1_error) } - __pyx_t_1 = PyUnicode_Split(__pyx_v_auth, __Pyx_NoneAsNull(__pyx_mstate_global->__pyx_kp_u_), -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Split(__pyx_v_auth, __Pyx_NoneAsNull(__pyx_mstate_global->__pyx_kp_u_), -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":207 + /* "ssh2/session.pyx":201 * return bool(rc) * * def userauth_list(self, username not None): # <<<<<<<<<<<<<< @@ -6593,7 +6414,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o return __pyx_r; } -/* "ssh2/session.pyx":224 +/* "ssh2/session.pyx":218 * return auth.split(',') * * def userauth_publickey_fromfile(self, username not None, # <<<<<<<<<<<<<< @@ -6602,16 +6423,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_list(struct __pyx_o */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_23userauth_publickey_fromfile(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_21userauth_publickey_fromfile(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_22userauth_publickey_fromfile, "Session.userauth_publickey_fromfile(self, username, privatekey, passphrase='', publickey=None)\n\nAuthenticate with public key from file.\n\n:rtype: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_23userauth_publickey_fromfile = {"userauth_publickey_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_23userauth_publickey_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_22userauth_publickey_fromfile}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_23userauth_publickey_fromfile(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_20userauth_publickey_fromfile, "Session.userauth_publickey_fromfile(self, username, privatekey, passphrase='', publickey=None)\n\nAuthenticate with public key from file.\n\n:rtype: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_21userauth_publickey_fromfile = {"userauth_publickey_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_21userauth_publickey_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_20userauth_publickey_fromfile}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_21userauth_publickey_fromfile(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -6644,33 +6465,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_privatekey,&__pyx_mstate_global->__pyx_n_u_passphrase,&__pyx_mstate_global->__pyx_n_u_publickey,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 224, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 218, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey_fromfile", 0) < 0) __PYX_ERR(0, 224, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey_fromfile", 0) < 0) __PYX_ERR(0, 218, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u__2)); - /* "ssh2/session.pyx":227 + /* "ssh2/session.pyx":221 * privatekey not None, * passphrase='', * publickey=None): # <<<<<<<<<<<<<< @@ -6679,23 +6500,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey_fromfile", 0, 2, 4, i); __PYX_ERR(0, 224, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey_fromfile", 0, 2, 4, i); __PYX_ERR(0, 218, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 218, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 218, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 224, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 218, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -6709,7 +6530,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_publickey_fromfile", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 224, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_publickey_fromfile", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 218, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6721,14 +6542,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 224, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 218, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_privatekey) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "privatekey"); __PYX_ERR(0, 225, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "privatekey"); __PYX_ERR(0, 219, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekey, __pyx_v_passphrase, __pyx_v_publickey); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_20userauth_publickey_fromfile(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekey, __pyx_v_passphrase, __pyx_v_publickey); - /* "ssh2/session.pyx":224 + /* "ssh2/session.pyx":218 * return auth.split(',') * * def userauth_publickey_fromfile(self, username not None, # <<<<<<<<<<<<<< @@ -6753,7 +6574,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickey) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_20userauth_publickey_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickey) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; PyObject *__pyx_v_b_publickey = 0; @@ -6775,19 +6596,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_fromfile", 0); - /* "ssh2/session.pyx":232 + /* "ssh2/session.pyx":226 * :rtype: int""" * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":234 + /* "ssh2/session.pyx":228 * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None # <<<<<<<<<<<<<< @@ -6797,20 +6618,20 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( __pyx_t_2 = (__pyx_v_publickey != Py_None); if (__pyx_t_2) { - /* "ssh2/session.pyx":233 + /* "ssh2/session.pyx":227 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ # <<<<<<<<<<<<<< * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) */ - __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_publickey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_publickey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { - /* "ssh2/session.pyx":234 + /* "ssh2/session.pyx":228 * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None # <<<<<<<<<<<<<< @@ -6821,42 +6642,42 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( __pyx_t_1 = Py_None; } - /* "ssh2/session.pyx":233 + /* "ssh2/session.pyx":227 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ # <<<<<<<<<<<<<< * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) */ - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 233, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 227, __pyx_L1_error) __pyx_v_b_publickey = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":235 + /* "ssh2/session.pyx":229 * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) # <<<<<<<<<<<<<< * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_privatekey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_privatekey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_privatekey = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":236 + /* "ssh2/session.pyx":230 * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) * cdef bytes b_passphrase = to_bytes(passphrase) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef char *_publickey = NULL */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":237 + /* "ssh2/session.pyx":231 * cdef bytes b_privatekey = to_bytes(privatekey) * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -6865,12 +6686,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 237, __pyx_L1_error) + __PYX_ERR(0, 231, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 231, __pyx_L1_error) __pyx_v__username = __pyx_t_4; - /* "ssh2/session.pyx":238 + /* "ssh2/session.pyx":232 * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username * cdef char *_publickey = NULL # <<<<<<<<<<<<<< @@ -6879,7 +6700,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ __pyx_v__publickey = NULL; - /* "ssh2/session.pyx":239 + /* "ssh2/session.pyx":233 * cdef char *_username = b_username * cdef char *_publickey = NULL * cdef char *_privatekey = b_privatekey # <<<<<<<<<<<<<< @@ -6888,12 +6709,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ if (unlikely(__pyx_v_b_privatekey == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 239, __pyx_L1_error) + __PYX_ERR(0, 233, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_privatekey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 239, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_privatekey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L1_error) __pyx_v__privatekey = __pyx_t_4; - /* "ssh2/session.pyx":240 + /* "ssh2/session.pyx":234 * cdef char *_publickey = NULL * cdef char *_privatekey = b_privatekey * cdef char *_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -6902,12 +6723,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 240, __pyx_L1_error) + __PYX_ERR(0, 234, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L1_error) __pyx_v__passphrase = __pyx_t_4; - /* "ssh2/session.pyx":241 + /* "ssh2/session.pyx":235 * cdef char *_privatekey = b_privatekey * cdef char *_passphrase = b_passphrase * if b_publickey is not None: # <<<<<<<<<<<<<< @@ -6917,7 +6738,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( __pyx_t_2 = (__pyx_v_b_publickey != ((PyObject*)Py_None)); if (__pyx_t_2) { - /* "ssh2/session.pyx":242 + /* "ssh2/session.pyx":236 * cdef char *_passphrase = b_passphrase * if b_publickey is not None: * _publickey = b_publickey # <<<<<<<<<<<<<< @@ -6926,12 +6747,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ if (unlikely(__pyx_v_b_publickey == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 242, __pyx_L1_error) + __PYX_ERR(0, 236, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_publickey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_publickey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L1_error) __pyx_v__publickey = __pyx_t_4; - /* "ssh2/session.pyx":241 + /* "ssh2/session.pyx":235 * cdef char *_privatekey = b_privatekey * cdef char *_passphrase = b_passphrase * if b_publickey is not None: # <<<<<<<<<<<<<< @@ -6940,7 +6761,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ } - /* "ssh2/session.pyx":243 + /* "ssh2/session.pyx":237 * if b_publickey is not None: * _publickey = b_publickey * with nogil: # <<<<<<<<<<<<<< @@ -6954,7 +6775,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":244 + /* "ssh2/session.pyx":238 * _publickey = b_publickey * with nogil: * rc = c_ssh2.libssh2_userauth_publickey_fromfile( # <<<<<<<<<<<<<< @@ -6964,7 +6785,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( __pyx_v_rc = libssh2_userauth_publickey_fromfile(__pyx_v_self->_session, __pyx_v__username, __pyx_v__publickey, __pyx_v__privatekey, __pyx_v__passphrase); } - /* "ssh2/session.pyx":243 + /* "ssh2/session.pyx":237 * if b_publickey is not None: * _publickey = b_publickey * with nogil: # <<<<<<<<<<<<<< @@ -6981,7 +6802,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( } } - /* "ssh2/session.pyx":246 + /* "ssh2/session.pyx":240 * rc = c_ssh2.libssh2_userauth_publickey_fromfile( * self._session, _username, _publickey, _privatekey, _passphrase) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -6989,14 +6810,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( * def userauth_publickey(self, username not None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 246, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":224 + /* "ssh2/session.pyx":218 * return auth.split(',') * * def userauth_publickey_fromfile(self, username not None, # <<<<<<<<<<<<<< @@ -7020,7 +6841,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( return __pyx_r; } -/* "ssh2/session.pyx":248 +/* "ssh2/session.pyx":242 * return handle_error_codes(rc) * * def userauth_publickey(self, username not None, # <<<<<<<<<<<<<< @@ -7029,16 +6850,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey_fromfile( */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_25userauth_publickey(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_23userauth_publickey(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_24userauth_publickey, "Session.userauth_publickey(self, username, bytes pubkeydata)\n\nPerform public key authentication with provided public key data\n\n:param username: User name to authenticate as\n:type username: str\n:param pubkeydata: Public key data\n:type pubkeydata: bytes\n\n:rtype: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_25userauth_publickey = {"userauth_publickey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_25userauth_publickey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_24userauth_publickey}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_25userauth_publickey(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_22userauth_publickey, "Session.userauth_publickey(self, username, bytes pubkeydata)\n\nPerform public key authentication with provided public key data\n\n:param username: User name to authenticate as\n:type username: str\n:param pubkeydata: Public key data\n:type pubkeydata: bytes\n\n:rtype: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_23userauth_publickey = {"userauth_publickey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_23userauth_publickey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_22userauth_publickey}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_23userauth_publickey(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -7069,39 +6890,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_pubkeydata,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 248, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 242, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 248, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 242, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 248, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 242, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey", 0) < 0) __PYX_ERR(0, 248, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey", 0) < 0) __PYX_ERR(0, 242, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey", 1, 2, 2, i); __PYX_ERR(0, 248, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey", 1, 2, 2, i); __PYX_ERR(0, 242, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 248, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 242, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 248, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 242, __pyx_L3_error) } __pyx_v_username = values[0]; __pyx_v_pubkeydata = ((PyObject*)values[1]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_publickey", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 248, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_publickey", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 242, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7113,10 +6934,10 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 248, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 242, __pyx_L1_error) } - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkeydata), (&PyBytes_Type), 0, "pubkeydata", 1))) __PYX_ERR(0, 249, __pyx_L1_error) - __pyx_r = __pyx_pf_4ssh2_7session_7Session_24userauth_publickey(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_pubkeydata); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkeydata), (&PyBytes_Type), 0, "pubkeydata", 1))) __PYX_ERR(0, 243, __pyx_L1_error) + __pyx_r = __pyx_pf_4ssh2_7session_7Session_22userauth_publickey(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_pubkeydata); /* function exit code */ goto __pyx_L0; @@ -7135,7 +6956,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_pubkeydata) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_22userauth_publickey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_pubkeydata) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; char *__pyx_v__username; @@ -7153,19 +6974,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh2/session.pyx":259 + /* "ssh2/session.pyx":253 * :rtype: int""" * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef unsigned char *_pubkeydata = pubkeydata */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":260 + /* "ssh2/session.pyx":254 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -7174,32 +6995,32 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 260, __pyx_L1_error) + __PYX_ERR(0, 254, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":261 + /* "ssh2/session.pyx":255 * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username * cdef unsigned char *_pubkeydata = pubkeydata # <<<<<<<<<<<<<< * cdef size_t pubkeydata_len = len(pubkeydata) * with nogil: */ - __pyx_t_3 = __Pyx_PyBytes_AsWritableUString(__pyx_v_pubkeydata); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableUString(__pyx_v_pubkeydata); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error) __pyx_v__pubkeydata = __pyx_t_3; - /* "ssh2/session.pyx":262 + /* "ssh2/session.pyx":256 * cdef char *_username = b_username * cdef unsigned char *_pubkeydata = pubkeydata * cdef size_t pubkeydata_len = len(pubkeydata) # <<<<<<<<<<<<<< * with nogil: * rc = c_ssh2.libssh2_userauth_publickey( */ - __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_pubkeydata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_pubkeydata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 256, __pyx_L1_error) __pyx_v_pubkeydata_len = __pyx_t_4; - /* "ssh2/session.pyx":263 + /* "ssh2/session.pyx":257 * cdef unsigned char *_pubkeydata = pubkeydata * cdef size_t pubkeydata_len = len(pubkeydata) * with nogil: # <<<<<<<<<<<<<< @@ -7213,7 +7034,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":264 + /* "ssh2/session.pyx":258 * cdef size_t pubkeydata_len = len(pubkeydata) * with nogil: * rc = c_ssh2.libssh2_userauth_publickey( # <<<<<<<<<<<<<< @@ -7223,7 +7044,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ __pyx_v_rc = libssh2_userauth_publickey(__pyx_v_self->_session, __pyx_v__username, __pyx_v__pubkeydata, __pyx_v_pubkeydata_len, NULL, NULL); } - /* "ssh2/session.pyx":263 + /* "ssh2/session.pyx":257 * cdef unsigned char *_pubkeydata = pubkeydata * cdef size_t pubkeydata_len = len(pubkeydata) * with nogil: # <<<<<<<<<<<<<< @@ -7240,7 +7061,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ } } - /* "ssh2/session.pyx":267 + /* "ssh2/session.pyx":261 * self._session, _username, _pubkeydata, * pubkeydata_len, NULL, NULL) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -7248,14 +7069,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ * def userauth_hostbased_fromfile(self, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 267, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 261, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":248 + /* "ssh2/session.pyx":242 * return handle_error_codes(rc) * * def userauth_publickey(self, username not None, # <<<<<<<<<<<<<< @@ -7275,7 +7096,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ return __pyx_r; } -/* "ssh2/session.pyx":269 +/* "ssh2/session.pyx":263 * return handle_error_codes(rc) * * def userauth_hostbased_fromfile(self, # <<<<<<<<<<<<<< @@ -7284,16 +7105,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_publickey(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_27userauth_hostbased_fromfile(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_25userauth_hostbased_fromfile(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_26userauth_hostbased_fromfile, "Session.userauth_hostbased_fromfile(self, username, privatekey, hostname, publickey=None, passphrase='')"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_27userauth_hostbased_fromfile = {"userauth_hostbased_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_27userauth_hostbased_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_26userauth_hostbased_fromfile}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_27userauth_hostbased_fromfile(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_24userauth_hostbased_fromfile, "Session.userauth_hostbased_fromfile(self, username, privatekey, hostname, publickey=None, passphrase='')"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_25userauth_hostbased_fromfile = {"userauth_hostbased_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_25userauth_hostbased_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_24userauth_hostbased_fromfile}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_25userauth_hostbased_fromfile(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -7327,36 +7148,36 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_privatekey,&__pyx_mstate_global->__pyx_n_u_hostname,&__pyx_mstate_global->__pyx_n_u_publickey,&__pyx_mstate_global->__pyx_n_u_passphrase,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 269, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 263, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_hostbased_fromfile", 0) < 0) __PYX_ERR(0, 269, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_hostbased_fromfile", 0) < 0) __PYX_ERR(0, 263, __pyx_L3_error) - /* "ssh2/session.pyx":273 + /* "ssh2/session.pyx":267 * privatekey not None, * hostname not None, * publickey=None, # <<<<<<<<<<<<<< @@ -7366,25 +7187,25 @@ PyObject *__pyx_args, PyObject *__pyx_kwds if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)Py_None)); if (!values[4]) values[4] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u__2)); for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_hostbased_fromfile", 0, 3, 5, i); __PYX_ERR(0, 269, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_hostbased_fromfile", 0, 3, 5, i); __PYX_ERR(0, 263, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 263, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 263, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 263, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 269, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 263, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -7399,7 +7220,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_hostbased_fromfile", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 269, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_hostbased_fromfile", 0, 3, 5, __pyx_nargs); __PYX_ERR(0, 263, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7411,17 +7232,17 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 270, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 264, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_privatekey) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "privatekey"); __PYX_ERR(0, 271, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "privatekey"); __PYX_ERR(0, 265, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_hostname) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "hostname"); __PYX_ERR(0, 272, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "hostname"); __PYX_ERR(0, 266, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekey, __pyx_v_hostname, __pyx_v_publickey, __pyx_v_passphrase); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_24userauth_hostbased_fromfile(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekey, __pyx_v_hostname, __pyx_v_publickey, __pyx_v_passphrase); - /* "ssh2/session.pyx":269 + /* "ssh2/session.pyx":263 * return handle_error_codes(rc) * * def userauth_hostbased_fromfile(self, # <<<<<<<<<<<<<< @@ -7446,7 +7267,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_hostname, PyObject *__pyx_v_publickey, PyObject *__pyx_v_passphrase) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_24userauth_hostbased_fromfile(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekey, PyObject *__pyx_v_hostname, PyObject *__pyx_v_publickey, PyObject *__pyx_v_passphrase) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; PyObject *__pyx_v_b_publickey = 0; @@ -7470,19 +7291,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_hostbased_fromfile", 0); - /* "ssh2/session.pyx":276 + /* "ssh2/session.pyx":270 * passphrase=''): * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":278 + /* "ssh2/session.pyx":272 * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None # <<<<<<<<<<<<<< @@ -7492,20 +7313,20 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( __pyx_t_2 = (__pyx_v_publickey != Py_None); if (__pyx_t_2) { - /* "ssh2/session.pyx":277 + /* "ssh2/session.pyx":271 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ # <<<<<<<<<<<<<< * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) */ - __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_publickey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_publickey); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } else { - /* "ssh2/session.pyx":278 + /* "ssh2/session.pyx":272 * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None # <<<<<<<<<<<<<< @@ -7516,54 +7337,54 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( __pyx_t_1 = Py_None; } - /* "ssh2/session.pyx":277 + /* "ssh2/session.pyx":271 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_publickey = to_bytes(publickey) \ # <<<<<<<<<<<<<< * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) */ - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 277, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 271, __pyx_L1_error) __pyx_v_b_publickey = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":279 + /* "ssh2/session.pyx":273 * cdef bytes b_publickey = to_bytes(publickey) \ * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) # <<<<<<<<<<<<<< * cdef bytes b_passphrase = to_bytes(passphrase) * cdef bytes b_hostname = to_bytes(hostname) */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_privatekey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_privatekey); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_privatekey = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":280 + /* "ssh2/session.pyx":274 * if publickey is not None else None * cdef bytes b_privatekey = to_bytes(privatekey) * cdef bytes b_passphrase = to_bytes(passphrase) # <<<<<<<<<<<<<< * cdef bytes b_hostname = to_bytes(hostname) * cdef char *_username = b_username */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":281 + /* "ssh2/session.pyx":275 * cdef bytes b_privatekey = to_bytes(privatekey) * cdef bytes b_passphrase = to_bytes(passphrase) * cdef bytes b_hostname = to_bytes(hostname) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef char *_publickey = NULL */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_hostname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_hostname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_hostname = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":282 + /* "ssh2/session.pyx":276 * cdef bytes b_passphrase = to_bytes(passphrase) * cdef bytes b_hostname = to_bytes(hostname) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -7572,12 +7393,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 282, __pyx_L1_error) + __PYX_ERR(0, 276, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) __pyx_v__username = __pyx_t_4; - /* "ssh2/session.pyx":283 + /* "ssh2/session.pyx":277 * cdef bytes b_hostname = to_bytes(hostname) * cdef char *_username = b_username * cdef char *_publickey = NULL # <<<<<<<<<<<<<< @@ -7586,7 +7407,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ __pyx_v__publickey = NULL; - /* "ssh2/session.pyx":284 + /* "ssh2/session.pyx":278 * cdef char *_username = b_username * cdef char *_publickey = NULL * cdef char *_privatekey = b_privatekey # <<<<<<<<<<<<<< @@ -7595,12 +7416,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ if (unlikely(__pyx_v_b_privatekey == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 284, __pyx_L1_error) + __PYX_ERR(0, 278, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_privatekey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_privatekey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L1_error) __pyx_v__privatekey = __pyx_t_4; - /* "ssh2/session.pyx":285 + /* "ssh2/session.pyx":279 * cdef char *_publickey = NULL * cdef char *_privatekey = b_privatekey * cdef char *_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -7609,12 +7430,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 285, __pyx_L1_error) + __PYX_ERR(0, 279, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) __pyx_v__passphrase = __pyx_t_4; - /* "ssh2/session.pyx":286 + /* "ssh2/session.pyx":280 * cdef char *_privatekey = b_privatekey * cdef char *_passphrase = b_passphrase * cdef char *_hostname = b_hostname # <<<<<<<<<<<<<< @@ -7623,12 +7444,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ if (unlikely(__pyx_v_b_hostname == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 286, __pyx_L1_error) + __PYX_ERR(0, 280, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_hostname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_hostname); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L1_error) __pyx_v__hostname = __pyx_t_4; - /* "ssh2/session.pyx":287 + /* "ssh2/session.pyx":281 * cdef char *_passphrase = b_passphrase * cdef char *_hostname = b_hostname * if b_publickey is not None: # <<<<<<<<<<<<<< @@ -7638,7 +7459,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( __pyx_t_2 = (__pyx_v_b_publickey != ((PyObject*)Py_None)); if (__pyx_t_2) { - /* "ssh2/session.pyx":288 + /* "ssh2/session.pyx":282 * cdef char *_hostname = b_hostname * if b_publickey is not None: * _publickey = b_publickey # <<<<<<<<<<<<<< @@ -7647,12 +7468,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ if (unlikely(__pyx_v_b_publickey == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 288, __pyx_L1_error) + __PYX_ERR(0, 282, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_publickey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_publickey); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 282, __pyx_L1_error) __pyx_v__publickey = __pyx_t_4; - /* "ssh2/session.pyx":287 + /* "ssh2/session.pyx":281 * cdef char *_passphrase = b_passphrase * cdef char *_hostname = b_hostname * if b_publickey is not None: # <<<<<<<<<<<<<< @@ -7661,7 +7482,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ } - /* "ssh2/session.pyx":289 + /* "ssh2/session.pyx":283 * if b_publickey is not None: * _publickey = b_publickey * with nogil: # <<<<<<<<<<<<<< @@ -7675,7 +7496,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":290 + /* "ssh2/session.pyx":284 * _publickey = b_publickey * with nogil: * rc = c_ssh2.libssh2_userauth_hostbased_fromfile( # <<<<<<<<<<<<<< @@ -7685,7 +7506,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( __pyx_v_rc = libssh2_userauth_hostbased_fromfile(__pyx_v_self->_session, __pyx_v__username, __pyx_v__publickey, __pyx_v__privatekey, __pyx_v__passphrase, __pyx_v__hostname); } - /* "ssh2/session.pyx":289 + /* "ssh2/session.pyx":283 * if b_publickey is not None: * _publickey = b_publickey * with nogil: # <<<<<<<<<<<<<< @@ -7702,7 +7523,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( } } - /* "ssh2/session.pyx":293 + /* "ssh2/session.pyx":287 * self._session, _username, _publickey, * _privatekey, _passphrase, _hostname) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -7710,14 +7531,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( * def userauth_publickey_frommemory( */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 293, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 287, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":269 + /* "ssh2/session.pyx":263 * return handle_error_codes(rc) * * def userauth_hostbased_fromfile(self, # <<<<<<<<<<<<<< @@ -7742,7 +7563,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( return __pyx_r; } -/* "ssh2/session.pyx":295 +/* "ssh2/session.pyx":289 * return handle_error_codes(rc) * * def userauth_publickey_frommemory( # <<<<<<<<<<<<<< @@ -7751,16 +7572,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_hostbased_fromfile( */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_29userauth_publickey_frommemory(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_27userauth_publickey_frommemory(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_28userauth_publickey_frommemory, "Session.userauth_publickey_frommemory(self, username, bytes privatekeyfiledata, passphrase='', bytes publickeyfiledata=None)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_29userauth_publickey_frommemory = {"userauth_publickey_frommemory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_29userauth_publickey_frommemory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_28userauth_publickey_frommemory}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_29userauth_publickey_frommemory(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_26userauth_publickey_frommemory, "Session.userauth_publickey_frommemory(self, username, bytes privatekeyfiledata, passphrase='', bytes publickeyfiledata=None)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_27userauth_publickey_frommemory = {"userauth_publickey_frommemory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_27userauth_publickey_frommemory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_26userauth_publickey_frommemory}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_27userauth_publickey_frommemory(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -7793,33 +7614,33 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_privatekeyfiledata,&__pyx_mstate_global->__pyx_n_u_passphrase,&__pyx_mstate_global->__pyx_n_u_publickeyfiledata,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 295, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 289, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey_frommemory", 0) < 0) __PYX_ERR(0, 295, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_publickey_frommemory", 0) < 0) __PYX_ERR(0, 289, __pyx_L3_error) if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)__pyx_mstate_global->__pyx_kp_u__2)); - /* "ssh2/session.pyx":297 + /* "ssh2/session.pyx":291 * def userauth_publickey_frommemory( * self, username, bytes privatekeyfiledata, * passphrase='', bytes publickeyfiledata=None): # <<<<<<<<<<<<<< @@ -7828,23 +7649,23 @@ PyObject *__pyx_args, PyObject *__pyx_kwds */ if (!values[3]) values[3] = __Pyx_NewRef(((PyObject*)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey_frommemory", 0, 2, 4, i); __PYX_ERR(0, 295, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_publickey_frommemory", 0, 2, 4, i); __PYX_ERR(0, 289, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 289, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 289, __pyx_L3_error) values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 295, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 289, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -7858,7 +7679,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_publickey_frommemory", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 295, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_publickey_frommemory", 0, 2, 4, __pyx_nargs); __PYX_ERR(0, 289, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -7869,11 +7690,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privatekeyfiledata), (&PyBytes_Type), 1, "privatekeyfiledata", 1))) __PYX_ERR(0, 296, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_publickeyfiledata), (&PyBytes_Type), 1, "publickeyfiledata", 1))) __PYX_ERR(0, 297, __pyx_L1_error) - __pyx_r = __pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemory(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekeyfiledata, __pyx_v_passphrase, __pyx_v_publickeyfiledata); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privatekeyfiledata), (&PyBytes_Type), 1, "privatekeyfiledata", 1))) __PYX_ERR(0, 290, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_publickeyfiledata), (&PyBytes_Type), 1, "publickeyfiledata", 1))) __PYX_ERR(0, 291, __pyx_L1_error) + __pyx_r = __pyx_pf_4ssh2_7session_7Session_26userauth_publickey_frommemory(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_privatekeyfiledata, __pyx_v_passphrase, __pyx_v_publickeyfiledata); - /* "ssh2/session.pyx":295 + /* "ssh2/session.pyx":289 * return handle_error_codes(rc) * * def userauth_publickey_frommemory( # <<<<<<<<<<<<<< @@ -7898,7 +7719,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemory(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekeyfiledata, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickeyfiledata) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_26userauth_publickey_frommemory(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_privatekeyfiledata, PyObject *__pyx_v_passphrase, PyObject *__pyx_v_publickeyfiledata) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; PyObject *__pyx_v_b_passphrase = 0; @@ -7922,31 +7743,31 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_frommemory", 0); - /* "ssh2/session.pyx":299 + /* "ssh2/session.pyx":293 * passphrase='', bytes publickeyfiledata=None): * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":300 + /* "ssh2/session.pyx":294 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_passphrase = to_bytes(passphrase) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef char *_passphrase = b_passphrase */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":301 + /* "ssh2/session.pyx":295 * cdef bytes b_username = to_bytes(username) * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -7955,12 +7776,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 301, __pyx_L1_error) + __PYX_ERR(0, 295, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":302 + /* "ssh2/session.pyx":296 * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *_username = b_username * cdef char *_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -7969,12 +7790,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 302, __pyx_L1_error) + __PYX_ERR(0, 296, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) __pyx_v__passphrase = __pyx_t_2; - /* "ssh2/session.pyx":303 + /* "ssh2/session.pyx":297 * cdef char *_username = b_username * cdef char *_passphrase = b_passphrase * cdef char *_publickeyfiledata = NULL # <<<<<<<<<<<<<< @@ -7983,7 +7804,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ __pyx_v__publickeyfiledata = NULL; - /* "ssh2/session.pyx":304 + /* "ssh2/session.pyx":298 * cdef char *_passphrase = b_passphrase * cdef char *_publickeyfiledata = NULL * cdef char *_privatekeyfiledata = privatekeyfiledata # <<<<<<<<<<<<<< @@ -7992,12 +7813,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_privatekeyfiledata == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 304, __pyx_L1_error) + __PYX_ERR(0, 298, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_privatekeyfiledata); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_privatekeyfiledata); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error) __pyx_v__privatekeyfiledata = __pyx_t_2; - /* "ssh2/session.pyx":306 + /* "ssh2/session.pyx":300 * cdef char *_privatekeyfiledata = privatekeyfiledata * cdef size_t username_len, privatekeydata_len * cdef size_t pubkeydata_len = 0 # <<<<<<<<<<<<<< @@ -8006,7 +7827,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ __pyx_v_pubkeydata_len = 0; - /* "ssh2/session.pyx":308 + /* "ssh2/session.pyx":302 * cdef size_t pubkeydata_len = 0 * username_len, privatekeydata_len = \ * len(b_username), len(privatekeyfiledata) # <<<<<<<<<<<<<< @@ -8015,18 +7836,18 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 308, __pyx_L1_error) + __PYX_ERR(0, 302, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_username); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GET_SIZE(__pyx_v_b_username); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) if (unlikely(__pyx_v_privatekeyfiledata == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 308, __pyx_L1_error) + __PYX_ERR(0, 302, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_privatekeyfiledata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_privatekeyfiledata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_v_username_len = __pyx_t_3; __pyx_v_privatekeydata_len = __pyx_t_4; - /* "ssh2/session.pyx":309 + /* "ssh2/session.pyx":303 * username_len, privatekeydata_len = \ * len(b_username), len(privatekeyfiledata) * if publickeyfiledata is not None: # <<<<<<<<<<<<<< @@ -8036,7 +7857,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor __pyx_t_5 = (__pyx_v_publickeyfiledata != ((PyObject*)Py_None)); if (__pyx_t_5) { - /* "ssh2/session.pyx":310 + /* "ssh2/session.pyx":304 * len(b_username), len(privatekeyfiledata) * if publickeyfiledata is not None: * _publickeyfiledata = publickeyfiledata # <<<<<<<<<<<<<< @@ -8045,12 +7866,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_publickeyfiledata == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 310, __pyx_L1_error) + __PYX_ERR(0, 304, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_publickeyfiledata); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_publickeyfiledata); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_v__publickeyfiledata = __pyx_t_2; - /* "ssh2/session.pyx":311 + /* "ssh2/session.pyx":305 * if publickeyfiledata is not None: * _publickeyfiledata = publickeyfiledata * pubkeydata_len = len(publickeyfiledata) # <<<<<<<<<<<<<< @@ -8059,12 +7880,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ if (unlikely(__pyx_v_publickeyfiledata == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 311, __pyx_L1_error) + __PYX_ERR(0, 305, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_publickeyfiledata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_publickeyfiledata); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 305, __pyx_L1_error) __pyx_v_pubkeydata_len = __pyx_t_4; - /* "ssh2/session.pyx":309 + /* "ssh2/session.pyx":303 * username_len, privatekeydata_len = \ * len(b_username), len(privatekeyfiledata) * if publickeyfiledata is not None: # <<<<<<<<<<<<<< @@ -8073,7 +7894,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ } - /* "ssh2/session.pyx":312 + /* "ssh2/session.pyx":306 * _publickeyfiledata = publickeyfiledata * pubkeydata_len = len(publickeyfiledata) * with nogil: # <<<<<<<<<<<<<< @@ -8087,7 +7908,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":313 + /* "ssh2/session.pyx":307 * pubkeydata_len = len(publickeyfiledata) * with nogil: * rc = c_ssh2.libssh2_userauth_publickey_frommemory( # <<<<<<<<<<<<<< @@ -8097,7 +7918,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor __pyx_v_rc = libssh2_userauth_publickey_frommemory(__pyx_v_self->_session, __pyx_v__username, __pyx_v_username_len, __pyx_v__publickeyfiledata, __pyx_v_pubkeydata_len, __pyx_v__privatekeyfiledata, __pyx_v_privatekeydata_len, __pyx_v__passphrase); } - /* "ssh2/session.pyx":312 + /* "ssh2/session.pyx":306 * _publickeyfiledata = publickeyfiledata * pubkeydata_len = len(publickeyfiledata) * with nogil: # <<<<<<<<<<<<<< @@ -8114,7 +7935,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor } } - /* "ssh2/session.pyx":317 + /* "ssh2/session.pyx":311 * pubkeydata_len, _privatekeyfiledata, * privatekeydata_len, _passphrase) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -8122,14 +7943,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor * def userauth_password(self, username not None, password not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 317, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 311, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":295 + /* "ssh2/session.pyx":289 * return handle_error_codes(rc) * * def userauth_publickey_frommemory( # <<<<<<<<<<<<<< @@ -8150,7 +7971,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor return __pyx_r; } -/* "ssh2/session.pyx":319 +/* "ssh2/session.pyx":313 * return handle_error_codes(rc) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8159,16 +7980,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_publickey_frommemor */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_31userauth_password(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_29userauth_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_30userauth_password, "Session.userauth_password(self, username, password)\n\nPerform password authentication\n\n:param username: User name to authenticate.\n:type username: str\n:param password: Password\n:type password: str"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_31userauth_password = {"userauth_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_31userauth_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_30userauth_password}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_31userauth_password(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_28userauth_password, "Session.userauth_password(self, username, password)\n\nPerform password authentication\n\n:param username: User name to authenticate.\n:type username: str\n:param password: Password\n:type password: str"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_29userauth_password = {"userauth_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_29userauth_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_28userauth_password}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_29userauth_password(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -8199,39 +8020,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_password,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 319, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 313, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 313, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 313, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_password", 0) < 0) __PYX_ERR(0, 319, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_password", 0) < 0) __PYX_ERR(0, 313, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, i); __PYX_ERR(0, 319, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, i); __PYX_ERR(0, 313, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 313, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 319, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 313, __pyx_L3_error) } __pyx_v_username = values[0]; __pyx_v_password = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 319, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 313, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8243,12 +8064,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 319, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 313, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_password) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 319, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 313, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_30userauth_password(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_28userauth_password(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); /* function exit code */ goto __pyx_L0; @@ -8267,7 +8088,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_password(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; PyObject *__pyx_v_b_password = 0; @@ -8284,31 +8105,31 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh2/session.pyx":327 + /* "ssh2/session.pyx":321 * :type password: str""" * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_password = to_bytes(password) * cdef const char *_username = b_username */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":328 + /* "ssh2/session.pyx":322 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) # <<<<<<<<<<<<<< * cdef const char *_username = b_username * cdef const char *_password = b_password */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":329 + /* "ssh2/session.pyx":323 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef const char *_username = b_username # <<<<<<<<<<<<<< @@ -8317,12 +8138,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 329, __pyx_L1_error) + __PYX_ERR(0, 323, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 329, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":330 + /* "ssh2/session.pyx":324 * cdef bytes b_password = to_bytes(password) * cdef const char *_username = b_username * cdef const char *_password = b_password # <<<<<<<<<<<<<< @@ -8331,12 +8152,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 330, __pyx_L1_error) + __PYX_ERR(0, 324, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_b_password); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 330, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_b_password); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 324, __pyx_L1_error) __pyx_v__password = __pyx_t_3; - /* "ssh2/session.pyx":331 + /* "ssh2/session.pyx":325 * cdef const char *_username = b_username * cdef const char *_password = b_password * with nogil: # <<<<<<<<<<<<<< @@ -8350,7 +8171,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":332 + /* "ssh2/session.pyx":326 * cdef const char *_password = b_password * with nogil: * rc = c_ssh2.libssh2_userauth_password( # <<<<<<<<<<<<<< @@ -8360,7 +8181,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p __pyx_v_rc = libssh2_userauth_password(__pyx_v_self->_session, __pyx_v__username, __pyx_v__password); } - /* "ssh2/session.pyx":331 + /* "ssh2/session.pyx":325 * cdef const char *_username = b_username * cdef const char *_password = b_password * with nogil: # <<<<<<<<<<<<<< @@ -8377,7 +8198,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p } } - /* "ssh2/session.pyx":334 + /* "ssh2/session.pyx":328 * rc = c_ssh2.libssh2_userauth_password( * self._session, _username, _password) * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -8385,14 +8206,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p * def userauth_keyboardinteractive(self, username not None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 334, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":319 + /* "ssh2/session.pyx":313 * return handle_error_codes(rc) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8413,7 +8234,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p return __pyx_r; } -/* "ssh2/session.pyx":336 +/* "ssh2/session.pyx":330 * return handle_error_codes(rc) * * def userauth_keyboardinteractive(self, username not None, # <<<<<<<<<<<<<< @@ -8422,16 +8243,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_password(struct __p */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_31userauth_keyboardinteractive(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive, "Session.userauth_keyboardinteractive(self, username, password)\n\nPerform keyboard-interactive authentication\n\n:param username: User name to authenticate.\n:type username: str\n:param password: Password\n:type password: str"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_33userauth_keyboardinteractive = {"userauth_keyboardinteractive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_30userauth_keyboardinteractive, "Session.userauth_keyboardinteractive(self, username, password)\n\nPerform keyboard-interactive authentication\n\n:param username: User name to authenticate.\n:type username: str\n:param password: Password\n:type password: str"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_31userauth_keyboardinteractive = {"userauth_keyboardinteractive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_31userauth_keyboardinteractive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_30userauth_keyboardinteractive}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_31userauth_keyboardinteractive(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -8462,39 +8283,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_password,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 336, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 330, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 336, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 330, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 336, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 330, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_keyboardinteractive", 0) < 0) __PYX_ERR(0, 336, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_keyboardinteractive", 0) < 0) __PYX_ERR(0, 330, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive", 1, 2, 2, i); __PYX_ERR(0, 336, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive", 1, 2, 2, i); __PYX_ERR(0, 330, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 336, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 330, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 336, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 330, __pyx_L3_error) } __pyx_v_username = values[0]; __pyx_v_password = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 336, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 330, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8506,12 +8327,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 336, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 330, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_password) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 337, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 331, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_30userauth_keyboardinteractive(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); /* function exit code */ goto __pyx_L0; @@ -8530,7 +8351,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -/* "ssh2/session.pyx":345 +/* "ssh2/session.pyx":339 * :type password: str * """ * def passwd(*args, password=password): # <<<<<<<<<<<<<< @@ -8548,16 +8369,16 @@ static PyObject *__pyx_pf_4ssh2_7session___defaults__(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__defaults__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_password, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) < 0) __PYX_ERR(0, 345, __pyx_L1_error) - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_mstate_global->__pyx_n_u_password, __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self)->arg0) < 0) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None) != (0)) __PYX_ERR(0, 345, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_None) != (0)) __PYX_ERR(0, 339, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 345, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 339, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -8602,13 +8423,13 @@ static PyObject *__pyx_pw_4ssh2_7session_7Session_28userauth_keyboardinteractive PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_password,0}; struct __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_self); const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_VARARGS(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 345, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 339, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { default: case 0: break; } - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "passwd", 0) < 0) __PYX_ERR(0, 345, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, 0, __pyx_kwds_len, "passwd", 0) < 0) __PYX_ERR(0, 339, __pyx_L3_error) if (!values[0]) values[0] = __Pyx_NewRef(__pyx_dynamic_args->arg0); } else if (unlikely(__pyx_nargs < 0)) { goto __pyx_L5_argtuple_error; @@ -8619,7 +8440,7 @@ static PyObject *__pyx_pw_4ssh2_7session_7Session_28userauth_keyboardinteractive } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("passwd", 0, 0, 0, __pyx_nargs); __PYX_ERR(0, 345, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("passwd", 0, 0, 0, __pyx_nargs); __PYX_ERR(0, 339, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8651,7 +8472,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_keyboardinteractive int __pyx_clineno = 0; __Pyx_RefNannySetupContext("passwd", 0); - /* "ssh2/session.pyx":346 + /* "ssh2/session.pyx":340 * """ * def passwd(*args, password=password): * return [password] # <<<<<<<<<<<<<< @@ -8659,16 +8480,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_keyboardinteractive * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 346, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_password); __Pyx_GIVEREF(__pyx_v_password); - if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_password) != (0)) __PYX_ERR(0, 346, __pyx_L1_error); + if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_v_password) != (0)) __PYX_ERR(0, 340, __pyx_L1_error); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":345 + /* "ssh2/session.pyx":339 * :type password: str * """ * def passwd(*args, password=password): # <<<<<<<<<<<<<< @@ -8687,7 +8508,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_keyboardinteractive return __pyx_r; } -/* "ssh2/session.pyx":336 +/* "ssh2/session.pyx":330 * return handle_error_codes(rc) * * def userauth_keyboardinteractive(self, username not None, # <<<<<<<<<<<<<< @@ -8695,7 +8516,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_28userauth_keyboardinteractive * """Perform keyboard-interactive authentication */ -static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_30userauth_keyboardinteractive(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_password) { PyObject *__pyx_v_passwd = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8707,16 +8528,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_keyboardinteractive", 0); - /* "ssh2/session.pyx":345 + /* "ssh2/session.pyx":339 * :type password: str * """ * def passwd(*args, password=password): # <<<<<<<<<<<<<< * return [password] * return self.userauth_keyboardinteractive_callback(username, passwd) */ - __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_28userauth_keyboardinteractive_1passwd, 0, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive_loc, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_28userauth_keyboardinteractive_1passwd, 0, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive_loc, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_4ssh2_7session___pyx_defaults)) __PYX_ERR(0, 345, __pyx_L1_error) + if (!__Pyx_CyFunction_InitDefaults(__pyx_t_1, __pyx_mstate_global->__pyx_ptype_4ssh2_7session___pyx_defaults)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_INCREF(__pyx_v_password); __Pyx_CyFunction_Defaults(struct __pyx_defaults, __pyx_t_1)->arg0 = __pyx_v_password; __Pyx_GIVEREF(__pyx_v_password); @@ -8724,7 +8545,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive __pyx_v_passwd = __pyx_t_1; __pyx_t_1 = 0; - /* "ssh2/session.pyx":347 + /* "ssh2/session.pyx":341 * def passwd(*args, password=password): * return [password] * return self.userauth_keyboardinteractive_callback(username, passwd) # <<<<<<<<<<<<<< @@ -8739,14 +8560,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_username, __pyx_v_passwd}; __pyx_t_1 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive_cal, __pyx_callargs+__pyx_t_3, (3-__pyx_t_3) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 347, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); } __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":336 + /* "ssh2/session.pyx":330 * return handle_error_codes(rc) * * def userauth_keyboardinteractive(self, username not None, # <<<<<<<<<<<<<< @@ -8767,7 +8588,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive return __pyx_r; } -/* "ssh2/session.pyx":349 +/* "ssh2/session.pyx":343 * return self.userauth_keyboardinteractive_callback(username, passwd) * * def userauth_keyboardinteractive_callback( # <<<<<<<<<<<<<< @@ -8776,16 +8597,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback, "Session.userauth_keyboardinteractive_callback(self, username, callback)\n\nPerform keyboard-interactive authentication with provided Python callback function.\n\nCallback function *must* have signature compatible with `(name, instruction, prompts, password, *args)`\nwhere `*args` is any additional user-provided authentication data needed for authentication.\nFor example `oauth_handler(name, instruction, prompts, password, oauth)` can be used as a callback\nto provide an oauth token for 2FA in addition to a password.\n\nCallback function *must* return a python list of bytes of user-provided prompts required for authentication.\nAny number of prompts may be used as required by the server.\n\nAuthentication is not required to be actually be keyboard interactive, in the requiring a human typing\nmanually sense.\n\nCallbacks must go through the existing keyboardinteractive mechanism for things like 2FA and oauth\nauthentication to work correctly with SSH, hence this function.\n\nThis function is `ssh2-python` specific and is not part of upstream libssh2.\n\n:param username: Username to authenticate as.\n:type username: str\n:param callback: Python callback function to be called to get additional authentication prompts.\n:type callback: callable(str|bytes, str|bytes, list[str|bytes], str|bytes, *args[str|bytes])"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback = {"userauth_keyboardinteractive_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback, "Session.userauth_keyboardinteractive_callback(self, username, callback)\n\nPerform keyboard-interactive authentication with provided Python callback function.\n\nCallback function *must* have signature compatible with `(name, instruction, prompts, password, *args)`\nwhere `*args` is any additional user-provided authentication data needed for authentication.\nFor example `oauth_handler(name, instruction, prompts, password, oauth)` can be used as a callback\nto provide an oauth token for 2FA in addition to a password.\n\nCallback function *must* return a python list of bytes of user-provided prompts required for authentication.\nAny number of prompts may be used as required by the server.\n\nAuthentication is not required to be actually be keyboard interactive, in the requiring a human typing\nmanually sense.\n\nCallbacks must go through the existing keyboardinteractive mechanism for things like 2FA and oauth\nauthentication to work correctly with SSH, hence this function.\n\nThis function is `ssh2-python` specific and is not part of upstream libssh2.\n\n:param username: Username to authenticate as.\n:type username: str\n:param callback: Python callback function to be called to get additional authentication prompts.\n:type callback: callable(str|bytes, str|bytes, list[str|bytes], str|bytes, *args[str|bytes])"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback = {"userauth_keyboardinteractive_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -8816,39 +8637,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,&__pyx_mstate_global->__pyx_n_u_callback,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 349, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 343, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 349, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 343, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 349, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 343, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_keyboardinteractive_callback", 0) < 0) __PYX_ERR(0, 349, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "userauth_keyboardinteractive_callback", 0) < 0) __PYX_ERR(0, 343, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive_callback", 1, 2, 2, i); __PYX_ERR(0, 349, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive_callback", 1, 2, 2, i); __PYX_ERR(0, 343, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 349, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 343, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 349, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 343, __pyx_L3_error) } __pyx_v_username = values[0]; __pyx_v_callback = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive_callback", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 349, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_keyboardinteractive_callback", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 343, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -8860,12 +8681,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 350, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 344, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_callback) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "callback"); __PYX_ERR(0, 350, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "callback"); __PYX_ERR(0, 344, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_callback); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_callback); /* function exit code */ goto __pyx_L0; @@ -8884,7 +8705,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_callback) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username, PyObject *__pyx_v_callback) { int __pyx_v_rc; PyObject *__pyx_v_b_username = 0; char const *__pyx_v__username; @@ -8898,19 +8719,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_keyboardinteractive_callback", 0); - /* "ssh2/session.pyx":376 + /* "ssh2/session.pyx":370 * """ * cdef int rc * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef const char *_username = b_username * */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":377 + /* "ssh2/session.pyx":371 * cdef int rc * cdef bytes b_username = to_bytes(username) * cdef const char *_username = b_username # <<<<<<<<<<<<<< @@ -8919,12 +8740,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 377, __pyx_L1_error) + __PYX_ERR(0, 371, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 371, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":379 + /* "ssh2/session.pyx":373 * cdef const char *_username = b_username * * self._kbd_callback = callback # <<<<<<<<<<<<<< @@ -8937,7 +8758,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive __Pyx_DECREF(__pyx_v_self->_kbd_callback); __pyx_v_self->_kbd_callback = __pyx_v_callback; - /* "ssh2/session.pyx":380 + /* "ssh2/session.pyx":374 * * self._kbd_callback = callback * rc = c_ssh2.libssh2_userauth_keyboard_interactive( # <<<<<<<<<<<<<< @@ -8946,7 +8767,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive */ __pyx_v_rc = libssh2_userauth_keyboard_interactive(__pyx_v_self->_session, __pyx_v__username, (&__pyx_f_4ssh2_7session_kbd_callback)); - /* "ssh2/session.pyx":382 + /* "ssh2/session.pyx":376 * rc = c_ssh2.libssh2_userauth_keyboard_interactive( * self._session, _username, &kbd_callback) * self._kbd_callback = None # <<<<<<<<<<<<<< @@ -8959,7 +8780,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive __Pyx_DECREF(__pyx_v_self->_kbd_callback); __pyx_v_self->_kbd_callback = Py_None; - /* "ssh2/session.pyx":383 + /* "ssh2/session.pyx":377 * self._session, _username, &kbd_callback) * self._kbd_callback = None * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -8967,14 +8788,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive * def agent_init(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 383, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 377, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":349 + /* "ssh2/session.pyx":343 * return self.userauth_keyboardinteractive_callback(username, passwd) * * def userauth_keyboardinteractive_callback( # <<<<<<<<<<<<<< @@ -8994,7 +8815,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive return __pyx_r; } -/* "ssh2/session.pyx":385 +/* "ssh2/session.pyx":379 * return handle_error_codes(rc) * * def agent_init(self): # <<<<<<<<<<<<<< @@ -9003,16 +8824,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_34userauth_keyboardinteractive */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_37agent_init(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_35agent_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_36agent_init, "Session.agent_init(self)\n\nInitialise SSH agent.\n\n:rtype: :py:class:`ssh2.agent.Agent`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_37agent_init = {"agent_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_37agent_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_36agent_init}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_37agent_init(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_34agent_init, "Session.agent_init(self)\n\nInitialise SSH agent.\n\n:rtype: :py:class:`ssh2.agent.Agent`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_35agent_init = {"agent_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_35agent_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_34agent_init}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_35agent_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9038,14 +8859,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("agent_init", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_36agent_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_34agent_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_34agent_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { LIBSSH2_AGENT *__pyx_v_agent; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9056,7 +8877,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("agent_init", 0); - /* "ssh2/session.pyx":391 + /* "ssh2/session.pyx":385 * """ * cdef c_ssh2.LIBSSH2_AGENT *agent * with nogil: # <<<<<<<<<<<<<< @@ -9070,18 +8891,18 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":392 + /* "ssh2/session.pyx":386 * cdef c_ssh2.LIBSSH2_AGENT *agent * with nogil: * agent = agent_init(self._session) # <<<<<<<<<<<<<< * return PyAgent(agent, self) * */ - __pyx_t_1 = __pyx_f_4ssh2_5agent_agent_init(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((LIBSSH2_AGENT *)0))) __PYX_ERR(0, 392, __pyx_L4_error) + __pyx_t_1 = __pyx_f_4ssh2_5agent_agent_init(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((LIBSSH2_AGENT *)0))) __PYX_ERR(0, 386, __pyx_L4_error) __pyx_v_agent = __pyx_t_1; } - /* "ssh2/session.pyx":391 + /* "ssh2/session.pyx":385 * """ * cdef c_ssh2.LIBSSH2_AGENT *agent * with nogil: # <<<<<<<<<<<<<< @@ -9103,7 +8924,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ } } - /* "ssh2/session.pyx":393 + /* "ssh2/session.pyx":387 * with nogil: * agent = agent_init(self._session) * return PyAgent(agent, self) # <<<<<<<<<<<<<< @@ -9111,13 +8932,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ * def agent_auth(self, username not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4ssh2_5agent_PyAgent(__pyx_v_agent, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_5agent_PyAgent(__pyx_v_agent, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":385 + /* "ssh2/session.pyx":379 * return handle_error_codes(rc) * * def agent_init(self): # <<<<<<<<<<<<<< @@ -9136,7 +8957,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/session.pyx":395 +/* "ssh2/session.pyx":389 * return PyAgent(agent, self) * * def agent_auth(self, username not None): # <<<<<<<<<<<<<< @@ -9145,16 +8966,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_init(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_39agent_auth(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_37agent_auth(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_38agent_auth, "Session.agent_auth(self, username)\n\nConvenience function for performing user authentication via SSH Agent.\n\nInitialises, connects to, gets list of identities from and attempts\nauthentication with each identity from SSH agent.\n\nNote that agent connections cannot be used in non-blocking mode -\nclients should call `set_blocking(0)` *after* calling this function.\n\nOn completion, or any errors, agent is disconnected and resources freed.\n\nAll steps are performed in C space which makes this function perform\nbetter than calling the individual Agent class functions from\nPython.\n\n:raises: :py:class:`MemoryError` on error initialising agent\n:raises: :py:class:`ssh2.exceptions.AgentConnectionError` on error\n connecting to agent\n:raises: :py:class:`ssh2.exceptions.AgentListIdentitiesError` on error\n getting identities from agent\n:raises: :py:class:`ssh2.exceptions.AgentAuthenticationError` on no\n successful authentication with all available identities.\n:raises: :py:class:`ssh2.exceptions.AgentGetIdentityError` on error\n getting known identity from agent\n\n:rtype: None"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_39agent_auth = {"agent_auth", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_39agent_auth, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_38agent_auth}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_39agent_auth(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_36agent_auth, "Session.agent_auth(self, username)\n\nConvenience function for performing user authentication via SSH Agent.\n\nInitialises, connects to, gets list of identities from and attempts\nauthentication with each identity from SSH agent.\n\nNote that agent connections cannot be used in non-blocking mode -\nclients should call `set_blocking(0)` *after* calling this function.\n\nOn completion, or any errors, agent is disconnected and resources freed.\n\nAll steps are performed in C space which makes this function perform\nbetter than calling the individual Agent class functions from\nPython.\n\n:raises: :py:class:`MemoryError` on error initialising agent\n:raises: :py:class:`ssh2.exceptions.AgentConnectionError` on error\n connecting to agent\n:raises: :py:class:`ssh2.exceptions.AgentListIdentitiesError` on error\n getting identities from agent\n:raises: :py:class:`ssh2.exceptions.AgentAuthenticationError` on no\n successful authentication with all available identities.\n:raises: :py:class:`ssh2.exceptions.AgentGetIdentityError` on error\n getting known identity from agent\n\n:rtype: None"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_37agent_auth = {"agent_auth", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_37agent_auth, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_36agent_auth}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_37agent_auth(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9184,32 +9005,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_username,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 395, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 389, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 389, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "agent_auth", 0) < 0) __PYX_ERR(0, 395, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "agent_auth", 0) < 0) __PYX_ERR(0, 389, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("agent_auth", 1, 1, 1, i); __PYX_ERR(0, 395, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("agent_auth", 1, 1, 1, i); __PYX_ERR(0, 389, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 395, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 389, __pyx_L3_error) } __pyx_v_username = values[0]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("agent_auth", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 395, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("agent_auth", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 389, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9221,9 +9042,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 395, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 389, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_38agent_auth(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_36agent_auth(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_username); /* function exit code */ goto __pyx_L0; @@ -9242,7 +9063,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_36agent_auth(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_username) { PyObject *__pyx_v_b_username = 0; char *__pyx_v__username; LIBSSH2_AGENT *__pyx_v_agent; @@ -9259,19 +9080,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("agent_auth", 0); - /* "ssh2/session.pyx":421 + /* "ssh2/session.pyx":415 * * :rtype: None""" * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef char *_username = b_username * cdef c_ssh2.LIBSSH2_AGENT *agent = NULL */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":422 + /* "ssh2/session.pyx":416 * :rtype: None""" * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username # <<<<<<<<<<<<<< @@ -9280,12 +9101,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 422, __pyx_L1_error) + __PYX_ERR(0, 416, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 422, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L1_error) __pyx_v__username = __pyx_t_2; - /* "ssh2/session.pyx":423 + /* "ssh2/session.pyx":417 * cdef bytes b_username = to_bytes(username) * cdef char *_username = b_username * cdef c_ssh2.LIBSSH2_AGENT *agent = NULL # <<<<<<<<<<<<<< @@ -9294,7 +9115,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ */ __pyx_v_agent = NULL; - /* "ssh2/session.pyx":424 + /* "ssh2/session.pyx":418 * cdef char *_username = b_username * cdef c_ssh2.LIBSSH2_AGENT *agent = NULL * cdef c_ssh2.libssh2_agent_publickey *identity = NULL # <<<<<<<<<<<<<< @@ -9303,7 +9124,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ */ __pyx_v_identity = NULL; - /* "ssh2/session.pyx":425 + /* "ssh2/session.pyx":419 * cdef c_ssh2.LIBSSH2_AGENT *agent = NULL * cdef c_ssh2.libssh2_agent_publickey *identity = NULL * cdef c_ssh2.libssh2_agent_publickey *prev = NULL # <<<<<<<<<<<<<< @@ -9312,17 +9133,17 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ */ __pyx_v_prev = NULL; - /* "ssh2/session.pyx":426 + /* "ssh2/session.pyx":420 * cdef c_ssh2.libssh2_agent_publickey *identity = NULL * cdef c_ssh2.libssh2_agent_publickey *prev = NULL * agent = init_connect_agent(self._session) # <<<<<<<<<<<<<< * with nogil: * agent_auth(_username, agent) */ - __pyx_t_3 = __pyx_f_4ssh2_5agent_init_connect_agent(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((LIBSSH2_AGENT *)0))) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5agent_init_connect_agent(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((LIBSSH2_AGENT *)0))) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_v_agent = __pyx_t_3; - /* "ssh2/session.pyx":427 + /* "ssh2/session.pyx":421 * cdef c_ssh2.libssh2_agent_publickey *prev = NULL * agent = init_connect_agent(self._session) * with nogil: # <<<<<<<<<<<<<< @@ -9336,17 +9157,17 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":428 + /* "ssh2/session.pyx":422 * agent = init_connect_agent(self._session) * with nogil: * agent_auth(_username, agent) # <<<<<<<<<<<<<< * * def open_session(self): */ - __pyx_t_4 = __pyx_f_4ssh2_5agent_agent_auth(__pyx_v__username, __pyx_v_agent); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 428, __pyx_L4_error) + __pyx_t_4 = __pyx_f_4ssh2_5agent_agent_auth(__pyx_v__username, __pyx_v_agent); if (unlikely(__pyx_t_4 == ((int)1))) __PYX_ERR(0, 422, __pyx_L4_error) } - /* "ssh2/session.pyx":427 + /* "ssh2/session.pyx":421 * cdef c_ssh2.libssh2_agent_publickey *prev = NULL * agent = init_connect_agent(self._session) * with nogil: # <<<<<<<<<<<<<< @@ -9368,7 +9189,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ } } - /* "ssh2/session.pyx":395 + /* "ssh2/session.pyx":389 * return PyAgent(agent, self) * * def agent_auth(self, username not None): # <<<<<<<<<<<<<< @@ -9390,7 +9211,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/session.pyx":430 +/* "ssh2/session.pyx":424 * agent_auth(_username, agent) * * def open_session(self): # <<<<<<<<<<<<<< @@ -9399,16 +9220,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_38agent_auth(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_41open_session(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_39open_session(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_40open_session, "Session.open_session(self)\n\nOpen new channel session.\n\n:rtype: :py:class:`ssh2.channel.Channel`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_41open_session = {"open_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_41open_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_40open_session}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_41open_session(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_38open_session, "Session.open_session(self)\n\nOpen new channel session.\n\n:rtype: :py:class:`ssh2.channel.Channel`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_39open_session = {"open_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_39open_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_38open_session}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_39open_session(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9434,14 +9255,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("open_session", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_40open_session(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_38open_session(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_38open_session(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { LIBSSH2_CHANNEL *__pyx_v_channel; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -9453,7 +9274,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_session", 0); - /* "ssh2/session.pyx":436 + /* "ssh2/session.pyx":430 * """ * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -9467,7 +9288,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":437 + /* "ssh2/session.pyx":431 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: * channel = c_ssh2.libssh2_channel_open_session( # <<<<<<<<<<<<<< @@ -9477,7 +9298,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob __pyx_v_channel = libssh2_channel_open_session(__pyx_v_self->_session); } - /* "ssh2/session.pyx":436 + /* "ssh2/session.pyx":430 * """ * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -9494,7 +9315,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob } } - /* "ssh2/session.pyx":439 + /* "ssh2/session.pyx":433 * channel = c_ssh2.libssh2_channel_open_session( * self._session) * if channel is NULL: # <<<<<<<<<<<<<< @@ -9504,7 +9325,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob __pyx_t_1 = (__pyx_v_channel == NULL); if (__pyx_t_1) { - /* "ssh2/session.pyx":440 + /* "ssh2/session.pyx":434 * self._session) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -9513,29 +9334,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":441 + /* "ssh2/session.pyx":435 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyChannel(channel, self) * */ - __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 434, __pyx_L1_error) - /* "ssh2/session.pyx":440 + /* "ssh2/session.pyx":434 * self._session) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyChannel(channel, self) */ - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":439 + /* "ssh2/session.pyx":433 * channel = c_ssh2.libssh2_channel_open_session( * self._session) * if channel is NULL: # <<<<<<<<<<<<<< @@ -9544,7 +9365,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob */ } - /* "ssh2/session.pyx":442 + /* "ssh2/session.pyx":436 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyChannel(channel, self) # <<<<<<<<<<<<<< @@ -9552,13 +9373,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob * def direct_tcpip_ex(self, host not None, int port, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":430 + /* "ssh2/session.pyx":424 * agent_auth(_username, agent) * * def open_session(self): # <<<<<<<<<<<<<< @@ -9577,7 +9398,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob return __pyx_r; } -/* "ssh2/session.pyx":444 +/* "ssh2/session.pyx":438 * return PyChannel(channel, self) * * def direct_tcpip_ex(self, host not None, int port, # <<<<<<<<<<<<<< @@ -9586,16 +9407,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_40open_session(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_43direct_tcpip_ex(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_41direct_tcpip_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_42direct_tcpip_ex, "Session.direct_tcpip_ex(self, host, int port, shost, int sport)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_43direct_tcpip_ex = {"direct_tcpip_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_43direct_tcpip_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_42direct_tcpip_ex}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_43direct_tcpip_ex(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_40direct_tcpip_ex, "Session.direct_tcpip_ex(self, host, int port, shost, int sport)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_41direct_tcpip_ex = {"direct_tcpip_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_41direct_tcpip_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_40direct_tcpip_ex}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_41direct_tcpip_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9628,53 +9449,53 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_port,&__pyx_mstate_global->__pyx_n_u_shost,&__pyx_mstate_global->__pyx_n_u_sport,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 444, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 438, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 438, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 438, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 438, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 438, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_tcpip_ex", 0) < 0) __PYX_ERR(0, 444, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_tcpip_ex", 0) < 0) __PYX_ERR(0, 438, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 4; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_tcpip_ex", 1, 4, 4, i); __PYX_ERR(0, 444, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_tcpip_ex", 1, 4, 4, i); __PYX_ERR(0, 438, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 4)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 438, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 438, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 438, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 444, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 438, __pyx_L3_error) } __pyx_v_host = values[0]; - __pyx_v_port = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L3_error) + __pyx_v_port = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L3_error) __pyx_v_shost = values[2]; - __pyx_v_sport = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_sport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L3_error) + __pyx_v_sport = __Pyx_PyLong_As_int(values[3]); if (unlikely((__pyx_v_sport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 439, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("direct_tcpip_ex", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 444, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("direct_tcpip_ex", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 438, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9686,12 +9507,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_host) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "host"); __PYX_ERR(0, 444, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "host"); __PYX_ERR(0, 438, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_shost) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "shost"); __PYX_ERR(0, 445, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "shost"); __PYX_ERR(0, 439, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_host, __pyx_v_port, __pyx_v_shost, __pyx_v_sport); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_40direct_tcpip_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_host, __pyx_v_port, __pyx_v_shost, __pyx_v_sport); /* function exit code */ goto __pyx_L0; @@ -9710,7 +9531,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port, PyObject *__pyx_v_shost, int __pyx_v_sport) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_40direct_tcpip_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port, PyObject *__pyx_v_shost, int __pyx_v_sport) { LIBSSH2_CHANNEL *__pyx_v_channel; PyObject *__pyx_v_b_host = 0; PyObject *__pyx_v_b_shost = 0; @@ -9727,31 +9548,31 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("direct_tcpip_ex", 0); - /* "ssh2/session.pyx":447 + /* "ssh2/session.pyx":441 * shost not None, int sport): * cdef c_ssh2.LIBSSH2_CHANNEL *channel * cdef bytes b_host = to_bytes(host) # <<<<<<<<<<<<<< * cdef bytes b_shost = to_bytes(shost) * cdef char *_host = b_host */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_host = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":448 + /* "ssh2/session.pyx":442 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * cdef bytes b_host = to_bytes(host) * cdef bytes b_shost = to_bytes(shost) # <<<<<<<<<<<<<< * cdef char *_host = b_host * cdef char *_shost = b_shost */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_shost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_shost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_shost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":449 + /* "ssh2/session.pyx":443 * cdef bytes b_host = to_bytes(host) * cdef bytes b_shost = to_bytes(shost) * cdef char *_host = b_host # <<<<<<<<<<<<<< @@ -9760,12 +9581,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx */ if (unlikely(__pyx_v_b_host == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 449, __pyx_L1_error) + __PYX_ERR(0, 443, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 449, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error) __pyx_v__host = __pyx_t_2; - /* "ssh2/session.pyx":450 + /* "ssh2/session.pyx":444 * cdef bytes b_shost = to_bytes(shost) * cdef char *_host = b_host * cdef char *_shost = b_shost # <<<<<<<<<<<<<< @@ -9774,12 +9595,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx */ if (unlikely(__pyx_v_b_shost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 450, __pyx_L1_error) + __PYX_ERR(0, 444, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_shost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 450, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_shost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __pyx_v__shost = __pyx_t_2; - /* "ssh2/session.pyx":451 + /* "ssh2/session.pyx":445 * cdef char *_host = b_host * cdef char *_shost = b_shost * with nogil: # <<<<<<<<<<<<<< @@ -9793,7 +9614,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":452 + /* "ssh2/session.pyx":446 * cdef char *_shost = b_shost * with nogil: * channel = c_ssh2.libssh2_channel_direct_tcpip_ex( # <<<<<<<<<<<<<< @@ -9803,7 +9624,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx __pyx_v_channel = libssh2_channel_direct_tcpip_ex(__pyx_v_self->_session, __pyx_v__host, __pyx_v_port, __pyx_v__shost, __pyx_v_sport); } - /* "ssh2/session.pyx":451 + /* "ssh2/session.pyx":445 * cdef char *_host = b_host * cdef char *_shost = b_shost * with nogil: # <<<<<<<<<<<<<< @@ -9820,7 +9641,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx } } - /* "ssh2/session.pyx":454 + /* "ssh2/session.pyx":448 * channel = c_ssh2.libssh2_channel_direct_tcpip_ex( * self._session, _host, port, _shost, sport) * if channel is NULL: # <<<<<<<<<<<<<< @@ -9830,7 +9651,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx __pyx_t_3 = (__pyx_v_channel == NULL); if (__pyx_t_3) { - /* "ssh2/session.pyx":455 + /* "ssh2/session.pyx":449 * self._session, _host, port, _shost, sport) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -9839,29 +9660,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":456 + /* "ssh2/session.pyx":450 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyChannel(channel, self) * */ - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L1_error) - /* "ssh2/session.pyx":455 + /* "ssh2/session.pyx":449 * self._session, _host, port, _shost, sport) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyChannel(channel, self) */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":454 + /* "ssh2/session.pyx":448 * channel = c_ssh2.libssh2_channel_direct_tcpip_ex( * self._session, _host, port, _shost, sport) * if channel is NULL: # <<<<<<<<<<<<<< @@ -9870,7 +9691,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx */ } - /* "ssh2/session.pyx":457 + /* "ssh2/session.pyx":451 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyChannel(channel, self) # <<<<<<<<<<<<<< @@ -9878,13 +9699,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx * def direct_tcpip(self, host not None, int port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":444 + /* "ssh2/session.pyx":438 * return PyChannel(channel, self) * * def direct_tcpip_ex(self, host not None, int port, # <<<<<<<<<<<<<< @@ -9905,7 +9726,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx return __pyx_r; } -/* "ssh2/session.pyx":459 +/* "ssh2/session.pyx":453 * return PyChannel(channel, self) * * def direct_tcpip(self, host not None, int port): # <<<<<<<<<<<<<< @@ -9914,16 +9735,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip_ex(struct __pyx */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_45direct_tcpip(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_43direct_tcpip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_44direct_tcpip, "Session.direct_tcpip(self, host, int port)\n\nOpen direct TCP/IP channel to host:port\n\nChannel will be listening on an available open port on client side\nas assigned by OS."); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_45direct_tcpip = {"direct_tcpip", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_45direct_tcpip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_44direct_tcpip}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_45direct_tcpip(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_42direct_tcpip, "Session.direct_tcpip(self, host, int port)\n\nOpen direct TCP/IP channel to host:port\n\nChannel will be listening on an available open port on client side\nas assigned by OS."); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_43direct_tcpip = {"direct_tcpip", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_43direct_tcpip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_42direct_tcpip}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_43direct_tcpip(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -9954,39 +9775,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_port,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 459, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 453, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 459, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 453, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 459, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 453, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_tcpip", 0) < 0) __PYX_ERR(0, 459, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_tcpip", 0) < 0) __PYX_ERR(0, 453, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_tcpip", 1, 2, 2, i); __PYX_ERR(0, 459, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_tcpip", 1, 2, 2, i); __PYX_ERR(0, 453, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 459, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 453, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 459, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 453, __pyx_L3_error) } __pyx_v_host = values[0]; - __pyx_v_port = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 459, __pyx_L3_error) + __pyx_v_port = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 453, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("direct_tcpip", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("direct_tcpip", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 453, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9998,9 +9819,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_host) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "host"); __PYX_ERR(0, 459, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "host"); __PYX_ERR(0, 453, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_44direct_tcpip(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_host, __pyx_v_port); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_42direct_tcpip(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_host, __pyx_v_port); /* function exit code */ goto __pyx_L0; @@ -10019,7 +9840,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_42direct_tcpip(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_host, int __pyx_v_port) { LIBSSH2_CHANNEL *__pyx_v_channel; PyObject *__pyx_v_b_host = 0; char *__pyx_v__host; @@ -10034,19 +9855,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("direct_tcpip", 0); - /* "ssh2/session.pyx":466 + /* "ssh2/session.pyx":460 * """ * cdef c_ssh2.LIBSSH2_CHANNEL *channel * cdef bytes b_host = to_bytes(host) # <<<<<<<<<<<<<< * cdef char *_host = b_host * with nogil: */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_host = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":467 + /* "ssh2/session.pyx":461 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * cdef bytes b_host = to_bytes(host) * cdef char *_host = b_host # <<<<<<<<<<<<<< @@ -10055,12 +9876,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob */ if (unlikely(__pyx_v_b_host == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 467, __pyx_L1_error) + __PYX_ERR(0, 461, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 467, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 461, __pyx_L1_error) __pyx_v__host = __pyx_t_2; - /* "ssh2/session.pyx":468 + /* "ssh2/session.pyx":462 * cdef bytes b_host = to_bytes(host) * cdef char *_host = b_host * with nogil: # <<<<<<<<<<<<<< @@ -10074,7 +9895,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":469 + /* "ssh2/session.pyx":463 * cdef char *_host = b_host * with nogil: * channel = c_ssh2.libssh2_channel_direct_tcpip( # <<<<<<<<<<<<<< @@ -10084,7 +9905,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob __pyx_v_channel = libssh2_channel_direct_tcpip(__pyx_v_self->_session, __pyx_v__host, __pyx_v_port); } - /* "ssh2/session.pyx":468 + /* "ssh2/session.pyx":462 * cdef bytes b_host = to_bytes(host) * cdef char *_host = b_host * with nogil: # <<<<<<<<<<<<<< @@ -10101,7 +9922,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob } } - /* "ssh2/session.pyx":471 + /* "ssh2/session.pyx":465 * channel = c_ssh2.libssh2_channel_direct_tcpip( * self._session, _host, port) * if channel is NULL: # <<<<<<<<<<<<<< @@ -10111,7 +9932,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob __pyx_t_3 = (__pyx_v_channel == NULL); if (__pyx_t_3) { - /* "ssh2/session.pyx":472 + /* "ssh2/session.pyx":466 * self._session, _host, port) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -10120,29 +9941,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":473 + /* "ssh2/session.pyx":467 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyChannel(channel, self) * */ - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 466, __pyx_L1_error) - /* "ssh2/session.pyx":472 + /* "ssh2/session.pyx":466 * self._session, _host, port) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyChannel(channel, self) */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":471 + /* "ssh2/session.pyx":465 * channel = c_ssh2.libssh2_channel_direct_tcpip( * self._session, _host, port) * if channel is NULL: # <<<<<<<<<<<<<< @@ -10151,7 +9972,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob */ } - /* "ssh2/session.pyx":474 + /* "ssh2/session.pyx":468 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyChannel(channel, self) # <<<<<<<<<<<<<< @@ -10159,13 +9980,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob * def direct_streamlocal_ex(self, socket_path not None, shost not None, int sport): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":459 + /* "ssh2/session.pyx":453 * return PyChannel(channel, self) * * def direct_tcpip(self, host not None, int port): # <<<<<<<<<<<<<< @@ -10185,7 +10006,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob return __pyx_r; } -/* "ssh2/session.pyx":476 +/* "ssh2/session.pyx":470 * return PyChannel(channel, self) * * def direct_streamlocal_ex(self, socket_path not None, shost not None, int sport): # <<<<<<<<<<<<<< @@ -10194,16 +10015,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_tcpip(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_47direct_streamlocal_ex(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_45direct_streamlocal_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_46direct_streamlocal_ex, "Session.direct_streamlocal_ex(self, socket_path, shost, int sport)\n\nFrom libssh2 documentation:\n Tunnel a UNIX socket connection through the SSH transport via the remote host to a third party.\n Communication from the client to the SSH server remains encrypted, communication from the server to the\n 3rd party host travels in cleartext.\n\n:param socket_path: Unix socket path to connect to using the SSH host as a proxy.\n:type socket_path: str\n:param shost: Host to tell the SSH server the connection originated on.\n:type shost: str\n:param sport: Port to tell the SSH server the connection originated from.\n:type sport: int\n:returns: A `Channel` object for the server intiated connection to the third party or an exception is raised\n on any error.\n:rtype: `ssh2.channel.Channel`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_47direct_streamlocal_ex = {"direct_streamlocal_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_47direct_streamlocal_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_46direct_streamlocal_ex}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_47direct_streamlocal_ex(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_44direct_streamlocal_ex, "Session.direct_streamlocal_ex(self, socket_path, shost, int sport)\n\nFrom libssh2 documentation:\n Tunnel a UNIX socket connection through the SSH transport via the remote host to a third party.\n Communication from the client to the SSH server remains encrypted, communication from the server to the\n 3rd party host travels in cleartext.\n\n:param socket_path: Unix socket path to connect to using the SSH host as a proxy.\n:type socket_path: str\n:param shost: Host to tell the SSH server the connection originated on.\n:type shost: str\n:param sport: Port to tell the SSH server the connection originated from.\n:type sport: int\n:returns: A `Channel` object for the server intiated connection to the third party or an exception is raised\n on any error.\n:rtype: `ssh2.channel.Channel`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_45direct_streamlocal_ex = {"direct_streamlocal_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_45direct_streamlocal_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_44direct_streamlocal_ex}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_45direct_streamlocal_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10235,46 +10056,46 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_socket_path,&__pyx_mstate_global->__pyx_n_u_shost,&__pyx_mstate_global->__pyx_n_u_sport,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 476, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 470, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 470, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 470, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 470, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_streamlocal_ex", 0) < 0) __PYX_ERR(0, 476, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "direct_streamlocal_ex", 0) < 0) __PYX_ERR(0, 470, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_streamlocal_ex", 1, 3, 3, i); __PYX_ERR(0, 476, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("direct_streamlocal_ex", 1, 3, 3, i); __PYX_ERR(0, 470, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 3)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 470, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 470, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 476, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 470, __pyx_L3_error) } __pyx_v_socket_path = values[0]; __pyx_v_shost = values[1]; - __pyx_v_sport = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_sport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 476, __pyx_L3_error) + __pyx_v_sport = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_sport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 470, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("direct_streamlocal_ex", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 476, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("direct_streamlocal_ex", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 470, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10286,12 +10107,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_socket_path) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket_path"); __PYX_ERR(0, 476, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket_path"); __PYX_ERR(0, 470, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_shost) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "shost"); __PYX_ERR(0, 476, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "shost"); __PYX_ERR(0, 470, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_socket_path, __pyx_v_shost, __pyx_v_sport); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_44direct_streamlocal_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_socket_path, __pyx_v_shost, __pyx_v_sport); /* function exit code */ goto __pyx_L0; @@ -10310,7 +10131,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_socket_path, PyObject *__pyx_v_shost, int __pyx_v_sport) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_44direct_streamlocal_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_socket_path, PyObject *__pyx_v_shost, int __pyx_v_sport) { PyObject *__pyx_v_b_socket_path = 0; PyObject *__pyx_v_b_shost = 0; char const *__pyx_v_c_socket_path; @@ -10328,31 +10149,31 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("direct_streamlocal_ex", 0); - /* "ssh2/session.pyx":493 + /* "ssh2/session.pyx":487 * :rtype: `ssh2.channel.Channel` * """ * cdef bytes b_socket_path = to_bytes(socket_path) # <<<<<<<<<<<<<< * cdef bytes b_shost = to_bytes(shost) * cdef const char *c_socket_path = b_socket_path */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_socket_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_socket_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_socket_path = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":494 + /* "ssh2/session.pyx":488 * """ * cdef bytes b_socket_path = to_bytes(socket_path) * cdef bytes b_shost = to_bytes(shost) # <<<<<<<<<<<<<< * cdef const char *c_socket_path = b_socket_path * cdef const char *c_shost = b_shost */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_shost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_shost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_shost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":495 + /* "ssh2/session.pyx":489 * cdef bytes b_socket_path = to_bytes(socket_path) * cdef bytes b_shost = to_bytes(shost) * cdef const char *c_socket_path = b_socket_path # <<<<<<<<<<<<<< @@ -10361,12 +10182,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct */ if (unlikely(__pyx_v_b_socket_path == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 495, __pyx_L1_error) + __PYX_ERR(0, 489, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_socket_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_socket_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 489, __pyx_L1_error) __pyx_v_c_socket_path = __pyx_t_2; - /* "ssh2/session.pyx":496 + /* "ssh2/session.pyx":490 * cdef bytes b_shost = to_bytes(shost) * cdef const char *c_socket_path = b_socket_path * cdef const char *c_shost = b_shost # <<<<<<<<<<<<<< @@ -10375,12 +10196,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct */ if (unlikely(__pyx_v_b_shost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 496, __pyx_L1_error) + __PYX_ERR(0, 490, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_b_shost); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 496, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_b_shost); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 490, __pyx_L1_error) __pyx_v_c_shost = __pyx_t_3; - /* "ssh2/session.pyx":498 + /* "ssh2/session.pyx":492 * cdef const char *c_shost = b_shost * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -10394,7 +10215,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":499 + /* "ssh2/session.pyx":493 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: * channel = c_ssh2.libssh2_channel_direct_streamlocal_ex(self._session, c_socket_path, c_shost, sport) # <<<<<<<<<<<<<< @@ -10404,7 +10225,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct __pyx_v_channel = libssh2_channel_direct_streamlocal_ex(__pyx_v_self->_session, __pyx_v_c_socket_path, __pyx_v_c_shost, __pyx_v_sport); } - /* "ssh2/session.pyx":498 + /* "ssh2/session.pyx":492 * cdef const char *c_shost = b_shost * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -10421,7 +10242,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct } } - /* "ssh2/session.pyx":500 + /* "ssh2/session.pyx":494 * with nogil: * channel = c_ssh2.libssh2_channel_direct_streamlocal_ex(self._session, c_socket_path, c_shost, sport) * if channel is NULL: # <<<<<<<<<<<<<< @@ -10431,7 +10252,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct __pyx_t_4 = (__pyx_v_channel == NULL); if (__pyx_t_4) { - /* "ssh2/session.pyx":501 + /* "ssh2/session.pyx":495 * channel = c_ssh2.libssh2_channel_direct_streamlocal_ex(self._session, c_socket_path, c_shost, sport) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -10440,29 +10261,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":502 + /* "ssh2/session.pyx":496 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyChannel(channel, self) * */ - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 495, __pyx_L1_error) - /* "ssh2/session.pyx":501 + /* "ssh2/session.pyx":495 * channel = c_ssh2.libssh2_channel_direct_streamlocal_ex(self._session, c_socket_path, c_shost, sport) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyChannel(channel, self) */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":500 + /* "ssh2/session.pyx":494 * with nogil: * channel = c_ssh2.libssh2_channel_direct_streamlocal_ex(self._session, c_socket_path, c_shost, sport) * if channel is NULL: # <<<<<<<<<<<<<< @@ -10471,7 +10292,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct */ } - /* "ssh2/session.pyx":503 + /* "ssh2/session.pyx":497 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyChannel(channel, self) # <<<<<<<<<<<<<< @@ -10479,13 +10300,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct * def block_directions(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":476 + /* "ssh2/session.pyx":470 * return PyChannel(channel, self) * * def direct_streamlocal_ex(self, socket_path not None, shost not None, int sport): # <<<<<<<<<<<<<< @@ -10506,7 +10327,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct return __pyx_r; } -/* "ssh2/session.pyx":505 +/* "ssh2/session.pyx":499 * return PyChannel(channel, self) * * def block_directions(self): # <<<<<<<<<<<<<< @@ -10515,16 +10336,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_46direct_streamlocal_ex(struct */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_49block_directions(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_47block_directions(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_48block_directions, "Session.block_directions(self)\n\nGet blocked directions for the current session.\n\nFrom libssh2 documentation:\n\nCan be a combination of:\n\n``ssh2.session.LIBSSH2_SESSION_BLOCK_INBOUND``: Inbound direction\nblocked.\n\n``ssh2.session.LIBSSH2_SESSION_BLOCK_OUTBOUND``: Outbound direction\nblocked.\n\nApplication should wait for data to be available for socket prior to\ncalling a libssh2 function again. If ``LIBSSH2_SESSION_BLOCK_INBOUND``\nis set select should contain the session socket in readfds set.\n\nCorrespondingly in case of ``LIBSSH2_SESSION_BLOCK_OUTBOUND`` writefds\nset should contain the socket.\n\n:rtype: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_49block_directions = {"block_directions", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_49block_directions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_48block_directions}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_49block_directions(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_46block_directions, "Session.block_directions(self)\n\nGet blocked directions for the current session.\n\nFrom libssh2 documentation:\n\nCan be a combination of:\n\n``ssh2.session.LIBSSH2_SESSION_BLOCK_INBOUND``: Inbound direction\nblocked.\n\n``ssh2.session.LIBSSH2_SESSION_BLOCK_OUTBOUND``: Outbound direction\nblocked.\n\nApplication should wait for data to be available for socket prior to\ncalling a libssh2 function again. If ``LIBSSH2_SESSION_BLOCK_INBOUND``\nis set select should contain the session socket in readfds set.\n\nCorrespondingly in case of ``LIBSSH2_SESSION_BLOCK_OUTBOUND`` writefds\nset should contain the socket.\n\n:rtype: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_47block_directions = {"block_directions", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_47block_directions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_46block_directions}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_47block_directions(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10550,14 +10371,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("block_directions", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_48block_directions(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_46block_directions(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_46block_directions(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -10567,7 +10388,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("block_directions", 0); - /* "ssh2/session.pyx":527 + /* "ssh2/session.pyx":521 * :rtype: int""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10581,7 +10402,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":528 + /* "ssh2/session.pyx":522 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_block_directions( # <<<<<<<<<<<<<< @@ -10591,7 +10412,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py __pyx_v_rc = libssh2_session_block_directions(__pyx_v_self->_session); } - /* "ssh2/session.pyx":527 + /* "ssh2/session.pyx":521 * :rtype: int""" * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10608,7 +10429,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py } } - /* "ssh2/session.pyx":530 + /* "ssh2/session.pyx":524 * rc = c_ssh2.libssh2_session_block_directions( * self._session) * return rc # <<<<<<<<<<<<<< @@ -10616,13 +10437,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py * def flag(self, FlagType flag, enabled=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":505 + /* "ssh2/session.pyx":499 * return PyChannel(channel, self) * * def block_directions(self): # <<<<<<<<<<<<<< @@ -10641,7 +10462,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py return __pyx_r; } -/* "ssh2/session.pyx":532 +/* "ssh2/session.pyx":526 * return rc * * def flag(self, FlagType flag, enabled=True): # <<<<<<<<<<<<<< @@ -10650,16 +10471,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_48block_directions(struct __py */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_51flag(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_49flag(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_50flag, "Session.flag(self, FlagType flag, enabled=True)\n\nEnable/Disable flag for session.\n\nFlag must be one of :py:class:`ssh2.session.LIBSSH2_FLAG_SIGPIPE`\n or :py:class:`ssh2.session.LIBSSH2_FLAG_COMPRESS`.\n\nFlags *must* be set before :py:func:`Session.handshake` is called for the library to use them.\n\n:py:class:`ssh2.session.LIBSSH2_FLAG_SIGPIPE` - Library will not block SIGPIPE signal from triggering from the\n socket used. Meaning if the socket connection is terminated unexpectedly, using library functions will\n trigger a SIGPIPE signal from the associated socket. Default is off.\n\n:py:class:`ssh2.session.LIBSSH2_FLAG_COMPRESS` - Library will enable compression for the session.\n Default is off.\n\nUse `Session.supported_algs(LIBSSH2_METHOD_COMP_CS)` to get a list of supported compression algorithms after\nenabling compression, if any.\n\nDefault is to enable the flag - `enabled=True`.\n\nSet `enabled=False` to disable a previously enabled flag.\n\n:raises ValueError: On incorrect :py:class:`ssh2.session.FlagType` passed.\n:returns: None"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_51flag = {"flag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_51flag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_50flag}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_51flag(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_48flag, "Session.flag(self, FlagType flag, enabled=True)\n\nEnable/Disable flag for session.\n\nFlag must be one of :py:class:`ssh2.session.LIBSSH2_FLAG_SIGPIPE`\n or :py:class:`ssh2.session.LIBSSH2_FLAG_COMPRESS`.\n\nFlags *must* be set before :py:func:`Session.handshake` is called for the library to use them.\n\n:py:class:`ssh2.session.LIBSSH2_FLAG_SIGPIPE` - Library will not block SIGPIPE signal from triggering from the\n socket used. Meaning if the socket connection is terminated unexpectedly, using library functions will\n trigger a SIGPIPE signal from the associated socket. Default is off.\n\n:py:class:`ssh2.session.LIBSSH2_FLAG_COMPRESS` - Library will enable compression for the session.\n Default is off.\n\nUse `Session.supported_algs(LIBSSH2_METHOD_COMP_CS)` to get a list of supported compression algorithms after\nenabling compression, if any.\n\nDefault is to enable the flag - `enabled=True`.\n\nSet `enabled=False` to disable a previously enabled flag.\n\n:raises ValueError: On incorrect :py:class:`ssh2.session.FlagType` passed.\n:returns: None"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_49flag = {"flag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_49flag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_48flag}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_49flag(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10690,35 +10511,35 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_flag,&__pyx_mstate_global->__pyx_n_u_enabled,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 532, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 526, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 532, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 526, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flag", 0) < 0) __PYX_ERR(0, 532, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "flag", 0) < 0) __PYX_ERR(0, 526, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_True)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("flag", 0, 1, 2, i); __PYX_ERR(0, 532, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("flag", 0, 1, 2, i); __PYX_ERR(0, 526, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 532, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 526, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 532, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 526, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } @@ -10729,7 +10550,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("flag", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 532, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("flag", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 526, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -10740,8 +10561,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flag), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_FlagType, 1, "flag", 0))) __PYX_ERR(0, 532, __pyx_L1_error) - __pyx_r = __pyx_pf_4ssh2_7session_7Session_50flag(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_flag, __pyx_v_enabled); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_flag), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_FlagType, 1, "flag", 0))) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_r = __pyx_pf_4ssh2_7session_7Session_48flag(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_flag, __pyx_v_enabled); /* function exit code */ goto __pyx_L0; @@ -10760,7 +10581,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_FlagType *__pyx_v_flag, PyObject *__pyx_v_enabled) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_48flag(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_FlagType *__pyx_v_flag, PyObject *__pyx_v_enabled) { int __pyx_v_rc; int __pyx_v_value; PyObject *__pyx_r = NULL; @@ -10778,17 +10599,17 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flag", 0); - /* "ssh2/session.pyx":559 + /* "ssh2/session.pyx":553 * """ * cdef int rc * cdef bint value = enabled # <<<<<<<<<<<<<< * if not flag in (LIBSSH2_FLAG_SIGPIPE, LIBSSH2_FLAG_COMPRESS): * raise ValueError("Provided flag must be one of LIBSSH2_FLAG_SIGPIPE or LIBSSH2_FLAG_COMPRESS - got %s", */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_enabled); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L1_error) __pyx_v_value = __pyx_t_1; - /* "ssh2/session.pyx":560 + /* "ssh2/session.pyx":554 * cdef int rc * cdef bint value = enabled * if not flag in (LIBSSH2_FLAG_SIGPIPE, LIBSSH2_FLAG_COMPRESS): # <<<<<<<<<<<<<< @@ -10797,22 +10618,22 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ */ __Pyx_INCREF((PyObject *)__pyx_v_flag); __pyx_t_2 = __pyx_v_flag; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LIBSSH2_FLAG_SIGPIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_mstate_global->__pyx_n_u_LIBSSH2_FLAG_SIGPIPE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_t_2), __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_t_2), __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LIBSSH2_FLAG_COMPRESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_LIBSSH2_FLAG_COMPRESS); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_2), __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(((PyObject *)__pyx_t_2), __pyx_t_4, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 560, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_5; __pyx_L4_bool_binop_done:; @@ -10820,7 +10641,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ __pyx_t_5 = __pyx_t_1; if (unlikely(__pyx_t_5)) { - /* "ssh2/session.pyx":561 + /* "ssh2/session.pyx":555 * cdef bint value = enabled * if not flag in (LIBSSH2_FLAG_SIGPIPE, LIBSSH2_FLAG_COMPRESS): * raise ValueError("Provided flag must be one of LIBSSH2_FLAG_SIGPIPE or LIBSSH2_FLAG_COMPRESS - got %s", # <<<<<<<<<<<<<< @@ -10831,7 +10652,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ __Pyx_INCREF(__pyx_builtin_ValueError); __pyx_t_6 = __pyx_builtin_ValueError; - /* "ssh2/session.pyx":562 + /* "ssh2/session.pyx":556 * if not flag in (LIBSSH2_FLAG_SIGPIPE, LIBSSH2_FLAG_COMPRESS): * raise ValueError("Provided flag must be one of LIBSSH2_FLAG_SIGPIPE or LIBSSH2_FLAG_COMPRESS - got %s", * flag) # <<<<<<<<<<<<<< @@ -10844,14 +10665,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); } __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 555, __pyx_L1_error) - /* "ssh2/session.pyx":560 + /* "ssh2/session.pyx":554 * cdef int rc * cdef bint value = enabled * if not flag in (LIBSSH2_FLAG_SIGPIPE, LIBSSH2_FLAG_COMPRESS): # <<<<<<<<<<<<<< @@ -10860,7 +10681,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ */ } - /* "ssh2/session.pyx":563 + /* "ssh2/session.pyx":557 * raise ValueError("Provided flag must be one of LIBSSH2_FLAG_SIGPIPE or LIBSSH2_FLAG_COMPRESS - got %s", * flag) * with nogil: # <<<<<<<<<<<<<< @@ -10874,7 +10695,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":564 + /* "ssh2/session.pyx":558 * flag) * with nogil: * rc = c_ssh2.libssh2_session_flag(self._session, flag.value, value) # <<<<<<<<<<<<<< @@ -10884,7 +10705,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ __pyx_v_rc = libssh2_session_flag(__pyx_v_self->_session, __pyx_v_flag->value, __pyx_v_value); } - /* "ssh2/session.pyx":563 + /* "ssh2/session.pyx":557 * raise ValueError("Provided flag must be one of LIBSSH2_FLAG_SIGPIPE or LIBSSH2_FLAG_COMPRESS - got %s", * flag) * with nogil: # <<<<<<<<<<<<<< @@ -10901,16 +10722,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ } } - /* "ssh2/session.pyx":565 + /* "ssh2/session.pyx":559 * with nogil: * rc = c_ssh2.libssh2_session_flag(self._session, flag.value, value) * handle_error_codes(rc) # <<<<<<<<<<<<<< * * def forward_listen(self, int port): */ - __pyx_t_8 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 565, __pyx_L1_error) + __pyx_t_8 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 559, __pyx_L1_error) - /* "ssh2/session.pyx":532 + /* "ssh2/session.pyx":526 * return rc * * def flag(self, FlagType flag, enabled=True): # <<<<<<<<<<<<<< @@ -10934,7 +10755,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ return __pyx_r; } -/* "ssh2/session.pyx":567 +/* "ssh2/session.pyx":561 * handle_error_codes(rc) * * def forward_listen(self, int port): # <<<<<<<<<<<<<< @@ -10943,16 +10764,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_50flag(struct __pyx_obj_4ssh2_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_53forward_listen(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_51forward_listen(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_52forward_listen, "Session.forward_listen(self, int port)\n\nCreate forward listener on port.\n\n:param port: Port to listen on.\n:type port: int\n\n:rtype: :py:class:`ssh2.listener.Listener` or None"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_53forward_listen = {"forward_listen", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_53forward_listen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_52forward_listen}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_53forward_listen(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_50forward_listen, "Session.forward_listen(self, int port)\n\nCreate forward listener on port.\n\n:param port: Port to listen on.\n:type port: int\n\n:rtype: :py:class:`ssh2.listener.Listener` or None"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_51forward_listen = {"forward_listen", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_51forward_listen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_50forward_listen}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_51forward_listen(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -10982,32 +10803,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_port,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 567, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 561, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 567, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 561, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "forward_listen", 0) < 0) __PYX_ERR(0, 567, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "forward_listen", 0) < 0) __PYX_ERR(0, 561, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forward_listen", 1, 1, 1, i); __PYX_ERR(0, 567, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forward_listen", 1, 1, 1, i); __PYX_ERR(0, 561, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 567, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 561, __pyx_L3_error) } - __pyx_v_port = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 567, __pyx_L3_error) + __pyx_v_port = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("forward_listen", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 567, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("forward_listen", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 561, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11018,7 +10839,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_52forward_listen(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_port); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_50forward_listen(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_port); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -11028,7 +10849,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_port) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_50forward_listen(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_port) { LIBSSH2_LISTENER *__pyx_v_listener; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11040,7 +10861,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("forward_listen", 0); - /* "ssh2/session.pyx":575 + /* "ssh2/session.pyx":569 * :rtype: :py:class:`ssh2.listener.Listener` or None""" * cdef c_ssh2.LIBSSH2_LISTENER *listener * with nogil: # <<<<<<<<<<<<<< @@ -11054,7 +10875,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":576 + /* "ssh2/session.pyx":570 * cdef c_ssh2.LIBSSH2_LISTENER *listener * with nogil: * listener = c_ssh2.libssh2_channel_forward_listen( # <<<<<<<<<<<<<< @@ -11064,7 +10885,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ __pyx_v_listener = libssh2_channel_forward_listen(__pyx_v_self->_session, __pyx_v_port); } - /* "ssh2/session.pyx":575 + /* "ssh2/session.pyx":569 * :rtype: :py:class:`ssh2.listener.Listener` or None""" * cdef c_ssh2.LIBSSH2_LISTENER *listener * with nogil: # <<<<<<<<<<<<<< @@ -11081,7 +10902,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ } } - /* "ssh2/session.pyx":578 + /* "ssh2/session.pyx":572 * listener = c_ssh2.libssh2_channel_forward_listen( * self._session, port) * if listener is NULL: # <<<<<<<<<<<<<< @@ -11091,7 +10912,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ __pyx_t_1 = (__pyx_v_listener == NULL); if (__pyx_t_1) { - /* "ssh2/session.pyx":579 + /* "ssh2/session.pyx":573 * self._session, port) * if listener is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -11100,29 +10921,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":580 + /* "ssh2/session.pyx":574 * if listener is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyListener(listener, self) * */ - __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 573, __pyx_L1_error) - /* "ssh2/session.pyx":579 + /* "ssh2/session.pyx":573 * self._session, port) * if listener is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyListener(listener, self) */ - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":578 + /* "ssh2/session.pyx":572 * listener = c_ssh2.libssh2_channel_forward_listen( * self._session, port) * if listener is NULL: # <<<<<<<<<<<<<< @@ -11131,7 +10952,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ */ } - /* "ssh2/session.pyx":581 + /* "ssh2/session.pyx":575 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyListener(listener, self) # <<<<<<<<<<<<<< @@ -11139,13 +10960,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ * def forward_listen_ex(self, int queue_maxsize, host=None, int port=0): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_8listener_PyListener(__pyx_v_listener, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_8listener_PyListener(__pyx_v_listener, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":567 + /* "ssh2/session.pyx":561 * handle_error_codes(rc) * * def forward_listen(self, int port): # <<<<<<<<<<<<<< @@ -11164,7 +10985,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ return __pyx_r; } -/* "ssh2/session.pyx":583 +/* "ssh2/session.pyx":577 * return PyListener(listener, self) * * def forward_listen_ex(self, int queue_maxsize, host=None, int port=0): # <<<<<<<<<<<<<< @@ -11173,16 +10994,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_55forward_listen_ex(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_53forward_listen_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_54forward_listen_ex, "Session.forward_listen_ex(self, int queue_maxsize, host=None, int port=0)\n\nInstruct the remote SSH server to begin listening for inbound\nTCP/IP connections. New connections will be queued by the library\nuntil accepted by ``ssh2.channel.Channel.forward_accept``.\n\n:param queue_maxsize: Maximum number of pending connections to queue\n before rejecting further attempts.\n:type queue_maxsize: int\n:param host: Address to bind to on the remote host. Binding\n to 0.0.0.0 (default when `None` is passed) will bind to all available\n addresses.\n:type host: str\n:param port: port to bind to on the remote host. When 0 is passed\n (the default), the remote host will select the first available\n dynamic port.\n:type port: int\n:returns: (listener, bound_port) tuple where bound_port is the\n listen port bound on the remote host. Useful when requesting\n dynamic port numbers.\n:rtype: (:py:class:`ssh2.listener.Listener`, int)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_55forward_listen_ex = {"forward_listen_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_55forward_listen_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_54forward_listen_ex}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_55forward_listen_ex(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_52forward_listen_ex, "Session.forward_listen_ex(self, int queue_maxsize, host=None, int port=0)\n\nInstruct the remote SSH server to begin listening for inbound\nTCP/IP connections. New connections will be queued by the library\nuntil accepted by ``ssh2.channel.Channel.forward_accept``.\n\n:param queue_maxsize: Maximum number of pending connections to queue\n before rejecting further attempts.\n:type queue_maxsize: int\n:param host: Address to bind to on the remote host. Binding\n to 0.0.0.0 (default when `None` is passed) will bind to all available\n addresses.\n:type host: str\n:param port: port to bind to on the remote host. When 0 is passed\n (the default), the remote host will select the first available\n dynamic port.\n:type port: int\n:returns: (listener, bound_port) tuple where bound_port is the\n listen port bound on the remote host. Useful when requesting\n dynamic port numbers.\n:rtype: (:py:class:`ssh2.listener.Listener`, int)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_53forward_listen_ex = {"forward_listen_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_53forward_listen_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_52forward_listen_ex}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_53forward_listen_ex(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -11214,59 +11035,59 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_queue_maxsize,&__pyx_mstate_global->__pyx_n_u_host,&__pyx_mstate_global->__pyx_n_u_port,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 583, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 577, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "forward_listen_ex", 0) < 0) __PYX_ERR(0, 583, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "forward_listen_ex", 0) < 0) __PYX_ERR(0, 577, __pyx_L3_error) if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forward_listen_ex", 0, 1, 3, i); __PYX_ERR(0, 583, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("forward_listen_ex", 0, 1, 3, i); __PYX_ERR(0, 577, __pyx_L3_error) } } } else { switch (__pyx_nargs) { case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 577, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 583, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 577, __pyx_L3_error) break; default: goto __pyx_L5_argtuple_error; } if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None)); } - __pyx_v_queue_maxsize = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_queue_maxsize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 583, __pyx_L3_error) + __pyx_v_queue_maxsize = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_queue_maxsize == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) __pyx_v_host = values[1]; if (values[2]) { - __pyx_v_port = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 583, __pyx_L3_error) + __pyx_v_port = __Pyx_PyLong_As_int(values[2]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error) } else { __pyx_v_port = ((int)0); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("forward_listen_ex", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 583, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("forward_listen_ex", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 577, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11277,7 +11098,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_queue_maxsize, __pyx_v_host, __pyx_v_port); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_52forward_listen_ex(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_queue_maxsize, __pyx_v_host, __pyx_v_port); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -11287,7 +11108,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_queue_maxsize, PyObject *__pyx_v_host, int __pyx_v_port) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_52forward_listen_ex(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_queue_maxsize, PyObject *__pyx_v_host, int __pyx_v_port) { LIBSSH2_LISTENER *__pyx_v_listener; PyObject *__pyx_v_b_host = 0; char *__pyx_v__host; @@ -11305,7 +11126,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("forward_listen_ex", 0); - /* "ssh2/session.pyx":606 + /* "ssh2/session.pyx":600 * """ * cdef c_ssh2.LIBSSH2_LISTENER *listener * cdef bytes b_host = None if host is None else to_bytes(host) # <<<<<<<<<<<<<< @@ -11317,16 +11138,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p __Pyx_INCREF(Py_None); __pyx_t_1 = Py_None; } else { - __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_host); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; } - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 606, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("bytes", __pyx_t_1))) __PYX_ERR(0, 600, __pyx_L1_error) __pyx_v_b_host = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":607 + /* "ssh2/session.pyx":601 * cdef c_ssh2.LIBSSH2_LISTENER *listener * cdef bytes b_host = None if host is None else to_bytes(host) * cdef char *_host = NULL # <<<<<<<<<<<<<< @@ -11335,7 +11156,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ __pyx_v__host = NULL; - /* "ssh2/session.pyx":608 + /* "ssh2/session.pyx":602 * cdef bytes b_host = None if host is None else to_bytes(host) * cdef char *_host = NULL * if b_host is not None: # <<<<<<<<<<<<<< @@ -11345,7 +11166,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p __pyx_t_2 = (__pyx_v_b_host != ((PyObject*)Py_None)); if (__pyx_t_2) { - /* "ssh2/session.pyx":609 + /* "ssh2/session.pyx":603 * cdef char *_host = NULL * if b_host is not None: * _host = b_host # <<<<<<<<<<<<<< @@ -11354,12 +11175,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ if (unlikely(__pyx_v_b_host == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 609, __pyx_L1_error) + __PYX_ERR(0, 603, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_host); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L1_error) __pyx_v__host = __pyx_t_4; - /* "ssh2/session.pyx":608 + /* "ssh2/session.pyx":602 * cdef bytes b_host = None if host is None else to_bytes(host) * cdef char *_host = NULL * if b_host is not None: # <<<<<<<<<<<<<< @@ -11368,7 +11189,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ } - /* "ssh2/session.pyx":610 + /* "ssh2/session.pyx":604 * if b_host is not None: * _host = b_host * cdef int bound_port = 0 # <<<<<<<<<<<<<< @@ -11377,7 +11198,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ __pyx_v_bound_port = 0; - /* "ssh2/session.pyx":611 + /* "ssh2/session.pyx":605 * _host = b_host * cdef int bound_port = 0 * with nogil: # <<<<<<<<<<<<<< @@ -11391,7 +11212,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":612 + /* "ssh2/session.pyx":606 * cdef int bound_port = 0 * with nogil: * listener = c_ssh2.libssh2_channel_forward_listen_ex( # <<<<<<<<<<<<<< @@ -11401,7 +11222,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p __pyx_v_listener = libssh2_channel_forward_listen_ex(__pyx_v_self->_session, __pyx_v__host, __pyx_v_port, (&__pyx_v_bound_port), __pyx_v_queue_maxsize); } - /* "ssh2/session.pyx":611 + /* "ssh2/session.pyx":605 * _host = b_host * cdef int bound_port = 0 * with nogil: # <<<<<<<<<<<<<< @@ -11418,7 +11239,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p } } - /* "ssh2/session.pyx":614 + /* "ssh2/session.pyx":608 * listener = c_ssh2.libssh2_channel_forward_listen_ex( * self._session, _host, port, &bound_port, queue_maxsize) * if listener is NULL: # <<<<<<<<<<<<<< @@ -11428,7 +11249,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p __pyx_t_2 = (__pyx_v_listener == NULL); if (__pyx_t_2) { - /* "ssh2/session.pyx":615 + /* "ssh2/session.pyx":609 * self._session, _host, port, &bound_port, queue_maxsize) * if listener is NULL: * return (handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -11437,37 +11258,37 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":616 + /* "ssh2/session.pyx":610 * if listener is NULL: * return (handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)), 0) # <<<<<<<<<<<<<< * return (PyListener(listener, self), bound_port) * */ - __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 609, __pyx_L1_error) - /* "ssh2/session.pyx":615 + /* "ssh2/session.pyx":609 * self._session, _host, port, &bound_port, queue_maxsize) * if listener is NULL: * return (handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)), 0) * return (PyListener(listener, self), bound_port) */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 615, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 609, __pyx_L1_error); __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_int_0); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 615, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_mstate_global->__pyx_int_0) != (0)) __PYX_ERR(0, 609, __pyx_L1_error); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":614 + /* "ssh2/session.pyx":608 * listener = c_ssh2.libssh2_channel_forward_listen_ex( * self._session, _host, port, &bound_port, queue_maxsize) * if listener is NULL: # <<<<<<<<<<<<<< @@ -11476,7 +11297,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ } - /* "ssh2/session.pyx":617 + /* "ssh2/session.pyx":611 * return (handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)), 0) * return (PyListener(listener, self), bound_port) # <<<<<<<<<<<<<< @@ -11484,23 +11305,23 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p * def sftp_init(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_8listener_PyListener(__pyx_v_listener, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_8listener_PyListener(__pyx_v_listener, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_bound_port); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_bound_port); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 617, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_3); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 617, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3) != (0)) __PYX_ERR(0, 611, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 617, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1) != (0)) __PYX_ERR(0, 611, __pyx_L1_error); __pyx_t_3 = 0; __pyx_t_1 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":583 + /* "ssh2/session.pyx":577 * return PyListener(listener, self) * * def forward_listen_ex(self, int queue_maxsize, host=None, int port=0): # <<<<<<<<<<<<<< @@ -11522,7 +11343,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p return __pyx_r; } -/* "ssh2/session.pyx":619 +/* "ssh2/session.pyx":613 * return (PyListener(listener, self), bound_port) * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -11531,16 +11352,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_54forward_listen_ex(struct __p */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_57sftp_init(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_55sftp_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_56sftp_init, "Session.sftp_init(self)\n\nInitialise SFTP channel.\n\n:rtype: :py:class:`ssh2.sftp.SFTP`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_57sftp_init = {"sftp_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_57sftp_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_56sftp_init}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_57sftp_init(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_54sftp_init, "Session.sftp_init(self)\n\nInitialise SFTP channel.\n\n:rtype: :py:class:`ssh2.sftp.SFTP`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_55sftp_init = {"sftp_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_55sftp_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_54sftp_init}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_55sftp_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -11566,14 +11387,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("sftp_init", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_56sftp_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_54sftp_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_54sftp_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { LIBSSH2_SFTP *__pyx_v__sftp; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -11585,7 +11406,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sftp_init", 0); - /* "ssh2/session.pyx":625 + /* "ssh2/session.pyx":619 * """ * cdef c_sftp.LIBSSH2_SFTP *_sftp * with nogil: # <<<<<<<<<<<<<< @@ -11599,7 +11420,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":626 + /* "ssh2/session.pyx":620 * cdef c_sftp.LIBSSH2_SFTP *_sftp * with nogil: * _sftp = c_sftp.libssh2_sftp_init(self._session) # <<<<<<<<<<<<<< @@ -11609,7 +11430,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 __pyx_v__sftp = libssh2_sftp_init(__pyx_v_self->_session); } - /* "ssh2/session.pyx":625 + /* "ssh2/session.pyx":619 * """ * cdef c_sftp.LIBSSH2_SFTP *_sftp * with nogil: # <<<<<<<<<<<<<< @@ -11626,7 +11447,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 } } - /* "ssh2/session.pyx":627 + /* "ssh2/session.pyx":621 * with nogil: * _sftp = c_sftp.libssh2_sftp_init(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -11636,7 +11457,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 __pyx_t_1 = (__pyx_v__sftp == NULL); if (__pyx_t_1) { - /* "ssh2/session.pyx":628 + /* "ssh2/session.pyx":622 * _sftp = c_sftp.libssh2_sftp_init(self._session) * if _sftp is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -11645,29 +11466,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":629 + /* "ssh2/session.pyx":623 * if _sftp is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PySFTP(_sftp, self) * */ - __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 622, __pyx_L1_error) - /* "ssh2/session.pyx":628 + /* "ssh2/session.pyx":622 * _sftp = c_sftp.libssh2_sftp_init(self._session) * if _sftp is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PySFTP(_sftp, self) */ - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":627 + /* "ssh2/session.pyx":621 * with nogil: * _sftp = c_sftp.libssh2_sftp_init(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -11676,7 +11497,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 */ } - /* "ssh2/session.pyx":630 + /* "ssh2/session.pyx":624 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PySFTP(_sftp, self) # <<<<<<<<<<<<<< @@ -11684,13 +11505,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 * def last_error(self, size_t msg_size=1024): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_4sftp_PySFTP(__pyx_v__sftp, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_4sftp_PySFTP(__pyx_v__sftp, __pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":619 + /* "ssh2/session.pyx":613 * return (PyListener(listener, self), bound_port) * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -11709,7 +11530,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 return __pyx_r; } -/* "ssh2/session.pyx":632 +/* "ssh2/session.pyx":626 * return PySFTP(_sftp, self) * * def last_error(self, size_t msg_size=1024): # <<<<<<<<<<<<<< @@ -11718,16 +11539,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_56sftp_init(struct __pyx_obj_4 */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_59last_error(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_57last_error(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_58last_error, "Session.last_error(self, size_t msg_size=1024)\n\nRetrieve last error message from libssh2, if any.\nReturns empty string on no error message.\n\n:rtype: str"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_59last_error = {"last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_59last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_58last_error}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_59last_error(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_56last_error, "Session.last_error(self, size_t msg_size=1024)\n\nRetrieve last error message from libssh2, if any.\nReturns empty string on no error message.\n\n:rtype: str"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_57last_error = {"last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_57last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_56last_error}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_57last_error(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -11757,37 +11578,37 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_msg_size,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 632, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 626, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 632, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 626, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "last_error", 0) < 0) __PYX_ERR(0, 632, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "last_error", 0) < 0) __PYX_ERR(0, 626, __pyx_L3_error) } else { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 632, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 626, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } } if (values[0]) { - __pyx_v_msg_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_msg_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L3_error) + __pyx_v_msg_size = __Pyx_PyLong_As_size_t(values[0]); if (unlikely((__pyx_v_msg_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 626, __pyx_L3_error) } else { __pyx_v_msg_size = ((size_t)0x400); } } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("last_error", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 632, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("last_error", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 626, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -11798,7 +11619,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_58last_error(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_msg_size); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_56last_error(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_msg_size); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -11808,7 +11629,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, size_t __pyx_v_msg_size) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_56last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, size_t __pyx_v_msg_size) { char *__pyx_v__error_msg; PyObject *__pyx_v_msg = 0; int __pyx_v_errmsg_len; @@ -11831,7 +11652,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("last_error", 0); - /* "ssh2/session.pyx":639 + /* "ssh2/session.pyx":633 * """ * cdef char *_error_msg * cdef bytes msg = b'' # <<<<<<<<<<<<<< @@ -11841,7 +11662,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__2); __pyx_v_msg = __pyx_mstate_global->__pyx_kp_b__2; - /* "ssh2/session.pyx":640 + /* "ssh2/session.pyx":634 * cdef char *_error_msg * cdef bytes msg = b'' * cdef int errmsg_len = 0 # <<<<<<<<<<<<<< @@ -11850,7 +11671,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ */ __pyx_v_errmsg_len = 0; - /* "ssh2/session.pyx":641 + /* "ssh2/session.pyx":635 * cdef bytes msg = b'' * cdef int errmsg_len = 0 * with nogil: # <<<<<<<<<<<<<< @@ -11864,7 +11685,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":642 + /* "ssh2/session.pyx":636 * cdef int errmsg_len = 0 * with nogil: * _error_msg = malloc(sizeof(char) * msg_size) # <<<<<<<<<<<<<< @@ -11873,7 +11694,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ */ __pyx_v__error_msg = ((char *)malloc(((sizeof(char)) * __pyx_v_msg_size))); - /* "ssh2/session.pyx":643 + /* "ssh2/session.pyx":637 * with nogil: * _error_msg = malloc(sizeof(char) * msg_size) * c_ssh2.libssh2_session_last_error( # <<<<<<<<<<<<<< @@ -11883,7 +11704,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ (void)(libssh2_session_last_error(__pyx_v_self->_session, (&__pyx_v__error_msg), (&__pyx_v_errmsg_len), 1)); } - /* "ssh2/session.pyx":641 + /* "ssh2/session.pyx":635 * cdef bytes msg = b'' * cdef int errmsg_len = 0 * with nogil: # <<<<<<<<<<<<<< @@ -11900,7 +11721,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ } } - /* "ssh2/session.pyx":645 + /* "ssh2/session.pyx":639 * c_ssh2.libssh2_session_last_error( * self._session, &_error_msg, &errmsg_len, 1) * try: # <<<<<<<<<<<<<< @@ -11909,7 +11730,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ */ /*try:*/ { - /* "ssh2/session.pyx":646 + /* "ssh2/session.pyx":640 * self._session, &_error_msg, &errmsg_len, 1) * try: * if errmsg_len > 0: # <<<<<<<<<<<<<< @@ -11919,19 +11740,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ __pyx_t_1 = (__pyx_v_errmsg_len > 0); if (__pyx_t_1) { - /* "ssh2/session.pyx":647 + /* "ssh2/session.pyx":641 * try: * if errmsg_len > 0: * msg = _error_msg[:errmsg_len] # <<<<<<<<<<<<<< * return to_str(msg) * finally: */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v__error_msg + 0, __pyx_v_errmsg_len - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L7_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v__error_msg + 0, __pyx_v_errmsg_len - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_msg, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh2/session.pyx":646 + /* "ssh2/session.pyx":640 * self._session, &_error_msg, &errmsg_len, 1) * try: * if errmsg_len > 0: # <<<<<<<<<<<<<< @@ -11940,7 +11761,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ */ } - /* "ssh2/session.pyx":648 + /* "ssh2/session.pyx":642 * if errmsg_len > 0: * msg = _error_msg[:errmsg_len] * return to_str(msg) # <<<<<<<<<<<<<< @@ -11948,15 +11769,15 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ * free(_error_msg) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_msg); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L7_error) - __pyx_t_2 = __pyx_f_4ssh2_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L7_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_msg); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L7_error) + __pyx_t_2 = __pyx_f_4ssh2_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L6_return; } - /* "ssh2/session.pyx":650 + /* "ssh2/session.pyx":644 * return to_str(msg) * finally: * free(_error_msg) # <<<<<<<<<<<<<< @@ -12004,7 +11825,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ } } - /* "ssh2/session.pyx":632 + /* "ssh2/session.pyx":626 * return PySFTP(_sftp, self) * * def last_error(self, size_t msg_size=1024): # <<<<<<<<<<<<<< @@ -12024,7 +11845,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/session.pyx":652 +/* "ssh2/session.pyx":646 * free(_error_msg) * * def last_errno(self): # <<<<<<<<<<<<<< @@ -12033,16 +11854,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_error(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_61last_errno(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_59last_errno(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_60last_errno, "Session.last_errno(self)\n\nRetrieve last error number from libssh2, if any.\nReturns 0 on no last error.\n\n:rtype: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_61last_errno = {"last_errno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_61last_errno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_60last_errno}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_61last_errno(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_58last_errno, "Session.last_errno(self)\n\nRetrieve last error number from libssh2, if any.\nReturns 0 on no last error.\n\n:rtype: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_59last_errno = {"last_errno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_59last_errno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_58last_errno}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_59last_errno(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -12068,14 +11889,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("last_errno", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_60last_errno(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_58last_errno(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_58last_errno(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { int __pyx_v_rc; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -12085,7 +11906,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("last_errno", 0); - /* "ssh2/session.pyx":659 + /* "ssh2/session.pyx":653 * """ * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -12099,7 +11920,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":660 + /* "ssh2/session.pyx":654 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -12109,7 +11930,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ __pyx_v_rc = libssh2_session_last_errno(__pyx_v_self->_session); } - /* "ssh2/session.pyx":659 + /* "ssh2/session.pyx":653 * """ * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -12126,7 +11947,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ } } - /* "ssh2/session.pyx":662 + /* "ssh2/session.pyx":656 * rc = c_ssh2.libssh2_session_last_errno( * self._session) * return rc # <<<<<<<<<<<<<< @@ -12134,13 +11955,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ * def set_last_error(self, int errcode, errmsg not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":652 + /* "ssh2/session.pyx":646 * free(_error_msg) * * def last_errno(self): # <<<<<<<<<<<<<< @@ -12159,7 +11980,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/session.pyx":664 +/* "ssh2/session.pyx":658 * return rc * * def set_last_error(self, int errcode, errmsg not None): # <<<<<<<<<<<<<< @@ -12168,16 +11989,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_60last_errno(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_63set_last_error(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_61set_last_error(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_62set_last_error, "Session.set_last_error(self, int errcode, errmsg)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_63set_last_error = {"set_last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_63set_last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_62set_last_error}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_63set_last_error(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_60set_last_error, "Session.set_last_error(self, int errcode, errmsg)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_61set_last_error = {"set_last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_61set_last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_60set_last_error}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_61set_last_error(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -12208,39 +12029,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_errcode,&__pyx_mstate_global->__pyx_n_u_errmsg,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 664, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 658, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 664, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 658, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 664, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 658, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_last_error", 0) < 0) __PYX_ERR(0, 664, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "set_last_error", 0) < 0) __PYX_ERR(0, 658, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_last_error", 1, 2, 2, i); __PYX_ERR(0, 664, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("set_last_error", 1, 2, 2, i); __PYX_ERR(0, 658, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 664, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 658, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 664, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 658, __pyx_L3_error) } - __pyx_v_errcode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_errcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 664, __pyx_L3_error) + __pyx_v_errcode = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_errcode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error) __pyx_v_errmsg = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_last_error", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 664, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_last_error", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 658, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -12252,9 +12073,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_errmsg) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "errmsg"); __PYX_ERR(0, 664, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "errmsg"); __PYX_ERR(0, 658, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_62set_last_error(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_errcode, __pyx_v_errmsg); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_60set_last_error(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_errcode, __pyx_v_errmsg); /* function exit code */ goto __pyx_L0; @@ -12273,7 +12094,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_62set_last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_errcode, PyObject *__pyx_v_errmsg) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_60set_last_error(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_errcode, PyObject *__pyx_v_errmsg) { PyObject *__pyx_v_b_errmsg = 0; char *__pyx_v__errmsg; int __pyx_v_rc; @@ -12286,19 +12107,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_62set_last_error(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_last_error", 0); - /* "ssh2/session.pyx":665 + /* "ssh2/session.pyx":659 * * def set_last_error(self, int errcode, errmsg not None): * cdef bytes b_errmsg = to_bytes(errmsg) # <<<<<<<<<<<<<< * cdef char *_errmsg = b_errmsg * cdef int rc */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_errmsg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_errmsg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_errmsg = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":666 + /* "ssh2/session.pyx":660 * def set_last_error(self, int errcode, errmsg not None): * cdef bytes b_errmsg = to_bytes(errmsg) * cdef char *_errmsg = b_errmsg # <<<<<<<<<<<<<< @@ -12307,12 +12128,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_62set_last_error(struct __pyx_ */ if (unlikely(__pyx_v_b_errmsg == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 666, __pyx_L1_error) + __PYX_ERR(0, 660, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_errmsg); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_errmsg); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L1_error) __pyx_v__errmsg = __pyx_t_2; - /* "ssh2/session.pyx":668 + /* "ssh2/session.pyx":662 * cdef char *_errmsg = b_errmsg * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -12326,704 +12147,86 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_62set_last_error(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":669 + /* "ssh2/session.pyx":663 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_set_last_error( # <<<<<<<<<<<<<< * self._session, errcode, _errmsg) * return rc */ - __pyx_v_rc = libssh2_session_set_last_error(__pyx_v_self->_session, __pyx_v_errcode, __pyx_v__errmsg); - } - - /* "ssh2/session.pyx":668 - * cdef char *_errmsg = b_errmsg - * cdef int rc - * with nogil: # <<<<<<<<<<<<<< - * rc = c_ssh2.libssh2_session_set_last_error( - * self._session, errcode, _errmsg) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/session.pyx":671 - * rc = c_ssh2.libssh2_session_set_last_error( - * self._session, errcode, _errmsg) - * return rc # <<<<<<<<<<<<<< - * - * def scp_recv(self, path not None): -*/ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "ssh2/session.pyx":664 - * return rc - * - * def set_last_error(self, int errcode, errmsg not None): # <<<<<<<<<<<<<< - * cdef bytes b_errmsg = to_bytes(errmsg) - * cdef char *_errmsg = b_errmsg -*/ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("ssh2.session.Session.set_last_error", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_b_errmsg); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/session.pyx":673 - * return rc - * - * def scp_recv(self, path not None): # <<<<<<<<<<<<<< - * """Receive file via SCP. - * -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_65scp_recv(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_64scp_recv, "Session.scp_recv(self, path)\n\nReceive file via SCP.\n\nDeprecated in favour or recv2 (requires libssh2 >= 1.7).\n\n:param path: File path to receive.\n:type path: str\n\n:rtype: tuple(:py:class:`ssh2.channel.Channel`,\n :py:class:`ssh2.statinfo.StatInfo`) or None"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_65scp_recv = {"scp_recv", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_65scp_recv, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_64scp_recv}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_65scp_recv(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_path = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("scp_recv (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 673, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 673, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_recv", 0) < 0) __PYX_ERR(0, 673, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_recv", 1, 1, 1, i); __PYX_ERR(0, 673, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 673, __pyx_L3_error) - } - __pyx_v_path = values[0]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_recv", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 673, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.session.Session.scp_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 673, __pyx_L1_error) - } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_64scp_recv(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - goto __pyx_L7_cleaned_up; - __pyx_L0:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __pyx_L7_cleaned_up:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7session_7Session_64scp_recv(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path) { - PyObject *__pyx_v_b_path = 0; - char *__pyx_v__path; - struct __pyx_obj_4ssh2_8statinfo_StatInfo *__pyx_v_statinfo = 0; - LIBSSH2_CHANNEL *__pyx_v_channel; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - char *__pyx_t_2; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - size_t __pyx_t_5; - int __pyx_t_6; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("scp_recv", 0); - - /* "ssh2/session.pyx":683 - * :rtype: tuple(:py:class:`ssh2.channel.Channel`, - * :py:class:`ssh2.statinfo.StatInfo`) or None""" - * cdef bytes b_path = to_bytes(path) # <<<<<<<<<<<<<< - * cdef char *_path = b_path - * cdef StatInfo statinfo = StatInfo() -*/ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_b_path = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "ssh2/session.pyx":684 - * :py:class:`ssh2.statinfo.StatInfo`) or None""" - * cdef bytes b_path = to_bytes(path) - * cdef char *_path = b_path # <<<<<<<<<<<<<< - * cdef StatInfo statinfo = StatInfo() - * cdef c_ssh2.LIBSSH2_CHANNEL *channel -*/ - if (unlikely(__pyx_v_b_path == Py_None)) { - PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 684, __pyx_L1_error) - } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 684, __pyx_L1_error) - __pyx_v__path = __pyx_t_2; - - /* "ssh2/session.pyx":685 - * cdef bytes b_path = to_bytes(path) - * cdef char *_path = b_path - * cdef StatInfo statinfo = StatInfo() # <<<<<<<<<<<<<< - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: -*/ - __pyx_t_3 = NULL; - __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8statinfo_StatInfo); - __pyx_t_4 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8statinfo_StatInfo); - __pyx_t_5 = 1; - { - PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (1-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) - __Pyx_GOTREF((PyObject *)__pyx_t_1); - } - __pyx_v_statinfo = ((struct __pyx_obj_4ssh2_8statinfo_StatInfo *)__pyx_t_1); - __pyx_t_1 = 0; - - /* "ssh2/session.pyx":687 - * cdef StatInfo statinfo = StatInfo() - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_recv( - * self._session, _path, statinfo._stat) -*/ - { - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - /*try:*/ { - - /* "ssh2/session.pyx":688 - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: - * channel = c_ssh2.libssh2_scp_recv( # <<<<<<<<<<<<<< - * self._session, _path, statinfo._stat) - * if channel is NULL: -*/ - __pyx_v_channel = libssh2_scp_recv(__pyx_v_self->_session, __pyx_v__path, __pyx_v_statinfo->_stat); - } - - /* "ssh2/session.pyx":687 - * cdef StatInfo statinfo = StatInfo() - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_recv( - * self._session, _path, statinfo._stat) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/session.pyx":690 - * channel = c_ssh2.libssh2_scp_recv( - * self._session, _path, statinfo._stat) - * if channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) -*/ - __pyx_t_6 = (__pyx_v_channel == NULL); - if (__pyx_t_6) { - - /* "ssh2/session.pyx":691 - * self._session, _path, statinfo._stat) - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< - * self._session)) - * return PyChannel(channel, self), statinfo -*/ - __Pyx_XDECREF(__pyx_r); - - /* "ssh2/session.pyx":692 - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) # <<<<<<<<<<<<<< - * return PyChannel(channel, self), statinfo - * -*/ - __pyx_t_7 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 691, __pyx_L1_error) - - /* "ssh2/session.pyx":691 - * self._session, _path, statinfo._stat) - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< - * self._session)) - * return PyChannel(channel, self), statinfo -*/ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - - /* "ssh2/session.pyx":690 - * channel = c_ssh2.libssh2_scp_recv( - * self._session, _path, statinfo._stat) - * if channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) -*/ - } - - /* "ssh2/session.pyx":693 - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) - * return PyChannel(channel, self), statinfo # <<<<<<<<<<<<<< - * - * def scp_recv2(self, path not None): -*/ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 693, __pyx_L1_error); - __Pyx_INCREF((PyObject *)__pyx_v_statinfo); - __Pyx_GIVEREF((PyObject *)__pyx_v_statinfo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_statinfo)) != (0)) __PYX_ERR(0, 693, __pyx_L1_error); - __pyx_t_1 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L0; - - /* "ssh2/session.pyx":673 - * return rc - * - * def scp_recv(self, path not None): # <<<<<<<<<<<<<< - * """Receive file via SCP. - * -*/ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_AddTraceback("ssh2.session.Session.scp_recv", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_b_path); - __Pyx_XDECREF((PyObject *)__pyx_v_statinfo); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "ssh2/session.pyx":695 - * return PyChannel(channel, self), statinfo - * - * def scp_recv2(self, path not None): # <<<<<<<<<<<<<< - * """Receive file via SCP. - * -*/ - -/* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_67scp_recv2(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_66scp_recv2, "Session.scp_recv2(self, path)\n\nReceive file via SCP.\n\n:param path: File path to receive.\n:type path: str\n\n:rtype: tuple(:py:class:`ssh2.channel.Channel`,\n :py:class:`ssh2.fileinfo.FileInfo`) or ``None``"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_67scp_recv2 = {"scp_recv2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_67scp_recv2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_66scp_recv2}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_67scp_recv2(PyObject *__pyx_v_self, -#if CYTHON_METH_FASTCALL -PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds -#else -PyObject *__pyx_args, PyObject *__pyx_kwds -#endif -) { - PyObject *__pyx_v_path = 0; - #if !CYTHON_METH_FASTCALL - CYTHON_UNUSED Py_ssize_t __pyx_nargs; - #endif - CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[1] = {0}; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("scp_recv2 (wrapper)", 0); - #if !CYTHON_METH_FASTCALL - #if CYTHON_ASSUME_SAFE_SIZE - __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); - #else - __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL; - #endif - #endif - __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); - { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0}; - const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 695, __pyx_L3_error) - if (__pyx_kwds_len > 0) { - switch (__pyx_nargs) { - case 1: - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 695, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_recv2", 0) < 0) __PYX_ERR(0, 695, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_recv2", 1, 1, 1, i); __PYX_ERR(0, 695, __pyx_L3_error) } - } - } else if (unlikely(__pyx_nargs != 1)) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 695, __pyx_L3_error) - } - __pyx_v_path = values[0]; - } - goto __pyx_L6_skip; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_recv2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 695, __pyx_L3_error) - __pyx_L6_skip:; - goto __pyx_L4_argument_unpacking_done; - __pyx_L3_error:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __Pyx_AddTraceback("ssh2.session.Session.scp_recv2", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 695, __pyx_L1_error) - } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_66scp_recv2(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path); - - /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __pyx_r = NULL; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - goto __pyx_L7_cleaned_up; - __pyx_L0:; - for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { - Py_XDECREF(values[__pyx_temp]); - } - __pyx_L7_cleaned_up:; - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_4ssh2_7session_7Session_66scp_recv2(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path) { - struct __pyx_obj_4ssh2_8fileinfo_FileInfo *__pyx_v_fileinfo = 0; - PyObject *__pyx_v_b_path = 0; - char *__pyx_v__path; - LIBSSH2_CHANNEL *__pyx_v_channel; - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - size_t __pyx_t_4; - char *__pyx_t_5; - int __pyx_t_6; - int __pyx_t_7; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("scp_recv2", 0); - - /* "ssh2/session.pyx":703 - * :rtype: tuple(:py:class:`ssh2.channel.Channel`, - * :py:class:`ssh2.fileinfo.FileInfo`) or ``None``""" - * cdef FileInfo fileinfo = FileInfo() # <<<<<<<<<<<<<< - * cdef bytes b_path = to_bytes(path) - * cdef char *_path = b_path -*/ - __pyx_t_2 = NULL; - __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8fileinfo_FileInfo); - __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8fileinfo_FileInfo); - __pyx_t_4 = 1; - { - PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; - __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF((PyObject *)__pyx_t_1); - } - __pyx_v_fileinfo = ((struct __pyx_obj_4ssh2_8fileinfo_FileInfo *)__pyx_t_1); - __pyx_t_1 = 0; - - /* "ssh2/session.pyx":704 - * :py:class:`ssh2.fileinfo.FileInfo`) or ``None``""" - * cdef FileInfo fileinfo = FileInfo() - * cdef bytes b_path = to_bytes(path) # <<<<<<<<<<<<<< - * cdef char *_path = b_path - * cdef c_ssh2.LIBSSH2_CHANNEL *channel -*/ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_b_path = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; - - /* "ssh2/session.pyx":705 - * cdef FileInfo fileinfo = FileInfo() - * cdef bytes b_path = to_bytes(path) - * cdef char *_path = b_path # <<<<<<<<<<<<<< - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: -*/ - if (unlikely(__pyx_v_b_path == Py_None)) { - PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 705, __pyx_L1_error) - } - __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 705, __pyx_L1_error) - __pyx_v__path = __pyx_t_5; - - /* "ssh2/session.pyx":707 - * cdef char *_path = b_path - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_recv2( - * self._session, _path, fileinfo._stat) -*/ - { - PyThreadState *_save; - _save = NULL; - Py_UNBLOCK_THREADS - __Pyx_FastGIL_Remember(); - /*try:*/ { - - /* "ssh2/session.pyx":708 - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: - * channel = c_ssh2.libssh2_scp_recv2( # <<<<<<<<<<<<<< - * self._session, _path, fileinfo._stat) - * if channel is NULL: -*/ - __pyx_v_channel = libssh2_scp_recv2(__pyx_v_self->_session, __pyx_v__path, __pyx_v_fileinfo->_stat); - } - - /* "ssh2/session.pyx":707 - * cdef char *_path = b_path - * cdef c_ssh2.LIBSSH2_CHANNEL *channel - * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_recv2( - * self._session, _path, fileinfo._stat) -*/ - /*finally:*/ { - /*normal exit:*/{ - __Pyx_FastGIL_Forget(); - Py_BLOCK_THREADS - goto __pyx_L5; - } - __pyx_L5:; - } - } - - /* "ssh2/session.pyx":710 - * channel = c_ssh2.libssh2_scp_recv2( - * self._session, _path, fileinfo._stat) - * if channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) -*/ - __pyx_t_6 = (__pyx_v_channel == NULL); - if (__pyx_t_6) { - - /* "ssh2/session.pyx":711 - * self._session, _path, fileinfo._stat) - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< - * self._session)) - * return PyChannel(channel, self), fileinfo -*/ - __Pyx_XDECREF(__pyx_r); - - /* "ssh2/session.pyx":712 - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) # <<<<<<<<<<<<<< - * return PyChannel(channel, self), fileinfo - * -*/ - __pyx_t_7 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 711, __pyx_L1_error) - - /* "ssh2/session.pyx":711 - * self._session, _path, fileinfo._stat) - * if channel is NULL: - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< - * self._session)) - * return PyChannel(channel, self), fileinfo -*/ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; + __pyx_v_rc = libssh2_session_set_last_error(__pyx_v_self->_session, __pyx_v_errcode, __pyx_v__errmsg); + } - /* "ssh2/session.pyx":710 - * channel = c_ssh2.libssh2_scp_recv2( - * self._session, _path, fileinfo._stat) - * if channel is NULL: # <<<<<<<<<<<<<< - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) + /* "ssh2/session.pyx":662 + * cdef char *_errmsg = b_errmsg + * cdef int rc + * with nogil: # <<<<<<<<<<<<<< + * rc = c_ssh2.libssh2_session_set_last_error( + * self._session, errcode, _errmsg) */ + /*finally:*/ { + /*normal exit:*/{ + __Pyx_FastGIL_Forget(); + Py_BLOCK_THREADS + goto __pyx_L5; + } + __pyx_L5:; + } } - /* "ssh2/session.pyx":713 - * return handle_error_codes(c_ssh2.libssh2_session_last_errno( - * self._session)) - * return PyChannel(channel, self), fileinfo # <<<<<<<<<<<<<< + /* "ssh2/session.pyx":665 + * rc = c_ssh2.libssh2_session_set_last_error( + * self._session, errcode, _errmsg) + * return rc # <<<<<<<<<<<<<< * - * def scp_send(self, path not None, int mode, size_t size): + * def scp_recv2(self, path not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_1); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 713, __pyx_L1_error); - __Pyx_INCREF((PyObject *)__pyx_v_fileinfo); - __Pyx_GIVEREF((PyObject *)__pyx_v_fileinfo); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_fileinfo)) != (0)) __PYX_ERR(0, 713, __pyx_L1_error); + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":695 - * return PyChannel(channel, self), statinfo - * - * def scp_recv2(self, path not None): # <<<<<<<<<<<<<< - * """Receive file via SCP. + /* "ssh2/session.pyx":658 + * return rc * + * def set_last_error(self, int errcode, errmsg not None): # <<<<<<<<<<<<<< + * cdef bytes b_errmsg = to_bytes(errmsg) + * cdef char *_errmsg = b_errmsg */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("ssh2.session.Session.scp_recv2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("ssh2.session.Session.set_last_error", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF((PyObject *)__pyx_v_fileinfo); - __Pyx_XDECREF(__pyx_v_b_path); + __Pyx_XDECREF(__pyx_v_b_errmsg); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "ssh2/session.pyx":715 - * return PyChannel(channel, self), fileinfo +/* "ssh2/session.pyx":667 + * return rc * - * def scp_send(self, path not None, int mode, size_t size): # <<<<<<<<<<<<<< - * """Deprecated in favour of scp_send64. Send file via SCP. + * def scp_recv2(self, path not None): # <<<<<<<<<<<<<< + * """Receive file via SCP. * */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_69scp_send(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_63scp_recv2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_68scp_send, "Session.scp_send(self, path, int mode, size_t size)\n\nDeprecated in favour of scp_send64. Send file via SCP.\n\n:param path: Local file path to send.\n:type path: str\n:param mode: File mode.\n:type mode: int\n:param size: size of file\n:type size: int\n\n:rtype: :py:class:`ssh2.channel.Channel`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_69scp_send = {"scp_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_69scp_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_68scp_send}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_69scp_send(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_62scp_recv2, "Session.scp_recv2(self, path)\n\nReceive file via SCP.\n\n:param path: File path to receive.\n:type path: str\n\n:rtype: tuple(:py:class:`ssh2.channel.Channel`,\n :py:class:`ssh2.fileinfo.FileInfo`) or ``None``"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_63scp_recv2 = {"scp_recv2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_63scp_recv2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_62scp_recv2}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_63scp_recv2(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -13031,19 +12234,17 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif ) { PyObject *__pyx_v_path = 0; - int __pyx_v_mode; - size_t __pyx_v_size; #if !CYTHON_METH_FASTCALL CYTHON_UNUSED Py_ssize_t __pyx_nargs; #endif CYTHON_UNUSED PyObject *const *__pyx_kwvalues; - PyObject* values[3] = {0,0,0}; + PyObject* values[1] = {0}; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("scp_send (wrapper)", 0); + __Pyx_RefNannySetupContext("scp_recv2 (wrapper)", 0); #if !CYTHON_METH_FASTCALL #if CYTHON_ASSUME_SAFE_SIZE __pyx_nargs = PyTuple_GET_SIZE(__pyx_args); @@ -13053,62 +12254,48 @@ PyObject *__pyx_args, PyObject *__pyx_kwds #endif __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs); { - PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_size,0}; + PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 715, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 667, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { - case 3: - values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 715, __pyx_L3_error) - CYTHON_FALLTHROUGH; - case 2: - values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 715, __pyx_L3_error) - CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 715, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_send", 0) < 0) __PYX_ERR(0, 715, __pyx_L3_error) - for (Py_ssize_t i = __pyx_nargs; i < 3; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_send", 1, 3, 3, i); __PYX_ERR(0, 715, __pyx_L3_error) } + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_recv2", 0) < 0) __PYX_ERR(0, 667, __pyx_L3_error) + for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_recv2", 1, 1, 1, i); __PYX_ERR(0, 667, __pyx_L3_error) } } - } else if (unlikely(__pyx_nargs != 3)) { + } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 715, __pyx_L3_error) - values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 715, __pyx_L3_error) - values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 715, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 667, __pyx_L3_error) } __pyx_v_path = values[0]; - __pyx_v_mode = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error) - __pyx_v_size = __Pyx_PyLong_As_size_t(values[2]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 715, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_send", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_recv2", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 667, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { Py_XDECREF(values[__pyx_temp]); } - __Pyx_AddTraceback("ssh2.session.Session.scp_send", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("ssh2.session.Session.scp_recv2", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 715, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 667, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_68scp_send(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path, __pyx_v_mode, __pyx_v_size); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_62scp_recv2(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path); /* function exit code */ goto __pyx_L0; @@ -13127,35 +12314,61 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, size_t __pyx_v_size) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_62scp_recv2(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path) { + struct __pyx_obj_4ssh2_8fileinfo_FileInfo *__pyx_v_fileinfo = 0; PyObject *__pyx_v_b_path = 0; char *__pyx_v__path; LIBSSH2_CHANNEL *__pyx_v_channel; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; - char *__pyx_t_2; - int __pyx_t_3; - int __pyx_t_4; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + size_t __pyx_t_4; + char *__pyx_t_5; + int __pyx_t_6; + int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("scp_send", 0); + __Pyx_RefNannySetupContext("scp_recv2", 0); - /* "ssh2/session.pyx":726 - * - * :rtype: :py:class:`ssh2.channel.Channel`""" + /* "ssh2/session.pyx":675 + * :rtype: tuple(:py:class:`ssh2.channel.Channel`, + * :py:class:`ssh2.fileinfo.FileInfo`) or ``None``""" + * cdef FileInfo fileinfo = FileInfo() # <<<<<<<<<<<<<< + * cdef bytes b_path = to_bytes(path) + * cdef char *_path = b_path +*/ + __pyx_t_2 = NULL; + __Pyx_INCREF((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8fileinfo_FileInfo); + __pyx_t_3 = ((PyObject *)__pyx_mstate_global->__pyx_ptype_4ssh2_8fileinfo_FileInfo); + __pyx_t_4 = 1; + { + PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL}; + __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_4, (1-__pyx_t_4) | (__pyx_t_4*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error) + __Pyx_GOTREF((PyObject *)__pyx_t_1); + } + __pyx_v_fileinfo = ((struct __pyx_obj_4ssh2_8fileinfo_FileInfo *)__pyx_t_1); + __pyx_t_1 = 0; + + /* "ssh2/session.pyx":676 + * :py:class:`ssh2.fileinfo.FileInfo`) or ``None``""" + * cdef FileInfo fileinfo = FileInfo() * cdef bytes b_path = to_bytes(path) # <<<<<<<<<<<<<< * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_path = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":727 - * :rtype: :py:class:`ssh2.channel.Channel`""" + /* "ssh2/session.pyx":677 + * cdef FileInfo fileinfo = FileInfo() * cdef bytes b_path = to_bytes(path) * cdef char *_path = b_path # <<<<<<<<<<<<<< * cdef c_ssh2.LIBSSH2_CHANNEL *channel @@ -13163,17 +12376,17 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4s */ if (unlikely(__pyx_v_b_path == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 727, __pyx_L1_error) + __PYX_ERR(0, 677, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 727, __pyx_L1_error) - __pyx_v__path = __pyx_t_2; + __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_v__path = __pyx_t_5; - /* "ssh2/session.pyx":729 + /* "ssh2/session.pyx":679 * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_send( - * self._session, _path, mode, size) + * channel = c_ssh2.libssh2_scp_recv2( + * self._session, _path, fileinfo._stat) */ { PyThreadState *_save; @@ -13182,22 +12395,22 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4s __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":730 + /* "ssh2/session.pyx":680 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: - * channel = c_ssh2.libssh2_scp_send( # <<<<<<<<<<<<<< - * self._session, _path, mode, size) + * channel = c_ssh2.libssh2_scp_recv2( # <<<<<<<<<<<<<< + * self._session, _path, fileinfo._stat) * if channel is NULL: */ - __pyx_v_channel = libssh2_scp_send(__pyx_v_self->_session, __pyx_v__path, __pyx_v_mode, __pyx_v_size); + __pyx_v_channel = libssh2_scp_recv2(__pyx_v_self->_session, __pyx_v__path, __pyx_v_fileinfo->_stat); } - /* "ssh2/session.pyx":729 + /* "ssh2/session.pyx":679 * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< - * channel = c_ssh2.libssh2_scp_send( - * self._session, _path, mode, size) + * channel = c_ssh2.libssh2_scp_recv2( + * self._session, _path, fileinfo._stat) */ /*finally:*/ { /*normal exit:*/{ @@ -13209,92 +12422,103 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4s } } - /* "ssh2/session.pyx":732 - * channel = c_ssh2.libssh2_scp_send( - * self._session, _path, mode, size) + /* "ssh2/session.pyx":682 + * channel = c_ssh2.libssh2_scp_recv2( + * self._session, _path, fileinfo._stat) * if channel is NULL: # <<<<<<<<<<<<<< * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) */ - __pyx_t_3 = (__pyx_v_channel == NULL); - if (__pyx_t_3) { + __pyx_t_6 = (__pyx_v_channel == NULL); + if (__pyx_t_6) { - /* "ssh2/session.pyx":733 - * self._session, _path, mode, size) + /* "ssh2/session.pyx":683 + * self._session, _path, fileinfo._stat) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) - * return PyChannel(channel, self) + * return PyChannel(channel, self), fileinfo */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":734 + /* "ssh2/session.pyx":684 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< - * return PyChannel(channel, self) + * return PyChannel(channel, self), fileinfo * */ - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 683, __pyx_L1_error) - /* "ssh2/session.pyx":733 - * self._session, _path, mode, size) + /* "ssh2/session.pyx":683 + * self._session, _path, fileinfo._stat) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) - * return PyChannel(channel, self) + * return PyChannel(channel, self), fileinfo */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":732 - * channel = c_ssh2.libssh2_scp_send( - * self._session, _path, mode, size) + /* "ssh2/session.pyx":682 + * channel = c_ssh2.libssh2_scp_recv2( + * self._session, _path, fileinfo._stat) * if channel is NULL: # <<<<<<<<<<<<<< * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) */ } - /* "ssh2/session.pyx":735 + /* "ssh2/session.pyx":685 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) - * return PyChannel(channel, self) # <<<<<<<<<<<<<< + * return PyChannel(channel, self), fileinfo # <<<<<<<<<<<<<< * * def scp_send64(self, path not None, int mode, c_ssh2.libssh2_uint64_t size, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 685, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1) != (0)) __PYX_ERR(0, 685, __pyx_L1_error); + __Pyx_INCREF((PyObject *)__pyx_v_fileinfo); + __Pyx_GIVEREF((PyObject *)__pyx_v_fileinfo); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_fileinfo)) != (0)) __PYX_ERR(0, 685, __pyx_L1_error); __pyx_t_1 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":715 - * return PyChannel(channel, self), fileinfo + /* "ssh2/session.pyx":667 + * return rc * - * def scp_send(self, path not None, int mode, size_t size): # <<<<<<<<<<<<<< - * """Deprecated in favour of scp_send64. Send file via SCP. + * def scp_recv2(self, path not None): # <<<<<<<<<<<<<< + * """Receive file via SCP. * */ /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("ssh2.session.Session.scp_send", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("ssh2.session.Session.scp_recv2", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; + __Pyx_XDECREF((PyObject *)__pyx_v_fileinfo); __Pyx_XDECREF(__pyx_v_b_path); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "ssh2/session.pyx":737 - * return PyChannel(channel, self) +/* "ssh2/session.pyx":687 + * return PyChannel(channel, self), fileinfo * * def scp_send64(self, path not None, int mode, c_ssh2.libssh2_uint64_t size, # <<<<<<<<<<<<<< * time_t mtime, time_t atime): @@ -13302,16 +12526,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_68scp_send(struct __pyx_obj_4s */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_71scp_send64(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_65scp_send64(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_70scp_send64, "Session.scp_send64(self, path, int mode, libssh2_uint64_t size, time_t mtime, time_t atime)\n\nSend file via SCP.\n\n:param path: Local file path to send.\n:type path: str\n:param mode: File mode.\n:type mode: int\n:param size: size of file\n:type size: int\n\n:rtype: :py:class:`ssh2.channel.Channel`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_71scp_send64 = {"scp_send64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_71scp_send64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_70scp_send64}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_71scp_send64(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_64scp_send64, "Session.scp_send64(self, path, int mode, libssh2_uint64_t size, time_t mtime, time_t atime)\n\nSend file via SCP.\n\n:param path: Local file path to send.\n:type path: str\n:param mode: File mode.\n:type mode: int\n:param size: size of file\n:type size: int\n\n:rtype: :py:class:`ssh2.channel.Channel`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_65scp_send64 = {"scp_send64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_65scp_send64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_64scp_send64}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_65scp_send64(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -13345,60 +12569,60 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_path,&__pyx_mstate_global->__pyx_n_u_mode,&__pyx_mstate_global->__pyx_n_u_size,&__pyx_mstate_global->__pyx_n_u_mtime,&__pyx_mstate_global->__pyx_n_u_atime,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 737, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 687, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 5: values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 687, __pyx_L3_error) CYTHON_FALLTHROUGH; case 4: values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 687, __pyx_L3_error) CYTHON_FALLTHROUGH; case 3: values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 687, __pyx_L3_error) CYTHON_FALLTHROUGH; case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 687, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 687, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_send64", 0) < 0) __PYX_ERR(0, 737, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "scp_send64", 0) < 0) __PYX_ERR(0, 687, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 5; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_send64", 1, 5, 5, i); __PYX_ERR(0, 737, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("scp_send64", 1, 5, 5, i); __PYX_ERR(0, 687, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 5)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 687, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 687, __pyx_L3_error) values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 687, __pyx_L3_error) values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 687, __pyx_L3_error) values[4] = __Pyx_ArgRef_FASTCALL(__pyx_args, 4); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 737, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[4])) __PYX_ERR(0, 687, __pyx_L3_error) } __pyx_v_path = values[0]; - __pyx_v_mode = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L3_error) - __pyx_v_size = __Pyx_PyLong_As_libssh2_uint64_t(values[2]); if (unlikely((__pyx_v_size == ((libssh2_uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 737, __pyx_L3_error) - __pyx_v_mtime = __Pyx_PyLong_As_time_t(values[3]); if (unlikely((__pyx_v_mtime == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L3_error) - __pyx_v_atime = __Pyx_PyLong_As_time_t(values[4]); if (unlikely((__pyx_v_atime == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 738, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyLong_As_int(values[1]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L3_error) + __pyx_v_size = __Pyx_PyLong_As_libssh2_uint64_t(values[2]); if (unlikely((__pyx_v_size == ((libssh2_uint64_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 687, __pyx_L3_error) + __pyx_v_mtime = __Pyx_PyLong_As_time_t(values[3]); if (unlikely((__pyx_v_mtime == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L3_error) + __pyx_v_atime = __Pyx_PyLong_As_time_t(values[4]); if (unlikely((__pyx_v_atime == ((time_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_send64", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 737, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_send64", 1, 5, 5, __pyx_nargs); __PYX_ERR(0, 687, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13410,9 +12634,9 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_path) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 737, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "path"); __PYX_ERR(0, 687, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_70scp_send64(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path, __pyx_v_mode, __pyx_v_size, __pyx_v_mtime, __pyx_v_atime); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_64scp_send64(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_path, __pyx_v_mode, __pyx_v_size, __pyx_v_mtime, __pyx_v_atime); /* function exit code */ goto __pyx_L0; @@ -13431,7 +12655,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, libssh2_uint64_t __pyx_v_size, time_t __pyx_v_mtime, time_t __pyx_v_atime) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_64scp_send64(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, PyObject *__pyx_v_path, int __pyx_v_mode, libssh2_uint64_t __pyx_v_size, time_t __pyx_v_mtime, time_t __pyx_v_atime) { PyObject *__pyx_v_b_path = 0; char *__pyx_v__path; LIBSSH2_CHANNEL *__pyx_v_channel; @@ -13446,19 +12670,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_send64", 0); - /* "ssh2/session.pyx":749 + /* "ssh2/session.pyx":699 * * :rtype: :py:class:`ssh2.channel.Channel`""" * cdef bytes b_path = to_bytes(path) # <<<<<<<<<<<<<< * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_path = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":750 + /* "ssh2/session.pyx":700 * :rtype: :py:class:`ssh2.channel.Channel`""" * cdef bytes b_path = to_bytes(path) * cdef char *_path = b_path # <<<<<<<<<<<<<< @@ -13467,12 +12691,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_path == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 750, __pyx_L1_error) + __PYX_ERR(0, 700, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error) __pyx_v__path = __pyx_t_2; - /* "ssh2/session.pyx":752 + /* "ssh2/session.pyx":702 * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -13486,7 +12710,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":753 + /* "ssh2/session.pyx":703 * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: * channel = c_ssh2.libssh2_scp_send64( # <<<<<<<<<<<<<< @@ -13496,7 +12720,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ __pyx_v_channel = libssh2_scp_send64(__pyx_v_self->_session, __pyx_v__path, __pyx_v_mode, __pyx_v_size, __pyx_v_mtime, __pyx_v_atime); } - /* "ssh2/session.pyx":752 + /* "ssh2/session.pyx":702 * cdef char *_path = b_path * cdef c_ssh2.LIBSSH2_CHANNEL *channel * with nogil: # <<<<<<<<<<<<<< @@ -13513,7 +12737,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ } } - /* "ssh2/session.pyx":755 + /* "ssh2/session.pyx":705 * channel = c_ssh2.libssh2_scp_send64( * self._session, _path, mode, size, mtime, atime) * if channel is NULL: # <<<<<<<<<<<<<< @@ -13523,7 +12747,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ __pyx_t_3 = (__pyx_v_channel == NULL); if (__pyx_t_3) { - /* "ssh2/session.pyx":756 + /* "ssh2/session.pyx":706 * self._session, _path, mode, size, mtime, atime) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< @@ -13532,29 +12756,29 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ */ __Pyx_XDECREF(__pyx_r); - /* "ssh2/session.pyx":757 + /* "ssh2/session.pyx":707 * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) # <<<<<<<<<<<<<< * return PyChannel(channel, self) * */ - __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4ssh2_5utils_handle_error_codes(libssh2_session_last_errno(__pyx_v_self->_session), 0); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 706, __pyx_L1_error) - /* "ssh2/session.pyx":756 + /* "ssh2/session.pyx":706 * self._session, _path, mode, size, mtime, atime) * if channel is NULL: * return handle_error_codes(c_ssh2.libssh2_session_last_errno( # <<<<<<<<<<<<<< * self._session)) * return PyChannel(channel, self) */ - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":755 + /* "ssh2/session.pyx":705 * channel = c_ssh2.libssh2_scp_send64( * self._session, _path, mode, size, mtime, atime) * if channel is NULL: # <<<<<<<<<<<<<< @@ -13563,7 +12787,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ */ } - /* "ssh2/session.pyx":758 + /* "ssh2/session.pyx":708 * return handle_error_codes(c_ssh2.libssh2_session_last_errno( * self._session)) * return PyChannel(channel, self) # <<<<<<<<<<<<<< @@ -13571,14 +12795,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ * def publickey_init(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_7channel_PyChannel(__pyx_v_channel, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":737 - * return PyChannel(channel, self) + /* "ssh2/session.pyx":687 + * return PyChannel(channel, self), fileinfo * * def scp_send64(self, path not None, int mode, c_ssh2.libssh2_uint64_t size, # <<<<<<<<<<<<<< * time_t mtime, time_t atime): @@ -13597,7 +12821,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ return __pyx_r; } -/* "ssh2/session.pyx":760 +/* "ssh2/session.pyx":710 * return PyChannel(channel, self) * * def publickey_init(self): # <<<<<<<<<<<<<< @@ -13606,16 +12830,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_70scp_send64(struct __pyx_obj_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_73publickey_init(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_67publickey_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_72publickey_init, "Session.publickey_init(self)\n\nInitialise public key subsystem for managing remote server\npublic keys"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_73publickey_init = {"publickey_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_73publickey_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_72publickey_init}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_73publickey_init(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_66publickey_init, "Session.publickey_init(self)\n\nInitialise public key subsystem for managing remote server\npublic keys"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_67publickey_init = {"publickey_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_67publickey_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_66publickey_init}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_67publickey_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -13641,14 +12865,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("publickey_init", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_72publickey_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_66publickey_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_66publickey_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { LIBSSH2_PUBLICKEY *__pyx_v__pkey; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -13659,7 +12883,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("publickey_init", 0); - /* "ssh2/session.pyx":764 + /* "ssh2/session.pyx":714 * public keys""" * cdef c_pkey.LIBSSH2_PUBLICKEY *_pkey * with nogil: # <<<<<<<<<<<<<< @@ -13673,7 +12897,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":765 + /* "ssh2/session.pyx":715 * cdef c_pkey.LIBSSH2_PUBLICKEY *_pkey * with nogil: * _pkey = c_pkey.libssh2_publickey_init(self._session) # <<<<<<<<<<<<<< @@ -13683,7 +12907,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ __pyx_v__pkey = libssh2_publickey_init(__pyx_v_self->_session); } - /* "ssh2/session.pyx":764 + /* "ssh2/session.pyx":714 * public keys""" * cdef c_pkey.LIBSSH2_PUBLICKEY *_pkey * with nogil: # <<<<<<<<<<<<<< @@ -13700,7 +12924,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ } } - /* "ssh2/session.pyx":766 + /* "ssh2/session.pyx":716 * with nogil: * _pkey = c_pkey.libssh2_publickey_init(self._session) * if _pkey is NULL: # <<<<<<<<<<<<<< @@ -13710,20 +12934,20 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ __pyx_t_1 = (__pyx_v__pkey == NULL); if (unlikely(__pyx_t_1)) { - /* "ssh2/session.pyx":767 + /* "ssh2/session.pyx":717 * _pkey = c_pkey.libssh2_publickey_init(self._session) * if _pkey is NULL: * raise PublicKeyInitError # <<<<<<<<<<<<<< * return PyPublicKeySystem(_pkey, self) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PublicKeyInitError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_PublicKeyInitError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 767, __pyx_L1_error) + __PYX_ERR(0, 717, __pyx_L1_error) - /* "ssh2/session.pyx":766 + /* "ssh2/session.pyx":716 * with nogil: * _pkey = c_pkey.libssh2_publickey_init(self._session) * if _pkey is NULL: # <<<<<<<<<<<<<< @@ -13732,7 +12956,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ */ } - /* "ssh2/session.pyx":768 + /* "ssh2/session.pyx":718 * if _pkey is NULL: * raise PublicKeyInitError * return PyPublicKeySystem(_pkey, self) # <<<<<<<<<<<<<< @@ -13740,13 +12964,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ * def hostkey_hash(self, int hash_type): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4ssh2_9publickey_PyPublicKeySystem(__pyx_v__pkey, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_9publickey_PyPublicKeySystem(__pyx_v__pkey, __pyx_v_self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":760 + /* "ssh2/session.pyx":710 * return PyChannel(channel, self) * * def publickey_init(self): # <<<<<<<<<<<<<< @@ -13765,7 +12989,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ return __pyx_r; } -/* "ssh2/session.pyx":770 +/* "ssh2/session.pyx":720 * return PyPublicKeySystem(_pkey, self) * * def hostkey_hash(self, int hash_type): # <<<<<<<<<<<<<< @@ -13774,16 +12998,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_72publickey_init(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_75hostkey_hash(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_69hostkey_hash(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_74hostkey_hash, "Session.hostkey_hash(self, int hash_type)\n\nGet computed digest of the remote system's host key.\n\n:param hash_type: One of ``ssh2.session.LIBSSH2_HOSTKEY_HASH_MD5`` or\n ``ssh2.session.LIBSSH2_HOSTKEY_HASH_SHA1``\n:type hash_type: int\n\n:rtype: bytes"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_75hostkey_hash = {"hostkey_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_75hostkey_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_74hostkey_hash}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_75hostkey_hash(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_68hostkey_hash, "Session.hostkey_hash(self, int hash_type)\n\nGet computed digest of the remote system's host key.\n\n:param hash_type: One of ``ssh2.session.LIBSSH2_HOSTKEY_HASH_MD5`` or\n ``ssh2.session.LIBSSH2_HOSTKEY_HASH_SHA1``\n:type hash_type: int\n\n:rtype: bytes"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_69hostkey_hash = {"hostkey_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_69hostkey_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_68hostkey_hash}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_69hostkey_hash(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -13813,32 +13037,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_hash_type,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 770, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 720, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 770, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 720, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "hostkey_hash", 0) < 0) __PYX_ERR(0, 770, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "hostkey_hash", 0) < 0) __PYX_ERR(0, 720, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("hostkey_hash", 1, 1, 1, i); __PYX_ERR(0, 770, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("hostkey_hash", 1, 1, 1, i); __PYX_ERR(0, 720, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 770, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 720, __pyx_L3_error) } - __pyx_v_hash_type = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_hash_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L3_error) + __pyx_v_hash_type = __Pyx_PyLong_As_int(values[0]); if (unlikely((__pyx_v_hash_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 720, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("hostkey_hash", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 770, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("hostkey_hash", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 720, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -13849,7 +13073,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_74hostkey_hash(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_hash_type); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_68hostkey_hash(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_hash_type); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -13859,7 +13083,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_hash_type) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_68hostkey_hash(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_hash_type) { char const *__pyx_v__hash; PyObject *__pyx_v_b_hash = 0; PyObject *__pyx_r = NULL; @@ -13871,7 +13095,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("hostkey_hash", 0); - /* "ssh2/session.pyx":780 + /* "ssh2/session.pyx":730 * cdef const char *_hash * cdef bytes b_hash * with nogil: # <<<<<<<<<<<<<< @@ -13885,7 +13109,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":781 + /* "ssh2/session.pyx":731 * cdef bytes b_hash * with nogil: * _hash = c_ssh2.libssh2_hostkey_hash(self._session, hash_type) # <<<<<<<<<<<<<< @@ -13895,7 +13119,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob __pyx_v__hash = libssh2_hostkey_hash(__pyx_v_self->_session, __pyx_v_hash_type); } - /* "ssh2/session.pyx":780 + /* "ssh2/session.pyx":730 * cdef const char *_hash * cdef bytes b_hash * with nogil: # <<<<<<<<<<<<<< @@ -13912,7 +13136,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob } } - /* "ssh2/session.pyx":782 + /* "ssh2/session.pyx":732 * with nogil: * _hash = c_ssh2.libssh2_hostkey_hash(self._session, hash_type) * if _hash is NULL: # <<<<<<<<<<<<<< @@ -13922,7 +13146,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob __pyx_t_1 = (__pyx_v__hash == NULL); if (__pyx_t_1) { - /* "ssh2/session.pyx":783 + /* "ssh2/session.pyx":733 * _hash = c_ssh2.libssh2_hostkey_hash(self._session, hash_type) * if _hash is NULL: * return # <<<<<<<<<<<<<< @@ -13933,7 +13157,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh2/session.pyx":782 + /* "ssh2/session.pyx":732 * with nogil: * _hash = c_ssh2.libssh2_hostkey_hash(self._session, hash_type) * if _hash is NULL: # <<<<<<<<<<<<<< @@ -13942,19 +13166,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob */ } - /* "ssh2/session.pyx":784 + /* "ssh2/session.pyx":734 * if _hash is NULL: * return * b_hash = _hash # <<<<<<<<<<<<<< * return b_hash * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hash); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hash); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_hash = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh2/session.pyx":785 + /* "ssh2/session.pyx":735 * return * b_hash = _hash * return b_hash # <<<<<<<<<<<<<< @@ -13966,7 +13190,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob __pyx_r = __pyx_v_b_hash; goto __pyx_L0; - /* "ssh2/session.pyx":770 + /* "ssh2/session.pyx":720 * return PyPublicKeySystem(_pkey, self) * * def hostkey_hash(self, int hash_type): # <<<<<<<<<<<<<< @@ -13986,7 +13210,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob return __pyx_r; } -/* "ssh2/session.pyx":787 +/* "ssh2/session.pyx":737 * return b_hash * * def hostkey(self): # <<<<<<<<<<<<<< @@ -13995,16 +13219,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_74hostkey_hash(struct __pyx_ob */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_77hostkey(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_71hostkey(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_76hostkey, "Session.hostkey(self)\n\nGet server host key for this session.\n\nReturns key, key_type tuple where key_type is one of\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_RSA`,\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_DSS`, or\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_UNKNOWN`\n\n:rtype: tuple(bytes, int)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_77hostkey = {"hostkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_77hostkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_76hostkey}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_77hostkey(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_70hostkey, "Session.hostkey(self)\n\nGet server host key for this session.\n\nReturns key, key_type tuple where key_type is one of\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_RSA`,\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_DSS`, or\n:py:class:`ssh2.session.LIBSSH2_HOSTKEY_TYPE_UNKNOWN`\n\n:rtype: tuple(bytes, int)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_71hostkey = {"hostkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_71hostkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_70hostkey}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_71hostkey(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -14030,14 +13254,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("hostkey", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_76hostkey(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_70hostkey(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_70hostkey(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { PyObject *__pyx_v_key = 0; char const *__pyx_v__key; size_t __pyx_v_key_len; @@ -14054,7 +13278,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("hostkey", 0); - /* "ssh2/session.pyx":796 + /* "ssh2/session.pyx":746 * * :rtype: tuple(bytes, int)""" * cdef bytes key = b"" # <<<<<<<<<<<<<< @@ -14064,7 +13288,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_b__2); __pyx_v_key = __pyx_mstate_global->__pyx_kp_b__2; - /* "ssh2/session.pyx":798 + /* "ssh2/session.pyx":748 * cdef bytes key = b"" * cdef const char *_key * cdef size_t key_len = 0 # <<<<<<<<<<<<<< @@ -14073,7 +13297,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss */ __pyx_v_key_len = 0; - /* "ssh2/session.pyx":799 + /* "ssh2/session.pyx":749 * cdef const char *_key * cdef size_t key_len = 0 * cdef int key_type = 0 # <<<<<<<<<<<<<< @@ -14082,7 +13306,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss */ __pyx_v_key_type = 0; - /* "ssh2/session.pyx":800 + /* "ssh2/session.pyx":750 * cdef size_t key_len = 0 * cdef int key_type = 0 * with nogil: # <<<<<<<<<<<<<< @@ -14096,7 +13320,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":801 + /* "ssh2/session.pyx":751 * cdef int key_type = 0 * with nogil: * _key = c_ssh2.libssh2_session_hostkey( # <<<<<<<<<<<<<< @@ -14106,7 +13330,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss __pyx_v__key = libssh2_session_hostkey(__pyx_v_self->_session, (&__pyx_v_key_len), (&__pyx_v_key_type)); } - /* "ssh2/session.pyx":800 + /* "ssh2/session.pyx":750 * cdef size_t key_len = 0 * cdef int key_type = 0 * with nogil: # <<<<<<<<<<<<<< @@ -14123,7 +13347,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss } } - /* "ssh2/session.pyx":803 + /* "ssh2/session.pyx":753 * _key = c_ssh2.libssh2_session_hostkey( * self._session, &key_len, &key_type) * if _key is NULL: # <<<<<<<<<<<<<< @@ -14133,7 +13357,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss __pyx_t_1 = (__pyx_v__key == NULL); if (unlikely(__pyx_t_1)) { - /* "ssh2/session.pyx":804 + /* "ssh2/session.pyx":754 * self._session, &key_len, &key_type) * if _key is NULL: * raise SessionHostKeyError( # <<<<<<<<<<<<<< @@ -14141,7 +13365,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss * key = _key[:key_len] */ __pyx_t_3 = NULL; - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SessionHostKeyError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 804, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_mstate_global->__pyx_n_u_SessionHostKeyError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 1; #if CYTHON_UNPACK_METHODS @@ -14160,14 +13384,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+__pyx_t_5, (2-__pyx_t_5) | (__pyx_t_5*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); } __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 804, __pyx_L1_error) + __PYX_ERR(0, 754, __pyx_L1_error) - /* "ssh2/session.pyx":803 + /* "ssh2/session.pyx":753 * _key = c_ssh2.libssh2_session_hostkey( * self._session, &key_len, &key_type) * if _key is NULL: # <<<<<<<<<<<<<< @@ -14176,19 +13400,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss */ } - /* "ssh2/session.pyx":806 + /* "ssh2/session.pyx":756 * raise SessionHostKeyError( * "Error retrieving server host key for session") * key = _key[:key_len] # <<<<<<<<<<<<<< * return key, key_type * */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v__key + 0, __pyx_v_key_len - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v__key + 0, __pyx_v_key_len - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_key, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh2/session.pyx":807 + /* "ssh2/session.pyx":757 * "Error retrieving server host key for session") * key = _key[:key_len] * return key, key_type # <<<<<<<<<<<<<< @@ -14196,21 +13420,21 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss * def knownhost_init(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_key_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_key_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key) != (0)) __PYX_ERR(0, 807, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_key) != (0)) __PYX_ERR(0, 757, __pyx_L1_error); __Pyx_GIVEREF(__pyx_t_2); - if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 807, __pyx_L1_error); + if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2) != (0)) __PYX_ERR(0, 757, __pyx_L1_error); __pyx_t_2 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":787 + /* "ssh2/session.pyx":737 * return b_hash * * def hostkey(self): # <<<<<<<<<<<<<< @@ -14232,7 +13456,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss return __pyx_r; } -/* "ssh2/session.pyx":809 +/* "ssh2/session.pyx":759 * return key, key_type * * def knownhost_init(self): # <<<<<<<<<<<<<< @@ -14241,16 +13465,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_76hostkey(struct __pyx_obj_4ss */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_79knownhost_init(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_73knownhost_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_78knownhost_init, "Session.knownhost_init(self)\n\nInitialise a collection of known hosts for this session.\n\n:rtype: :py:class:`ssh2.knownhost.KnownHost`"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_79knownhost_init = {"knownhost_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_79knownhost_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_78knownhost_init}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_79knownhost_init(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_72knownhost_init, "Session.knownhost_init(self)\n\nInitialise a collection of known hosts for this session.\n\n:rtype: :py:class:`ssh2.knownhost.KnownHost`"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_73knownhost_init = {"knownhost_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_73knownhost_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_72knownhost_init}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_73knownhost_init(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -14276,14 +13500,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("knownhost_init", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_78knownhost_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_72knownhost_init(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_72knownhost_init(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { LIBSSH2_KNOWNHOSTS *__pyx_v_known_hosts; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -14294,7 +13518,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("knownhost_init", 0); - /* "ssh2/session.pyx":814 + /* "ssh2/session.pyx":764 * :rtype: :py:class:`ssh2.knownhost.KnownHost`""" * cdef c_ssh2.LIBSSH2_KNOWNHOSTS *known_hosts * with nogil: # <<<<<<<<<<<<<< @@ -14308,7 +13532,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":815 + /* "ssh2/session.pyx":765 * cdef c_ssh2.LIBSSH2_KNOWNHOSTS *known_hosts * with nogil: * known_hosts = c_ssh2.libssh2_knownhost_init( # <<<<<<<<<<<<<< @@ -14318,7 +13542,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ __pyx_v_known_hosts = libssh2_knownhost_init(__pyx_v_self->_session); } - /* "ssh2/session.pyx":814 + /* "ssh2/session.pyx":764 * :rtype: :py:class:`ssh2.knownhost.KnownHost`""" * cdef c_ssh2.LIBSSH2_KNOWNHOSTS *known_hosts * with nogil: # <<<<<<<<<<<<<< @@ -14335,7 +13559,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ } } - /* "ssh2/session.pyx":817 + /* "ssh2/session.pyx":767 * known_hosts = c_ssh2.libssh2_knownhost_init( * self._session) * if known_hosts is NULL: # <<<<<<<<<<<<<< @@ -14345,20 +13569,20 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ __pyx_t_1 = (__pyx_v_known_hosts == NULL); if (unlikely(__pyx_t_1)) { - /* "ssh2/session.pyx":818 + /* "ssh2/session.pyx":768 * self._session) * if known_hosts is NULL: * raise KnownHostError # <<<<<<<<<<<<<< * return PyKnownHost(self, known_hosts) * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KnownHostError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_KnownHostError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 818, __pyx_L1_error) + __PYX_ERR(0, 768, __pyx_L1_error) - /* "ssh2/session.pyx":817 + /* "ssh2/session.pyx":767 * known_hosts = c_ssh2.libssh2_knownhost_init( * self._session) * if known_hosts is NULL: # <<<<<<<<<<<<<< @@ -14367,7 +13591,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ */ } - /* "ssh2/session.pyx":819 + /* "ssh2/session.pyx":769 * if known_hosts is NULL: * raise KnownHostError * return PyKnownHost(self, known_hosts) # <<<<<<<<<<<<<< @@ -14375,13 +13599,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ * def keepalive_config(self, bint want_reply, unsigned interval): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_4ssh2_9knownhost_PyKnownHost(__pyx_v_self, __pyx_v_known_hosts)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4ssh2_9knownhost_PyKnownHost(__pyx_v_self, __pyx_v_known_hosts)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":809 + /* "ssh2/session.pyx":759 * return key, key_type * * def knownhost_init(self): # <<<<<<<<<<<<<< @@ -14400,7 +13624,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ return __pyx_r; } -/* "ssh2/session.pyx":821 +/* "ssh2/session.pyx":771 * return PyKnownHost(self, known_hosts) * * def keepalive_config(self, bint want_reply, unsigned interval): # <<<<<<<<<<<<<< @@ -14409,16 +13633,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_78knownhost_init(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_81keepalive_config(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_75keepalive_config(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_80keepalive_config, "Session.keepalive_config(self, bool want_reply, unsigned int interval)\n\nConfigure keep alive settings.\n\n:param want_reply: True/False for reply wanted from server on keep\n alive messages being sent or not.\n:type want_reply: bool\n:param interval: Required keep alive interval. Set to ``0`` to disable\n keepalives.\n:type interval: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_81keepalive_config = {"keepalive_config", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_81keepalive_config, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_80keepalive_config}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_81keepalive_config(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_74keepalive_config, "Session.keepalive_config(self, bool want_reply, unsigned int interval)\n\nConfigure keep alive settings.\n\n:param want_reply: True/False for reply wanted from server on keep\n alive messages being sent or not.\n:type want_reply: bool\n:param interval: Required keep alive interval. Set to ``0`` to disable\n keepalives.\n:type interval: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_75keepalive_config = {"keepalive_config", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_75keepalive_config, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_74keepalive_config}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_75keepalive_config(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -14449,39 +13673,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_want_reply,&__pyx_mstate_global->__pyx_n_u_interval,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 821, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 771, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 821, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 771, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 821, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 771, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "keepalive_config", 0) < 0) __PYX_ERR(0, 821, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "keepalive_config", 0) < 0) __PYX_ERR(0, 771, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("keepalive_config", 1, 2, 2, i); __PYX_ERR(0, 821, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("keepalive_config", 1, 2, 2, i); __PYX_ERR(0, 771, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 821, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 771, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 821, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 771, __pyx_L3_error) } - __pyx_v_want_reply = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_want_reply == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L3_error) - __pyx_v_interval = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_interval == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 821, __pyx_L3_error) + __pyx_v_want_reply = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_want_reply == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L3_error) + __pyx_v_interval = __Pyx_PyLong_As_unsigned_int(values[1]); if (unlikely((__pyx_v_interval == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 771, __pyx_L3_error) } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("keepalive_config", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 821, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("keepalive_config", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 771, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14492,7 +13716,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_80keepalive_config(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_want_reply, __pyx_v_interval); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_74keepalive_config(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_want_reply, __pyx_v_interval); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -14502,12 +13726,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_want_reply, unsigned int __pyx_v_interval) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_74keepalive_config(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, int __pyx_v_want_reply, unsigned int __pyx_v_interval) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("keepalive_config", 0); - /* "ssh2/session.pyx":831 + /* "ssh2/session.pyx":781 * keepalives. * :type interval: int""" * with nogil: # <<<<<<<<<<<<<< @@ -14521,7 +13745,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __py __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":832 + /* "ssh2/session.pyx":782 * :type interval: int""" * with nogil: * c_ssh2.libssh2_keepalive_config(self._session, want_reply, interval) # <<<<<<<<<<<<<< @@ -14531,7 +13755,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __py libssh2_keepalive_config(__pyx_v_self->_session, __pyx_v_want_reply, __pyx_v_interval); } - /* "ssh2/session.pyx":831 + /* "ssh2/session.pyx":781 * keepalives. * :type interval: int""" * with nogil: # <<<<<<<<<<<<<< @@ -14548,7 +13772,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __py } } - /* "ssh2/session.pyx":821 + /* "ssh2/session.pyx":771 * return PyKnownHost(self, known_hosts) * * def keepalive_config(self, bint want_reply, unsigned interval): # <<<<<<<<<<<<<< @@ -14563,7 +13787,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __py return __pyx_r; } -/* "ssh2/session.pyx":834 +/* "ssh2/session.pyx":784 * c_ssh2.libssh2_keepalive_config(self._session, want_reply, interval) * * def keepalive_send(self): # <<<<<<<<<<<<<< @@ -14572,16 +13796,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_80keepalive_config(struct __py */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_83keepalive_send(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_77keepalive_send(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_82keepalive_send, "Session.keepalive_send(self)\n\nSend keepalive.\n\nReturns seconds remaining before next keep alive should be sent.\n\n:rtype: int"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_83keepalive_send = {"keepalive_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_83keepalive_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_82keepalive_send}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_83keepalive_send(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_76keepalive_send, "Session.keepalive_send(self)\n\nSend keepalive.\n\nReturns seconds remaining before next keep alive should be sent.\n\n:rtype: int"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_77keepalive_send = {"keepalive_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_77keepalive_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_76keepalive_send}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_77keepalive_send(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -14607,14 +13831,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("keepalive_send", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_82keepalive_send(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_76keepalive_send(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_76keepalive_send(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { CYTHON_UNUSED int __pyx_v_seconds; int __pyx_v_c_seconds; int __pyx_v_rc; @@ -14627,7 +13851,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("keepalive_send", 0); - /* "ssh2/session.pyx":840 + /* "ssh2/session.pyx":790 * * :rtype: int""" * cdef int seconds = 0 # <<<<<<<<<<<<<< @@ -14636,7 +13860,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ */ __pyx_v_seconds = 0; - /* "ssh2/session.pyx":841 + /* "ssh2/session.pyx":791 * :rtype: int""" * cdef int seconds = 0 * cdef int c_seconds = 0 # <<<<<<<<<<<<<< @@ -14645,7 +13869,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ */ __pyx_v_c_seconds = 0; - /* "ssh2/session.pyx":843 + /* "ssh2/session.pyx":793 * cdef int c_seconds = 0 * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -14659,7 +13883,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":844 + /* "ssh2/session.pyx":794 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_keepalive_send(self._session, &c_seconds) # <<<<<<<<<<<<<< @@ -14669,7 +13893,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ __pyx_v_rc = libssh2_keepalive_send(__pyx_v_self->_session, (&__pyx_v_c_seconds)); } - /* "ssh2/session.pyx":843 + /* "ssh2/session.pyx":793 * cdef int c_seconds = 0 * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -14686,16 +13910,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ } } - /* "ssh2/session.pyx":845 + /* "ssh2/session.pyx":795 * with nogil: * rc = c_ssh2.libssh2_keepalive_send(self._session, &c_seconds) * handle_error_codes(rc) # <<<<<<<<<<<<<< * return c_seconds * */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 795, __pyx_L1_error) - /* "ssh2/session.pyx":846 + /* "ssh2/session.pyx":796 * rc = c_ssh2.libssh2_keepalive_send(self._session, &c_seconds) * handle_error_codes(rc) * return c_seconds # <<<<<<<<<<<<<< @@ -14703,13 +13927,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ * def supported_algs(self, MethodType method_type): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_c_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyLong_From_int(__pyx_v_c_seconds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":834 + /* "ssh2/session.pyx":784 * c_ssh2.libssh2_keepalive_config(self._session, want_reply, interval) * * def keepalive_send(self): # <<<<<<<<<<<<<< @@ -14728,7 +13952,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ return __pyx_r; } -/* "ssh2/session.pyx":848 +/* "ssh2/session.pyx":798 * return c_seconds * * def supported_algs(self, MethodType method_type): # <<<<<<<<<<<<<< @@ -14737,16 +13961,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_82keepalive_send(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_85supported_algs(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_79supported_algs(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_84supported_algs, "Session.supported_algs(self, MethodType method_type)\n\nGet supportd algorithms for method type.\n\n:param method_type: Type of method to get\n:type method_type: :py:class:`MethodType`\n\n:returns: List of supported algorithms.\n:rtype: list(str)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_85supported_algs = {"supported_algs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_85supported_algs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_84supported_algs}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_85supported_algs(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_78supported_algs, "Session.supported_algs(self, MethodType method_type)\n\nGet supportd algorithms for method type.\n\n:param method_type: Type of method to get\n:type method_type: :py:class:`MethodType`\n\n:returns: List of supported algorithms.\n:rtype: list(str)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_79supported_algs = {"supported_algs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_79supported_algs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_78supported_algs}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_79supported_algs(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -14776,32 +14000,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method_type,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 848, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 798, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 848, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 798, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "supported_algs", 0) < 0) __PYX_ERR(0, 848, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "supported_algs", 0) < 0) __PYX_ERR(0, 798, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("supported_algs", 1, 1, 1, i); __PYX_ERR(0, 848, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("supported_algs", 1, 1, 1, i); __PYX_ERR(0, 798, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 848, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 798, __pyx_L3_error) } __pyx_v_method_type = ((struct __pyx_obj_4ssh2_7session_MethodType *)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("supported_algs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 848, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("supported_algs", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 798, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -14812,8 +14036,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 848, __pyx_L1_error) - __pyx_r = __pyx_pf_4ssh2_7session_7Session_84supported_algs(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_r = __pyx_pf_4ssh2_7session_7Session_78supported_algs(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type); /* function exit code */ goto __pyx_L0; @@ -14832,7 +14056,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_78supported_algs(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type) { char const **__pyx_v_c_algs; int __pyx_v_rc; PyObject *__pyx_v_algs = NULL; @@ -14857,7 +14081,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("supported_algs", 0); - /* "ssh2/session.pyx":859 + /* "ssh2/session.pyx":809 * cdef const char **c_algs * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -14871,7 +14095,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":860 + /* "ssh2/session.pyx":810 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_supported_algs( # <<<<<<<<<<<<<< @@ -14881,7 +14105,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_v_rc = libssh2_session_supported_algs(__pyx_v_self->_session, __pyx_v_method_type->value, (&__pyx_v_c_algs)); } - /* "ssh2/session.pyx":859 + /* "ssh2/session.pyx":809 * cdef const char **c_algs * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -14898,7 +14122,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ } } - /* "ssh2/session.pyx":862 + /* "ssh2/session.pyx":812 * rc = c_ssh2.libssh2_session_supported_algs( * self._session, method_type.value, &c_algs) * if rc < 0: # <<<<<<<<<<<<<< @@ -14908,7 +14132,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_t_1 = (__pyx_v_rc < 0); if (__pyx_t_1) { - /* "ssh2/session.pyx":863 + /* "ssh2/session.pyx":813 * self._session, method_type.value, &c_algs) * if rc < 0: * return handle_error_codes(rc) # <<<<<<<<<<<<<< @@ -14916,14 +14140,14 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ * return [] */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 863, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyLong_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 813, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":862 + /* "ssh2/session.pyx":812 * rc = c_ssh2.libssh2_session_supported_algs( * self._session, method_type.value, &c_algs) * if rc < 0: # <<<<<<<<<<<<<< @@ -14932,7 +14156,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ */ } - /* "ssh2/session.pyx":864 + /* "ssh2/session.pyx":814 * if rc < 0: * return handle_error_codes(rc) * elif rc == 0: # <<<<<<<<<<<<<< @@ -14942,7 +14166,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_t_1 = (__pyx_v_rc == 0); if (__pyx_t_1) { - /* "ssh2/session.pyx":865 + /* "ssh2/session.pyx":815 * return handle_error_codes(rc) * elif rc == 0: * return [] # <<<<<<<<<<<<<< @@ -14950,13 +14174,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ * algs = [to_str(c_algs[i]) for i in range(rc)] */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 815, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":864 + /* "ssh2/session.pyx":814 * if rc < 0: * return handle_error_codes(rc) * elif rc == 0: # <<<<<<<<<<<<<< @@ -14965,7 +14189,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ */ } - /* "ssh2/session.pyx":866 + /* "ssh2/session.pyx":816 * elif rc == 0: * return [] * try: # <<<<<<<<<<<<<< @@ -14974,7 +14198,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ */ /*try:*/ { - /* "ssh2/session.pyx":867 + /* "ssh2/session.pyx":817 * return [] * try: * algs = [to_str(c_algs[i]) for i in range(rc)] # <<<<<<<<<<<<<< @@ -14982,15 +14206,15 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ * with nogil: */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L8_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 817, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_v_rc; __pyx_t_4 = __pyx_t_2; for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_7genexpr__pyx_v_i = __pyx_t_5; - __pyx_t_6 = __pyx_f_4ssh2_5utils_to_str((__pyx_v_c_algs[__pyx_7genexpr__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 867, __pyx_L8_error) + __pyx_t_6 = __pyx_f_4ssh2_5utils_to_str((__pyx_v_c_algs[__pyx_7genexpr__pyx_v_i])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 867, __pyx_L8_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 817, __pyx_L8_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } } /* exit inner scope */ @@ -14998,7 +14222,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_t_3 = 0; } - /* "ssh2/session.pyx":869 + /* "ssh2/session.pyx":819 * algs = [to_str(c_algs[i]) for i in range(rc)] * finally: * with nogil: # <<<<<<<<<<<<<< @@ -15014,7 +14238,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":870 + /* "ssh2/session.pyx":820 * finally: * with nogil: * c_ssh2.libssh2_free(self._session, c_algs) # <<<<<<<<<<<<<< @@ -15024,7 +14248,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ libssh2_free(__pyx_v_self->_session, __pyx_v_c_algs); } - /* "ssh2/session.pyx":869 + /* "ssh2/session.pyx":819 * algs = [to_str(c_algs[i]) for i in range(rc)] * finally: * with nogil: # <<<<<<<<<<<<<< @@ -15066,7 +14290,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":870 + /* "ssh2/session.pyx":820 * finally: * with nogil: * c_ssh2.libssh2_free(self._session, c_algs) # <<<<<<<<<<<<<< @@ -15076,7 +14300,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ libssh2_free(__pyx_v_self->_session, __pyx_v_c_algs); } - /* "ssh2/session.pyx":869 + /* "ssh2/session.pyx":819 * algs = [to_str(c_algs[i]) for i in range(rc)] * finally: * with nogil: # <<<<<<<<<<<<<< @@ -15108,7 +14332,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_L9:; } - /* "ssh2/session.pyx":871 + /* "ssh2/session.pyx":821 * with nogil: * c_ssh2.libssh2_free(self._session, c_algs) * return algs # <<<<<<<<<<<<<< @@ -15120,7 +14344,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ __pyx_r = __pyx_v_algs; goto __pyx_L0; - /* "ssh2/session.pyx":848 + /* "ssh2/session.pyx":798 * return c_seconds * * def supported_algs(self, MethodType method_type): # <<<<<<<<<<<<<< @@ -15141,7 +14365,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ return __pyx_r; } -/* "ssh2/session.pyx":873 +/* "ssh2/session.pyx":823 * return algs * * def methods(self, MethodType method_type): # <<<<<<<<<<<<<< @@ -15150,16 +14374,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_84supported_algs(struct __pyx_ */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_87methods(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_81methods(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_86methods, "Session.methods(self, MethodType method_type)\n\nGet currently active algorithms for method type.\n\n:param method_type: Type of method to get\n:type method_type: :py:class:`MethodType`\n\n:rtype: str"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_87methods = {"methods", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_87methods, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_86methods}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_87methods(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_80methods, "Session.methods(self, MethodType method_type)\n\nGet currently active algorithms for method type.\n\n:param method_type: Type of method to get\n:type method_type: :py:class:`MethodType`\n\n:rtype: str"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_81methods = {"methods", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_81methods, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_80methods}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_81methods(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -15189,32 +14413,32 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method_type,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 873, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 823, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 873, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 823, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "methods", 0) < 0) __PYX_ERR(0, 873, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "methods", 0) < 0) __PYX_ERR(0, 823, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 1; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("methods", 1, 1, 1, i); __PYX_ERR(0, 873, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("methods", 1, 1, 1, i); __PYX_ERR(0, 823, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 1)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 873, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 823, __pyx_L3_error) } __pyx_v_method_type = ((struct __pyx_obj_4ssh2_7session_MethodType *)values[0]); } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("methods", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 873, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("methods", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 823, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15225,8 +14449,8 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 873, __pyx_L1_error) - __pyx_r = __pyx_pf_4ssh2_7session_7Session_86methods(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type); + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 823, __pyx_L1_error) + __pyx_r = __pyx_pf_4ssh2_7session_7Session_80methods(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type); /* function exit code */ goto __pyx_L0; @@ -15245,7 +14469,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_80methods(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type) { char const *__pyx_v_methods; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -15257,18 +14481,18 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("methods", 0); - /* "ssh2/session.pyx":881 + /* "ssh2/session.pyx":831 * :rtype: str * """ * if not self.sock: # <<<<<<<<<<<<<< * return * with nogil: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_self->sock); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 831, __pyx_L1_error) __pyx_t_2 = (!__pyx_t_1); if (__pyx_t_2) { - /* "ssh2/session.pyx":882 + /* "ssh2/session.pyx":832 * """ * if not self.sock: * return # <<<<<<<<<<<<<< @@ -15279,7 +14503,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh2/session.pyx":881 + /* "ssh2/session.pyx":831 * :rtype: str * """ * if not self.sock: # <<<<<<<<<<<<<< @@ -15288,7 +14512,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss */ } - /* "ssh2/session.pyx":883 + /* "ssh2/session.pyx":833 * if not self.sock: * return * with nogil: # <<<<<<<<<<<<<< @@ -15302,7 +14526,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":884 + /* "ssh2/session.pyx":834 * return * with nogil: * methods = c_ssh2.libssh2_session_methods( # <<<<<<<<<<<<<< @@ -15312,7 +14536,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss __pyx_v_methods = libssh2_session_methods(__pyx_v_self->_session, __pyx_v_method_type->value); } - /* "ssh2/session.pyx":883 + /* "ssh2/session.pyx":833 * if not self.sock: * return * with nogil: # <<<<<<<<<<<<<< @@ -15329,7 +14553,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss } } - /* "ssh2/session.pyx":886 + /* "ssh2/session.pyx":836 * methods = c_ssh2.libssh2_session_methods( * self._session, method_type.value) * return to_str(methods) # <<<<<<<<<<<<<< @@ -15337,13 +14561,13 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss * def method_pref(self, MethodType method_type, prefs not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4ssh2_5utils_to_str(__pyx_v_methods); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_to_str(__pyx_v_methods); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":873 + /* "ssh2/session.pyx":823 * return algs * * def methods(self, MethodType method_type): # <<<<<<<<<<<<<< @@ -15362,7 +14586,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss return __pyx_r; } -/* "ssh2/session.pyx":888 +/* "ssh2/session.pyx":838 * return to_str(methods) * * def method_pref(self, MethodType method_type, prefs not None): # <<<<<<<<<<<<<< @@ -15371,16 +14595,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_86methods(struct __pyx_obj_4ss */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_89method_pref(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_83method_pref(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_88method_pref, "Session.method_pref(self, MethodType method_type, prefs)\n\nSet preference for session method.\n\nSee :py:func:`Session.supported_algs` for supported algorithms\nfor method type.\n\n:param method_type: A supported session method LIBSSH2_METHOD_*\n:type method_type: :py:class:`MethodType`\n:param prefs: Algorithm preference for method type provided.\n:type prefs: str\n\n:rtype: int\n:raises: :py:class:`ssh2.exceptions.MethodNotSupported`\n on unsupported method preference"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_89method_pref = {"method_pref", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_89method_pref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_88method_pref}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_89method_pref(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_82method_pref, "Session.method_pref(self, MethodType method_type, prefs)\n\nSet preference for session method.\n\nSee :py:func:`Session.supported_algs` for supported algorithms\nfor method type.\n\n:param method_type: A supported session method LIBSSH2_METHOD_*\n:type method_type: :py:class:`MethodType`\n:param prefs: Algorithm preference for method type provided.\n:type prefs: str\n\n:rtype: int\n:raises: :py:class:`ssh2.exceptions.MethodNotSupported`\n on unsupported method preference"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_83method_pref = {"method_pref", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_83method_pref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_82method_pref}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_83method_pref(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -15411,39 +14635,39 @@ PyObject *__pyx_args, PyObject *__pyx_kwds { PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_method_type,&__pyx_mstate_global->__pyx_n_u_prefs,0}; const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; - if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 888, __pyx_L3_error) + if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 838, __pyx_L3_error) if (__pyx_kwds_len > 0) { switch (__pyx_nargs) { case 2: values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 888, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 838, __pyx_L3_error) CYTHON_FALLTHROUGH; case 1: values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 838, __pyx_L3_error) CYTHON_FALLTHROUGH; case 0: break; default: goto __pyx_L5_argtuple_error; } const Py_ssize_t kwd_pos_args = __pyx_nargs; - if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "method_pref", 0) < 0) __PYX_ERR(0, 888, __pyx_L3_error) + if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "method_pref", 0) < 0) __PYX_ERR(0, 838, __pyx_L3_error) for (Py_ssize_t i = __pyx_nargs; i < 2; i++) { - if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("method_pref", 1, 2, 2, i); __PYX_ERR(0, 888, __pyx_L3_error) } + if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("method_pref", 1, 2, 2, i); __PYX_ERR(0, 838, __pyx_L3_error) } } } else if (unlikely(__pyx_nargs != 2)) { goto __pyx_L5_argtuple_error; } else { values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 888, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 838, __pyx_L3_error) values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1); - if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 888, __pyx_L3_error) + if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 838, __pyx_L3_error) } __pyx_v_method_type = ((struct __pyx_obj_4ssh2_7session_MethodType *)values[0]); __pyx_v_prefs = values[1]; } goto __pyx_L6_skip; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("method_pref", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 888, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("method_pref", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 838, __pyx_L3_error) __pyx_L6_skip:; goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -15454,11 +14678,11 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 888, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_method_type), __pyx_mstate_global->__pyx_ptype_4ssh2_7session_MethodType, 1, "method_type", 0))) __PYX_ERR(0, 838, __pyx_L1_error) if (unlikely(((PyObject *)__pyx_v_prefs) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "prefs"); __PYX_ERR(0, 888, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "prefs"); __PYX_ERR(0, 838, __pyx_L1_error) } - __pyx_r = __pyx_pf_4ssh2_7session_7Session_88method_pref(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type, __pyx_v_prefs); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_82method_pref(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v_method_type, __pyx_v_prefs); /* function exit code */ goto __pyx_L0; @@ -15477,7 +14701,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type, PyObject *__pyx_v_prefs) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_82method_pref(struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, struct __pyx_obj_4ssh2_7session_MethodType *__pyx_v_method_type, PyObject *__pyx_v_prefs) { PyObject *__pyx_v_b_prefs = 0; char const *__pyx_v_c_prefs; int __pyx_v_rc; @@ -15491,19 +14715,19 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("method_pref", 0); - /* "ssh2/session.pyx":903 + /* "ssh2/session.pyx":853 * on unsupported method preference * """ * cdef bytes b_prefs = to_bytes(prefs) # <<<<<<<<<<<<<< * cdef const char *c_prefs = b_prefs * cdef int rc */ - __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_prefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4ssh2_5utils_to_bytes(__pyx_v_prefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_prefs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh2/session.pyx":904 + /* "ssh2/session.pyx":854 * """ * cdef bytes b_prefs = to_bytes(prefs) * cdef const char *c_prefs = b_prefs # <<<<<<<<<<<<<< @@ -15512,12 +14736,12 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj */ if (unlikely(__pyx_v_b_prefs == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 904, __pyx_L1_error) + __PYX_ERR(0, 854, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_prefs); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_prefs); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error) __pyx_v_c_prefs = __pyx_t_2; - /* "ssh2/session.pyx":906 + /* "ssh2/session.pyx":856 * cdef const char *c_prefs = b_prefs * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -15531,7 +14755,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj __Pyx_FastGIL_Remember(); /*try:*/ { - /* "ssh2/session.pyx":907 + /* "ssh2/session.pyx":857 * cdef int rc * with nogil: * rc = c_ssh2.libssh2_session_method_pref( # <<<<<<<<<<<<<< @@ -15541,7 +14765,7 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj __pyx_v_rc = libssh2_session_method_pref(__pyx_v_self->_session, __pyx_v_method_type->value, __pyx_v_c_prefs); } - /* "ssh2/session.pyx":906 + /* "ssh2/session.pyx":856 * cdef const char *c_prefs = b_prefs * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -15558,27 +14782,27 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_88method_pref(struct __pyx_obj } } - /* "ssh2/session.pyx":909 + /* "ssh2/session.pyx":859 * rc = c_ssh2.libssh2_session_method_pref( * self._session, method_type.value, c_prefs) * handle_error_codes(rc) # <<<<<<<<<<<<<< * return rc */ - __pyx_t_3 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 909, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4ssh2_5utils_handle_error_codes(__pyx_v_rc, 0); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 859, __pyx_L1_error) - /* "ssh2/session.pyx":910 + /* "ssh2/session.pyx":860 * self._session, method_type.value, c_prefs) * handle_error_codes(rc) * return rc # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyLong_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh2/session.pyx":888 + /* "ssh2/session.pyx":838 * return to_str(methods) * * def method_pref(self, MethodType method_type, prefs not None): # <<<<<<<<<<<<<< @@ -15683,16 +14907,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_13_kbd_callback___get__(struct */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_91__reduce_cython__(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_85__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_90__reduce_cython__, "Session.__reduce_cython__(self)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_91__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_91__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_90__reduce_cython__}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_91__reduce_cython__(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_84__reduce_cython__, "Session.__reduce_cython__(self)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_85__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_85__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_84__reduce_cython__}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_85__reduce_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -15718,14 +14942,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds const Py_ssize_t __pyx_kwds_len = unlikely(__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0; if (unlikely(__pyx_kwds_len < 0)) return NULL; if (unlikely(__pyx_kwds_len > 0)) {__Pyx_RejectKeywords("__reduce_cython__", __pyx_kwds); return NULL;} - __pyx_r = __pyx_pf_4ssh2_7session_7Session_90__reduce_cython__(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_84__reduce_cython__(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_90__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_84__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -15765,16 +14989,16 @@ static PyObject *__pyx_pf_4ssh2_7session_7Session_90__reduce_cython__(CYTHON_UNU */ /* Python wrapper */ -static PyObject *__pyx_pw_4ssh2_7session_7Session_93__setstate_cython__(PyObject *__pyx_v_self, +static PyObject *__pyx_pw_4ssh2_7session_7Session_87__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else PyObject *__pyx_args, PyObject *__pyx_kwds #endif ); /*proto*/ -PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_92__setstate_cython__, "Session.__setstate_cython__(self, __pyx_state)"); -static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_93__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_93__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_92__setstate_cython__}; -static PyObject *__pyx_pw_4ssh2_7session_7Session_93__setstate_cython__(PyObject *__pyx_v_self, +PyDoc_STRVAR(__pyx_doc_4ssh2_7session_7Session_86__setstate_cython__, "Session.__setstate_cython__(self, __pyx_state)"); +static PyMethodDef __pyx_mdef_4ssh2_7session_7Session_87__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_87__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_86__setstate_cython__}; +static PyObject *__pyx_pw_4ssh2_7session_7Session_87__setstate_cython__(PyObject *__pyx_v_self, #if CYTHON_METH_FASTCALL PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds #else @@ -15840,7 +15064,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_pf_4ssh2_7session_7Session_92__setstate_cython__(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v___pyx_state); + __pyx_r = __pyx_pf_4ssh2_7session_7Session_86__setstate_cython__(((struct __pyx_obj_4ssh2_7session_Session *)__pyx_v_self), __pyx_v___pyx_state); /* function exit code */ for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) { @@ -15850,7 +15074,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds return __pyx_r; } -static PyObject *__pyx_pf_4ssh2_7session_7Session_92__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_4ssh2_7session_7Session_86__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4ssh2_7session_Session *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_lineno = 0; @@ -15976,49 +15200,46 @@ static PyObject *__pyx_getprop_4ssh2_7session_7Session__kbd_callback(PyObject *o static PyMethodDef __pyx_methods_4ssh2_7session_Session[] = { {"disconnect", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_5disconnect, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_4disconnect}, {"handshake", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_7handshake, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_6handshake}, - {"startup", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_9startup, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_8startup}, - {"set_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_11set_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_10set_blocking}, - {"get_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_13get_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_12get_blocking}, - {"set_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_15set_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_14set_timeout}, - {"get_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_17get_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_16get_timeout}, - {"userauth_authenticated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_19userauth_authenticated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_18userauth_authenticated}, - {"userauth_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_21userauth_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_20userauth_list}, - {"userauth_publickey_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_23userauth_publickey_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_22userauth_publickey_fromfile}, - {"userauth_publickey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_25userauth_publickey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_24userauth_publickey}, - {"userauth_hostbased_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_27userauth_hostbased_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_26userauth_hostbased_fromfile}, - {"userauth_publickey_frommemory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_29userauth_publickey_frommemory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_28userauth_publickey_frommemory}, - {"userauth_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_31userauth_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_30userauth_password}, - {"userauth_keyboardinteractive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive}, - {"userauth_keyboardinteractive_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_34userauth_keyboardinteractive_callback}, - {"agent_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_37agent_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_36agent_init}, - {"agent_auth", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_39agent_auth, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_38agent_auth}, - {"open_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_41open_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_40open_session}, - {"direct_tcpip_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_43direct_tcpip_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_42direct_tcpip_ex}, - {"direct_tcpip", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_45direct_tcpip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_44direct_tcpip}, - {"direct_streamlocal_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_47direct_streamlocal_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_46direct_streamlocal_ex}, - {"block_directions", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_49block_directions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_48block_directions}, - {"flag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_51flag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_50flag}, - {"forward_listen", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_53forward_listen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_52forward_listen}, - {"forward_listen_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_55forward_listen_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_54forward_listen_ex}, - {"sftp_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_57sftp_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_56sftp_init}, - {"last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_59last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_58last_error}, - {"last_errno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_61last_errno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_60last_errno}, - {"set_last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_63set_last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_62set_last_error}, - {"scp_recv", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_65scp_recv, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_64scp_recv}, - {"scp_recv2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_67scp_recv2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_66scp_recv2}, - {"scp_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_69scp_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_68scp_send}, - {"scp_send64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_71scp_send64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_70scp_send64}, - {"publickey_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_73publickey_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_72publickey_init}, - {"hostkey_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_75hostkey_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_74hostkey_hash}, - {"hostkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_77hostkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_76hostkey}, - {"knownhost_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_79knownhost_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_78knownhost_init}, - {"keepalive_config", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_81keepalive_config, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_80keepalive_config}, - {"keepalive_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_83keepalive_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_82keepalive_send}, - {"supported_algs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_85supported_algs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_84supported_algs}, - {"methods", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_87methods, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_86methods}, - {"method_pref", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_89method_pref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_88method_pref}, - {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_91__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_90__reduce_cython__}, - {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_93__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_92__setstate_cython__}, + {"set_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_9set_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_8set_blocking}, + {"get_blocking", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_11get_blocking, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_10get_blocking}, + {"set_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_13set_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_12set_timeout}, + {"get_timeout", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_15get_timeout, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_14get_timeout}, + {"userauth_authenticated", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_17userauth_authenticated, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_16userauth_authenticated}, + {"userauth_list", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_19userauth_list, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_18userauth_list}, + {"userauth_publickey_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_21userauth_publickey_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_20userauth_publickey_fromfile}, + {"userauth_publickey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_23userauth_publickey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_22userauth_publickey}, + {"userauth_hostbased_fromfile", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_25userauth_hostbased_fromfile, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_24userauth_hostbased_fromfile}, + {"userauth_publickey_frommemory", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_27userauth_publickey_frommemory, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_26userauth_publickey_frommemory}, + {"userauth_password", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_29userauth_password, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_28userauth_password}, + {"userauth_keyboardinteractive", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_31userauth_keyboardinteractive, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_30userauth_keyboardinteractive}, + {"userauth_keyboardinteractive_callback", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_32userauth_keyboardinteractive_callback}, + {"agent_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_35agent_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_34agent_init}, + {"agent_auth", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_37agent_auth, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_36agent_auth}, + {"open_session", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_39open_session, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_38open_session}, + {"direct_tcpip_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_41direct_tcpip_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_40direct_tcpip_ex}, + {"direct_tcpip", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_43direct_tcpip, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_42direct_tcpip}, + {"direct_streamlocal_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_45direct_streamlocal_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_44direct_streamlocal_ex}, + {"block_directions", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_47block_directions, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_46block_directions}, + {"flag", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_49flag, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_48flag}, + {"forward_listen", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_51forward_listen, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_50forward_listen}, + {"forward_listen_ex", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_53forward_listen_ex, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_52forward_listen_ex}, + {"sftp_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_55sftp_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_54sftp_init}, + {"last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_57last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_56last_error}, + {"last_errno", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_59last_errno, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_58last_errno}, + {"set_last_error", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_61set_last_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_60set_last_error}, + {"scp_recv2", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_63scp_recv2, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_62scp_recv2}, + {"scp_send64", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_65scp_send64, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_64scp_send64}, + {"publickey_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_67publickey_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_66publickey_init}, + {"hostkey_hash", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_69hostkey_hash, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_68hostkey_hash}, + {"hostkey", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_71hostkey, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_70hostkey}, + {"knownhost_init", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_73knownhost_init, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_72knownhost_init}, + {"keepalive_config", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_75keepalive_config, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_74keepalive_config}, + {"keepalive_send", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_77keepalive_send, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_76keepalive_send}, + {"supported_algs", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_79supported_algs, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_78supported_algs}, + {"methods", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_81methods, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_80methods}, + {"method_pref", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_83method_pref, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_82method_pref}, + {"__reduce_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_85__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_84__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4ssh2_7session_7Session_87__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4ssh2_7session_7Session_86__setstate_cython__}, {0, 0, 0, 0} }; @@ -16656,15 +15877,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) { if (PyObject_SetAttr(__pyx_m, __pyx_mstate_global->__pyx_n_u_FlagType, (PyObject *) __pyx_mstate->__pyx_ptype_4ssh2_7session_FlagType) < 0) __PYX_ERR(0, 76, __pyx_L1_error) if (__Pyx_setup_reduce((PyObject *) __pyx_mstate->__pyx_ptype_4ssh2_7session_FlagType) < 0) __PYX_ERR(0, 76, __pyx_L1_error) #if CYTHON_USE_TYPE_SPECS - __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4ssh2_7session___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults)) __PYX_ERR(0, 345, __pyx_L1_error) - if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4ssh2_7session___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults) < 0) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_4ssh2_7session___pyx_defaults_spec, NULL); if (unlikely(!__pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults)) __PYX_ERR(0, 339, __pyx_L1_error) + if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_4ssh2_7session___pyx_defaults_spec, __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults) < 0) __PYX_ERR(0, 339, __pyx_L1_error) #else __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults = &__pyx_type_4ssh2_7session___pyx_defaults; #endif #if !CYTHON_COMPILING_IN_LIMITED_API #endif #if !CYTHON_USE_TYPE_SPECS - if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults) < 0) __PYX_ERR(0, 345, __pyx_L1_error) + if (__Pyx_PyType_Ready(__pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults) < 0) __PYX_ERR(0, 339, __pyx_L1_error) #endif #if !CYTHON_COMPILING_IN_LIMITED_API if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults->tp_dictoffset && __pyx_mstate->__pyx_ptype_4ssh2_7session___pyx_defaults->tp_getattro == PyObject_GenericGetAttr)) { @@ -17788,499 +17009,463 @@ __Pyx_RefNannySetupContext("PyInit_session", 0); /* "ssh2/session.pyx":155 * return handle_error_codes(rc) * - * def startup(self, sock): # <<<<<<<<<<<<<< - * """Deprecated - use self.handshake""" - * cdef int _sock = PyObject_AsFileDescriptor(sock) -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_9startup, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_startup, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_startup, __pyx_t_3) < 0) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/session.pyx":161 - * return handle_error_codes(rc) - * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< * """Set session blocking mode on/off. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_11set_blocking, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_blocking, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_9set_blocking, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_blocking, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_blocking, __pyx_t_3) < 0) __PYX_ERR(0, 161, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_blocking, __pyx_t_3) < 0) __PYX_ERR(0, 155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":171 + /* "ssh2/session.pyx":165 * self._session, blocking) * * def get_blocking(self): # <<<<<<<<<<<<<< * """Get session blocking mode enabled True/False. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_13get_blocking, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_get_blocking, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_11get_blocking, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_get_blocking, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[8])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_get_blocking, __pyx_t_3) < 0) __PYX_ERR(0, 171, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_get_blocking, __pyx_t_3) < 0) __PYX_ERR(0, 165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":180 + /* "ssh2/session.pyx":174 * return bool(rc) * * def set_timeout(self, long timeout): # <<<<<<<<<<<<<< * """Set the timeout in milliseconds for how long a blocking * call may wait until the situation is considered an error and */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_15set_timeout, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_timeout, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_13set_timeout, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_timeout, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[9])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_timeout, __pyx_t_3) < 0) __PYX_ERR(0, 180, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_timeout, __pyx_t_3) < 0) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":191 + /* "ssh2/session.pyx":185 * c_ssh2.libssh2_session_set_timeout(self._session, timeout) * * def get_timeout(self): # <<<<<<<<<<<<<< * """Get current session timeout setting""" * cdef long timeout */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_17get_timeout, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_get_timeout, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 191, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_15get_timeout, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_get_timeout, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[10])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_get_timeout, __pyx_t_3) < 0) __PYX_ERR(0, 191, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_get_timeout, __pyx_t_3) < 0) __PYX_ERR(0, 185, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":198 + /* "ssh2/session.pyx":192 * return timeout * * def userauth_authenticated(self): # <<<<<<<<<<<<<< * """True/False for is user authenticated or not. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_19userauth_authenticated, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_authenticated, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_17userauth_authenticated, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_authenticated, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[11])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_authenticated, __pyx_t_3) < 0) __PYX_ERR(0, 198, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_authenticated, __pyx_t_3) < 0) __PYX_ERR(0, 192, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":207 + /* "ssh2/session.pyx":201 * return bool(rc) * * def userauth_list(self, username not None): # <<<<<<<<<<<<<< * """Retrieve available authentication methodslist. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_21userauth_list, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_list, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_19userauth_list, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_list, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[12])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_list, __pyx_t_3) < 0) __PYX_ERR(0, 207, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_list, __pyx_t_3) < 0) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":224 + /* "ssh2/session.pyx":218 * return auth.split(',') * * def userauth_publickey_fromfile(self, username not None, # <<<<<<<<<<<<<< * privatekey not None, * passphrase='', */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_23userauth_publickey_fromfile, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey_fromf, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_21userauth_publickey_fromfile, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey_fromf, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[13])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[0]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey_fromfile, __pyx_t_3) < 0) __PYX_ERR(0, 224, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey_fromfile, __pyx_t_3) < 0) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":248 + /* "ssh2/session.pyx":242 * return handle_error_codes(rc) * * def userauth_publickey(self, username not None, # <<<<<<<<<<<<<< * bytes pubkeydata not None): * """Perform public key authentication with provided public key data */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_25userauth_publickey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_23userauth_publickey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[14])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey, __pyx_t_3) < 0) __PYX_ERR(0, 248, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey, __pyx_t_3) < 0) __PYX_ERR(0, 242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":269 + /* "ssh2/session.pyx":263 * return handle_error_codes(rc) * * def userauth_hostbased_fromfile(self, # <<<<<<<<<<<<<< * username not None, * privatekey not None, */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_27userauth_hostbased_fromfile, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_hostbased_fromf, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_25userauth_hostbased_fromfile, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_hostbased_fromf, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[15])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[1]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_hostbased_fromfile, __pyx_t_3) < 0) __PYX_ERR(0, 269, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_hostbased_fromfile, __pyx_t_3) < 0) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":295 + /* "ssh2/session.pyx":289 * return handle_error_codes(rc) * * def userauth_publickey_frommemory( # <<<<<<<<<<<<<< * self, username, bytes privatekeyfiledata, * passphrase='', bytes publickeyfiledata=None): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_29userauth_publickey_frommemory, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey_fromm, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_27userauth_publickey_frommemory, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_publickey_fromm, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[16])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[0]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey_frommemory, __pyx_t_3) < 0) __PYX_ERR(0, 295, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_publickey_frommemory, __pyx_t_3) < 0) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":319 + /* "ssh2/session.pyx":313 * return handle_error_codes(rc) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< * """Perform password authentication * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_31userauth_password, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_password, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_29userauth_password, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_password, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[17])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_password, __pyx_t_3) < 0) __PYX_ERR(0, 319, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_password, __pyx_t_3) < 0) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":336 + /* "ssh2/session.pyx":330 * return handle_error_codes(rc) * * def userauth_keyboardinteractive(self, username not None, # <<<<<<<<<<<<<< * password not None): * """Perform keyboard-interactive authentication */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_33userauth_keyboardinteractive, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_keyboardinterac, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_31userauth_keyboardinteractive, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_keyboardinterac, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[18])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive, __pyx_t_3) < 0) __PYX_ERR(0, 336, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive, __pyx_t_3) < 0) __PYX_ERR(0, 330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":349 + /* "ssh2/session.pyx":343 * return self.userauth_keyboardinteractive_callback(username, passwd) * * def userauth_keyboardinteractive_callback( # <<<<<<<<<<<<<< * self, username not None, callback not None): * """ */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_35userauth_keyboardinteractive_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_keyboardinterac_2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_33userauth_keyboardinteractive_callback, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_userauth_keyboardinterac_2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[19])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive_cal, __pyx_t_3) < 0) __PYX_ERR(0, 349, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_userauth_keyboardinteractive_cal, __pyx_t_3) < 0) __PYX_ERR(0, 343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":385 + /* "ssh2/session.pyx":379 * return handle_error_codes(rc) * * def agent_init(self): # <<<<<<<<<<<<<< * """Initialise SSH agent. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_37agent_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_agent_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 385, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_35agent_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_agent_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[20])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_agent_init, __pyx_t_3) < 0) __PYX_ERR(0, 385, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_agent_init, __pyx_t_3) < 0) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":395 + /* "ssh2/session.pyx":389 * return PyAgent(agent, self) * * def agent_auth(self, username not None): # <<<<<<<<<<<<<< * """Convenience function for performing user authentication via SSH Agent. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_39agent_auth, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_agent_auth, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_37agent_auth, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_agent_auth, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[21])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_agent_auth, __pyx_t_3) < 0) __PYX_ERR(0, 395, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_agent_auth, __pyx_t_3) < 0) __PYX_ERR(0, 389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":430 + /* "ssh2/session.pyx":424 * agent_auth(_username, agent) * * def open_session(self): # <<<<<<<<<<<<<< * """Open new channel session. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_41open_session, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_open_session, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_39open_session, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_open_session, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[22])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_open_session, __pyx_t_3) < 0) __PYX_ERR(0, 430, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_open_session, __pyx_t_3) < 0) __PYX_ERR(0, 424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":444 + /* "ssh2/session.pyx":438 * return PyChannel(channel, self) * * def direct_tcpip_ex(self, host not None, int port, # <<<<<<<<<<<<<< * shost not None, int sport): * cdef c_ssh2.LIBSSH2_CHANNEL *channel */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_43direct_tcpip_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_tcpip_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_41direct_tcpip_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_tcpip_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_tcpip_ex, __pyx_t_3) < 0) __PYX_ERR(0, 444, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_tcpip_ex, __pyx_t_3) < 0) __PYX_ERR(0, 438, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":459 + /* "ssh2/session.pyx":453 * return PyChannel(channel, self) * * def direct_tcpip(self, host not None, int port): # <<<<<<<<<<<<<< * """Open direct TCP/IP channel to host:port * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_45direct_tcpip, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_tcpip, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 459, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_43direct_tcpip, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_tcpip, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[24])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_tcpip, __pyx_t_3) < 0) __PYX_ERR(0, 459, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_tcpip, __pyx_t_3) < 0) __PYX_ERR(0, 453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":476 + /* "ssh2/session.pyx":470 * return PyChannel(channel, self) * * def direct_streamlocal_ex(self, socket_path not None, shost not None, int sport): # <<<<<<<<<<<<<< * """ * From libssh2 documentation: */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_47direct_streamlocal_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_streamlocal_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 476, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_45direct_streamlocal_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_direct_streamlocal_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[25])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_streamlocal_ex, __pyx_t_3) < 0) __PYX_ERR(0, 476, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_direct_streamlocal_ex, __pyx_t_3) < 0) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":505 + /* "ssh2/session.pyx":499 * return PyChannel(channel, self) * * def block_directions(self): # <<<<<<<<<<<<<< * """Get blocked directions for the current session. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_49block_directions, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_block_directions, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_47block_directions, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_block_directions, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[26])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_block_directions, __pyx_t_3) < 0) __PYX_ERR(0, 505, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_block_directions, __pyx_t_3) < 0) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":532 + /* "ssh2/session.pyx":526 * return rc * * def flag(self, FlagType flag, enabled=True): # <<<<<<<<<<<<<< * """ * Enable/Disable flag for session. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_51flag, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_flag, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_49flag, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_flag, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[27])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[2]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_flag, __pyx_t_3) < 0) __PYX_ERR(0, 532, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_flag, __pyx_t_3) < 0) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":567 + /* "ssh2/session.pyx":561 * handle_error_codes(rc) * * def forward_listen(self, int port): # <<<<<<<<<<<<<< * """Create forward listener on port. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_53forward_listen, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_forward_listen, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_51forward_listen, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_forward_listen, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[28])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_forward_listen, __pyx_t_3) < 0) __PYX_ERR(0, 567, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_forward_listen, __pyx_t_3) < 0) __PYX_ERR(0, 561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":583 + /* "ssh2/session.pyx":577 * return PyListener(listener, self) * * def forward_listen_ex(self, int queue_maxsize, host=None, int port=0): # <<<<<<<<<<<<<< * """ * Instruct the remote SSH server to begin listening for inbound */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_55forward_listen_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_forward_listen_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_53forward_listen_ex, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_forward_listen_ex, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[29])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[3]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_forward_listen_ex, __pyx_t_3) < 0) __PYX_ERR(0, 583, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_forward_listen_ex, __pyx_t_3) < 0) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":619 + /* "ssh2/session.pyx":613 * return (PyListener(listener, self), bound_port) * * def sftp_init(self): # <<<<<<<<<<<<<< * """Initialise SFTP channel. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_57sftp_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_sftp_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_55sftp_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_sftp_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[30])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_sftp_init, __pyx_t_3) < 0) __PYX_ERR(0, 619, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_sftp_init, __pyx_t_3) < 0) __PYX_ERR(0, 613, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":632 + /* "ssh2/session.pyx":626 * return PySFTP(_sftp, self) * * def last_error(self, size_t msg_size=1024): # <<<<<<<<<<<<<< * """Retrieve last error message from libssh2, if any. * Returns empty string on no error message. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_59last_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_last_error, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_57last_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_last_error, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[31])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_mstate_global->__pyx_tuple[4]); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_last_error, __pyx_t_3) < 0) __PYX_ERR(0, 632, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_last_error, __pyx_t_3) < 0) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":652 + /* "ssh2/session.pyx":646 * free(_error_msg) * * def last_errno(self): # <<<<<<<<<<<<<< * """Retrieve last error number from libssh2, if any. * Returns 0 on no last error. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_61last_errno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_last_errno, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_59last_errno, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_last_errno, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[32])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_last_errno, __pyx_t_3) < 0) __PYX_ERR(0, 652, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_last_errno, __pyx_t_3) < 0) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":664 + /* "ssh2/session.pyx":658 * return rc * * def set_last_error(self, int errcode, errmsg not None): # <<<<<<<<<<<<<< * cdef bytes b_errmsg = to_bytes(errmsg) * cdef char *_errmsg = b_errmsg */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_63set_last_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_last_error, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_61set_last_error, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_set_last_error, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[33])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_last_error, __pyx_t_3) < 0) __PYX_ERR(0, 664, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_set_last_error, __pyx_t_3) < 0) __PYX_ERR(0, 658, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":673 + /* "ssh2/session.pyx":667 * return rc * - * def scp_recv(self, path not None): # <<<<<<<<<<<<<< - * """Receive file via SCP. - * -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_65scp_recv, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_recv, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_recv, __pyx_t_3) < 0) __PYX_ERR(0, 673, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/session.pyx":695 - * return PyChannel(channel, self), statinfo - * * def scp_recv2(self, path not None): # <<<<<<<<<<<<<< * """Receive file via SCP. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_67scp_recv2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_recv2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_63scp_recv2, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_recv2, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_recv2, __pyx_t_3) < 0) __PYX_ERR(0, 695, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_recv2, __pyx_t_3) < 0) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":715 + /* "ssh2/session.pyx":687 * return PyChannel(channel, self), fileinfo * - * def scp_send(self, path not None, int mode, size_t size): # <<<<<<<<<<<<<< - * """Deprecated in favour of scp_send64. Send file via SCP. - * -*/ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_69scp_send, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_send, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 715, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_send, __pyx_t_3) < 0) __PYX_ERR(0, 715, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "ssh2/session.pyx":737 - * return PyChannel(channel, self) - * * def scp_send64(self, path not None, int mode, c_ssh2.libssh2_uint64_t size, # <<<<<<<<<<<<<< * time_t mtime, time_t atime): * """Send file via SCP. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_71scp_send64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_send64, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_65scp_send64, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_scp_send64, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_send64, __pyx_t_3) < 0) __PYX_ERR(0, 737, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_scp_send64, __pyx_t_3) < 0) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":760 + /* "ssh2/session.pyx":710 * return PyChannel(channel, self) * * def publickey_init(self): # <<<<<<<<<<<<<< * """Initialise public key subsystem for managing remote server * public keys""" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_73publickey_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_publickey_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_67publickey_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_publickey_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[36])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_publickey_init, __pyx_t_3) < 0) __PYX_ERR(0, 760, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_publickey_init, __pyx_t_3) < 0) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":770 + /* "ssh2/session.pyx":720 * return PyPublicKeySystem(_pkey, self) * * def hostkey_hash(self, int hash_type): # <<<<<<<<<<<<<< * """Get computed digest of the remote system's host key. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_75hostkey_hash, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_hostkey_hash, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_69hostkey_hash, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_hostkey_hash, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[37])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_hostkey_hash, __pyx_t_3) < 0) __PYX_ERR(0, 770, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_hostkey_hash, __pyx_t_3) < 0) __PYX_ERR(0, 720, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":787 + /* "ssh2/session.pyx":737 * return b_hash * * def hostkey(self): # <<<<<<<<<<<<<< * """Get server host key for this session. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_77hostkey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_hostkey, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_71hostkey, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_hostkey, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[38])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_hostkey, __pyx_t_3) < 0) __PYX_ERR(0, 787, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_hostkey, __pyx_t_3) < 0) __PYX_ERR(0, 737, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":809 + /* "ssh2/session.pyx":759 * return key, key_type * * def knownhost_init(self): # <<<<<<<<<<<<<< * """Initialise a collection of known hosts for this session. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_79knownhost_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_knownhost_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_73knownhost_init, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_knownhost_init, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[39])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_knownhost_init, __pyx_t_3) < 0) __PYX_ERR(0, 809, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_knownhost_init, __pyx_t_3) < 0) __PYX_ERR(0, 759, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":821 + /* "ssh2/session.pyx":771 * return PyKnownHost(self, known_hosts) * * def keepalive_config(self, bint want_reply, unsigned interval): # <<<<<<<<<<<<<< * """ * Configure keep alive settings. */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_81keepalive_config, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_keepalive_config, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 821, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_75keepalive_config, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_keepalive_config, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[40])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_keepalive_config, __pyx_t_3) < 0) __PYX_ERR(0, 821, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_keepalive_config, __pyx_t_3) < 0) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":834 + /* "ssh2/session.pyx":784 * c_ssh2.libssh2_keepalive_config(self._session, want_reply, interval) * * def keepalive_send(self): # <<<<<<<<<<<<<< * """Send keepalive. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_83keepalive_send, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_keepalive_send, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_77keepalive_send, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_keepalive_send, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[41])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_keepalive_send, __pyx_t_3) < 0) __PYX_ERR(0, 834, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_keepalive_send, __pyx_t_3) < 0) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":848 + /* "ssh2/session.pyx":798 * return c_seconds * * def supported_algs(self, MethodType method_type): # <<<<<<<<<<<<<< * """Get supportd algorithms for method type. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_85supported_algs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_supported_algs, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_79supported_algs, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_supported_algs, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[42])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_supported_algs, __pyx_t_3) < 0) __PYX_ERR(0, 848, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_supported_algs, __pyx_t_3) < 0) __PYX_ERR(0, 798, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":873 + /* "ssh2/session.pyx":823 * return algs * * def methods(self, MethodType method_type): # <<<<<<<<<<<<<< * """Get currently active algorithms for method type. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_87methods, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_methods, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_81methods, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_methods, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_methods, __pyx_t_3) < 0) __PYX_ERR(0, 873, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_methods, __pyx_t_3) < 0) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "ssh2/session.pyx":888 + /* "ssh2/session.pyx":838 * return to_str(methods) * * def method_pref(self, MethodType method_type, prefs not None): # <<<<<<<<<<<<<< * """Set preference for session method. * */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_89method_pref, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_method_pref, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[47])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_83method_pref, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session_method_pref, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_method_pref, __pyx_t_3) < 0) __PYX_ERR(0, 888, __pyx_L1_error) + if (__Pyx_SetItemOnTypeDict(__pyx_mstate_global->__pyx_ptype_4ssh2_7session_Session, __pyx_mstate_global->__pyx_n_u_method_pref, __pyx_t_3) < 0) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "(tree fragment)":1 @@ -18288,7 +17473,7 @@ __Pyx_RefNannySetupContext("PyInit_session", 0); * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" * def __setstate_cython__(self, __pyx_state): */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_91__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[48])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_85__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[45])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18299,7 +17484,7 @@ __Pyx_RefNannySetupContext("PyInit_session", 0); * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" */ - __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_93__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[49])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_4ssh2_7session_7Session_87__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Session___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_ssh2_session, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[46])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -18444,15 +17629,12 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_Session_methods, sizeof(__pyx_k_Session_methods), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_methods */ {__pyx_k_Session_open_session, sizeof(__pyx_k_Session_open_session), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_open_session */ {__pyx_k_Session_publickey_init, sizeof(__pyx_k_Session_publickey_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_publickey_init */ - {__pyx_k_Session_scp_recv, sizeof(__pyx_k_Session_scp_recv), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_scp_recv */ {__pyx_k_Session_scp_recv2, sizeof(__pyx_k_Session_scp_recv2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_scp_recv2 */ - {__pyx_k_Session_scp_send, sizeof(__pyx_k_Session_scp_send), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_scp_send */ {__pyx_k_Session_scp_send64, sizeof(__pyx_k_Session_scp_send64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_scp_send64 */ {__pyx_k_Session_set_blocking, sizeof(__pyx_k_Session_set_blocking), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_set_blocking */ {__pyx_k_Session_set_last_error, sizeof(__pyx_k_Session_set_last_error), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_set_last_error */ {__pyx_k_Session_set_timeout, sizeof(__pyx_k_Session_set_timeout), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_set_timeout */ {__pyx_k_Session_sftp_init, sizeof(__pyx_k_Session_sftp_init), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_sftp_init */ - {__pyx_k_Session_startup, sizeof(__pyx_k_Session_startup), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_startup */ {__pyx_k_Session_supported_algs, sizeof(__pyx_k_Session_supported_algs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_supported_algs */ {__pyx_k_Session_userauth_authenticated, sizeof(__pyx_k_Session_userauth_authenticated), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_userauth_authenticated */ {__pyx_k_Session_userauth_hostbased_fromf, sizeof(__pyx_k_Session_userauth_hostbased_fromf), 0, 1, 1}, /* PyObject cname: __pyx_n_u_Session_userauth_hostbased_fromf */ @@ -18595,9 +17777,7 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce */ {__pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_cython */ {__pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 1, 1}, /* PyObject cname: __pyx_n_u_reduce_ex */ - {__pyx_k_scp_recv, sizeof(__pyx_k_scp_recv), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scp_recv */ {__pyx_k_scp_recv2, sizeof(__pyx_k_scp_recv2), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scp_recv2 */ - {__pyx_k_scp_send, sizeof(__pyx_k_scp_send), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scp_send */ {__pyx_k_scp_send64, sizeof(__pyx_k_scp_send64), 0, 1, 1}, /* PyObject cname: __pyx_n_u_scp_send64 */ {__pyx_k_seconds, sizeof(__pyx_k_seconds), 0, 1, 1}, /* PyObject cname: __pyx_n_u_seconds */ {__pyx_k_self, sizeof(__pyx_k_self), 0, 1, 1}, /* PyObject cname: __pyx_n_u_self */ @@ -18618,8 +17798,6 @@ static const __Pyx_StringTabEntry __pyx_string_tab[] = { {__pyx_k_sport, sizeof(__pyx_k_sport), 0, 1, 1}, /* PyObject cname: __pyx_n_u_sport */ {__pyx_k_ssh2_session, sizeof(__pyx_k_ssh2_session), 0, 1, 1}, /* PyObject cname: __pyx_n_u_ssh2_session */ {__pyx_k_ssh2_session_pyx, sizeof(__pyx_k_ssh2_session_pyx), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_ssh2_session_pyx */ - {__pyx_k_startup, sizeof(__pyx_k_startup), 0, 1, 1}, /* PyObject cname: __pyx_n_u_startup */ - {__pyx_k_statinfo, sizeof(__pyx_k_statinfo), 0, 1, 1}, /* PyObject cname: __pyx_n_u_statinfo */ {__pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 1, 0}, /* PyObject cname: __pyx_kp_u_stringsource */ {__pyx_k_supported_algs, sizeof(__pyx_k_supported_algs), 0, 1, 1}, /* PyObject cname: __pyx_n_u_supported_algs */ {__pyx_k_test, sizeof(__pyx_k_test), 0, 1, 1}, /* PyObject cname: __pyx_n_u_test */ @@ -18651,7 +17829,7 @@ static int __Pyx_InitCachedBuiltins(__pyx_mstatetype *__pyx_mstate) { __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_range); if (!__pyx_builtin_range) __PYX_ERR(0, 99, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 127, __pyx_L1_error) - __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_mstate->__pyx_n_u_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 555, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -18663,58 +17841,58 @@ static int __Pyx_InitCachedConstants(__pyx_mstatetype *__pyx_mstate) { CYTHON_UNUSED_VAR(__pyx_mstate); __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "ssh2/session.pyx":224 + /* "ssh2/session.pyx":218 * return auth.split(',') * * def userauth_publickey_fromfile(self, username not None, # <<<<<<<<<<<<<< * privatekey not None, * passphrase='', */ - __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__2, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(2, __pyx_mstate_global->__pyx_kp_u__2, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]); - /* "ssh2/session.pyx":269 + /* "ssh2/session.pyx":263 * return handle_error_codes(rc) * * def userauth_hostbased_fromfile(self, # <<<<<<<<<<<<<< * username not None, * privatekey not None, */ - __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[1] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(!__pyx_mstate_global->__pyx_tuple[1])) __PYX_ERR(0, 263, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[1]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[1]); - /* "ssh2/session.pyx":532 + /* "ssh2/session.pyx":526 * return rc * * def flag(self, FlagType flag, enabled=True): # <<<<<<<<<<<<<< * """ * Enable/Disable flag for session. */ - __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[2] = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_mstate_global->__pyx_tuple[2])) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[2]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[2]); - /* "ssh2/session.pyx":583 + /* "ssh2/session.pyx":577 * return PyListener(listener, self) * * def forward_listen_ex(self, int queue_maxsize, host=None, int port=0): # <<<<<<<<<<<<<< * """ * Instruct the remote SSH server to begin listening for inbound */ - __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[3] = PyTuple_Pack(2, Py_None, __pyx_mstate_global->__pyx_int_0); if (unlikely(!__pyx_mstate_global->__pyx_tuple[3])) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[3]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[3]); - /* "ssh2/session.pyx":632 + /* "ssh2/session.pyx":626 * return PySFTP(_sftp, self) * * def last_error(self, size_t msg_size=1024): # <<<<<<<<<<<<<< * """Retrieve last error message from libssh2, if any. * Returns empty string on no error message. */ - __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_1024); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_mstate_global->__pyx_tuple[4] = PyTuple_Pack(1, __pyx_mstate_global->__pyx_int_1024); if (unlikely(!__pyx_mstate_global->__pyx_tuple[4])) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[4]); __Pyx_RefNannyFinishContext(); @@ -18762,7 +17940,7 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { PyObject* tuple_dedup_map = PyDict_New(); if (unlikely(!tuple_dedup_map)) return -1; { - const __Pyx_PyCode_New_function_description descr = {0, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 345, 12}; + const __Pyx_PyCode_New_function_description descr = {0, 0, 1, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS), 339, 12}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_password, __pyx_mstate->__pyx_n_u_args}; __pyx_mstate_global->__pyx_codeobj_tab[0] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_passwd, __pyx_k_1_1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[0])) goto bad; } @@ -18797,219 +17975,204 @@ static int __Pyx_CreateCodeObjects(__pyx_mstatetype *__pyx_mstate) { __pyx_mstate_global->__pyx_codeobj_tab[6] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_handshake, __pyx_k_A_2_1_1_k_HA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[6])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 155, 36}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sock, __pyx_mstate->__pyx_n_u_sock_2, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_startup, __pyx_k_A_2_1_4AT_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 161, 19}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 155, 19}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_blocking}; - __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_blocking, __pyx_k_A_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[7] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_blocking, __pyx_k_A_q_Kq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[7])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 171, 28}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 165, 28}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_get_blocking, __pyx_k_A_4AT_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[8] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_get_blocking, __pyx_k_A_4AT_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[8])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 180, 18}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 174, 18}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout}; - __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_timeout, __pyx_k_A_at_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[9] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_timeout, __pyx_k_A_at_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[9])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 191, 24}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 185, 24}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_timeout}; - __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_get_timeout, __pyx_k_A_8_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[10] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_get_timeout, __pyx_k_A_8_Q_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[10])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 198, 28}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 192, 28}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_authenticated, __pyx_k_A_6at1_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[11] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_authenticated, __pyx_k_A_6at1_t1A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[11])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 207, 81}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 201, 81}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_username_len, __pyx_mstate->__pyx_n_u_auth, __pyx_mstate->__pyx_n_u_auth_2}; - __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_list, __pyx_k_A_q_3aq_0_K_6_A_vQa_t6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[12] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_list, __pyx_k_A_q_3aq_0_K_6_A_vQa_t6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[12])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 224, 123}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 14, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 218, 123}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_privatekey, __pyx_mstate->__pyx_n_u_passphrase, __pyx_mstate->__pyx_n_u_publickey, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_b_publickey, __pyx_mstate->__pyx_n_u_b_privatekey, __pyx_mstate->__pyx_n_u_b_passphrase, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_publickey_2, __pyx_mstate->__pyx_n_u_privatekey_2, __pyx_mstate->__pyx_n_u_passphrase_2}; - __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey_fromfile, __pyx_k_A_0_1_1_q_wa_1_K_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[13] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey_fromfile, __pyx_k_A_0_1_1_q_wa_1_K_m1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[13])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 248, 69}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 242, 69}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_pubkeydata, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_pubkeydata_2, __pyx_mstate->__pyx_n_u_pubkeydata_len}; - __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey, __pyx_k_A_q_S_2_K_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[14] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey, __pyx_k_A_q_S_2_K_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[14])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 269, 140}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 17, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 263, 140}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_privatekey, __pyx_mstate->__pyx_n_u_hostname, __pyx_mstate->__pyx_n_u_publickey, __pyx_mstate->__pyx_n_u_passphrase, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_b_publickey, __pyx_mstate->__pyx_n_u_b_privatekey, __pyx_mstate->__pyx_n_u_b_passphrase, __pyx_mstate->__pyx_n_u_b_hostname, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_publickey_2, __pyx_mstate->__pyx_n_u_privatekey_2, __pyx_mstate->__pyx_n_u_passphrase_2, __pyx_mstate->__pyx_n_u_hostname_2}; - __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_hostbased_fromfile, __pyx_k_A_0_0_1_1_q_q_wa_1_K, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[15] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_hostbased_fromfile, __pyx_k_A_0_0_1_1_q_q_wa_1_K, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[15])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 295, 134}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 15, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 289, 134}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_privatekeyfiledata, __pyx_mstate->__pyx_n_u_passphrase, __pyx_mstate->__pyx_n_u_publickeyfiledata, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_b_passphrase, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_passphrase_2, __pyx_mstate->__pyx_n_u_publickeyfiledata_2, __pyx_mstate->__pyx_n_u_privatekeyfiledata_2, __pyx_mstate->__pyx_n_u_username_len, __pyx_mstate->__pyx_n_u_privatekeydata_len, __pyx_mstate->__pyx_n_u_pubkeydata_len}; - __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey_frommemory, __pyx_k_A_31_1_q_Q_a_q_S_WA_S_Q_K_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[16] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_publickey_frommemory, __pyx_k_A_31_1_q_Q_a_q_S_WA_S_Q_K_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[16])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 319, 62}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 313, 62}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_password, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_b_password, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_password_2}; - __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_password, __pyx_k_A_Q_Q_1_K, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[17] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_password, __pyx_k_A_Q_Q_1_K, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[17])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 336, 21}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 330, 21}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_password, __pyx_mstate->__pyx_n_u_passwd, __pyx_mstate->__pyx_n_u_passwd}; - __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_keyboardinteractive, __pyx_k_A_t_9_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[18] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_keyboardinteractive, __pyx_k_A_t_9_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[18])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 349, 63}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 343, 63}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_callback, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_username_2}; - __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_keyboardinteractive_cal, __pyx_k_A6_Q_Q_9_aq_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[19] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_userauth_keyboardinteractive_cal, __pyx_k_A6_Q_Q_9_aq_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[19])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 385, 29}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 379, 29}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_agent}; - __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_agent_init, __pyx_k_A_Jat1_wawa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[20] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_agent_init, __pyx_k_A_Jat1_wawa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[20])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 395, 57}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 389, 57}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_username, __pyx_mstate->__pyx_n_u_b_username, __pyx_mstate->__pyx_n_u_username_2, __pyx_mstate->__pyx_n_u_agent, __pyx_mstate->__pyx_n_u_identity, __pyx_mstate->__pyx_n_u_prev}; - __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_agent_auth, __pyx_k_A4_q_1_8_4A_4q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[21] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_agent_auth, __pyx_k_A4_q_1_8_4A_4q_a, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[21])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 430, 58}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 424, 58}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_open_session, __pyx_k_A_9_A_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[22] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_open_session, __pyx_k_A_9_A_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[22])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 444, 94}; + const __Pyx_PyCode_New_function_description descr = {5, 0, 0, 10, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 438, 94}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_shost, __pyx_mstate->__pyx_n_u_sport, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_b_host, __pyx_mstate->__pyx_n_u_b_shost, __pyx_mstate->__pyx_n_u_host_2, __pyx_mstate->__pyx_n_u_shost_2}; - __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_tcpip_ex, __pyx_k_A_HAQ_XQa_1_A_A_KwfHA_83a_W_Gq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[23] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_tcpip_ex, __pyx_k_A_HAQ_XQa_1_A_A_KwfHA_83a_W_Gq_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[23])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 459, 76}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 453, 76}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_channel, __pyx_mstate->__pyx_n_u_b_host, __pyx_mstate->__pyx_n_u_host_2}; - __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_tcpip, __pyx_k_A_HAQ_1_9_Kwa_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[24] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_tcpip, __pyx_k_A_HAQ_1_9_Kwa_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[24])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 476, 94}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 470, 94}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_socket_path, __pyx_mstate->__pyx_n_u_shost, __pyx_mstate->__pyx_n_u_sport, __pyx_mstate->__pyx_n_u_b_socket_path, __pyx_mstate->__pyx_n_u_b_shost, __pyx_mstate->__pyx_n_u_c_socket_path, __pyx_mstate->__pyx_n_u_c_shost, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_streamlocal_ex, __pyx_k_A_81A_XQa_1_B_4_Raajjk_83a_W_Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[25] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_direct_streamlocal_ex, __pyx_k_A_81A_XQa_1_B_4_Raajjk_83a_W_Gq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[25])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 505, 25}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 499, 25}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_block_directions, __pyx_k_A_8_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[26] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_block_directions, __pyx_k_A_8_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[26])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 532, 64}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 526, 64}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_flag, __pyx_mstate->__pyx_n_u_enabled, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_value}; - __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_flag, __pyx_k_6_uD_a_AQ_AT_D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[27] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_flag, __pyx_k_6_uD_a_AQ_AT_D_1, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[27])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 567, 60}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 561, 60}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_listener}; - __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_forward_listen, __pyx_k_A_A_Kq_9Cq_W_Gq_A_z_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[28] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_forward_listen, __pyx_k_A_A_Kq_9Cq_W_Gq_A_z_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[28])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 583, 118}; + const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 8, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 577, 118}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_queue_maxsize, __pyx_mstate->__pyx_n_u_host, __pyx_mstate->__pyx_n_u_port, __pyx_mstate->__pyx_n_u_listener, __pyx_mstate->__pyx_n_u_b_host, __pyx_mstate->__pyx_n_u_host_2, __pyx_mstate->__pyx_n_u_bound_port}; - __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_forward_listen_ex, __pyx_k_8_q_HE_Jhaq_1_7_A_a_q_KwfA_9Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[29] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_forward_listen_ex, __pyx_k_8_q_HE_Jhaq_1_7_A_a_q_KwfA_9Cq, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[29])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 619, 57}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 613, 57}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_sftp}; - __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_sftp_init, __pyx_k_A_AT_6_A_W_Gq_A_vQgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[30] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_sftp_init, __pyx_k_A_AT_6_A_W_Gq_A_vQgQ, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[30])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 632, 92}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 626, 92}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_msg_size, __pyx_mstate->__pyx_n_u_error_msg, __pyx_mstate->__pyx_n_u_msg, __pyx_mstate->__pyx_n_u_errmsg_len}; - __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_last_error, __pyx_k_a_q_Rq_Q_Kq_A_A_j_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[31] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_last_error, __pyx_k_a_q_Rq_Q_Kq_A_A_j_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[31])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 652, 25}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 646, 25}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_last_errno, __pyx_k_A_2_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[32] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_last_errno, __pyx_k_A_2_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[32])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 664, 41}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 658, 41}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_errcode, __pyx_mstate->__pyx_n_u_errmsg, __pyx_mstate->__pyx_n_u_b_errmsg, __pyx_mstate->__pyx_n_u_errmsg_2, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_last_error, __pyx_k_A_haq_Q_6a_Ky_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[33] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_set_last_error, __pyx_k_A_haq_Q_6a_Ky_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[33])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 673, 87}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_b_path, __pyx_mstate->__pyx_n_u_path_2, __pyx_mstate->__pyx_n_u_statinfo, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_recv, __pyx_k_A_HAQ_1_Q_Kwha_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 695, 87}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 667, 87}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_fileinfo, __pyx_mstate->__pyx_n_u_b_path, __pyx_mstate->__pyx_n_u_path_2, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_recv2, __pyx_k_A_HAQ_1_a_Kwha_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; - } - { - const __Pyx_PyCode_New_function_description descr = {4, 0, 0, 7, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 715, 78}; - PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_mode, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_b_path, __pyx_mstate->__pyx_n_u_path_2, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_send, __pyx_k_A_HAQ_1_Q_KwfA_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[34] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_recv2, __pyx_k_A_HAQ_1_a_Kwha_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[34])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 737, 82}; + const __Pyx_PyCode_New_function_description descr = {6, 0, 0, 9, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 687, 82}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_path, __pyx_mstate->__pyx_n_u_mode, __pyx_mstate->__pyx_n_u_size, __pyx_mstate->__pyx_n_u_mtime, __pyx_mstate->__pyx_n_u_atime, __pyx_mstate->__pyx_n_u_b_path, __pyx_mstate->__pyx_n_u_path_2, __pyx_mstate->__pyx_n_u_channel}; - __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_send64, __pyx_k_A_HAQ_1_q_KwfF_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[35] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_scp_send64, __pyx_k_A_HAQ_1_q_KwfF_83a_W_Gq_A_y, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[35])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 760, 45}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 710, 45}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pkey}; - __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_publickey_init, __pyx_k_A_1_a_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[36] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_publickey_init, __pyx_k_A_1_a_6_A, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[36])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 770, 43}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 720, 43}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_hash_type, __pyx_mstate->__pyx_n_u_hash, __pyx_mstate->__pyx_n_u_b_hash}; - __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_hostkey_hash, __pyx_k_A_q_Kq_6_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[37] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_hostkey_hash, __pyx_k_A_q_Kq_6_A_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[37])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 787, 79}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 5, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 737, 79}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_key, __pyx_mstate->__pyx_n_u_key_2, __pyx_mstate->__pyx_n_u_key_len, __pyx_mstate->__pyx_n_u_key_type}; - __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_hostkey, __pyx_k_A_a_A_1_Kq_5_1_Q_d_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[38] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_hostkey, __pyx_k_A_a_A_1_Kq_5_1_Q_d_A_uA, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[38])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 809, 45}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 759, 45}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_known_hosts}; - __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_knownhost_init, __pyx_k_A_7q_A_s_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[39] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_knownhost_init, __pyx_k_A_7q_A_s_6, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[39])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 821, 20}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 771, 20}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_want_reply, __pyx_mstate->__pyx_n_u_interval}; - __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_keepalive_config, __pyx_k_A_1D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[40] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_keepalive_config, __pyx_k_A_1D_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[40])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 834, 45}; + const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 4, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 784, 45}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_seconds, __pyx_mstate->__pyx_n_u_c_seconds, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_keepalive_send, __pyx_k_A_1_Q_at_aq_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[41] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_keepalive_send, __pyx_k_A_1_Q_at_aq_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[41])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 848, 106}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 798, 106}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method_type, __pyx_mstate->__pyx_n_u_c_algs, __pyx_mstate->__pyx_n_u_rc, __pyx_mstate->__pyx_n_u_algs, __pyx_mstate->__pyx_n_u_i}; - __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_supported_algs, __pyx_k_A_6a_K_1_3b_Qa_1_1_1F_6_d_uAQ_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[42] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_supported_algs, __pyx_k_A_6a_K_1_3b_Qa_1_1_1F_6_d_uAQ_1D, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[42])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 873, 45}; + const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 3, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 823, 45}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method_type, __pyx_mstate->__pyx_n_u_methods}; - __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_methods, __pyx_k_A_4t1_4A_K_vQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[43] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_methods, __pyx_k_A_4t1_4A_K_vQa, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[43])) goto bad; } { - const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 888, 52}; + const __Pyx_PyCode_New_function_description descr = {3, 0, 0, 6, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 838, 52}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_method_type, __pyx_mstate->__pyx_n_u_prefs, __pyx_mstate->__pyx_n_u_b_prefs, __pyx_mstate->__pyx_n_u_c_prefs, __pyx_mstate->__pyx_n_u_rc}; - __pyx_mstate_global->__pyx_codeobj_tab[47] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_method_pref, __pyx_k_A_XQa_1_31_K_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[47])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[44] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_ssh2_session_pyx, __pyx_mstate->__pyx_n_u_method_pref, __pyx_k_A_XQa_1_31_K_1_q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[44])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {1, 0, 0, 1, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 1, 9}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self}; - __pyx_mstate_global->__pyx_codeobj_tab[48] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[48])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[45] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_reduce_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[45])) goto bad; } { const __Pyx_PyCode_New_function_description descr = {2, 0, 0, 2, (unsigned int)(CO_OPTIMIZED|CO_NEWLOCALS), 3, 9}; PyObject* const varnames[] = {__pyx_mstate->__pyx_n_u_self, __pyx_mstate->__pyx_n_u_pyx_state}; - __pyx_mstate_global->__pyx_codeobj_tab[49] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[49])) goto bad; + __pyx_mstate_global->__pyx_codeobj_tab[46] = __Pyx_PyCode_New(descr, varnames, __pyx_mstate->__pyx_kp_u_stringsource, __pyx_mstate->__pyx_n_u_setstate_cython, __pyx_k_Q, tuple_dedup_map); if (unlikely(!__pyx_mstate_global->__pyx_codeobj_tab[46])) goto bad; } Py_DECREF(tuple_dedup_map); return 0; diff --git a/ssh2/session.pyx b/ssh2/session.pyx index 5cead79f..b7e50662 100644 --- a/ssh2/session.pyx +++ b/ssh2/session.pyx @@ -152,12 +152,6 @@ cdef class Session: self.sock = sock return handle_error_codes(rc) - def startup(self, sock): - """Deprecated - use self.handshake""" - cdef int _sock = PyObject_AsFileDescriptor(sock) - cdef int rc = c_ssh2.libssh2_session_startup(self._session, _sock) - return handle_error_codes(rc) - def set_blocking(self, bint blocking): """Set session blocking mode on/off. @@ -670,28 +664,6 @@ cdef class Session: self._session, errcode, _errmsg) return rc - def scp_recv(self, path not None): - """Receive file via SCP. - - Deprecated in favour or recv2 (requires libssh2 >= 1.7). - - :param path: File path to receive. - :type path: str - - :rtype: tuple(:py:class:`ssh2.channel.Channel`, - :py:class:`ssh2.statinfo.StatInfo`) or None""" - cdef bytes b_path = to_bytes(path) - cdef char *_path = b_path - cdef StatInfo statinfo = StatInfo() - cdef c_ssh2.LIBSSH2_CHANNEL *channel - with nogil: - channel = c_ssh2.libssh2_scp_recv( - self._session, _path, statinfo._stat) - if channel is NULL: - return handle_error_codes(c_ssh2.libssh2_session_last_errno( - self._session)) - return PyChannel(channel, self), statinfo - def scp_recv2(self, path not None): """Receive file via SCP. @@ -712,28 +684,6 @@ cdef class Session: self._session)) return PyChannel(channel, self), fileinfo - def scp_send(self, path not None, int mode, size_t size): - """Deprecated in favour of scp_send64. Send file via SCP. - - :param path: Local file path to send. - :type path: str - :param mode: File mode. - :type mode: int - :param size: size of file - :type size: int - - :rtype: :py:class:`ssh2.channel.Channel`""" - cdef bytes b_path = to_bytes(path) - cdef char *_path = b_path - cdef c_ssh2.LIBSSH2_CHANNEL *channel - with nogil: - channel = c_ssh2.libssh2_scp_send( - self._session, _path, mode, size) - if channel is NULL: - return handle_error_codes(c_ssh2.libssh2_session_last_errno( - self._session)) - return PyChannel(channel, self) - def scp_send64(self, path not None, int mode, c_ssh2.libssh2_uint64_t size, time_t mtime, time_t atime): """Send file via SCP.