From 5827280f6a7f4b5913164ea1d73e516c72e046cc Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 20:13:40 +0100 Subject: [PATCH 01/50] Updated OSX build --- .circleci/config.yml | 58 ++++++++++++++++++++++++++++---------------- _setup_libssh.py | 2 +- ci/pyenv-wheel.sh | 44 +++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 22 deletions(-) create mode 100755 ci/pyenv-wheel.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index b32dedd5..3fed4ffc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -39,20 +39,35 @@ jobs: cd dist; pip install *; cd .. name: Test osx: + parameters: + pyenv_ver: + type: string + default: "3.8.5" + xcode_ver: + type: string + default: "11.6.0" macos: - xcode: 11.6.0 + xcode: << parameters.xcode_ver >> environment: HOMEBREW_NO_AUTO_UPDATE: 1 - PYENV: 3.6.11 - SYSTEM_LIBSSH: 1 + # PYENV: 3.6.11 + PYENV: << parameters.pyenv_ver >> + # SYSTEM_LIBSSH: 1 steps: - checkout - run: name: deps command: | - brew install cmake git-lfs + brew install cmake git-lfs krb5 pip install twine which twine + - run: + name: Build Wheel + command: ./ci/pyenv-wheel.sh + - run: + name: Upload Wheel + command: | + twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/* manylinux: machine: image: ubuntu-1604:201903-01 @@ -96,24 +111,25 @@ workflows: version: 2.1 main: jobs: - - python_test: - matrix: - parameters: - python_ver: - - "3.6" - - "3.7" - - "3.8" - filters: - tags: - ignore: /.*/ - - manylinux: + # - python_test: + # matrix: + # parameters: + # python_ver: + # - "3.6" + # - "3.7" + # - "3.8" + # filters: + # tags: + # ignore: /.*/ + # - manylinux: + # context: Docker + # filters: + # tags: + # only: /.*/ + # branches: + # ignore: /.*/ + - osx: context: Docker filters: tags: only: /.*/ - branches: - ignore: /.*/ - # - osx - # filters: - # tags: - # only: /.*/ diff --git a/_setup_libssh.py b/_setup_libssh.py index af40634d..928f53c5 100644 --- a/_setup_libssh.py +++ b/_setup_libssh.py @@ -18,7 +18,7 @@ def build_ssh(): os.mkdir('src') os.chdir('src') - check_call('cmake -DCMAKE_BUILD_TYPE=Release ../libssh', + check_call('cmake -DCMAKE_BUILD_TYPE=Release -DWITH_GSS_API=ON ../libssh', shell=True, env=os.environ) check_call(['make', '-j%s' % (cpu_count(),)]) os.chdir('..') diff --git a/ci/pyenv-wheel.sh b/ci/pyenv-wheel.sh new file mode 100755 index 00000000..e23cbfef --- /dev/null +++ b/ci/pyenv-wheel.sh @@ -0,0 +1,44 @@ +#!/bin/bash -xe + +brew install pyenv || brew outdated pyenv || brew upgrade pyenv + +export PYENV_VERSION=${PYENV:-3.6.4} +if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then + pyenv install $PYENV_VERSION +fi +pyenv global $PYENV_VERSION +pyenv versions + +set +x +eval "$(pyenv init -)" +set -x + +which python +python -m pip install -U virtualenv +python -m virtualenv -p "$(which python)" venv + +set +x +source venv/bin/activate +set -x + +python -V +python -m pip install -U setuptools pip +pip install -U delocate wheel +pip wheel . +cp /usr/local/lib/libssh2* . +delocate-listdeps --all *.whl +delocate-wheel -v *.whl +delocate-listdeps --all *.whl + +ls -l *.whl +rm -f *.dylib +pip install -v *.whl +pwd; mkdir -p temp; cd temp; pwd +python -c "from ssh2.session import Session; Session()" && echo "Import successfull" +cd ..; pwd +set +x +deactivate +set -x + +mv -f *.whl wheels/ +ls -lh wheels From 4cf15689495782022bd9f8da8352584d3b370e5d Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:01:15 +0100 Subject: [PATCH 02/50] Added version info to init --- ssh/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssh/__init__.py b/ssh/__init__.py index e69de29b..e44e9d15 100644 --- a/ssh/__init__.py +++ b/ssh/__init__.py @@ -0,0 +1,3 @@ +from ._version import get_versions +__version__ = get_versions()['version'] +del get_versions From 13d8c20d142645722d82113bcad8867c08e2d03d Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:10:10 +0100 Subject: [PATCH 03/50] Updated manifest file --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 9ca4c65b..5254337e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,6 +3,7 @@ include versioneer.py include ssh/_version.py exclude .travis.yml include LICENSE +include COPYING include ssh/*.pyx include ssh/*.pxd recursive-include libssh * From 9e5175dc2879159cf83237870d7b1c260d03a95b Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:14:35 +0100 Subject: [PATCH 04/50] Updated macos cfg --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fed4ffc..da8e5233 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 # PYENV: 3.6.11 PYENV: << parameters.pyenv_ver >> - # SYSTEM_LIBSSH: 1 + SYSTEM_LIBSSH: 1 steps: - checkout - run: From b828ade9da4400365e9853ce366e3f78ecb72850 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:36:18 +0100 Subject: [PATCH 05/50] Update cfg --- .circleci/config.yml | 2 +- ci/appveyor/build_ssh.bat | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da8e5233..3fed4ffc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,7 +52,7 @@ jobs: HOMEBREW_NO_AUTO_UPDATE: 1 # PYENV: 3.6.11 PYENV: << parameters.pyenv_ver >> - SYSTEM_LIBSSH: 1 + # SYSTEM_LIBSSH: 1 steps: - checkout - run: diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 32028aae..90d27c66 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -1,7 +1,5 @@ IF "%PYTHON_VERSION%" == "2.7" (exit 0) -cp ci\appveyor\include\stdint.h libssh/include - mkdir src cd src @@ -35,8 +33,8 @@ cmake --build . --config Release cd .. ls -ls src/src/Release -cp src/src/static/Release/ssh.lib %PYTHON%/libs/ -# cp src/src/Release/ssh.dll ssh/ +ls src/lib/Release +cp src/lib/static/Release/ssh.lib %PYTHON%/libs/ +# cp src/lib/Release/ssh.dll ssh/ ls %PYTHON%/libs/ ls ssh/ From 53bc489b54116a8110e7d473a25e361e944caa52 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:42:28 +0100 Subject: [PATCH 06/50] Updated appveyor cfg --- .appveyor.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index e0c6c837..b838c43b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -60,8 +60,8 @@ install: # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture - - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - - "%CMD_IN_ENV% pip install -U wheel setuptools twine" + # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" + - "%CMD_IN_ENV% pip install -U wheel setuptools twine cython" # .c files need to be generated on Windows to handle platform # specific code. @@ -69,15 +69,13 @@ install: # do not cause a version change. - python ci/appveyor/fix_version.py . - mv -f .git .git.bak - - IF NOT "%PYTHON_VERSION%" == "2.7" ( - 7z x ci\appveyor\zlib1211.zip - appveyor DownloadFile https://indy.fulgan.com/SSL/Archive/Experimental/openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x ci\appveyor\kfw-4.1-src.zip - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ) + - 7z x ci\appveyor\zlib1211.zip + - appveyor DownloadFile https://indy.fulgan.com/SSL/Archive/Experimental/openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip + - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip + - 7z x ci\appveyor\kfw-4.1-src.zip + - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip + - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ + - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls From ffffdc73a4a0e29ad65915df9a6ad229623002b9 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:44:36 +0100 Subject: [PATCH 07/50] Updated cfg --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fed4ffc..2fd3c69f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,8 +58,8 @@ jobs: - run: name: deps command: | - brew install cmake git-lfs krb5 - pip install twine + brew install cmake git-lfs krb5 twine + # pip install twine which twine - run: name: Build Wheel From c69fd5e2ad6a74a81746968a5bcc51bae22b8799 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 21:59:17 +0100 Subject: [PATCH 08/50] Updated cfg --- .appveyor.yml | 12 +++++++----- .circleci/config.yml | 4 ++-- ci/appveyor/build_openssl.bat | 8 ++++++++ 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100755 ci/appveyor/build_openssl.bat diff --git a/.appveyor.yml b/.appveyor.yml index b838c43b..d26cd978 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,7 +5,7 @@ environment: # See: http://stackoverflow.com/a/13751649/163740 # CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd" PYTHONUNBUFFERED: 1 - OPENSSL_VER: 1.1.0h + OPENSSL_VER: 1.1.1g SYSTEM_LIBSSH: 1 PYPI_USER: secure: 2m0jy6JD/R9RExIosOT6YA== @@ -70,16 +70,18 @@ install: - python ci/appveyor/fix_version.py . - mv -f .git .git.bak - 7z x ci\appveyor\zlib1211.zip - - appveyor DownloadFile https://indy.fulgan.com/SSL/Archive/Experimental/openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip + - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x ci\appveyor\kfw-4.1-src.zip - - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip - - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ - - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ + - 7z x openssl-%OPENSSL_VER%.tar.gz + # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip + # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ + # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls build_script: + - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" diff --git a/.circleci/config.yml b/.circleci/config.yml index 2fd3c69f..e0751fab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,8 +58,8 @@ jobs: - run: name: deps command: | - brew install cmake git-lfs krb5 twine - # pip install twine + brew install cmake git-lfs krb5 python + pip3 install twine which twine - run: name: Build Wheel diff --git a/ci/appveyor/build_openssl.bat b/ci/appveyor/build_openssl.bat new file mode 100755 index 00000000..47c8e310 --- /dev/null +++ b/ci/appveyor/build_openssl.bat @@ -0,0 +1,8 @@ +cd "openssl-%OPENSSL_VER%" + +perl Configure VC-WIN64A --no-shared +nmake +dumpbin /headers libcrypto-1_1x64.dll +ls libcrypto* +cp libcrypto* ../ +cd .. From 795ed359d0cdbf36514defe94239af43feabbcd7 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:03:54 +0100 Subject: [PATCH 09/50] Updated cfg --- .appveyor.yml | 2 +- .circleci/config.yml | 2 +- ci/pyenv-wheel.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index d26cd978..77b074b7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -72,7 +72,7 @@ install: - 7z x ci\appveyor\zlib1211.zip - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - - 7z x ci\appveyor\kfw-4.1-src.zip + - 7z x kfw-4.1-src.zip - 7z x openssl-%OPENSSL_VER%.tar.gz # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ diff --git a/.circleci/config.yml b/.circleci/config.yml index e0751fab..57191592 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: parameters: pyenv_ver: type: string - default: "3.8.5" + default: "3.8.1" xcode_ver: type: string default: "11.6.0" diff --git a/ci/pyenv-wheel.sh b/ci/pyenv-wheel.sh index e23cbfef..0b7a7475 100755 --- a/ci/pyenv-wheel.sh +++ b/ci/pyenv-wheel.sh @@ -1,6 +1,7 @@ #!/bin/bash -xe brew install pyenv || brew outdated pyenv || brew upgrade pyenv +pyenv install --list export PYENV_VERSION=${PYENV:-3.6.4} if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then From 505ac24d78219a048ac2fa762f928de5efc3c799 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:22:13 +0100 Subject: [PATCH 10/50] Updated cfg --- .appveyor.yml | 7 +- .circleci/config.yml | 2 +- ci/appveyor/copy_openssl_pys.py | 55 +++++++++++ ci/appveyor/rebuild_openssl_vs2015.cmd | 126 +++++++++++++++++++++++++ ci/pyenv-wheel.sh | 4 +- 5 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 ci/appveyor/copy_openssl_pys.py create mode 100755 ci/appveyor/rebuild_openssl_vs2015.cmd diff --git a/.appveyor.yml b/.appveyor.yml index 77b074b7..872a2b61 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -73,7 +73,9 @@ install: - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip - - 7z x openssl-%OPENSSL_VER%.tar.gz + # - 7z e openssl-%OPENSSL_VER%.tar.gz + # - ps: ls openssl-%OPENSSL_VER% + - SUBST T: %APPVEYOR_BUILD_FOLDER% # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ @@ -81,7 +83,8 @@ install: - ps: ls build_script: - - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" + # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" + - ci\\appveyor\\rebuild_openssl_vs2015.cmd - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" diff --git a/.circleci/config.yml b/.circleci/config.yml index 57191592..367f2771 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,7 +42,7 @@ jobs: parameters: pyenv_ver: type: string - default: "3.8.1" + default: "3.8.3" xcode_ver: type: string default: "11.6.0" diff --git a/ci/appveyor/copy_openssl_pys.py b/ci/appveyor/copy_openssl_pys.py new file mode 100644 index 00000000..aa2a42e7 --- /dev/null +++ b/ci/appveyor/copy_openssl_pys.py @@ -0,0 +1,55 @@ +#! -*- Encoding: utf-8 -*- + +import os +import sys +import shutil +import re + +def extension(filename): + k = filename.rfind(".") + if k > 0: + return filename[k:].lower() + +def change_extension(filename, new_extension): + k = filename.rfind(".") + if k > 0: + return filename[:k] + new_extension + + return filename + new_extension + +def ensure_files(target, source): + try: + print("%r => %r" % (source, target, )) + for filename in os.listdir(target): + if extension(filename) in (".dll", ".exe", ): + source_path = os.path.join(source, change_extension(filename, ".pdb")) + if os.path.exists(source_path): + target_path = os.path.join(target, change_extension(filename, ".pdb")) + print("copy %r => %r" % (source_path, target_path, )) + shutil.copy2(source_path, target_path) + except: + pass + +def main(openssl_version): + for vs in ("vs2010", "vs2013", "vs2015"): + for architecture in ("win32", "win64"): + bitness = "32bit" + if architecture == "win64": + bitness = "64bit" + + for build in ("release", "debug"): + target_name = "t:\\openssl-%s-%s-%s-%s" % (openssl_version, bitness, build, vs, ) + build_name = "" + if build == "debug": + build_name = ".dbg" + source_name = "t:\\openssl-src-%s-%s\\out32dll%s" % (architecture, vs, build_name, ) + ensure_files(os.path.join(target_name, "bin"), source_name) + ensure_files(os.path.join(target_name, "lib\\engines"), source_name) + +if __name__ == "__main__": + #main("1.0.0m") + for filename in os.listdir("."): + if filename.endswith(".tar.gz"): + if filename.startswith("openssl-"): + main(filename[8:-7]) + \ No newline at end of file diff --git a/ci/appveyor/rebuild_openssl_vs2015.cmd b/ci/appveyor/rebuild_openssl_vs2015.cmd new file mode 100755 index 00000000..6b6064e1 --- /dev/null +++ b/ci/appveyor/rebuild_openssl_vs2015.cmd @@ -0,0 +1,126 @@ +@echo off + +setlocal + +where /q perl +IF ERRORLEVEL 1 ( + ECHO Perl cannot be found. Please ensure it is installed and placed in your PATH. + PAUSE + EXIT /B +) + +where /q nasm +IF ERRORLEVEL 1 ( + ECHO nasm cannot be found. Please ensure it is installed and placed in your PATH. + PAUSE + EXIT /B +) + + +T: +set OPENSSL_VERSION="%OPENSSL_VER%" +set SEVENZIP="C:\Program Files\7-Zip\7z.exe" +set VS2015="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" +set VS2015_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" + + +REM Remove openssl source directories +IF NOT EXIST "T:\openssl-src-win32" GOTO NO_WIN32_SOURCE +DEL "T:\openssl-src-win32" /Q /F /S +RMDIR /S /Q "T:\openssl-src-win32" +:NO_WIN32_SOURCE + +IF NOT EXIST "T:\openssl-src-win64" GOTO NO_WIN64_SOURCE +DEL "T:\openssl-src-win64" /Q /F /S +RMDIR /S /Q "T:\openssl-src-win64" +:NO_WIN64_SOURCE + +IF NOT EXIST "T:\openssl-%OPENSSL_VERSION%" GOTO NO_OPENSSL_SOURCE +DEL "T:\openssl-%OPENSSL_VERSION%" /Q /F /S +RMDIR /S /Q "T:\openssl-%OPENSSL_VERSION%" +:NO_OPENSSL_SOURCE + +del openssl-%OPENSSL_VERSION%.tar +%SEVENZIP% e openssl-%OPENSSL_VERSION%.tar.gz +%SEVENZIP% x openssl-%OPENSSL_VERSION%.tar +ren openssl-%OPENSSL_VERSION% openssl-src-win32-VS2015 +%SEVENZIP% x openssl-%OPENSSL_VERSION%.tar +ren openssl-%OPENSSL_VERSION% openssl-src-win64-VS2015 + +CALL %VS2015% + +cd \openssl-src-win32-VS2015 +perl Configure VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 +nmake +nmake test +nmake install + +perl Configure debug-VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 +nmake +nmake test +nmake install + +perl Configure VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 +nmake +nmake test +nmake install + +perl Configure debug-VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 +nmake +nmake test +nmake install + +CALL %VS2015_AMD64% + +cd \openssl-src-win64-VS2015 +perl Configure VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 +nmake +nmake test +nmake install + +perl Configure debug-VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 +nmake +nmake test +nmake install + +cd \openssl-src-win64-VS2015 +perl Configure VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 +nmake +nmake test +nmake install + +perl Configure debug-VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 +nmake +nmake test +nmake install + +cd \ +python copy_openssl_pys.py + +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015\* +%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015\* + +DEL openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 /Q /F /S +DEL openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 /Q /F /S + +RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 +RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 + diff --git a/ci/pyenv-wheel.sh b/ci/pyenv-wheel.sh index 0b7a7475..47ba5024 100755 --- a/ci/pyenv-wheel.sh +++ b/ci/pyenv-wheel.sh @@ -26,7 +26,7 @@ python -V python -m pip install -U setuptools pip pip install -U delocate wheel pip wheel . -cp /usr/local/lib/libssh2* . +cp /usr/local/lib/libssh* . delocate-listdeps --all *.whl delocate-wheel -v *.whl delocate-listdeps --all *.whl @@ -35,7 +35,7 @@ ls -l *.whl rm -f *.dylib pip install -v *.whl pwd; mkdir -p temp; cd temp; pwd -python -c "from ssh2.session import Session; Session()" && echo "Import successfull" +python -c "from ssh.session import Session; Session()" && echo "Import successfull" cd ..; pwd set +x deactivate From 9d0f108fc779c6d3d7af528b80b57758d58b83a4 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:29:51 +0100 Subject: [PATCH 11/50] Updated cfg --- .appveyor.yml | 2 +- .circleci/config.yml | 6 ++++-- ci/osx-wheel.sh | 31 +++++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100755 ci/osx-wheel.sh diff --git a/.appveyor.yml b/.appveyor.yml index 872a2b61..5ad90f52 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,7 @@ install: - 7z x kfw-4.1-src.zip # - 7z e openssl-%OPENSSL_VER%.tar.gz # - ps: ls openssl-%OPENSSL_VER% - - SUBST T: %APPVEYOR_BUILD_FOLDER% + - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ diff --git a/.circleci/config.yml b/.circleci/config.yml index 367f2771..3ac86904 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -58,12 +58,14 @@ jobs: - run: name: deps command: | - brew install cmake git-lfs krb5 python + brew install cmake git-lfs krb5 python libssh pip3 install twine which twine - run: name: Build Wheel - command: ./ci/pyenv-wheel.sh + command: | + ./ci/osx-wheel.sh + # ./ci/pyenv-wheel.sh - run: name: Upload Wheel command: | diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh new file mode 100755 index 00000000..9fd49221 --- /dev/null +++ b/ci/osx-wheel.sh @@ -0,0 +1,31 @@ +#!/bin/bash -xe + +python -m pip install -U virtualenv +python -m virtualenv -p "$(which python)" venv + +set +x +source venv/bin/activate +set -x + +python -V +python -m pip install -U setuptools pip +pip install -U delocate wheel +pip wheel . +ls -lhtr /usr/local/lib/ +# cp /usr/local/lib/libssh* . +delocate-listdeps --all *.whl +delocate-wheel -v *.whl +delocate-listdeps --all *.whl + +ls -l *.whl +rm -f *.dylib +pip install -v *.whl +pwd; mkdir -p temp; cd temp; pwd +python -c "from ssh.session import Session; Session()" && echo "Import successfull" +cd ..; pwd +set +x +deactivate +set -x + +mv -f *.whl wheels/ +ls -lh wheels From 6323ea6932e0efcc34b09c1b7284b2a20f485659 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:32:42 +0100 Subject: [PATCH 12/50] Updated cfg --- .appveyor.yml | 2 +- ci/osx-wheel.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5ad90f52..edad1903 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,7 @@ install: - 7z x kfw-4.1-src.zip # - 7z e openssl-%OPENSSL_VER%.tar.gz # - ps: ls openssl-%OPENSSL_VER% - - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% + # - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 9fd49221..62b904f9 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -1,6 +1,6 @@ #!/bin/bash -xe -python -m pip install -U virtualenv +pip3 install -U virtualenv python -m virtualenv -p "$(which python)" venv set +x @@ -8,9 +8,9 @@ source venv/bin/activate set -x python -V -python -m pip install -U setuptools pip -pip install -U delocate wheel -pip wheel . +pip3 install -U setuptools pip +pip3 install -U delocate wheel +pip3 wheel . ls -lhtr /usr/local/lib/ # cp /usr/local/lib/libssh* . delocate-listdeps --all *.whl @@ -19,7 +19,7 @@ delocate-listdeps --all *.whl ls -l *.whl rm -f *.dylib -pip install -v *.whl +pip3 install -v *.whl pwd; mkdir -p temp; cd temp; pwd python -c "from ssh.session import Session; Session()" && echo "Import successfull" cd ..; pwd From 79a3d159922de2ef3affe4882a203017b388cab0 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:36:30 +0100 Subject: [PATCH 13/50] Updated cfg --- .appveyor.yml | 1 + ci/osx-wheel.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index edad1903..c3a5ff16 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -81,6 +81,7 @@ install: # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls + - cinst nasm build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 62b904f9..0a4a2de2 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -1,7 +1,7 @@ #!/bin/bash -xe pip3 install -U virtualenv -python -m virtualenv -p "$(which python)" venv +python3 -m virtualenv -p "$(which python3)" venv set +x source venv/bin/activate From 8749d53e16b717d6c12b66a8de22d35fbff5fb6f Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:44:20 +0100 Subject: [PATCH 14/50] Updated cfg --- .appveyor.yml | 1 + .circleci/config.yml | 2 +- ci/osx-wheel.sh | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index c3a5ff16..9a9434fa 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -82,6 +82,7 @@ install: - ps: ls ssh - ps: ls - cinst nasm + - refreshenv build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" diff --git a/.circleci/config.yml b/.circleci/config.yml index 3ac86904..859cf320 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,7 +69,7 @@ jobs: - run: name: Upload Wheel command: | - twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/* + twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD *.whl manylinux: machine: image: ubuntu-1604:201903-01 diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 0a4a2de2..9c3ab365 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -27,5 +27,4 @@ set +x deactivate set -x -mv -f *.whl wheels/ -ls -lh wheels +ls -lh *.whl From 9545ae02c058e046e07bb13d8658507af727d56b Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 22:58:46 +0100 Subject: [PATCH 15/50] Updated cfg --- .appveyor.yml | 13 ++++++++----- .circleci/config.yml | 4 +++- ci/osx-wheel.sh | 8 +++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 9a9434fa..3dde81b5 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -5,7 +5,7 @@ environment: # See: http://stackoverflow.com/a/13751649/163740 # CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd" PYTHONUNBUFFERED: 1 - OPENSSL_VER: 1.1.1g + OPENSSL_VER: 1.1.0c SYSTEM_LIBSSH: 1 PYPI_USER: secure: 2m0jy6JD/R9RExIosOT6YA== @@ -70,9 +70,12 @@ install: - python ci/appveyor/fix_version.py . - mv -f .git .git.bak - 7z x ci\appveyor\zlib1211.zip - - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz + # - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz + - appveyor DownloadFile http://www.p-nand-q.com/programming/windows/openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z + - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip + - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015\bin\*.dll ssh\ # - 7z e openssl-%OPENSSL_VER%.tar.gz # - ps: ls openssl-%OPENSSL_VER% # - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% @@ -81,12 +84,12 @@ install: # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls - - cinst nasm - - refreshenv + # - cinst nasm build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" - - ci\\appveyor\\rebuild_openssl_vs2015.cmd + # - refreshenv + # - "%CMD_IN_ENV% ci\\appveyor\\rebuild_openssl_vs2015.cmd" - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" diff --git a/.circleci/config.yml b/.circleci/config.yml index 859cf320..ac19f318 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,10 +66,12 @@ jobs: command: | ./ci/osx-wheel.sh # ./ci/pyenv-wheel.sh + - store_artifacts: + path: wheels - run: name: Upload Wheel command: | - twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD *.whl + twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/* manylinux: machine: image: ubuntu-1604:201903-01 diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 9c3ab365..4cc0570e 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -12,7 +12,7 @@ pip3 install -U setuptools pip pip3 install -U delocate wheel pip3 wheel . ls -lhtr /usr/local/lib/ -# cp /usr/local/lib/libssh* . +cp /usr/local/lib/libssh* . delocate-listdeps --all *.whl delocate-wheel -v *.whl delocate-listdeps --all *.whl @@ -21,10 +21,12 @@ ls -l *.whl rm -f *.dylib pip3 install -v *.whl pwd; mkdir -p temp; cd temp; pwd -python -c "from ssh.session import Session; Session()" && echo "Import successfull" +python3 -c "from ssh.session import Session; Session()" && echo "Import successfull" cd ..; pwd set +x deactivate set -x -ls -lh *.whl +mkdir -p wheels +mv *.whl wheels/ +ls -lh wheels From 452412bcd3dab21240a8fb78c4d7e4d9bcf1bafb Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:06:59 +0100 Subject: [PATCH 16/50] Updated cfgs. Removed debug code --- .appveyor.yml | 2 +- MANIFEST.in | 1 + ci/osx-wheel.sh | 4 +- ssh/channel.c | 1200 +++++++++++++------------------ ssh/channel.pyx | 1 - ssh/session.c | 1814 +++++++++++++++++++++-------------------------- ssh/session.pyx | 1 - 7 files changed, 1283 insertions(+), 1740 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3dde81b5..1ea3b52f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,7 @@ install: - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip - - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015\bin\*.dll ssh\ + - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ # - 7z e openssl-%OPENSSL_VER%.tar.gz # - ps: ls openssl-%OPENSSL_VER% # - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% diff --git a/MANIFEST.in b/MANIFEST.in index 5254337e..fbde741e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,6 +6,7 @@ include LICENSE include COPYING include ssh/*.pyx include ssh/*.pxd +include ssh/*.dylib recursive-include libssh * include ci/build_ssh.sh include _setup_libssh.py diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 4cc0570e..ef5dd71e 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -12,13 +12,13 @@ pip3 install -U setuptools pip pip3 install -U delocate wheel pip3 wheel . ls -lhtr /usr/local/lib/ -cp /usr/local/lib/libssh* . +cp /usr/local/lib/libssh* ssh/ delocate-listdeps --all *.whl delocate-wheel -v *.whl delocate-listdeps --all *.whl ls -l *.whl -rm -f *.dylib +rm -f ssh/*.dylib /usr/local/lib/libssh* pip3 install -v *.whl pwd; mkdir -p temp; cd temp; pwd python3 -c "from ssh.session import Session; Session()" && echo "Import successfull" diff --git a/ssh/channel.c b/ssh/channel.c index e6cfa187..be712b13 100644 --- a/ssh/channel.c +++ b/ssh/channel.c @@ -967,6 +967,14 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); +/* RaiseDoubleKeywords.proto */ +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); + +/* ParseKeywords.proto */ +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ + const char* function_name); + /* PyThreadStateGet.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; @@ -1003,19 +1011,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) #endif -/* WriteUnraisableException.proto */ -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil); - -/* RaiseDoubleKeywords.proto */ -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); - -/* ParseKeywords.proto */ -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\ - const char* function_name); - /* GetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) @@ -1158,13 +1153,6 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); static void __Pyx_AddTraceback(const char *funcname, int c_line, int py_line, const char *filename); -/* Print.proto */ -static int __Pyx_Print(PyObject*, PyObject *, int); -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -static PyObject* __pyx_print = 0; -static PyObject* __pyx_print_kwargs = 0; -#endif - /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); @@ -1177,9 +1165,6 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *); -/* PrintOne.proto */ -static int __Pyx_PrintOne(PyObject* stream, PyObject *o); - /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); @@ -1242,17 +1227,14 @@ static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_TypeError; static const char __pyx_k_[] = ""; static const char __pyx_k_col[] = "col"; -static const char __pyx_k_end[] = "end"; static const char __pyx_k_row[] = "row"; static const char __pyx_k_cols[] = "cols"; -static const char __pyx_k_file[] = "file"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_name[] = "name"; static const char __pyx_k_rows[] = "rows"; static const char __pyx_k_size[] = "size"; static const char __pyx_k_test[] = "__test__"; static const char __pyx_k_maxfd[] = "maxfd"; -static const char __pyx_k_print[] = "print"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_name_2[] = "__name__"; static const char __pyx_k_reduce[] = "__reduce__"; @@ -1275,7 +1257,6 @@ static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_outchannels[] = "outchannels"; static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; static const char __pyx_k_screen_number[] = "screen_number"; -static const char __pyx_k_Channel_dealloc[] = "Channel dealloc"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_single_connection[] = "single_connection"; static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; @@ -1283,7 +1264,6 @@ static const char __pyx_k_NotImplementedError[] = "NotImplementedError"; static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; static PyObject *__pyx_kp_b_; static PyObject *__pyx_n_s_Channel; -static PyObject *__pyx_kp_s_Channel_dealloc; static PyObject *__pyx_n_s_MemoryError; static PyObject *__pyx_n_s_NotImplementedError; static PyObject *__pyx_n_s_TypeError; @@ -1291,8 +1271,6 @@ static PyObject *__pyx_n_s_channels; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_col; static PyObject *__pyx_n_s_cols; -static PyObject *__pyx_n_s_end; -static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_is_stderr; static PyObject *__pyx_n_s_main; @@ -1301,7 +1279,6 @@ static PyObject *__pyx_n_s_name; static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_n_s_outchannels; -static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_readfds; static PyObject *__pyx_n_s_reduce; @@ -1426,7 +1403,7 @@ static int __pyx_pf_3ssh_7channel_7Channel___cinit__(struct __pyx_obj_3ssh_7chan * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._channel is not NULL: - * print("Channel dealloc") + * c_ssh.ssh_channel_free(self._channel) */ /* Python wrapper */ @@ -1443,17 +1420,14 @@ static void __pyx_pw_3ssh_7channel_7Channel_3__dealloc__(PyObject *__pyx_v_self) static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7channel_Channel *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "ssh/channel.pyx":31 * * def __dealloc__(self): * if self._channel is not NULL: # <<<<<<<<<<<<<< - * print("Channel dealloc") * c_ssh.ssh_channel_free(self._channel) + * self._channel = NULL */ __pyx_t_1 = ((__pyx_v_self->_channel != NULL) != 0); if (__pyx_t_1) { @@ -1461,23 +1435,14 @@ static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7 /* "ssh/channel.pyx":32 * def __dealloc__(self): * if self._channel is not NULL: - * print("Channel dealloc") # <<<<<<<<<<<<<< - * c_ssh.ssh_channel_free(self._channel) - * self._channel = NULL - */ - if (__Pyx_PrintOne(0, __pyx_kp_s_Channel_dealloc) < 0) __PYX_ERR(0, 32, __pyx_L1_error) - - /* "ssh/channel.pyx":33 - * if self._channel is not NULL: - * print("Channel dealloc") * c_ssh.ssh_channel_free(self._channel) # <<<<<<<<<<<<<< * self._channel = NULL * */ ssh_channel_free(__pyx_v_self->_channel); - /* "ssh/channel.pyx":34 - * print("Channel dealloc") + /* "ssh/channel.pyx":33 + * if self._channel is not NULL: * c_ssh.ssh_channel_free(self._channel) * self._channel = NULL # <<<<<<<<<<<<<< * @@ -1489,8 +1454,8 @@ static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7 * * def __dealloc__(self): * if self._channel is not NULL: # <<<<<<<<<<<<<< - * print("Channel dealloc") * c_ssh.ssh_channel_free(self._channel) + * self._channel = NULL */ } @@ -1499,18 +1464,14 @@ static void __pyx_pf_3ssh_7channel_7Channel_2__dealloc__(struct __pyx_obj_3ssh_7 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._channel is not NULL: - * print("Channel dealloc") + * c_ssh.ssh_channel_free(self._channel) */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("ssh.channel.Channel.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; __Pyx_RefNannyFinishContext(); } -/* "ssh/channel.pyx":37 +/* "ssh/channel.pyx":36 * * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): # <<<<<<<<<<<<<< @@ -1528,19 +1489,19 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr int __pyx_clineno = 0; __Pyx_RefNannySetupContext("from_ptr", 0); - /* "ssh/channel.pyx":38 + /* "ssh/channel.pyx":37 * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): * cdef Channel chan = Channel.__new__(Channel) # <<<<<<<<<<<<<< * chan._channel = _chan * chan.session = session */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_3ssh_7channel_Channel(((PyTypeObject *)__pyx_ptype_3ssh_7channel_Channel), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_3ssh_7channel_Channel(((PyTypeObject *)__pyx_ptype_3ssh_7channel_Channel), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_chan = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":39 + /* "ssh/channel.pyx":38 * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): * cdef Channel chan = Channel.__new__(Channel) * chan._channel = _chan # <<<<<<<<<<<<<< @@ -1549,7 +1510,7 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr */ __pyx_v_chan->_channel = __pyx_v__chan; - /* "ssh/channel.pyx":40 + /* "ssh/channel.pyx":39 * cdef Channel chan = Channel.__new__(Channel) * chan._channel = _chan * chan.session = session # <<<<<<<<<<<<<< @@ -1562,7 +1523,7 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr __Pyx_DECREF(((PyObject *)__pyx_v_chan->session)); __pyx_v_chan->session = __pyx_v_session; - /* "ssh/channel.pyx":41 + /* "ssh/channel.pyx":40 * chan._channel = _chan * chan.session = session * return chan # <<<<<<<<<<<<<< @@ -1574,7 +1535,7 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr __pyx_r = __pyx_v_chan; goto __pyx_L0; - /* "ssh/channel.pyx":37 + /* "ssh/channel.pyx":36 * * @staticmethod * cdef Channel from_ptr(c_ssh.ssh_channel _chan, Session session): # <<<<<<<<<<<<<< @@ -1594,7 +1555,7 @@ static struct __pyx_obj_3ssh_7channel_Channel *__pyx_f_3ssh_7channel_7Channel_fr return __pyx_r; } -/* "ssh/channel.pyx":43 +/* "ssh/channel.pyx":42 * return chan * * def close(self): # <<<<<<<<<<<<<< @@ -1628,7 +1589,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("close", 0); - /* "ssh/channel.pyx":45 + /* "ssh/channel.pyx":44 * def close(self): * cdef int rc * if self.closed: # <<<<<<<<<<<<<< @@ -1638,7 +1599,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_t_1 = (__pyx_v_self->closed != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":46 + /* "ssh/channel.pyx":45 * cdef int rc * if self.closed: * return 0 # <<<<<<<<<<<<<< @@ -1650,7 +1611,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_r = __pyx_int_0; goto __pyx_L0; - /* "ssh/channel.pyx":45 + /* "ssh/channel.pyx":44 * def close(self): * cdef int rc * if self.closed: # <<<<<<<<<<<<<< @@ -1659,7 +1620,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c */ } - /* "ssh/channel.pyx":47 + /* "ssh/channel.pyx":46 * if self.closed: * return 0 * with nogil: # <<<<<<<<<<<<<< @@ -1674,7 +1635,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":48 + /* "ssh/channel.pyx":47 * return 0 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) # <<<<<<<<<<<<<< @@ -1684,7 +1645,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_v_rc = ssh_channel_close(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":47 + /* "ssh/channel.pyx":46 * if self.closed: * return 0 * with nogil: # <<<<<<<<<<<<<< @@ -1703,7 +1664,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":49 + /* "ssh/channel.pyx":48 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: # <<<<<<<<<<<<<< @@ -1713,7 +1674,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c __pyx_t_1 = ((__pyx_v_rc == 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":50 + /* "ssh/channel.pyx":49 * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: * self.closed = True # <<<<<<<<<<<<<< @@ -1722,7 +1683,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c */ __pyx_v_self->closed = 1; - /* "ssh/channel.pyx":49 + /* "ssh/channel.pyx":48 * with nogil: * rc = c_ssh.ssh_channel_close(self._channel) * if rc == 0: # <<<<<<<<<<<<<< @@ -1731,7 +1692,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c */ } - /* "ssh/channel.pyx":51 + /* "ssh/channel.pyx":50 * if rc == 0: * self.closed = True * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -1739,14 +1700,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c * def get_exit_status(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 51, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 50, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":43 + /* "ssh/channel.pyx":42 * return chan * * def close(self): # <<<<<<<<<<<<<< @@ -1765,7 +1726,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_4close(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":53 +/* "ssh/channel.pyx":52 * return handle_error_codes(rc, self.session._session) * * def get_exit_status(self): # <<<<<<<<<<<<<< @@ -1797,7 +1758,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_exit_status", 0); - /* "ssh/channel.pyx":55 + /* "ssh/channel.pyx":54 * def get_exit_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -1812,7 +1773,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o #endif /*try:*/ { - /* "ssh/channel.pyx":56 + /* "ssh/channel.pyx":55 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_get_exit_status(self._channel) # <<<<<<<<<<<<<< @@ -1822,7 +1783,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o __pyx_v_rc = ssh_channel_get_exit_status(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":55 + /* "ssh/channel.pyx":54 * def get_exit_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -1841,7 +1802,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o } } - /* "ssh/channel.pyx":57 + /* "ssh/channel.pyx":56 * with nogil: * rc = c_ssh.ssh_channel_get_exit_status(self._channel) * return rc # <<<<<<<<<<<<<< @@ -1849,13 +1810,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o * def get_session(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":53 + /* "ssh/channel.pyx":52 * return handle_error_codes(rc, self.session._session) * * def get_exit_status(self): # <<<<<<<<<<<<<< @@ -1874,7 +1835,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_6get_exit_status(struct __pyx_o return __pyx_r; } -/* "ssh/channel.pyx":59 +/* "ssh/channel.pyx":58 * return rc * * def get_session(self): # <<<<<<<<<<<<<< @@ -1901,7 +1862,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3 __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_session", 0); - /* "ssh/channel.pyx":60 + /* "ssh/channel.pyx":59 * * def get_session(self): * return self.session # <<<<<<<<<<<<<< @@ -1913,7 +1874,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3 __pyx_r = ((PyObject *)__pyx_v_self->session); goto __pyx_L0; - /* "ssh/channel.pyx":59 + /* "ssh/channel.pyx":58 * return rc * * def get_session(self): # <<<<<<<<<<<<<< @@ -1928,7 +1889,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_8get_session(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/channel.pyx":62 +/* "ssh/channel.pyx":61 * return self.session * * def is_closed(self): # <<<<<<<<<<<<<< @@ -1960,7 +1921,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_closed", 0); - /* "ssh/channel.pyx":64 + /* "ssh/channel.pyx":63 * def is_closed(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -1975,7 +1936,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/channel.pyx":65 + /* "ssh/channel.pyx":64 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_closed(self._channel) # <<<<<<<<<<<<<< @@ -1985,7 +1946,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s __pyx_v_rc = ssh_channel_is_closed(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":64 + /* "ssh/channel.pyx":63 * def is_closed(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2004,7 +1965,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s } } - /* "ssh/channel.pyx":66 + /* "ssh/channel.pyx":65 * with nogil: * rc = c_ssh.ssh_channel_is_closed(self._channel) * return rc != 0 # <<<<<<<<<<<<<< @@ -2012,13 +1973,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s * def is_eof(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_rc != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_rc != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":62 + /* "ssh/channel.pyx":61 * return self.session * * def is_closed(self): # <<<<<<<<<<<<<< @@ -2037,7 +1998,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_10is_closed(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/channel.pyx":68 +/* "ssh/channel.pyx":67 * return rc != 0 * * def is_eof(self): # <<<<<<<<<<<<<< @@ -2070,7 +2031,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_eof", 0); - /* "ssh/channel.pyx":70 + /* "ssh/channel.pyx":69 * def is_eof(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2085,7 +2046,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/channel.pyx":71 + /* "ssh/channel.pyx":70 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_eof(self._channel) # <<<<<<<<<<<<<< @@ -2095,7 +2056,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ __pyx_v_rc = ssh_channel_is_eof(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":70 + /* "ssh/channel.pyx":69 * def is_eof(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2114,7 +2075,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ } } - /* "ssh/channel.pyx":72 + /* "ssh/channel.pyx":71 * with nogil: * rc = c_ssh.ssh_channel_is_eof(self._channel) * return bool(rc) # <<<<<<<<<<<<<< @@ -2123,13 +2084,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ */ __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, 72, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":68 + /* "ssh/channel.pyx":67 * return rc != 0 * * def is_eof(self): # <<<<<<<<<<<<<< @@ -2148,7 +2109,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_12is_eof(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/channel.pyx":74 +/* "ssh/channel.pyx":73 * return bool(rc) * * def is_open(self): # <<<<<<<<<<<<<< @@ -2181,7 +2142,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_open", 0); - /* "ssh/channel.pyx":76 + /* "ssh/channel.pyx":75 * def is_open(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2196,7 +2157,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh #endif /*try:*/ { - /* "ssh/channel.pyx":77 + /* "ssh/channel.pyx":76 * cdef bint rc * with nogil: * rc = c_ssh.ssh_channel_is_open(self._channel) # <<<<<<<<<<<<<< @@ -2206,7 +2167,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh __pyx_v_rc = ssh_channel_is_open(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":76 + /* "ssh/channel.pyx":75 * def is_open(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -2225,7 +2186,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh } } - /* "ssh/channel.pyx":78 + /* "ssh/channel.pyx":77 * with nogil: * rc = c_ssh.ssh_channel_is_open(self._channel) * return bool(rc) # <<<<<<<<<<<<<< @@ -2234,13 +2195,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh */ __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, 78, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":74 + /* "ssh/channel.pyx":73 * return bool(rc) * * def is_open(self): # <<<<<<<<<<<<<< @@ -2259,7 +2220,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_14is_open(struct __pyx_obj_3ssh return __pyx_r; } -/* "ssh/channel.pyx":80 +/* "ssh/channel.pyx":79 * return bool(rc) * * def send_eof(self): # <<<<<<<<<<<<<< @@ -2292,7 +2253,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_eof", 0); - /* "ssh/channel.pyx":82 + /* "ssh/channel.pyx":81 * def send_eof(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2307,7 +2268,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/channel.pyx":83 + /* "ssh/channel.pyx":82 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_send_eof(self._channel) # <<<<<<<<<<<<<< @@ -2317,7 +2278,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss __pyx_v_rc = ssh_channel_send_eof(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":82 + /* "ssh/channel.pyx":81 * def send_eof(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2336,7 +2297,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss } } - /* "ssh/channel.pyx":84 + /* "ssh/channel.pyx":83 * with nogil: * rc = c_ssh.ssh_channel_send_eof(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -2344,14 +2305,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss * def request_auth_agent(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 84, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":80 + /* "ssh/channel.pyx":79 * return bool(rc) * * def send_eof(self): # <<<<<<<<<<<<<< @@ -2370,7 +2331,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_16send_eof(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/channel.pyx":86 +/* "ssh/channel.pyx":85 * return handle_error_codes(rc, self.session._session) * * def request_auth_agent(self): # <<<<<<<<<<<<<< @@ -2403,7 +2364,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_auth_agent", 0); - /* "ssh/channel.pyx":88 + /* "ssh/channel.pyx":87 * def request_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2418,7 +2379,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p #endif /*try:*/ { - /* "ssh/channel.pyx":89 + /* "ssh/channel.pyx":88 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) # <<<<<<<<<<<<<< @@ -2428,7 +2389,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p __pyx_v_rc = ssh_channel_request_auth_agent(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":88 + /* "ssh/channel.pyx":87 * def request_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2447,7 +2408,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p } } - /* "ssh/channel.pyx":90 + /* "ssh/channel.pyx":89 * with nogil: * rc = c_ssh.ssh_channel_request_auth_agent(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -2455,14 +2416,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p * def open_auth_agent(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 90, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":86 + /* "ssh/channel.pyx":85 * return handle_error_codes(rc, self.session._session) * * def request_auth_agent(self): # <<<<<<<<<<<<<< @@ -2481,7 +2442,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_18request_auth_agent(struct __p return __pyx_r; } -/* "ssh/channel.pyx":92 +/* "ssh/channel.pyx":91 * return handle_error_codes(rc, self.session._session) * * def open_auth_agent(self): # <<<<<<<<<<<<<< @@ -2514,7 +2475,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_auth_agent", 0); - /* "ssh/channel.pyx":94 + /* "ssh/channel.pyx":93 * def open_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2529,7 +2490,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ #endif /*try:*/ { - /* "ssh/channel.pyx":95 + /* "ssh/channel.pyx":94 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) # <<<<<<<<<<<<<< @@ -2539,7 +2500,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ __pyx_v_rc = ssh_channel_open_auth_agent(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":94 + /* "ssh/channel.pyx":93 * def open_auth_agent(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2558,7 +2519,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ } } - /* "ssh/channel.pyx":96 + /* "ssh/channel.pyx":95 * with nogil: * rc = c_ssh.ssh_channel_open_auth_agent(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -2566,14 +2527,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ * def open_forward(self, remotehost, int remoteport, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 96, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 95, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":92 + /* "ssh/channel.pyx":91 * return handle_error_codes(rc, self.session._session) * * def open_auth_agent(self): # <<<<<<<<<<<<<< @@ -2592,7 +2553,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_20open_auth_agent(struct __pyx_ return __pyx_r; } -/* "ssh/channel.pyx":98 +/* "ssh/channel.pyx":97 * return handle_error_codes(rc, self.session._session) * * def open_forward(self, remotehost, int remoteport, # <<<<<<<<<<<<<< @@ -2641,23 +2602,23 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_23open_forward(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_remoteport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 1); __PYX_ERR(0, 98, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 1); __PYX_ERR(0, 97, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourcehost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 2); __PYX_ERR(0, 98, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 2); __PYX_ERR(0, 97, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 3); __PYX_ERR(0, 98, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, 3); __PYX_ERR(0, 97, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_forward") < 0)) __PYX_ERR(0, 98, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_forward") < 0)) __PYX_ERR(0, 97, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -2668,13 +2629,13 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_23open_forward(PyObject *__pyx_ values[3] = PyTuple_GET_ITEM(__pyx_args, 3); } __pyx_v_remotehost = values[0]; - __pyx_v_remoteport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_remoteport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) + __pyx_v_remoteport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_remoteport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error) __pyx_v_sourcehost = values[2]; - __pyx_v_sourceport = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L3_error) + __pyx_v_sourceport = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 98, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_forward", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 97, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.open_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -2703,19 +2664,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_forward", 0); - /* "ssh/channel.pyx":100 + /* "ssh/channel.pyx":99 * def open_forward(self, remotehost, int remoteport, * sourcehost, int sourceport): * cdef bytes b_remotehost = to_bytes(remotehost) # <<<<<<<<<<<<<< * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_remotehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_remotehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_remotehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":101 + /* "ssh/channel.pyx":100 * sourcehost, int sourceport): * cdef bytes b_remotehost = to_bytes(remotehost) * cdef const_char *c_remotehost = b_remotehost # <<<<<<<<<<<<<< @@ -2724,24 +2685,24 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj */ if (unlikely(__pyx_v_b_remotehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 101, __pyx_L1_error) + __PYX_ERR(0, 100, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_remotehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 101, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_remotehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 100, __pyx_L1_error) __pyx_v_c_remotehost = __pyx_t_2; - /* "ssh/channel.pyx":102 + /* "ssh/channel.pyx":101 * cdef bytes b_remotehost = to_bytes(remotehost) * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) # <<<<<<<<<<<<<< * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sourcehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":103 + /* "ssh/channel.pyx":102 * cdef const_char *c_remotehost = b_remotehost * cdef bytes b_sourcehost = to_bytes(sourcehost) * cdef const_char *c_sourcehost = b_sourcehost # <<<<<<<<<<<<<< @@ -2750,12 +2711,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj */ if (unlikely(__pyx_v_b_sourcehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 103, __pyx_L1_error) + __PYX_ERR(0, 102, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 102, __pyx_L1_error) __pyx_v_c_sourcehost = __pyx_t_2; - /* "ssh/channel.pyx":105 + /* "ssh/channel.pyx":104 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2770,7 +2731,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":106 + /* "ssh/channel.pyx":105 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_forward( # <<<<<<<<<<<<<< @@ -2780,7 +2741,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj __pyx_v_rc = ssh_channel_open_forward(__pyx_v_self->_channel, __pyx_v_c_remotehost, __pyx_v_remoteport, __pyx_v_c_sourcehost, __pyx_v_sourceport); } - /* "ssh/channel.pyx":105 + /* "ssh/channel.pyx":104 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2799,7 +2760,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj } } - /* "ssh/channel.pyx":109 + /* "ssh/channel.pyx":108 * self._channel, c_remotehost, remoteport, * c_sourcehost, sourceport) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -2807,14 +2768,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj * def open_session(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 109, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":98 + /* "ssh/channel.pyx":97 * return handle_error_codes(rc, self.session._session) * * def open_forward(self, remotehost, int remoteport, # <<<<<<<<<<<<<< @@ -2835,7 +2796,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_22open_forward(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":111 +/* "ssh/channel.pyx":110 * return handle_error_codes(rc, self.session._session) * * def open_session(self): # <<<<<<<<<<<<<< @@ -2868,7 +2829,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_session", 0); - /* "ssh/channel.pyx":113 + /* "ssh/channel.pyx":112 * def open_session(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2883,7 +2844,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":114 + /* "ssh/channel.pyx":113 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_session(self._channel) # <<<<<<<<<<<<<< @@ -2893,7 +2854,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj __pyx_v_rc = ssh_channel_open_session(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":113 + /* "ssh/channel.pyx":112 * def open_session(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2912,7 +2873,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj } } - /* "ssh/channel.pyx":115 + /* "ssh/channel.pyx":114 * with nogil: * rc = c_ssh.ssh_channel_open_session(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -2920,14 +2881,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj * def open_x11(self, sourcehost, int sourceport): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 115, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":111 + /* "ssh/channel.pyx":110 * return handle_error_codes(rc, self.session._session) * * def open_session(self): # <<<<<<<<<<<<<< @@ -2946,7 +2907,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_24open_session(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":117 +/* "ssh/channel.pyx":116 * return handle_error_codes(rc, self.session._session) * * def open_x11(self, sourcehost, int sourceport): # <<<<<<<<<<<<<< @@ -2989,11 +2950,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_27open_x11(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sourceport)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, 1); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, 1); __PYX_ERR(0, 116, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_x11") < 0)) __PYX_ERR(0, 117, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "open_x11") < 0)) __PYX_ERR(0, 116, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3002,11 +2963,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_27open_x11(PyObject *__pyx_v_se values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_sourcehost = values[0]; - __pyx_v_sourceport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 117, __pyx_L3_error) + __pyx_v_sourceport = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_sourceport == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 116, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 117, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("open_x11", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 116, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.open_x11", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3033,19 +2994,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("open_x11", 0); - /* "ssh/channel.pyx":118 + /* "ssh/channel.pyx":117 * * def open_x11(self, sourcehost, int sourceport): * cdef bytes b_sourcehost = to_bytes(sourcehost) # <<<<<<<<<<<<<< * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sourcehost); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sourcehost = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":119 + /* "ssh/channel.pyx":118 * def open_x11(self, sourcehost, int sourceport): * cdef bytes b_sourcehost = to_bytes(sourcehost) * cdef const_char *c_sourcehost = b_sourcehost # <<<<<<<<<<<<<< @@ -3054,12 +3015,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_sourcehost == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 119, __pyx_L1_error) + __PYX_ERR(0, 118, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sourcehost); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 118, __pyx_L1_error) __pyx_v_c_sourcehost = __pyx_t_2; - /* "ssh/channel.pyx":121 + /* "ssh/channel.pyx":120 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3074,7 +3035,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/channel.pyx":122 + /* "ssh/channel.pyx":121 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_open_x11( # <<<<<<<<<<<<<< @@ -3084,7 +3045,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss __pyx_v_rc = ssh_channel_open_x11(__pyx_v_self->_channel, __pyx_v_c_sourcehost, __pyx_v_sourceport); } - /* "ssh/channel.pyx":121 + /* "ssh/channel.pyx":120 * cdef const_char *c_sourcehost = b_sourcehost * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3103,7 +3064,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss } } - /* "ssh/channel.pyx":124 + /* "ssh/channel.pyx":123 * rc = c_ssh.ssh_channel_open_x11( * self._channel, c_sourcehost, sourceport) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -3111,14 +3072,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss * def accept_x11(self, int timeout_ms): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 124, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":117 + /* "ssh/channel.pyx":116 * return handle_error_codes(rc, self.session._session) * * def open_x11(self, sourcehost, int sourceport): # <<<<<<<<<<<<<< @@ -3138,7 +3099,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_26open_x11(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/channel.pyx":126 +/* "ssh/channel.pyx":125 * return handle_error_codes(rc, self.session._session) * * def accept_x11(self, int timeout_ms): # <<<<<<<<<<<<<< @@ -3158,7 +3119,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_29accept_x11(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("accept_x11 (wrapper)", 0); assert(__pyx_arg_timeout_ms); { - __pyx_v_timeout_ms = __Pyx_PyInt_As_int(__pyx_arg_timeout_ms); if (unlikely((__pyx_v_timeout_ms == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 126, __pyx_L3_error) + __pyx_v_timeout_ms = __Pyx_PyInt_As_int(__pyx_arg_timeout_ms); if (unlikely((__pyx_v_timeout_ms == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -3186,7 +3147,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept_x11", 0); - /* "ssh/channel.pyx":128 + /* "ssh/channel.pyx":127 * def accept_x11(self, int timeout_ms): * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL # <<<<<<<<<<<<<< @@ -3195,7 +3156,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 */ __pyx_v__chan = NULL; - /* "ssh/channel.pyx":129 + /* "ssh/channel.pyx":128 * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL * with nogil: # <<<<<<<<<<<<<< @@ -3210,7 +3171,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/channel.pyx":130 + /* "ssh/channel.pyx":129 * cdef c_ssh.ssh_channel _chan = NULL * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) # <<<<<<<<<<<<<< @@ -3220,7 +3181,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 __pyx_v__chan = ssh_channel_accept_x11(__pyx_v_self->_channel, __pyx_v_timeout_ms); } - /* "ssh/channel.pyx":129 + /* "ssh/channel.pyx":128 * cdef Channel chan * cdef c_ssh.ssh_channel _chan = NULL * with nogil: # <<<<<<<<<<<<<< @@ -3239,7 +3200,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 } } - /* "ssh/channel.pyx":131 + /* "ssh/channel.pyx":130 * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: # <<<<<<<<<<<<<< @@ -3249,16 +3210,16 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v__chan == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/channel.pyx":132 + /* "ssh/channel.pyx":131 * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: * raise MemoryError # <<<<<<<<<<<<<< * chan = Channel.from_ptr(_chan, self.session) * return chan */ - PyErr_NoMemory(); __PYX_ERR(0, 132, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 131, __pyx_L1_error) - /* "ssh/channel.pyx":131 + /* "ssh/channel.pyx":130 * with nogil: * _chan = c_ssh.ssh_channel_accept_x11(self._channel, timeout_ms) * if _chan is NULL: # <<<<<<<<<<<<<< @@ -3267,7 +3228,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 */ } - /* "ssh/channel.pyx":133 + /* "ssh/channel.pyx":132 * if _chan is NULL: * raise MemoryError * chan = Channel.from_ptr(_chan, self.session) # <<<<<<<<<<<<<< @@ -3276,13 +3237,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 */ __pyx_t_2 = ((PyObject *)__pyx_v_self->session); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_3ssh_7channel_7Channel_from_ptr(__pyx_v__chan, ((struct __pyx_obj_3ssh_7session_Session *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_3ssh_7channel_7Channel_from_ptr(__pyx_v__chan, ((struct __pyx_obj_3ssh_7session_Session *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chan = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/channel.pyx":134 + /* "ssh/channel.pyx":133 * raise MemoryError * chan = Channel.from_ptr(_chan, self.session) * return chan # <<<<<<<<<<<<<< @@ -3294,7 +3255,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 __pyx_r = ((PyObject *)__pyx_v_chan); goto __pyx_L0; - /* "ssh/channel.pyx":126 + /* "ssh/channel.pyx":125 * return handle_error_codes(rc, self.session._session) * * def accept_x11(self, int timeout_ms): # <<<<<<<<<<<<<< @@ -3315,7 +3276,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_28accept_x11(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/channel.pyx":136 +/* "ssh/channel.pyx":135 * return chan * * def poll(self, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3355,7 +3316,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_31poll(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll") < 0)) __PYX_ERR(0, 136, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll") < 0)) __PYX_ERR(0, 135, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3366,14 +3327,14 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_31poll(PyObject *__pyx_v_self, } } if (values[0]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 136, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 135, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 136, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("poll", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 135, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.poll", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3397,7 +3358,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll", 0); - /* "ssh/channel.pyx":138 + /* "ssh/channel.pyx":137 * def poll(self, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3412,7 +3373,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":139 + /* "ssh/channel.pyx":138 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) # <<<<<<<<<<<<<< @@ -3422,7 +3383,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c __pyx_v_rc = ssh_channel_poll(__pyx_v_self->_channel, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":138 + /* "ssh/channel.pyx":137 * def poll(self, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3441,7 +3402,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":140 + /* "ssh/channel.pyx":139 * with nogil: * rc = c_ssh.ssh_channel_poll(self._channel, is_stderr) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -3449,14 +3410,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c * def poll_timeout(self, int timeout, bint is_stderr=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 140, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 139, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":136 + /* "ssh/channel.pyx":135 * return chan * * def poll(self, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3475,7 +3436,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_30poll(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":142 +/* "ssh/channel.pyx":141 * return handle_error_codes(rc, self.session._session) * * def poll_timeout(self, int timeout, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3522,7 +3483,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_33poll_timeout(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll_timeout") < 0)) __PYX_ERR(0, 142, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "poll_timeout") < 0)) __PYX_ERR(0, 141, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3533,16 +3494,16 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_33poll_timeout(PyObject *__pyx_ default: goto __pyx_L5_argtuple_error; } } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L3_error) if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 142, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("poll_timeout", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 142, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("poll_timeout", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 141, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.poll_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3566,7 +3527,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("poll_timeout", 0); - /* "ssh/channel.pyx":144 + /* "ssh/channel.pyx":143 * def poll_timeout(self, int timeout, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3581,7 +3542,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":145 + /* "ssh/channel.pyx":144 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_poll_timeout( # <<<<<<<<<<<<<< @@ -3591,7 +3552,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj __pyx_v_rc = ssh_channel_poll_timeout(__pyx_v_self->_channel, __pyx_v_timeout, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":144 + /* "ssh/channel.pyx":143 * def poll_timeout(self, int timeout, bint is_stderr=False): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3610,7 +3571,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":147 + /* "ssh/channel.pyx":146 * rc = c_ssh.ssh_channel_poll_timeout( * self._channel, timeout, is_stderr) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -3618,14 +3579,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 147, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 147, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":142 + /* "ssh/channel.pyx":141 * return handle_error_codes(rc, self.session._session) * * def poll_timeout(self, int timeout, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3644,7 +3605,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_32poll_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":149 +/* "ssh/channel.pyx":148 * return handle_error_codes(rc, self.session._session) * * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -3693,7 +3654,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_35read(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 149, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read") < 0)) __PYX_ERR(0, 148, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -3706,19 +3667,19 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_35read(PyObject *__pyx_v_self, } } if (values[0]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 148, __pyx_L3_error) } else { __pyx_v_is_stderr = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 149, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3754,7 +3715,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read", 0); - /* "ssh/channel.pyx":151 + /* "ssh/channel.pyx":150 * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -3764,7 +3725,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":153 + /* "ssh/channel.pyx":152 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -3779,7 +3740,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":154 + /* "ssh/channel.pyx":153 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -3788,7 +3749,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":155 + /* "ssh/channel.pyx":154 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -3798,7 +3759,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":156 + /* "ssh/channel.pyx":155 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -3811,17 +3772,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c #endif /*try:*/ { - /* "ssh/channel.pyx":157 + /* "ssh/channel.pyx":156 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: */ - PyErr_NoMemory(); __PYX_ERR(0, 157, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 156, __pyx_L8_error) } - /* "ssh/channel.pyx":156 + /* "ssh/channel.pyx":155 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -3838,7 +3799,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":155 + /* "ssh/channel.pyx":154 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -3847,7 +3808,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ } - /* "ssh/channel.pyx":158 + /* "ssh/channel.pyx":157 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) # <<<<<<<<<<<<<< @@ -3857,7 +3818,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_v_rc = ssh_channel_read(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":153 + /* "ssh/channel.pyx":152 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -3883,7 +3844,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":159 + /* "ssh/channel.pyx":158 * raise MemoryError * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: # <<<<<<<<<<<<<< @@ -3892,7 +3853,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c */ /*try:*/ { - /* "ssh/channel.pyx":160 + /* "ssh/channel.pyx":159 * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -3902,19 +3863,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":161 + /* "ssh/channel.pyx":160 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":160 + /* "ssh/channel.pyx":159 * rc = c_ssh.ssh_channel_read(self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -3924,7 +3885,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c } } - /* "ssh/channel.pyx":163 + /* "ssh/channel.pyx":162 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< @@ -3971,7 +3932,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_L12:; } - /* "ssh/channel.pyx":164 + /* "ssh/channel.pyx":163 * finally: * free(cbuf) * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< @@ -3979,10 +3940,10 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 164, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 163, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 164, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 163, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -3994,7 +3955,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":149 + /* "ssh/channel.pyx":148 * return handle_error_codes(rc, self.session._session) * * def read(self, c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -4015,7 +3976,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_34read(struct __pyx_obj_3ssh_7c return __pyx_r; } -/* "ssh/channel.pyx":166 +/* "ssh/channel.pyx":165 * return handle_error_codes(rc, self.session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< @@ -4064,7 +4025,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_nonblocking") < 0)) __PYX_ERR(0, 166, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_nonblocking") < 0)) __PYX_ERR(0, 165, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4077,15 +4038,15 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } } if (values[0]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[0]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[1]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 166, __pyx_L3_error) } else { - /* "ssh/channel.pyx":167 + /* "ssh/channel.pyx":166 * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, * bint is_stderr=False): # <<<<<<<<<<<<<< @@ -4097,7 +4058,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_nonblocking", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 166, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_nonblocking", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 165, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read_nonblocking", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4105,7 +4066,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_37read_nonblocking(PyObject *__ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_size, __pyx_v_is_stderr); - /* "ssh/channel.pyx":166 + /* "ssh/channel.pyx":165 * return handle_error_codes(rc, self.session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< @@ -4141,7 +4102,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_nonblocking", 0); - /* "ssh/channel.pyx":169 + /* "ssh/channel.pyx":168 * bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -4151,7 +4112,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":171 + /* "ssh/channel.pyx":170 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4166,7 +4127,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":172 + /* "ssh/channel.pyx":171 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -4175,7 +4136,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":173 + /* "ssh/channel.pyx":172 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4185,7 +4146,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":174 + /* "ssh/channel.pyx":173 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4198,17 +4159,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":175 + /* "ssh/channel.pyx":174 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read_nonblocking( * self._channel, cbuf, size, is_stderr) */ - PyErr_NoMemory(); __PYX_ERR(0, 175, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 174, __pyx_L8_error) } - /* "ssh/channel.pyx":174 + /* "ssh/channel.pyx":173 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4225,7 +4186,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":173 + /* "ssh/channel.pyx":172 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4234,7 +4195,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ } - /* "ssh/channel.pyx":176 + /* "ssh/channel.pyx":175 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read_nonblocking( # <<<<<<<<<<<<<< @@ -4244,7 +4205,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_v_rc = ssh_channel_read_nonblocking(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr); } - /* "ssh/channel.pyx":171 + /* "ssh/channel.pyx":170 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4270,7 +4231,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":178 + /* "ssh/channel.pyx":177 * rc = c_ssh.ssh_channel_read_nonblocking( * self._channel, cbuf, size, is_stderr) * try: # <<<<<<<<<<<<<< @@ -4279,7 +4240,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx */ /*try:*/ { - /* "ssh/channel.pyx":179 + /* "ssh/channel.pyx":178 * self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4289,19 +4250,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":180 + /* "ssh/channel.pyx":179 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":179 + /* "ssh/channel.pyx":178 * self._channel, cbuf, size, is_stderr) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4311,7 +4272,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx } } - /* "ssh/channel.pyx":182 + /* "ssh/channel.pyx":181 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< @@ -4358,7 +4319,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_L12:; } - /* "ssh/channel.pyx":183 + /* "ssh/channel.pyx":182 * finally: * free(cbuf) * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< @@ -4366,10 +4327,10 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx * def read_timeout(self, int timeout, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 183, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 183, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -4381,7 +4342,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":166 + /* "ssh/channel.pyx":165 * return handle_error_codes(rc, self.session._session), buf * * def read_nonblocking(self, c_ssh.uint32_t size=1024*1024, # <<<<<<<<<<<<<< @@ -4402,7 +4363,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_36read_nonblocking(struct __pyx return __pyx_r; } -/* "ssh/channel.pyx":185 +/* "ssh/channel.pyx":184 * return handle_error_codes(rc, self.session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< @@ -4458,7 +4419,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_timeout") < 0)) __PYX_ERR(0, 185, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_timeout") < 0)) __PYX_ERR(0, 184, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -4471,17 +4432,17 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ default: goto __pyx_L5_argtuple_error; } } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L3_error) if (values[1]) { - __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_size == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) } else { __pyx_v_size = ((uint32_t)0x100000); } if (values[2]) { - __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 186, __pyx_L3_error) + __pyx_v_is_stderr = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_is_stderr == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L3_error) } else { - /* "ssh/channel.pyx":186 + /* "ssh/channel.pyx":185 * * def read_timeout(self, int timeout, * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): # <<<<<<<<<<<<<< @@ -4493,7 +4454,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_timeout", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 185, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_timeout", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 184, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.read_timeout", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4501,7 +4462,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_39read_timeout(PyObject *__pyx_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_3ssh_7channel_7Channel_38read_timeout(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_timeout, __pyx_v_size, __pyx_v_is_stderr); - /* "ssh/channel.pyx":185 + /* "ssh/channel.pyx":184 * return handle_error_codes(rc, self.session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< @@ -4537,7 +4498,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("read_timeout", 0); - /* "ssh/channel.pyx":188 + /* "ssh/channel.pyx":187 * c_ssh.uint32_t size=1024*1024, bint is_stderr=False): * cdef int rc * cdef bytes buf = b'' # <<<<<<<<<<<<<< @@ -4547,7 +4508,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __Pyx_INCREF(__pyx_kp_b_); __pyx_v_buf = __pyx_kp_b_; - /* "ssh/channel.pyx":190 + /* "ssh/channel.pyx":189 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4562,7 +4523,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":191 + /* "ssh/channel.pyx":190 * cdef char* cbuf * with nogil: * cbuf = malloc(sizeof(char)*size) # <<<<<<<<<<<<<< @@ -4571,7 +4532,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ __pyx_v_cbuf = ((char *)malloc(((sizeof(char)) * __pyx_v_size))); - /* "ssh/channel.pyx":192 + /* "ssh/channel.pyx":191 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4581,7 +4542,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_1 = ((__pyx_v_cbuf == NULL) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":193 + /* "ssh/channel.pyx":192 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4594,17 +4555,17 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":194 + /* "ssh/channel.pyx":193 * if cbuf is NULL: * with gil: * raise MemoryError # <<<<<<<<<<<<<< * rc = c_ssh.ssh_channel_read_timeout( * self._channel, cbuf, size, is_stderr, timeout) */ - PyErr_NoMemory(); __PYX_ERR(0, 194, __pyx_L8_error) + PyErr_NoMemory(); __PYX_ERR(0, 193, __pyx_L8_error) } - /* "ssh/channel.pyx":193 + /* "ssh/channel.pyx":192 * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: * with gil: # <<<<<<<<<<<<<< @@ -4621,7 +4582,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":192 + /* "ssh/channel.pyx":191 * with nogil: * cbuf = malloc(sizeof(char)*size) * if cbuf is NULL: # <<<<<<<<<<<<<< @@ -4630,7 +4591,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ } - /* "ssh/channel.pyx":195 + /* "ssh/channel.pyx":194 * with gil: * raise MemoryError * rc = c_ssh.ssh_channel_read_timeout( # <<<<<<<<<<<<<< @@ -4640,7 +4601,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_v_rc = ssh_channel_read_timeout(__pyx_v_self->_channel, __pyx_v_cbuf, __pyx_v_size, __pyx_v_is_stderr, __pyx_v_timeout); } - /* "ssh/channel.pyx":190 + /* "ssh/channel.pyx":189 * cdef bytes buf = b'' * cdef char* cbuf * with nogil: # <<<<<<<<<<<<<< @@ -4666,7 +4627,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":197 + /* "ssh/channel.pyx":196 * rc = c_ssh.ssh_channel_read_timeout( * self._channel, cbuf, size, is_stderr, timeout) * try: # <<<<<<<<<<<<<< @@ -4675,7 +4636,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj */ /*try:*/ { - /* "ssh/channel.pyx":198 + /* "ssh/channel.pyx":197 * self._channel, cbuf, size, is_stderr, timeout) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4685,19 +4646,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_1 = ((__pyx_v_rc > 0) != 0); if (__pyx_t_1) { - /* "ssh/channel.pyx":199 + /* "ssh/channel.pyx":198 * try: * if rc > 0: * buf = cbuf[:rc] # <<<<<<<<<<<<<< * finally: * free(cbuf) */ - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L11_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_cbuf + 0, __pyx_v_rc - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_buf, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "ssh/channel.pyx":198 + /* "ssh/channel.pyx":197 * self._channel, cbuf, size, is_stderr, timeout) * try: * if rc > 0: # <<<<<<<<<<<<<< @@ -4707,7 +4668,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj } } - /* "ssh/channel.pyx":201 + /* "ssh/channel.pyx":200 * buf = cbuf[:rc] * finally: * free(cbuf) # <<<<<<<<<<<<<< @@ -4754,7 +4715,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_L12:; } - /* "ssh/channel.pyx":202 + /* "ssh/channel.pyx":201 * finally: * free(cbuf) * return handle_error_codes(rc, self.session._session), buf # <<<<<<<<<<<<<< @@ -4762,10 +4723,10 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj * def request_env(self, name, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 202, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 201, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 202, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_2); @@ -4777,7 +4738,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj __pyx_t_12 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":185 + /* "ssh/channel.pyx":184 * return handle_error_codes(rc, self.session._session), buf * * def read_timeout(self, int timeout, # <<<<<<<<<<<<<< @@ -4798,7 +4759,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_38read_timeout(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":204 +/* "ssh/channel.pyx":203 * return handle_error_codes(rc, self.session._session), buf * * def request_env(self, name, value): # <<<<<<<<<<<<<< @@ -4841,11 +4802,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_41request_env(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, 1); __PYX_ERR(0, 204, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, 1); __PYX_ERR(0, 203, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_env") < 0)) __PYX_ERR(0, 204, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_env") < 0)) __PYX_ERR(0, 203, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -4858,7 +4819,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_41request_env(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 204, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_env", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 203, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_env", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -4887,19 +4848,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_env", 0); - /* "ssh/channel.pyx":205 + /* "ssh/channel.pyx":204 * * def request_env(self, name, value): * cdef bytes b_name = to_bytes(name) # <<<<<<<<<<<<<< * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":206 + /* "ssh/channel.pyx":205 * def request_env(self, name, value): * cdef bytes b_name = to_bytes(name) * cdef const_char *c_name = b_name # <<<<<<<<<<<<<< @@ -4908,24 +4869,24 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_name == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 206, __pyx_L1_error) + __PYX_ERR(0, 205, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 206, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_name); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 205, __pyx_L1_error) __pyx_v_c_name = __pyx_t_2; - /* "ssh/channel.pyx":207 + /* "ssh/channel.pyx":206 * cdef bytes b_name = to_bytes(name) * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) # <<<<<<<<<<<<<< * cdef const_char *c_value = b_value * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":208 + /* "ssh/channel.pyx":207 * cdef const_char *c_name = b_name * cdef bytes b_value = to_bytes(value) * cdef const_char *c_value = b_value # <<<<<<<<<<<<<< @@ -4934,12 +4895,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 208, __pyx_L1_error) + __PYX_ERR(0, 207, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 208, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 207, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/channel.pyx":210 + /* "ssh/channel.pyx":209 * cdef const_char *c_value = b_value * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4954,7 +4915,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":211 + /* "ssh/channel.pyx":210 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) # <<<<<<<<<<<<<< @@ -4964,7 +4925,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ __pyx_v_rc = ssh_channel_request_env(__pyx_v_self->_channel, __pyx_v_c_name, __pyx_v_c_value); } - /* "ssh/channel.pyx":210 + /* "ssh/channel.pyx":209 * cdef const_char *c_value = b_value * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4983,7 +4944,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ } } - /* "ssh/channel.pyx":212 + /* "ssh/channel.pyx":211 * with nogil: * rc = c_ssh.ssh_channel_request_env(self._channel, c_name, c_value) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -4991,14 +4952,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ * def request_exec(self, cmd): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":204 + /* "ssh/channel.pyx":203 * return handle_error_codes(rc, self.session._session), buf * * def request_env(self, name, value): # <<<<<<<<<<<<<< @@ -5019,7 +4980,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_40request_env(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":214 +/* "ssh/channel.pyx":213 * return handle_error_codes(rc, self.session._session) * * def request_exec(self, cmd): # <<<<<<<<<<<<<< @@ -5055,19 +5016,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_exec", 0); - /* "ssh/channel.pyx":215 + /* "ssh/channel.pyx":214 * * def request_exec(self, cmd): * cdef bytes b_cmd = to_bytes(cmd) # <<<<<<<<<<<<<< * cdef const_char *c_cmd = b_cmd * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_cmd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_cmd = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":216 + /* "ssh/channel.pyx":215 * def request_exec(self, cmd): * cdef bytes b_cmd = to_bytes(cmd) * cdef const_char *c_cmd = b_cmd # <<<<<<<<<<<<<< @@ -5076,12 +5037,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj */ if (unlikely(__pyx_v_b_cmd == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 216, __pyx_L1_error) + __PYX_ERR(0, 215, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_cmd); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 216, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_cmd); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 215, __pyx_L1_error) __pyx_v_c_cmd = __pyx_t_2; - /* "ssh/channel.pyx":218 + /* "ssh/channel.pyx":217 * cdef const_char *c_cmd = b_cmd * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5096,7 +5057,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":219 + /* "ssh/channel.pyx":218 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) # <<<<<<<<<<<<<< @@ -5106,7 +5067,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj __pyx_v_rc = ssh_channel_request_exec(__pyx_v_self->_channel, __pyx_v_c_cmd); } - /* "ssh/channel.pyx":218 + /* "ssh/channel.pyx":217 * cdef const_char *c_cmd = b_cmd * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5125,7 +5086,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj } } - /* "ssh/channel.pyx":220 + /* "ssh/channel.pyx":219 * with nogil: * rc = c_ssh.ssh_channel_request_exec(self._channel, c_cmd) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5133,14 +5094,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj * def request_pty(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 220, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":214 + /* "ssh/channel.pyx":213 * return handle_error_codes(rc, self.session._session) * * def request_exec(self, cmd): # <<<<<<<<<<<<<< @@ -5160,7 +5121,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_42request_exec(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":222 +/* "ssh/channel.pyx":221 * return handle_error_codes(rc, self.session._session) * * def request_pty(self): # <<<<<<<<<<<<<< @@ -5193,7 +5154,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_pty", 0); - /* "ssh/channel.pyx":224 + /* "ssh/channel.pyx":223 * def request_pty(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5208,7 +5169,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":225 + /* "ssh/channel.pyx":224 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_pty(self._channel) # <<<<<<<<<<<<<< @@ -5218,7 +5179,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ __pyx_v_rc = ssh_channel_request_pty(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":224 + /* "ssh/channel.pyx":223 * def request_pty(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5237,7 +5198,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ } } - /* "ssh/channel.pyx":226 + /* "ssh/channel.pyx":225 * with nogil: * rc = c_ssh.ssh_channel_request_pty(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5245,14 +5206,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ * def change_pty_size(self, int cols, int rows): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 226, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 225, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":222 + /* "ssh/channel.pyx":221 * return handle_error_codes(rc, self.session._session) * * def request_pty(self): # <<<<<<<<<<<<<< @@ -5271,7 +5232,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_44request_pty(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":228 +/* "ssh/channel.pyx":227 * return handle_error_codes(rc, self.session._session) * * def change_pty_size(self, int cols, int rows): # <<<<<<<<<<<<<< @@ -5314,11 +5275,11 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_47change_pty_size(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rows)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, 1); __PYX_ERR(0, 228, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, 1); __PYX_ERR(0, 227, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_pty_size") < 0)) __PYX_ERR(0, 228, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "change_pty_size") < 0)) __PYX_ERR(0, 227, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5326,12 +5287,12 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_47change_pty_size(PyObject *__p values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_cols = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L3_error) - __pyx_v_rows = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 228, __pyx_L3_error) + __pyx_v_cols = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_cols == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) + __pyx_v_rows = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rows == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 228, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("change_pty_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 227, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.change_pty_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5355,7 +5316,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("change_pty_size", 0); - /* "ssh/channel.pyx":230 + /* "ssh/channel.pyx":229 * def change_pty_size(self, int cols, int rows): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5370,7 +5331,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ #endif /*try:*/ { - /* "ssh/channel.pyx":231 + /* "ssh/channel.pyx":230 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) # <<<<<<<<<<<<<< @@ -5380,7 +5341,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ __pyx_v_rc = ssh_channel_change_pty_size(__pyx_v_self->_channel, __pyx_v_cols, __pyx_v_rows); } - /* "ssh/channel.pyx":230 + /* "ssh/channel.pyx":229 * def change_pty_size(self, int cols, int rows): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5399,7 +5360,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ } } - /* "ssh/channel.pyx":232 + /* "ssh/channel.pyx":231 * with nogil: * rc = c_ssh.ssh_channel_change_pty_size(self._channel, cols, rows) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5407,14 +5368,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ * def request_pty_size(self, terminal, int col, int row): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 232, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 231, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":228 + /* "ssh/channel.pyx":227 * return handle_error_codes(rc, self.session._session) * * def change_pty_size(self, int cols, int rows): # <<<<<<<<<<<<<< @@ -5433,7 +5394,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_46change_pty_size(struct __pyx_ return __pyx_r; } -/* "ssh/channel.pyx":234 +/* "ssh/channel.pyx":233 * return handle_error_codes(rc, self.session._session) * * def request_pty_size(self, terminal, int col, int row): # <<<<<<<<<<<<<< @@ -5479,17 +5440,17 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_49request_pty_size(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_col)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 1); __PYX_ERR(0, 234, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 1); __PYX_ERR(0, 233, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 2); __PYX_ERR(0, 234, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, 2); __PYX_ERR(0, 233, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_pty_size") < 0)) __PYX_ERR(0, 234, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_pty_size") < 0)) __PYX_ERR(0, 233, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -5499,12 +5460,12 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_49request_pty_size(PyObject *__ values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_terminal = values[0]; - __pyx_v_col = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) - __pyx_v_row = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 234, __pyx_L3_error) + __pyx_v_col = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_col == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L3_error) + __pyx_v_row = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_row == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 233, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 234, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_pty_size", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 233, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_pty_size", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5531,19 +5492,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_pty_size", 0); - /* "ssh/channel.pyx":235 + /* "ssh/channel.pyx":234 * * def request_pty_size(self, terminal, int col, int row): * cdef bytes b_terminal = to_bytes(terminal) # <<<<<<<<<<<<<< * cdef const_char *c_terminal = b_terminal * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_terminal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_terminal); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_terminal = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":236 + /* "ssh/channel.pyx":235 * def request_pty_size(self, terminal, int col, int row): * cdef bytes b_terminal = to_bytes(terminal) * cdef const_char *c_terminal = b_terminal # <<<<<<<<<<<<<< @@ -5552,12 +5513,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx */ if (unlikely(__pyx_v_b_terminal == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 236, __pyx_L1_error) + __PYX_ERR(0, 235, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_terminal); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_terminal); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 235, __pyx_L1_error) __pyx_v_c_terminal = __pyx_t_2; - /* "ssh/channel.pyx":238 + /* "ssh/channel.pyx":237 * cdef const_char *c_terminal = b_terminal * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5572,7 +5533,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx #endif /*try:*/ { - /* "ssh/channel.pyx":239 + /* "ssh/channel.pyx":238 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_pty_size( # <<<<<<<<<<<<<< @@ -5582,7 +5543,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx __pyx_v_rc = ssh_channel_request_pty_size(__pyx_v_self->_channel, __pyx_v_c_terminal, __pyx_v_col, __pyx_v_row); } - /* "ssh/channel.pyx":238 + /* "ssh/channel.pyx":237 * cdef const_char *c_terminal = b_terminal * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5601,7 +5562,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx } } - /* "ssh/channel.pyx":241 + /* "ssh/channel.pyx":240 * rc = c_ssh.ssh_channel_request_pty_size( * self._channel, c_terminal, col, row) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5609,14 +5570,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx * def request_send_signal(self, sig): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 241, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 240, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); 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; - /* "ssh/channel.pyx":234 + /* "ssh/channel.pyx":233 * return handle_error_codes(rc, self.session._session) * * def request_pty_size(self, terminal, int col, int row): # <<<<<<<<<<<<<< @@ -5636,7 +5597,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_48request_pty_size(struct __pyx return __pyx_r; } -/* "ssh/channel.pyx":243 +/* "ssh/channel.pyx":242 * return handle_error_codes(rc, self.session._session) * * def request_send_signal(self, sig): # <<<<<<<<<<<<<< @@ -5672,19 +5633,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_send_signal", 0); - /* "ssh/channel.pyx":244 + /* "ssh/channel.pyx":243 * * def request_send_signal(self, sig): * cdef bytes b_sig = to_bytes(sig) # <<<<<<<<<<<<<< * cdef const_char *c_sig = b_sig * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_sig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sig = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":245 + /* "ssh/channel.pyx":244 * def request_send_signal(self, sig): * cdef bytes b_sig = to_bytes(sig) * cdef const_char *c_sig = b_sig # <<<<<<<<<<<<<< @@ -5693,12 +5654,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ */ if (unlikely(__pyx_v_b_sig == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 245, __pyx_L1_error) + __PYX_ERR(0, 244, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sig); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sig); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) __pyx_v_c_sig = __pyx_t_2; - /* "ssh/channel.pyx":247 + /* "ssh/channel.pyx":246 * cdef const_char *c_sig = b_sig * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5713,7 +5674,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ #endif /*try:*/ { - /* "ssh/channel.pyx":248 + /* "ssh/channel.pyx":247 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_send_signal( # <<<<<<<<<<<<<< @@ -5723,7 +5684,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ __pyx_v_rc = ssh_channel_request_send_signal(__pyx_v_self->_channel, __pyx_v_c_sig); } - /* "ssh/channel.pyx":247 + /* "ssh/channel.pyx":246 * cdef const_char *c_sig = b_sig * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5742,7 +5703,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ } } - /* "ssh/channel.pyx":250 + /* "ssh/channel.pyx":249 * rc = c_ssh.ssh_channel_request_send_signal( * self._channel, c_sig) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5750,14 +5711,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ * def request_send_break(self, c_ssh.uint32_t length): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 250, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 249, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":243 + /* "ssh/channel.pyx":242 * return handle_error_codes(rc, self.session._session) * * def request_send_signal(self, sig): # <<<<<<<<<<<<<< @@ -5777,7 +5738,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_50request_send_signal(struct __ return __pyx_r; } -/* "ssh/channel.pyx":252 +/* "ssh/channel.pyx":251 * return handle_error_codes(rc, self.session._session) * * def request_send_break(self, c_ssh.uint32_t length): # <<<<<<<<<<<<<< @@ -5797,7 +5758,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_53request_send_break(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("request_send_break (wrapper)", 0); assert(__pyx_arg_length); { - __pyx_v_length = __Pyx_PyInt_As_uint32_t(__pyx_arg_length); if (unlikely((__pyx_v_length == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 252, __pyx_L3_error) + __pyx_v_length = __Pyx_PyInt_As_uint32_t(__pyx_arg_length); if (unlikely((__pyx_v_length == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5823,7 +5784,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_send_break", 0); - /* "ssh/channel.pyx":254 + /* "ssh/channel.pyx":253 * def request_send_break(self, c_ssh.uint32_t length): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5838,7 +5799,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p #endif /*try:*/ { - /* "ssh/channel.pyx":255 + /* "ssh/channel.pyx":254 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_send_break( # <<<<<<<<<<<<<< @@ -5848,7 +5809,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p __pyx_v_rc = ssh_channel_request_send_break(__pyx_v_self->_channel, __pyx_v_length); } - /* "ssh/channel.pyx":254 + /* "ssh/channel.pyx":253 * def request_send_break(self, c_ssh.uint32_t length): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5867,7 +5828,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p } } - /* "ssh/channel.pyx":257 + /* "ssh/channel.pyx":256 * rc = c_ssh.ssh_channel_request_send_break( * self._channel, length) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5875,14 +5836,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p * def request_shell(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 257, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 256, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":252 + /* "ssh/channel.pyx":251 * return handle_error_codes(rc, self.session._session) * * def request_send_break(self, c_ssh.uint32_t length): # <<<<<<<<<<<<<< @@ -5901,7 +5862,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_52request_send_break(struct __p return __pyx_r; } -/* "ssh/channel.pyx":259 +/* "ssh/channel.pyx":258 * return handle_error_codes(rc, self.session._session) * * def request_shell(self): # <<<<<<<<<<<<<< @@ -5934,7 +5895,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_shell", 0); - /* "ssh/channel.pyx":261 + /* "ssh/channel.pyx":260 * def request_shell(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5949,7 +5910,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob #endif /*try:*/ { - /* "ssh/channel.pyx":262 + /* "ssh/channel.pyx":261 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_shell(self._channel) # <<<<<<<<<<<<<< @@ -5959,7 +5920,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob __pyx_v_rc = ssh_channel_request_shell(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":261 + /* "ssh/channel.pyx":260 * def request_shell(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5978,7 +5939,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob } } - /* "ssh/channel.pyx":263 + /* "ssh/channel.pyx":262 * with nogil: * rc = c_ssh.ssh_channel_request_shell(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -5986,14 +5947,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob * def request_sftp(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 263, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 262, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":259 + /* "ssh/channel.pyx":258 * return handle_error_codes(rc, self.session._session) * * def request_shell(self): # <<<<<<<<<<<<<< @@ -6012,7 +5973,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_54request_shell(struct __pyx_ob return __pyx_r; } -/* "ssh/channel.pyx":265 +/* "ssh/channel.pyx":264 * return handle_error_codes(rc, self.session._session) * * def request_sftp(self): # <<<<<<<<<<<<<< @@ -6045,7 +6006,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_sftp", 0); - /* "ssh/channel.pyx":267 + /* "ssh/channel.pyx":266 * def request_sftp(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6060,7 +6021,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":268 + /* "ssh/channel.pyx":267 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_sftp(self._channel) # <<<<<<<<<<<<<< @@ -6070,7 +6031,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj __pyx_v_rc = ssh_channel_request_sftp(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":267 + /* "ssh/channel.pyx":266 * def request_sftp(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6089,7 +6050,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj } } - /* "ssh/channel.pyx":269 + /* "ssh/channel.pyx":268 * with nogil: * rc = c_ssh.ssh_channel_request_sftp(self._channel) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -6097,14 +6058,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj * def request_subsystem(self, subsystem): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 269, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 268, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":265 + /* "ssh/channel.pyx":264 * return handle_error_codes(rc, self.session._session) * * def request_sftp(self): # <<<<<<<<<<<<<< @@ -6123,7 +6084,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_56request_sftp(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":271 +/* "ssh/channel.pyx":270 * return handle_error_codes(rc, self.session._session) * * def request_subsystem(self, subsystem): # <<<<<<<<<<<<<< @@ -6159,19 +6120,19 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_subsystem", 0); - /* "ssh/channel.pyx":272 + /* "ssh/channel.pyx":271 * * def request_subsystem(self, subsystem): * cdef bytes b_sys = to_bytes(subsystem) # <<<<<<<<<<<<<< * cdef const_char *c_sys = b_sys * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_subsystem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_subsystem); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_sys = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/channel.pyx":273 + /* "ssh/channel.pyx":272 * def request_subsystem(self, subsystem): * cdef bytes b_sys = to_bytes(subsystem) * cdef const_char *c_sys = b_sys # <<<<<<<<<<<<<< @@ -6180,12 +6141,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py */ if (unlikely(__pyx_v_b_sys == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 273, __pyx_L1_error) + __PYX_ERR(0, 272, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sys); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_b_sys); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) __pyx_v_c_sys = __pyx_t_2; - /* "ssh/channel.pyx":275 + /* "ssh/channel.pyx":274 * cdef const_char *c_sys = b_sys * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6200,7 +6161,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py #endif /*try:*/ { - /* "ssh/channel.pyx":276 + /* "ssh/channel.pyx":275 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_subsystem( # <<<<<<<<<<<<<< @@ -6210,7 +6171,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py __pyx_v_rc = ssh_channel_request_subsystem(__pyx_v_self->_channel, __pyx_v_c_sys); } - /* "ssh/channel.pyx":275 + /* "ssh/channel.pyx":274 * cdef const_char *c_sys = b_sys * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6229,7 +6190,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py } } - /* "ssh/channel.pyx":278 + /* "ssh/channel.pyx":277 * rc = c_ssh.ssh_channel_request_subsystem( * self._channel, c_sys) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -6237,14 +6198,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py * def request_x11(self, int screen_number, bint single_connection=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 278, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":271 + /* "ssh/channel.pyx":270 * return handle_error_codes(rc, self.session._session) * * def request_subsystem(self, subsystem): # <<<<<<<<<<<<<< @@ -6264,7 +6225,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_58request_subsystem(struct __py return __pyx_r; } -/* "ssh/channel.pyx":280 +/* "ssh/channel.pyx":279 * return handle_error_codes(rc, self.session._session) * * def request_x11(self, int screen_number, bint single_connection=True): # <<<<<<<<<<<<<< @@ -6311,7 +6272,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_61request_x11(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_x11") < 0)) __PYX_ERR(0, 280, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "request_x11") < 0)) __PYX_ERR(0, 279, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -6322,16 +6283,16 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_61request_x11(PyObject *__pyx_v default: goto __pyx_L5_argtuple_error; } } - __pyx_v_screen_number = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L3_error) + __pyx_v_screen_number = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_screen_number == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) if (values[1]) { - __pyx_v_single_connection = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 280, __pyx_L3_error) + __pyx_v_single_connection = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_single_connection == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) } else { __pyx_v_single_connection = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("request_x11", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 280, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("request_x11", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 279, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.request_x11", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -6355,7 +6316,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("request_x11", 0); - /* "ssh/channel.pyx":282 + /* "ssh/channel.pyx":281 * def request_x11(self, int screen_number, bint single_connection=True): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6370,7 +6331,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":283 + /* "ssh/channel.pyx":282 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_request_x11( # <<<<<<<<<<<<<< @@ -6380,7 +6341,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ __pyx_v_rc = ssh_channel_request_x11(__pyx_v_self->_channel, __pyx_v_single_connection, NULL, NULL, __pyx_v_screen_number); } - /* "ssh/channel.pyx":282 + /* "ssh/channel.pyx":281 * def request_x11(self, int screen_number, bint single_connection=True): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6399,7 +6360,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ } } - /* "ssh/channel.pyx":285 + /* "ssh/channel.pyx":284 * rc = c_ssh.ssh_channel_request_x11( * self._channel, single_connection, NULL, NULL, screen_number) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -6407,14 +6368,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ * def set_blocking(self, bint blocking): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 285, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":280 + /* "ssh/channel.pyx":279 * return handle_error_codes(rc, self.session._session) * * def request_x11(self, int screen_number, bint single_connection=True): # <<<<<<<<<<<<<< @@ -6433,7 +6394,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_60request_x11(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":287 +/* "ssh/channel.pyx":286 * return handle_error_codes(rc, self.session._session) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< @@ -6453,7 +6414,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_63set_blocking(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking (wrapper)", 0); assert(__pyx_arg_blocking); { - __pyx_v_blocking = __Pyx_PyObject_IsTrue(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 287, __pyx_L3_error) + __pyx_v_blocking = __Pyx_PyObject_IsTrue(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6473,7 +6434,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/channel.pyx":288 + /* "ssh/channel.pyx":287 * * def set_blocking(self, bint blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6488,7 +6449,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":289 + /* "ssh/channel.pyx":288 * def set_blocking(self, bint blocking): * with nogil: * c_ssh.ssh_channel_set_blocking(self._channel, blocking) # <<<<<<<<<<<<<< @@ -6498,7 +6459,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj ssh_channel_set_blocking(__pyx_v_self->_channel, __pyx_v_blocking); } - /* "ssh/channel.pyx":288 + /* "ssh/channel.pyx":287 * * def set_blocking(self, bint blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6517,7 +6478,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj } } - /* "ssh/channel.pyx":287 + /* "ssh/channel.pyx":286 * return handle_error_codes(rc, self.session._session) * * def set_blocking(self, bint blocking): # <<<<<<<<<<<<<< @@ -6532,7 +6493,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_62set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":291 +/* "ssh/channel.pyx":290 * c_ssh.ssh_channel_set_blocking(self._channel, blocking) * * def set_counter(self, counter): # <<<<<<<<<<<<<< @@ -6562,7 +6523,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counter", 0); - /* "ssh/channel.pyx":292 + /* "ssh/channel.pyx":291 * * def set_counter(self, counter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6570,9 +6531,9 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str * def write(self, bytes data): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 292, __pyx_L1_error) + __PYX_ERR(0, 291, __pyx_L1_error) - /* "ssh/channel.pyx":291 + /* "ssh/channel.pyx":290 * c_ssh.ssh_channel_set_blocking(self._channel, blocking) * * def set_counter(self, counter): # <<<<<<<<<<<<<< @@ -6589,7 +6550,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_64set_counter(CYTHON_UNUSED str return __pyx_r; } -/* "ssh/channel.pyx":294 +/* "ssh/channel.pyx":293 * raise NotImplementedError * * def write(self, bytes data): # <<<<<<<<<<<<<< @@ -6607,7 +6568,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_67write(PyObject *__pyx_v_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 294, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 293, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7channel_7Channel_66write(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6634,7 +6595,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write", 0); - /* "ssh/channel.pyx":295 + /* "ssh/channel.pyx":294 * * def write(self, bytes data): * cdef c_ssh.uint32_t size = len(data) # <<<<<<<<<<<<<< @@ -6643,12 +6604,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 295, __pyx_L1_error) + __PYX_ERR(0, 294, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 294, __pyx_L1_error) __pyx_v_size = __pyx_t_1; - /* "ssh/channel.pyx":296 + /* "ssh/channel.pyx":295 * def write(self, bytes data): * cdef c_ssh.uint32_t size = len(data) * cdef const_char *c_data = data # <<<<<<<<<<<<<< @@ -6657,12 +6618,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 296, __pyx_L1_error) + __PYX_ERR(0, 295, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 296, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 295, __pyx_L1_error) __pyx_v_c_data = __pyx_t_2; - /* "ssh/channel.pyx":298 + /* "ssh/channel.pyx":297 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6677,7 +6638,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 #endif /*try:*/ { - /* "ssh/channel.pyx":299 + /* "ssh/channel.pyx":298 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) # <<<<<<<<<<<<<< @@ -6687,7 +6648,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 __pyx_v_rc = ssh_channel_write(__pyx_v_self->_channel, __pyx_v_c_data, __pyx_v_size); } - /* "ssh/channel.pyx":298 + /* "ssh/channel.pyx":297 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6706,7 +6667,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 } } - /* "ssh/channel.pyx":300 + /* "ssh/channel.pyx":299 * with nogil: * rc = c_ssh.ssh_channel_write(self._channel, c_data, size) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -6714,14 +6675,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 * def write_stderr(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 300, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 299, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":294 + /* "ssh/channel.pyx":293 * raise NotImplementedError * * def write(self, bytes data): # <<<<<<<<<<<<<< @@ -6740,7 +6701,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_66write(struct __pyx_obj_3ssh_7 return __pyx_r; } -/* "ssh/channel.pyx":302 +/* "ssh/channel.pyx":301 * return handle_error_codes(rc, self.session._session) * * def write_stderr(self, bytes data): # <<<<<<<<<<<<<< @@ -6758,7 +6719,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_69write_stderr(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("write_stderr (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 302, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 301, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7channel_7Channel_68write_stderr(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6785,7 +6746,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_stderr", 0); - /* "ssh/channel.pyx":303 + /* "ssh/channel.pyx":302 * * def write_stderr(self, bytes data): * cdef c_ssh.uint32_t size = len(data) # <<<<<<<<<<<<<< @@ -6794,12 +6755,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 303, __pyx_L1_error) + __PYX_ERR(0, 302, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_v_size = __pyx_t_1; - /* "ssh/channel.pyx":304 + /* "ssh/channel.pyx":303 * def write_stderr(self, bytes data): * cdef c_ssh.uint32_t size = len(data) * cdef const_char *c_data = data # <<<<<<<<<<<<<< @@ -6808,12 +6769,12 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 304, __pyx_L1_error) + __PYX_ERR(0, 303, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 304, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 303, __pyx_L1_error) __pyx_v_c_data = __pyx_t_2; - /* "ssh/channel.pyx":306 + /* "ssh/channel.pyx":305 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6828,7 +6789,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj #endif /*try:*/ { - /* "ssh/channel.pyx":307 + /* "ssh/channel.pyx":306 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) # <<<<<<<<<<<<<< @@ -6838,7 +6799,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj __pyx_v_rc = ssh_channel_write_stderr(__pyx_v_self->_channel, __pyx_v_c_data, __pyx_v_size); } - /* "ssh/channel.pyx":306 + /* "ssh/channel.pyx":305 * cdef const_char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6857,7 +6818,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj } } - /* "ssh/channel.pyx":308 + /* "ssh/channel.pyx":307 * with nogil: * rc = c_ssh.ssh_channel_write_stderr(self._channel, c_data, size) * return handle_error_codes(rc, self.session._session) # <<<<<<<<<<<<<< @@ -6865,14 +6826,14 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj * def window_size(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 308, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->session->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 307, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":302 + /* "ssh/channel.pyx":301 * return handle_error_codes(rc, self.session._session) * * def write_stderr(self, bytes data): # <<<<<<<<<<<<<< @@ -6891,7 +6852,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_68write_stderr(struct __pyx_obj return __pyx_r; } -/* "ssh/channel.pyx":310 +/* "ssh/channel.pyx":309 * return handle_error_codes(rc, self.session._session) * * def window_size(self): # <<<<<<<<<<<<<< @@ -6923,7 +6884,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("window_size", 0); - /* "ssh/channel.pyx":312 + /* "ssh/channel.pyx":311 * def window_size(self): * cdef c_ssh.uint32_t size * with nogil: # <<<<<<<<<<<<<< @@ -6938,7 +6899,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/channel.pyx":313 + /* "ssh/channel.pyx":312 * cdef c_ssh.uint32_t size * with nogil: * size = c_ssh.ssh_channel_window_size(self._channel) # <<<<<<<<<<<<<< @@ -6948,7 +6909,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ __pyx_v_size = ssh_channel_window_size(__pyx_v_self->_channel); } - /* "ssh/channel.pyx":312 + /* "ssh/channel.pyx":311 * def window_size(self): * cdef c_ssh.uint32_t size * with nogil: # <<<<<<<<<<<<<< @@ -6967,7 +6928,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ } } - /* "ssh/channel.pyx":314 + /* "ssh/channel.pyx":313 * with nogil: * size = c_ssh.ssh_channel_window_size(self._channel) * return size # <<<<<<<<<<<<<< @@ -6975,13 +6936,13 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ * def select(self, channels not None, outchannels not None, maxfd, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_uint32_t(__pyx_v_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/channel.pyx":310 + /* "ssh/channel.pyx":309 * return handle_error_codes(rc, self.session._session) * * def window_size(self): # <<<<<<<<<<<<<< @@ -7000,7 +6961,7 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_70window_size(struct __pyx_obj_ return __pyx_r; } -/* "ssh/channel.pyx":316 +/* "ssh/channel.pyx":315 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -7027,7 +6988,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_channels,&__pyx_n_s_outchannels,&__pyx_n_s_maxfd,&__pyx_n_s_readfds,&__pyx_n_s_timeout,0}; PyObject* values[5] = {0,0,0,0,0}; - /* "ssh/channel.pyx":317 + /* "ssh/channel.pyx":316 * * def select(self, channels not None, outchannels not None, maxfd, * readfds, timeout=None): # <<<<<<<<<<<<<< @@ -7060,19 +7021,19 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_outchannels)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 1); __PYX_ERR(0, 316, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 1); __PYX_ERR(0, 315, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxfd)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 2); __PYX_ERR(0, 316, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 2); __PYX_ERR(0, 315, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_readfds)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 3); __PYX_ERR(0, 316, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, 3); __PYX_ERR(0, 315, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: @@ -7082,7 +7043,7 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "select") < 0)) __PYX_ERR(0, 316, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "select") < 0)) __PYX_ERR(0, 315, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -7104,21 +7065,21 @@ static PyObject *__pyx_pw_3ssh_7channel_7Channel_73select(PyObject *__pyx_v_self } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 316, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("select", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 315, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.channel.Channel.select", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_channels) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "channels"); __PYX_ERR(0, 316, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "channels"); __PYX_ERR(0, 315, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_outchannels) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "outchannels"); __PYX_ERR(0, 316, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "outchannels"); __PYX_ERR(0, 315, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7channel_7Channel_72select(((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_self), __pyx_v_channels, __pyx_v_outchannels, __pyx_v_maxfd, __pyx_v_readfds, __pyx_v_timeout); - /* "ssh/channel.pyx":316 + /* "ssh/channel.pyx":315 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -7143,15 +7104,15 @@ static PyObject *__pyx_pf_3ssh_7channel_7Channel_72select(CYTHON_UNUSED struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("select", 0); - /* "ssh/channel.pyx":318 + /* "ssh/channel.pyx":317 * def select(self, channels not None, outchannels not None, maxfd, * readfds, timeout=None): * raise NotImplementedError # <<<<<<<<<<<<<< */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 318, __pyx_L1_error) + __PYX_ERR(0, 317, __pyx_L1_error) - /* "ssh/channel.pyx":316 + /* "ssh/channel.pyx":315 * return size * * def select(self, channels not None, outchannels not None, maxfd, # <<<<<<<<<<<<<< @@ -7597,7 +7558,6 @@ static struct PyModuleDef __pyx_moduledef = { static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_b_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 0, 0}, {&__pyx_n_s_Channel, __pyx_k_Channel, sizeof(__pyx_k_Channel), 0, 0, 1, 1}, - {&__pyx_kp_s_Channel_dealloc, __pyx_k_Channel_dealloc, sizeof(__pyx_k_Channel_dealloc), 0, 0, 1, 0}, {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1}, {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, @@ -7605,8 +7565,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_col, __pyx_k_col, sizeof(__pyx_k_col), 0, 0, 1, 1}, {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1}, - {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, - {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_is_stderr, __pyx_k_is_stderr, sizeof(__pyx_k_is_stderr), 0, 0, 1, 1}, {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, @@ -7615,7 +7573,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, {&__pyx_n_s_outchannels, __pyx_k_outchannels, sizeof(__pyx_k_outchannels), 0, 0, 1, 1}, - {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_readfds, __pyx_k_readfds, sizeof(__pyx_k_readfds), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, @@ -7639,8 +7596,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 132, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 131, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 291, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -8142,72 +8099,6 @@ static int __Pyx_CheckKeywordStrings( return 0; } -/* PyErrFetchRestore */ -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -} -#endif - -/* WriteUnraisableException */ -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback, CYTHON_UNUSED int nogil) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_PyThreadState_declare -#ifdef WITH_THREAD - PyGILState_STATE state; - if (nogil) - state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; -#endif -#endif - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -#ifdef WITH_THREAD - if (nogil) - PyGILState_Release(state); -#endif -} - /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, @@ -8324,6 +8215,30 @@ static int __Pyx_ParseOptionalKeywords( return -1; } +/* PyErrFetchRestore */ +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + /* GetException */ #if CYTHON_FAST_THREAD_STATE static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) @@ -9204,112 +9119,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, return (target_type) value;\ } -/* Print */ -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static PyObject *__Pyx_GetStdout(void) { - PyObject *f = PySys_GetObject((char *)"stdout"); - if (!f) { - PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); - } - return f; -} -static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { - int i; - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { - PyObject* v; - if (PyFile_SoftSpace(f, 1)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - v = PyTuple_GET_ITEM(arg_tuple, i); - if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) - goto error; - if (PyString_Check(v)) { - char *s = PyString_AsString(v); - Py_ssize_t len = PyString_Size(v); - if (len > 0) { - switch (s[len-1]) { - case ' ': break; - case '\f': case '\r': case '\n': case '\t': case '\v': - PyFile_SoftSpace(f, 0); - break; - default: break; - } - } - } - } - if (newline) { - if (PyFile_WriteString("\n", f) < 0) - goto error; - PyFile_SoftSpace(f, 0); - } - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; -} -#else -static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { - PyObject* kwargs = 0; - PyObject* result = 0; - PyObject* end_string; - if (unlikely(!__pyx_print)) { - __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); - if (!__pyx_print) - return -1; - } - if (stream) { - kwargs = PyDict_New(); - if (unlikely(!kwargs)) - return -1; - if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) - goto bad; - if (!newline) { - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - goto bad; - if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - goto bad; - } - Py_DECREF(end_string); - } - } else if (!newline) { - if (unlikely(!__pyx_print_kwargs)) { - __pyx_print_kwargs = PyDict_New(); - if (unlikely(!__pyx_print_kwargs)) - return -1; - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - return -1; - if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - return -1; - } - Py_DECREF(end_string); - } - kwargs = __pyx_print_kwargs; - } - result = PyObject_Call(__pyx_print, arg_tuple, kwargs); - if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) - Py_DECREF(kwargs); - if (!result) - return -1; - Py_DECREF(result); - return 0; -bad: - if (kwargs != __pyx_print_kwargs) - Py_XDECREF(kwargs); - return -1; -} -#endif - /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; @@ -9750,43 +9559,6 @@ static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) { return (uint32_t) -1; } -/* PrintOne */ -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static int __Pyx_PrintOne(PyObject* f, PyObject *o) { - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - if (PyFile_SoftSpace(f, 0)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) - goto error; - if (PyFile_WriteString("\n", f) < 0) - goto error; - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; - /* the line below is just to avoid C compiler - * warnings about unused functions */ - return __Pyx_Print(f, NULL, 0); -} -#else -static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { - int res; - PyObject* arg_tuple = PyTuple_Pack(1, o); - if (unlikely(!arg_tuple)) - return -1; - res = __Pyx_Print(stream, arg_tuple, 1); - Py_DECREF(arg_tuple); - return res; -} -#endif - /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; diff --git a/ssh/channel.pyx b/ssh/channel.pyx index 2412d5eb..85e4014b 100644 --- a/ssh/channel.pyx +++ b/ssh/channel.pyx @@ -29,7 +29,6 @@ cdef class Channel: def __dealloc__(self): if self._channel is not NULL: - print("Channel dealloc") c_ssh.ssh_channel_free(self._channel) self._channel = NULL diff --git a/ssh/session.c b/ssh/session.c index c656793d..b91e71dd 100644 --- a/ssh/session.c +++ b/ssh/session.c @@ -1290,11 +1290,6 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, /* KeywordStringCheck.proto */ static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); -/* WriteUnraisableException.proto */ -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil); - /* RaiseDoubleKeywords.proto */ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); @@ -1389,13 +1384,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__ssh_auth_e(enum ssh_auth_e value); -/* Print.proto */ -static int __Pyx_Print(PyObject*, PyObject *, int); -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -static PyObject* __pyx_print = 0; -static PyObject* __pyx_print_kwargs = 0; -#endif - /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_socket_t(socket_t value); @@ -1405,9 +1393,6 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); /* CIntFromPy.proto */ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); -/* PrintOne.proto */ -static int __Pyx_PrintOne(PyObject* stream, PyObject *o); - /* CIntToPy.proto */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); @@ -1569,15 +1554,12 @@ static PyObject *__pyx_builtin_MemoryError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_TypeError; static const char __pyx_k_i[] = "i"; -static const char __pyx_k_end[] = "end"; static const char __pyx_k_echo[] = "echo"; -static const char __pyx_k_file[] = "file"; static const char __pyx_k_main[] = "__main__"; static const char __pyx_k_mode[] = "mode"; static const char __pyx_k_name[] = "__name__"; static const char __pyx_k_port[] = "port"; static const char __pyx_k_test[] = "__test__"; -static const char __pyx_k_print[] = "print"; static const char __pyx_k_value[] = "value"; static const char __pyx_k_answer[] = "answer"; static const char __pyx_k_import[] = "__import__"; @@ -1611,7 +1593,6 @@ static const char __pyx_k_SSH_AUTH_AGAIN[] = "SSH_AUTH_AGAIN"; static const char __pyx_k_SSH_AUTH_ERROR[] = "SSH_AUTH_ERROR"; static const char __pyx_k_always_display[] = "always_display"; static const char __pyx_k_SSH_AUTH_DENIED[] = "SSH_AUTH_DENIED"; -static const char __pyx_k_Session_dealloc[] = "Session dealloc"; static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; static const char __pyx_k_SSH_AUTH_PARTIAL[] = "SSH_AUTH_PARTIAL"; static const char __pyx_k_SSH_AUTH_SUCCESS[] = "SSH_AUTH_SUCCESS"; @@ -1637,7 +1618,6 @@ static PyObject *__pyx_n_s_SSH_CLOSED_ERROR; static PyObject *__pyx_n_s_SSH_READ_PENDING; static PyObject *__pyx_n_s_SSH_WRITE_PENDING; static PyObject *__pyx_n_s_Session; -static PyObject *__pyx_kp_s_Session_dealloc; static PyObject *__pyx_kp_s_Session_is_not_connected; static PyObject *__pyx_n_s_TypeError; static PyObject *__pyx_n_s_address; @@ -1647,9 +1627,7 @@ static PyObject *__pyx_n_s_bound_port; static PyObject *__pyx_n_s_cline_in_traceback; static PyObject *__pyx_n_s_dest_port; static PyObject *__pyx_n_s_echo; -static PyObject *__pyx_n_s_end; static PyObject *__pyx_n_s_exceptions; -static PyObject *__pyx_n_s_file; static PyObject *__pyx_n_s_getstate; static PyObject *__pyx_n_s_i; static PyObject *__pyx_n_s_import; @@ -1662,7 +1640,6 @@ static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; static PyObject *__pyx_n_s_option; static PyObject *__pyx_n_s_password; static PyObject *__pyx_n_s_port; -static PyObject *__pyx_n_s_print; static PyObject *__pyx_n_s_pyx_vtable; static PyObject *__pyx_n_s_rcounter; static PyObject *__pyx_n_s_reduce; @@ -2008,7 +1985,7 @@ static int __pyx_pf_3ssh_7session_7Session___cinit__(struct __pyx_obj_3ssh_7sess * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._session is not NULL: - * print("Session dealloc") + * c_ssh.ssh_free(self._session) */ /* Python wrapper */ @@ -2025,17 +2002,14 @@ static void __pyx_pw_3ssh_7session_7Session_3__dealloc__(PyObject *__pyx_v_self) static void __pyx_pf_3ssh_7session_7Session_2__dealloc__(struct __pyx_obj_3ssh_7session_Session *__pyx_v_self) { __Pyx_RefNannyDeclarations int __pyx_t_1; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__dealloc__", 0); /* "ssh/session.pyx":67 * * def __dealloc__(self): * if self._session is not NULL: # <<<<<<<<<<<<<< - * print("Session dealloc") * c_ssh.ssh_free(self._session) + * self._session = NULL */ __pyx_t_1 = ((__pyx_v_self->_session != NULL) != 0); if (__pyx_t_1) { @@ -2043,23 +2017,14 @@ static void __pyx_pf_3ssh_7session_7Session_2__dealloc__(struct __pyx_obj_3ssh_7 /* "ssh/session.pyx":68 * def __dealloc__(self): * if self._session is not NULL: - * print("Session dealloc") # <<<<<<<<<<<<<< - * c_ssh.ssh_free(self._session) - * self._session = NULL - */ - if (__Pyx_PrintOne(0, __pyx_kp_s_Session_dealloc) < 0) __PYX_ERR(0, 68, __pyx_L1_error) - - /* "ssh/session.pyx":69 - * if self._session is not NULL: - * print("Session dealloc") * c_ssh.ssh_free(self._session) # <<<<<<<<<<<<<< * self._session = NULL * */ ssh_free(__pyx_v_self->_session); - /* "ssh/session.pyx":70 - * print("Session dealloc") + /* "ssh/session.pyx":69 + * if self._session is not NULL: * c_ssh.ssh_free(self._session) * self._session = NULL # <<<<<<<<<<<<<< * @@ -2071,8 +2036,8 @@ static void __pyx_pf_3ssh_7session_7Session_2__dealloc__(struct __pyx_obj_3ssh_7 * * def __dealloc__(self): * if self._session is not NULL: # <<<<<<<<<<<<<< - * print("Session dealloc") * c_ssh.ssh_free(self._session) + * self._session = NULL */ } @@ -2081,18 +2046,14 @@ static void __pyx_pf_3ssh_7session_7Session_2__dealloc__(struct __pyx_obj_3ssh_7 * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._session is not NULL: - * print("Session dealloc") + * c_ssh.ssh_free(self._session) */ /* function exit code */ - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_WriteUnraisable("ssh.session.Session.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __pyx_L0:; __Pyx_RefNannyFinishContext(); } -/* "ssh/session.pyx":72 +/* "ssh/session.pyx":71 * self._session = NULL * * def set_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -2111,7 +2072,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_5set_socket(PyObject *__pyx_v_s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_socket (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_socket) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 72, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 71, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_4set_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -2137,17 +2098,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_socket", 0); - /* "ssh/session.pyx":78 + /* "ssh/session.pyx":77 * translate python sockets to file descriptors to be used by libssh. * """ * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) # <<<<<<<<<<<<<< * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD * cdef int rc */ - __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 78, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 77, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":79 + /* "ssh/session.pyx":78 * """ * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD # <<<<<<<<<<<<<< @@ -2156,7 +2117,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s */ __pyx_v_fd = SSH_OPTIONS_FD; - /* "ssh/session.pyx":81 + /* "ssh/session.pyx":80 * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2171,7 +2132,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":82 + /* "ssh/session.pyx":81 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) # <<<<<<<<<<<<<< @@ -2181,7 +2142,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, __pyx_v_fd, (&__pyx_v__sock)); } - /* "ssh/session.pyx":81 + /* "ssh/session.pyx":80 * cdef c_ssh.ssh_options_e fd = c_ssh.ssh_options_e.SSH_OPTIONS_FD * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2200,16 +2161,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s } } - /* "ssh/session.pyx":83 + /* "ssh/session.pyx":82 * with nogil: * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) * handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< * self._sock = _sock * self.sock = socket */ - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 82, __pyx_L1_error) - /* "ssh/session.pyx":84 + /* "ssh/session.pyx":83 * rc = c_ssh.ssh_options_set(self._session, fd, &_sock) * handle_error_codes(rc, self._session) * self._sock = _sock # <<<<<<<<<<<<<< @@ -2218,7 +2179,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s */ __pyx_v_self->_sock = __pyx_v__sock; - /* "ssh/session.pyx":85 + /* "ssh/session.pyx":84 * handle_error_codes(rc, self._session) * self._sock = _sock * self.sock = socket # <<<<<<<<<<<<<< @@ -2231,7 +2192,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s __Pyx_DECREF(__pyx_v_self->sock); __pyx_v_self->sock = __pyx_v_socket; - /* "ssh/session.pyx":86 + /* "ssh/session.pyx":85 * self._sock = _sock * self.sock = socket * return rc # <<<<<<<<<<<<<< @@ -2239,13 +2200,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s * def blocking_flush(self, int timeout): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":72 + /* "ssh/session.pyx":71 * self._session = NULL * * def set_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -2264,7 +2225,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_4set_socket(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/session.pyx":88 +/* "ssh/session.pyx":87 * return rc * * def blocking_flush(self, int timeout): # <<<<<<<<<<<<<< @@ -2284,7 +2245,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_7blocking_flush(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("blocking_flush (wrapper)", 0); assert(__pyx_arg_timeout); { - __pyx_v_timeout = __Pyx_PyInt_As_int(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(__pyx_arg_timeout); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -2310,7 +2271,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("blocking_flush", 0); - /* "ssh/session.pyx":90 + /* "ssh/session.pyx":89 * def blocking_flush(self, int timeout): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2325,7 +2286,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":91 + /* "ssh/session.pyx":90 * cdef int rc * with nogil: * rc = c_ssh.ssh_blocking_flush(self._session, timeout) # <<<<<<<<<<<<<< @@ -2335,7 +2296,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob __pyx_v_rc = ssh_blocking_flush(__pyx_v_self->_session, __pyx_v_timeout); } - /* "ssh/session.pyx":90 + /* "ssh/session.pyx":89 * def blocking_flush(self, int timeout): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2354,7 +2315,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob } } - /* "ssh/session.pyx":92 + /* "ssh/session.pyx":91 * with nogil: * rc = c_ssh.ssh_blocking_flush(self._session, timeout) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -2362,14 +2323,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob * def channel_new(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 92, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":88 + /* "ssh/session.pyx":87 * return rc * * def blocking_flush(self, int timeout): # <<<<<<<<<<<<<< @@ -2388,7 +2349,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_6blocking_flush(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":94 +/* "ssh/session.pyx":93 * return handle_error_codes(rc, self._session) * * def channel_new(self): # <<<<<<<<<<<<<< @@ -2423,7 +2384,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("channel_new", 0); - /* "ssh/session.pyx":97 + /* "ssh/session.pyx":96 * cdef c_ssh.ssh_channel _channel * cdef Channel channel * with nogil: # <<<<<<<<<<<<<< @@ -2438,16 +2399,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":98 + /* "ssh/session.pyx":97 * cdef Channel channel * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 98, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 97, __pyx_L4_error) - /* "ssh/session.pyx":99 + /* "ssh/session.pyx":98 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) # <<<<<<<<<<<<<< @@ -2456,7 +2417,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 */ __pyx_v__channel = ssh_channel_new(__pyx_v_self->_session); - /* "ssh/session.pyx":100 + /* "ssh/session.pyx":99 * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -2466,7 +2427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":101 + /* "ssh/session.pyx":100 * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2479,7 +2440,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":102 + /* "ssh/session.pyx":101 * if _channel is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2488,30 +2449,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":103 + /* "ssh/session.pyx":102 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * channel = Channel.from_ptr(_channel, self) * return channel */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 102, __pyx_L8_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 101, __pyx_L8_error) - /* "ssh/session.pyx":102 + /* "ssh/session.pyx":101 * if _channel is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * channel = Channel.from_ptr(_channel, self) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 101, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":101 + /* "ssh/session.pyx":100 * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2534,7 +2495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 } } - /* "ssh/session.pyx":100 + /* "ssh/session.pyx":99 * _check_connected(self._session) * _channel = c_ssh.ssh_channel_new(self._session) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -2544,7 +2505,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 } } - /* "ssh/session.pyx":97 + /* "ssh/session.pyx":96 * cdef c_ssh.ssh_channel _channel * cdef Channel channel * with nogil: # <<<<<<<<<<<<<< @@ -2577,19 +2538,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 } } - /* "ssh/session.pyx":104 + /* "ssh/session.pyx":103 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * channel = Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< * return channel * */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 104, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_channel = ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":105 + /* "ssh/session.pyx":104 * c_ssh.ssh_get_error_code(self._session), self._session) * channel = Channel.from_ptr(_channel, self) * return channel # <<<<<<<<<<<<<< @@ -2601,7 +2562,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 __pyx_r = ((PyObject *)__pyx_v_channel); goto __pyx_L0; - /* "ssh/session.pyx":94 + /* "ssh/session.pyx":93 * return handle_error_codes(rc, self._session) * * def channel_new(self): # <<<<<<<<<<<<<< @@ -2621,7 +2582,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_8channel_new(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":107 +/* "ssh/session.pyx":106 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2656,7 +2617,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sftp_new", 0); - /* "ssh/session.pyx":110 + /* "ssh/session.pyx":109 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2671,16 +2632,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":111 + /* "ssh/session.pyx":110 * cdef SFTP sftp * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _sftp = sftp_new(self._session) * if _sftp is NULL: */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 111, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 110, __pyx_L4_error) - /* "ssh/session.pyx":112 + /* "ssh/session.pyx":111 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2690,7 +2651,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_v__sftp = sftp_new(__pyx_v_self->_session); } - /* "ssh/session.pyx":110 + /* "ssh/session.pyx":109 * cdef sftp_session _sftp * cdef SFTP sftp * with nogil: # <<<<<<<<<<<<<< @@ -2716,7 +2677,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":113 + /* "ssh/session.pyx":112 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2726,7 +2687,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_t_1 = ((__pyx_v__sftp == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":114 + /* "ssh/session.pyx":113 * _sftp = sftp_new(self._session) * if _sftp is NULL: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2735,29 +2696,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":115 + /* "ssh/session.pyx":114 * if _sftp is NULL: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * sftp = SFTP.from_ptr(_sftp, self) * return sftp */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 113, __pyx_L1_error) - /* "ssh/session.pyx":114 + /* "ssh/session.pyx":113 * _sftp = sftp_new(self._session) * if _sftp is NULL: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":113 + /* "ssh/session.pyx":112 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2766,19 +2727,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":116 + /* "ssh/session.pyx":115 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) # <<<<<<<<<<<<<< * return sftp * */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sftp = ((struct __pyx_obj_3ssh_4sftp_SFTP *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":117 + /* "ssh/session.pyx":116 * c_ssh.ssh_get_error_code(self._session), self._session) * sftp = SFTP.from_ptr(_sftp, self) * return sftp # <<<<<<<<<<<<<< @@ -2790,7 +2751,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss __pyx_r = ((PyObject *)__pyx_v_sftp); goto __pyx_L0; - /* "ssh/session.pyx":107 + /* "ssh/session.pyx":106 * return channel * * def sftp_new(self): # <<<<<<<<<<<<<< @@ -2810,7 +2771,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_10sftp_new(struct __pyx_obj_3ss return __pyx_r; } -/* "ssh/session.pyx":119 +/* "ssh/session.pyx":118 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -2846,7 +2807,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sftp_init", 0); - /* "ssh/session.pyx":127 + /* "ssh/session.pyx":126 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -2861,16 +2822,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":128 + /* "ssh/session.pyx":127 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _sftp = sftp_new(self._session) * if _sftp is NULL: */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 128, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 127, __pyx_L4_error) - /* "ssh/session.pyx":129 + /* "ssh/session.pyx":128 * with nogil: * _check_connected(self._session) * _sftp = sftp_new(self._session) # <<<<<<<<<<<<<< @@ -2879,7 +2840,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ __pyx_v__sftp = sftp_new(__pyx_v_self->_session); - /* "ssh/session.pyx":130 + /* "ssh/session.pyx":129 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2889,7 +2850,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_t_1 = ((__pyx_v__sftp == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":131 + /* "ssh/session.pyx":130 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2902,7 +2863,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s #endif /*try:*/ { - /* "ssh/session.pyx":132 + /* "ssh/session.pyx":131 * if _sftp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -2911,30 +2872,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":133 + /* "ssh/session.pyx":132 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 132, __pyx_L8_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 131, __pyx_L8_error) - /* "ssh/session.pyx":132 + /* "ssh/session.pyx":131 * if _sftp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 132, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":131 + /* "ssh/session.pyx":130 * _sftp = sftp_new(self._session) * if _sftp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -2957,7 +2918,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":130 + /* "ssh/session.pyx":129 * _check_connected(self._session) * _sftp = sftp_new(self._session) * if _sftp is NULL: # <<<<<<<<<<<<<< @@ -2966,7 +2927,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s */ } - /* "ssh/session.pyx":134 + /* "ssh/session.pyx":133 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) # <<<<<<<<<<<<<< @@ -2976,7 +2937,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_v_rc = sftp_init(__pyx_v__sftp); } - /* "ssh/session.pyx":127 + /* "ssh/session.pyx":126 * cdef SFTP sftp * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3009,28 +2970,28 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s } } - /* "ssh/session.pyx":135 + /* "ssh/session.pyx":134 * c_ssh.ssh_get_error_code(self._session), self._session) * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) # <<<<<<<<<<<<<< * handle_error_codes(rc, self._session) * return sftp */ - __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 135, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_vtabptr_3ssh_4sftp_SFTP->from_ptr(__pyx_v__sftp, __pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_sftp = ((struct __pyx_obj_3ssh_4sftp_SFTP *)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":136 + /* "ssh/session.pyx":135 * rc = sftp_init(_sftp) * sftp = SFTP.from_ptr(_sftp, self) * handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< * return sftp * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 136, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 135, __pyx_L1_error) - /* "ssh/session.pyx":137 + /* "ssh/session.pyx":136 * sftp = SFTP.from_ptr(_sftp, self) * handle_error_codes(rc, self._session) * return sftp # <<<<<<<<<<<<<< @@ -3042,7 +3003,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s __pyx_r = ((PyObject *)__pyx_v_sftp); goto __pyx_L0; - /* "ssh/session.pyx":119 + /* "ssh/session.pyx":118 * return sftp * * def sftp_init(self): # <<<<<<<<<<<<<< @@ -3062,7 +3023,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_12sftp_init(struct __pyx_obj_3s return __pyx_r; } -/* "ssh/session.pyx":139 +/* "ssh/session.pyx":138 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3095,7 +3056,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connect", 0); - /* "ssh/session.pyx":141 + /* "ssh/session.pyx":140 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3110,7 +3071,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh #endif /*try:*/ { - /* "ssh/session.pyx":142 + /* "ssh/session.pyx":141 * cdef int rc * with nogil: * rc = c_ssh.ssh_connect(self._session) # <<<<<<<<<<<<<< @@ -3120,7 +3081,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh __pyx_v_rc = ssh_connect(__pyx_v_self->_session); } - /* "ssh/session.pyx":141 + /* "ssh/session.pyx":140 * def connect(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3139,7 +3100,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh } } - /* "ssh/session.pyx":143 + /* "ssh/session.pyx":142 * with nogil: * rc = c_ssh.ssh_connect(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3147,14 +3108,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh * def disconnect(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 143, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 142, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":139 + /* "ssh/session.pyx":138 * return sftp * * def connect(self): # <<<<<<<<<<<<<< @@ -3173,7 +3134,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_14connect(struct __pyx_obj_3ssh return __pyx_r; } -/* "ssh/session.pyx":145 +/* "ssh/session.pyx":144 * return handle_error_codes(rc, self._session) * * def disconnect(self): # <<<<<<<<<<<<<< @@ -3207,7 +3168,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_16disconnect(CYTHON_UNUSED stru return __pyx_r; } -/* "ssh/session.pyx":156 +/* "ssh/session.pyx":155 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3240,7 +3201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("connector_new", 0); - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":157 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3255,7 +3216,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":159 + /* "ssh/session.pyx":158 * cdef c_ssh.ssh_connector _connector * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) # <<<<<<<<<<<<<< @@ -3265,7 +3226,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_v__connector = ssh_connector_new(__pyx_v_self->_session); } - /* "ssh/session.pyx":158 + /* "ssh/session.pyx":157 * def connector_new(self): * cdef c_ssh.ssh_connector _connector * with nogil: # <<<<<<<<<<<<<< @@ -3284,7 +3245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob } } - /* "ssh/session.pyx":160 + /* "ssh/session.pyx":159 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3294,7 +3255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_t_1 = ((__pyx_v__connector == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":161 + /* "ssh/session.pyx":160 * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: * return # <<<<<<<<<<<<<< @@ -3305,7 +3266,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":160 + /* "ssh/session.pyx":159 * with nogil: * _connector = c_ssh.ssh_connector_new(self._session) * if _connector is NULL: # <<<<<<<<<<<<<< @@ -3314,7 +3275,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob */ } - /* "ssh/session.pyx":162 + /* "ssh/session.pyx":161 * if _connector is NULL: * return * return Connector.from_ptr(_connector, self) # <<<<<<<<<<<<<< @@ -3322,13 +3283,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob * def accept_forward(self, int timeout, int dest_port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_9connector_Connector->from_ptr(__pyx_v__connector, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_9connector_Connector->from_ptr(__pyx_v__connector, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":156 + /* "ssh/session.pyx":155 * # c_ssh.ssh_disconnect(self._session) * * def connector_new(self): # <<<<<<<<<<<<<< @@ -3347,7 +3308,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_18connector_new(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":164 +/* "ssh/session.pyx":163 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3390,11 +3351,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_21accept_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dest_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 164, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, 1); __PYX_ERR(0, 163, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 164, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "accept_forward") < 0)) __PYX_ERR(0, 163, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3402,12 +3363,12 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_21accept_forward(PyObject *__py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error) - __pyx_v_dest_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 164, __pyx_L3_error) + __pyx_v_timeout = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error) + __pyx_v_dest_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_dest_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 163, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 164, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("accept_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 163, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.accept_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -3431,7 +3392,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("accept_forward", 0); - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":165 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3446,16 +3407,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":167 + /* "ssh/session.pyx":166 * cdef c_ssh.ssh_channel _channel * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 167, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 166, __pyx_L4_error) - /* "ssh/session.pyx":168 + /* "ssh/session.pyx":167 * with nogil: * _check_connected(self._session) * _channel = c_ssh.ssh_channel_accept_forward( # <<<<<<<<<<<<<< @@ -3465,7 +3426,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_v__channel = ssh_channel_accept_forward(__pyx_v_self->_session, __pyx_v_timeout, (&__pyx_v_dest_port)); } - /* "ssh/session.pyx":166 + /* "ssh/session.pyx":165 * def accept_forward(self, int timeout, int dest_port): * cdef c_ssh.ssh_channel _channel * with nogil: # <<<<<<<<<<<<<< @@ -3491,7 +3452,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o } } - /* "ssh/session.pyx":170 + /* "ssh/session.pyx":169 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3501,7 +3462,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_t_1 = ((__pyx_v__channel == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":171 + /* "ssh/session.pyx":170 * self._session, timeout, &dest_port) * if _channel is NULL: * return # <<<<<<<<<<<<<< @@ -3512,7 +3473,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":170 + /* "ssh/session.pyx":169 * _channel = c_ssh.ssh_channel_accept_forward( * self._session, timeout, &dest_port) * if _channel is NULL: # <<<<<<<<<<<<<< @@ -3521,7 +3482,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o */ } - /* "ssh/session.pyx":172 + /* "ssh/session.pyx":171 * if _channel is NULL: * return * return Channel.from_ptr(_channel, self) # <<<<<<<<<<<<<< @@ -3529,13 +3490,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o * def cancel_forward(self, address not None, int port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_vtabptr_3ssh_7channel_Channel->from_ptr(__pyx_v__channel, __pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":164 + /* "ssh/session.pyx":163 * return Connector.from_ptr(_connector, self) * * def accept_forward(self, int timeout, int dest_port): # <<<<<<<<<<<<<< @@ -3554,7 +3515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_20accept_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":174 +/* "ssh/session.pyx":173 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3597,11 +3558,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_23cancel_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, 1); __PYX_ERR(0, 173, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 174, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cancel_forward") < 0)) __PYX_ERR(0, 173, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -3610,18 +3571,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_23cancel_forward(PyObject *__py values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_address = values[0]; - __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 174, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cancel_forward", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 173, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.cancel_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_address) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 174, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 173, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_22cancel_forward(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_address, __pyx_v_port); @@ -3648,19 +3609,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("cancel_forward", 0); - /* "ssh/session.pyx":175 + /* "ssh/session.pyx":174 * * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) # <<<<<<<<<<<<<< * cdef char *c_address = b_address * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 175, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":176 + /* "ssh/session.pyx":175 * def cancel_forward(self, address not None, int port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3669,12 +3630,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o */ if (unlikely(__pyx_v_b_address == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 176, __pyx_L1_error) + __PYX_ERR(0, 175, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 176, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 175, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":178 + /* "ssh/session.pyx":177 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3689,7 +3650,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":179 + /* "ssh/session.pyx":178 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_cancel_forward( # <<<<<<<<<<<<<< @@ -3699,7 +3660,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o __pyx_v_rc = ssh_channel_cancel_forward(__pyx_v_self->_session, __pyx_v_c_address, __pyx_v_port); } - /* "ssh/session.pyx":178 + /* "ssh/session.pyx":177 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3718,7 +3679,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o } } - /* "ssh/session.pyx":181 + /* "ssh/session.pyx":180 * rc = c_ssh.ssh_channel_cancel_forward( * self._session, c_address, port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3726,14 +3687,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o * def listen_forward(self, address not None, int port, int bound_port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 181, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 180, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":174 + /* "ssh/session.pyx":173 * return Channel.from_ptr(_channel, self) * * def cancel_forward(self, address not None, int port): # <<<<<<<<<<<<<< @@ -3753,7 +3714,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_22cancel_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":183 +/* "ssh/session.pyx":182 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3799,17 +3760,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_25listen_forward(PyObject *__py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 1); __PYX_ERR(0, 182, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bound_port)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, 2); __PYX_ERR(0, 182, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 183, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "listen_forward") < 0)) __PYX_ERR(0, 182, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -3819,19 +3780,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_25listen_forward(PyObject *__py values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_address = values[0]; - __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error) - __pyx_v_bound_port = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bound_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error) + __pyx_v_bound_port = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_bound_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 182, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("listen_forward", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 182, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.listen_forward", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_address) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 183, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "address"); __PYX_ERR(0, 182, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_24listen_forward(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_address, __pyx_v_port, __pyx_v_bound_port); @@ -3858,19 +3819,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("listen_forward", 0); - /* "ssh/session.pyx":184 + /* "ssh/session.pyx":183 * * def listen_forward(self, address not None, int port, int bound_port): * cdef bytes b_address = to_bytes(address) # <<<<<<<<<<<<<< * cdef char *c_address = b_address * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_address); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_address = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":185 + /* "ssh/session.pyx":184 * def listen_forward(self, address not None, int port, int bound_port): * cdef bytes b_address = to_bytes(address) * cdef char *c_address = b_address # <<<<<<<<<<<<<< @@ -3879,12 +3840,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o */ if (unlikely(__pyx_v_b_address == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 185, __pyx_L1_error) + __PYX_ERR(0, 184, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 185, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_address); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 184, __pyx_L1_error) __pyx_v_c_address = __pyx_t_2; - /* "ssh/session.pyx":187 + /* "ssh/session.pyx":186 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3899,7 +3860,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":188 + /* "ssh/session.pyx":187 * cdef int rc * with nogil: * rc = c_ssh.ssh_channel_listen_forward( # <<<<<<<<<<<<<< @@ -3909,7 +3870,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o __pyx_v_rc = ssh_channel_listen_forward(__pyx_v_self->_session, __pyx_v_c_address, __pyx_v_port, (&__pyx_v_bound_port)); } - /* "ssh/session.pyx":187 + /* "ssh/session.pyx":186 * cdef char *c_address = b_address * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -3928,7 +3889,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o } } - /* "ssh/session.pyx":190 + /* "ssh/session.pyx":189 * rc = c_ssh.ssh_channel_listen_forward( * self._session, c_address, port, &bound_port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -3936,14 +3897,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o * def get_disconnect_message(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 190, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":183 + /* "ssh/session.pyx":182 * return handle_error_codes(rc, self._session) * * def listen_forward(self, address not None, int port, int bound_port): # <<<<<<<<<<<<<< @@ -3963,7 +3924,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_24listen_forward(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":192 +/* "ssh/session.pyx":191 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -3997,7 +3958,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_disconnect_message", 0); - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":194 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -4012,16 +3973,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct #endif /*try:*/ { - /* "ssh/session.pyx":196 + /* "ssh/session.pyx":195 * cdef bytes b_message * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 196, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 195, __pyx_L4_error) - /* "ssh/session.pyx":197 + /* "ssh/session.pyx":196 * with nogil: * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) # <<<<<<<<<<<<<< @@ -4031,7 +3992,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_v_message = ssh_get_disconnect_message(__pyx_v_self->_session); } - /* "ssh/session.pyx":195 + /* "ssh/session.pyx":194 * cdef const char *message * cdef bytes b_message * with nogil: # <<<<<<<<<<<<<< @@ -4057,19 +4018,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct } } - /* "ssh/session.pyx":198 + /* "ssh/session.pyx":197 * _check_connected(self._session) * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message # <<<<<<<<<<<<<< * return b_message * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_message = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":199 + /* "ssh/session.pyx":198 * message = c_ssh.ssh_get_disconnect_message(self._session) * b_message = message * return b_message # <<<<<<<<<<<<<< @@ -4081,7 +4042,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct __pyx_r = __pyx_v_b_message; goto __pyx_L0; - /* "ssh/session.pyx":192 + /* "ssh/session.pyx":191 * return handle_error_codes(rc, self._session) * * def get_disconnect_message(self): # <<<<<<<<<<<<<< @@ -4101,7 +4062,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_26get_disconnect_message(struct return __pyx_r; } -/* "ssh/session.pyx":201 +/* "ssh/session.pyx":200 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4133,7 +4094,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_fd", 0); - /* "ssh/session.pyx":203 + /* "ssh/session.pyx":202 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4148,7 +4109,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ #endif /*try:*/ { - /* "ssh/session.pyx":204 + /* "ssh/session.pyx":203 * cdef c_ssh.socket_t _sock * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) # <<<<<<<<<<<<<< @@ -4158,7 +4119,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ __pyx_v__sock = ssh_get_fd(__pyx_v_self->_session); } - /* "ssh/session.pyx":203 + /* "ssh/session.pyx":202 * def get_fd(self): * cdef c_ssh.socket_t _sock * with nogil: # <<<<<<<<<<<<<< @@ -4177,7 +4138,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ } } - /* "ssh/session.pyx":205 + /* "ssh/session.pyx":204 * with nogil: * _sock = c_ssh.ssh_get_fd(self._session) * return _sock # <<<<<<<<<<<<<< @@ -4185,13 +4146,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ * def get_issue_banner(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_socket_t(__pyx_v__sock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":201 + /* "ssh/session.pyx":200 * return b_message * * def get_fd(self): # <<<<<<<<<<<<<< @@ -4210,7 +4171,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_28get_fd(struct __pyx_obj_3ssh_ return __pyx_r; } -/* "ssh/session.pyx":207 +/* "ssh/session.pyx":206 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4244,7 +4205,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_issue_banner", 0); - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":209 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4259,16 +4220,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":211 + /* "ssh/session.pyx":210 * cdef bytes banner * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 211, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 210, __pyx_L4_error) - /* "ssh/session.pyx":212 + /* "ssh/session.pyx":211 * with nogil: * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) # <<<<<<<<<<<<<< @@ -4278,7 +4239,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_v__banner = ssh_get_issue_banner(__pyx_v_self->_session); } - /* "ssh/session.pyx":210 + /* "ssh/session.pyx":209 * cdef char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -4304,19 +4265,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx } } - /* "ssh/session.pyx":213 + /* "ssh/session.pyx":212 * _check_connected(self._session) * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":214 + /* "ssh/session.pyx":213 * _banner = c_ssh.ssh_get_issue_banner(self._session) * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -4328,7 +4289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":207 + /* "ssh/session.pyx":206 * return _sock * * def get_issue_banner(self): # <<<<<<<<<<<<<< @@ -4348,7 +4309,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_30get_issue_banner(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":216 +/* "ssh/session.pyx":215 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4381,7 +4342,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_openssh_version", 0); - /* "ssh/session.pyx":218 + /* "ssh/session.pyx":217 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4396,16 +4357,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ #endif /*try:*/ { - /* "ssh/session.pyx":219 + /* "ssh/session.pyx":218 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 219, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 218, __pyx_L4_error) - /* "ssh/session.pyx":220 + /* "ssh/session.pyx":219 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) # <<<<<<<<<<<<<< @@ -4415,7 +4376,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ __pyx_v_rc = ssh_get_openssh_version(__pyx_v_self->_session); } - /* "ssh/session.pyx":218 + /* "ssh/session.pyx":217 * def get_openssh_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4441,7 +4402,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ } } - /* "ssh/session.pyx":221 + /* "ssh/session.pyx":220 * _check_connected(self._session) * rc = c_ssh.ssh_get_openssh_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4449,13 +4410,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ * def get_server_publickey(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":216 + /* "ssh/session.pyx":215 * return banner * * def get_openssh_version(self): # <<<<<<<<<<<<<< @@ -4474,7 +4435,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_32get_openssh_version(struct __ return __pyx_r; } -/* "ssh/session.pyx":223 +/* "ssh/session.pyx":222 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4504,7 +4465,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_server_publickey", 0); - /* "ssh/session.pyx":224 + /* "ssh/session.pyx":223 * * def get_server_publickey(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -4512,9 +4473,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U * def get_version(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 224, __pyx_L1_error) + __PYX_ERR(0, 223, __pyx_L1_error) - /* "ssh/session.pyx":223 + /* "ssh/session.pyx":222 * return rc * * def get_server_publickey(self): # <<<<<<<<<<<<<< @@ -4531,7 +4492,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_34get_server_publickey(CYTHON_U return __pyx_r; } -/* "ssh/session.pyx":226 +/* "ssh/session.pyx":225 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4563,7 +4524,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_version", 0); - /* "ssh/session.pyx":228 + /* "ssh/session.pyx":227 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4578,7 +4539,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":229 + /* "ssh/session.pyx":228 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_version(self._session) # <<<<<<<<<<<<<< @@ -4588,7 +4549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ __pyx_v_rc = ssh_get_version(__pyx_v_self->_session); } - /* "ssh/session.pyx":228 + /* "ssh/session.pyx":227 * def get_version(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4607,7 +4568,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ } } - /* "ssh/session.pyx":230 + /* "ssh/session.pyx":229 * with nogil: * rc = c_ssh.ssh_get_version(self._session) * return rc # <<<<<<<<<<<<<< @@ -4615,13 +4576,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ * def get_status(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":226 + /* "ssh/session.pyx":225 * raise NotImplementedError * * def get_version(self): # <<<<<<<<<<<<<< @@ -4640,7 +4601,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_36get_version(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":232 +/* "ssh/session.pyx":231 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4672,7 +4633,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_status", 0); - /* "ssh/session.pyx":234 + /* "ssh/session.pyx":233 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4687,7 +4648,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":235 + /* "ssh/session.pyx":234 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_status(self._session) # <<<<<<<<<<<<<< @@ -4697,7 +4658,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 __pyx_v_rc = ssh_get_status(__pyx_v_self->_session); } - /* "ssh/session.pyx":234 + /* "ssh/session.pyx":233 * def get_status(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4716,7 +4677,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 } } - /* "ssh/session.pyx":236 + /* "ssh/session.pyx":235 * with nogil: * rc = c_ssh.ssh_get_status(self._session) * return rc # <<<<<<<<<<<<<< @@ -4724,13 +4685,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 * def get_poll_flags(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 236, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":232 + /* "ssh/session.pyx":231 * return rc * * def get_status(self): # <<<<<<<<<<<<<< @@ -4749,7 +4710,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_38get_status(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":238 +/* "ssh/session.pyx":237 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4781,7 +4742,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_poll_flags", 0); - /* "ssh/session.pyx":240 + /* "ssh/session.pyx":239 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4796,7 +4757,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":241 + /* "ssh/session.pyx":240 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) # <<<<<<<<<<<<<< @@ -4806,7 +4767,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o __pyx_v_rc = ssh_get_poll_flags(__pyx_v_self->_session); } - /* "ssh/session.pyx":240 + /* "ssh/session.pyx":239 * def get_poll_flags(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -4825,7 +4786,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o } } - /* "ssh/session.pyx":242 + /* "ssh/session.pyx":241 * with nogil: * rc = c_ssh.ssh_get_poll_flags(self._session) * return rc # <<<<<<<<<<<<<< @@ -4833,13 +4794,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o * def is_blocking(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 242, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":238 + /* "ssh/session.pyx":237 * return rc * * def get_poll_flags(self): # <<<<<<<<<<<<<< @@ -4858,7 +4819,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_40get_poll_flags(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":244 +/* "ssh/session.pyx":243 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4891,7 +4852,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_blocking", 0); - /* "ssh/session.pyx":246 + /* "ssh/session.pyx":245 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4906,7 +4867,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":247 + /* "ssh/session.pyx":246 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) # <<<<<<<<<<<<<< @@ -4916,7 +4877,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ __pyx_v_rc = ssh_is_blocking(__pyx_v_self->_session); } - /* "ssh/session.pyx":246 + /* "ssh/session.pyx":245 * def is_blocking(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -4935,7 +4896,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ } } - /* "ssh/session.pyx":248 + /* "ssh/session.pyx":247 * with nogil: * rc = c_ssh.ssh_is_blocking(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -4944,13 +4905,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ */ __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, 248, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":244 + /* "ssh/session.pyx":243 * return rc * * def is_blocking(self): # <<<<<<<<<<<<<< @@ -4969,7 +4930,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_42is_blocking(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":250 +/* "ssh/session.pyx":249 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -5002,7 +4963,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_connected", 0); - /* "ssh/session.pyx":252 + /* "ssh/session.pyx":251 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5017,7 +4978,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":253 + /* "ssh/session.pyx":252 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_connected(self._session) # <<<<<<<<<<<<<< @@ -5027,7 +4988,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj __pyx_v_rc = ssh_is_connected(__pyx_v_self->_session); } - /* "ssh/session.pyx":252 + /* "ssh/session.pyx":251 * def is_connected(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5046,7 +5007,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj } } - /* "ssh/session.pyx":254 + /* "ssh/session.pyx":253 * with nogil: * rc = c_ssh.ssh_is_connected(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5055,13 +5016,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj */ __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, 254, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":250 + /* "ssh/session.pyx":249 * return bool(rc) * * def is_connected(self): # <<<<<<<<<<<<<< @@ -5080,7 +5041,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_44is_connected(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":256 +/* "ssh/session.pyx":255 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5113,7 +5074,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_server_known", 0); - /* "ssh/session.pyx":258 + /* "ssh/session.pyx":257 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5128,7 +5089,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":259 + /* "ssh/session.pyx":258 * cdef bint rc * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) # <<<<<<<<<<<<<< @@ -5138,7 +5099,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ __pyx_v_rc = ssh_is_server_known(__pyx_v_self->_session); } - /* "ssh/session.pyx":258 + /* "ssh/session.pyx":257 * def is_server_known(self): * cdef bint rc * with nogil: # <<<<<<<<<<<<<< @@ -5157,7 +5118,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ } } - /* "ssh/session.pyx":260 + /* "ssh/session.pyx":259 * with nogil: * rc = c_ssh.ssh_is_server_known(self._session) * return bool(rc) # <<<<<<<<<<<<<< @@ -5166,13 +5127,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ */ __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, 260, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":256 + /* "ssh/session.pyx":255 * return bool(rc) * * def is_server_known(self): # <<<<<<<<<<<<<< @@ -5191,7 +5152,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_46is_server_known(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":262 +/* "ssh/session.pyx":261 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5209,7 +5170,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_49copy_options(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("copy_options (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 262, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_destination), __pyx_ptype_3ssh_7session_Session, 1, "destination", 0))) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_48copy_options(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_destination)); /* function exit code */ @@ -5232,7 +5193,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("copy_options", 0); - /* "ssh/session.pyx":264 + /* "ssh/session.pyx":263 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5247,7 +5208,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":265 + /* "ssh/session.pyx":264 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) # <<<<<<<<<<<<<< @@ -5257,7 +5218,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj __pyx_v_rc = ssh_options_copy(__pyx_v_self->_session, (&__pyx_v_destination->_session)); } - /* "ssh/session.pyx":264 + /* "ssh/session.pyx":263 * def copy_options(self, Session destination): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5276,7 +5237,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj } } - /* "ssh/session.pyx":266 + /* "ssh/session.pyx":265 * with nogil: * rc = c_ssh.ssh_options_copy(self._session, &destination._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5284,14 +5245,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj * def options_getopt(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 266, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":262 + /* "ssh/session.pyx":261 * return bool(rc) * * def copy_options(self, Session destination): # <<<<<<<<<<<<<< @@ -5310,7 +5271,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_48copy_options(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":268 +/* "ssh/session.pyx":267 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5340,7 +5301,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_getopt", 0); - /* "ssh/session.pyx":269 + /* "ssh/session.pyx":268 * * def options_getopt(self): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -5348,9 +5309,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED * def options_parse_config(self, filepath): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 269, __pyx_L1_error) + __PYX_ERR(0, 268, __pyx_L1_error) - /* "ssh/session.pyx":268 + /* "ssh/session.pyx":267 * return handle_error_codes(rc, self._session) * * def options_getopt(self): # <<<<<<<<<<<<<< @@ -5367,7 +5328,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_50options_getopt(CYTHON_UNUSED return __pyx_r; } -/* "ssh/session.pyx":271 +/* "ssh/session.pyx":270 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5403,19 +5364,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_parse_config", 0); - /* "ssh/session.pyx":272 + /* "ssh/session.pyx":271 * * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) # <<<<<<<<<<<<<< * cdef char *c_filepath = b_filepath * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_filepath); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_filepath = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":273 + /* "ssh/session.pyx":272 * def options_parse_config(self, filepath): * cdef bytes b_filepath = to_bytes(filepath) * cdef char *c_filepath = b_filepath # <<<<<<<<<<<<<< @@ -5424,12 +5385,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ */ if (unlikely(__pyx_v_b_filepath == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 273, __pyx_L1_error) + __PYX_ERR(0, 272, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_filepath); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 273, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_filepath); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) __pyx_v_c_filepath = __pyx_t_2; - /* "ssh/session.pyx":275 + /* "ssh/session.pyx":274 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5444,7 +5405,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ #endif /*try:*/ { - /* "ssh/session.pyx":276 + /* "ssh/session.pyx":275 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) # <<<<<<<<<<<<<< @@ -5454,7 +5415,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ __pyx_v_rc = ssh_options_parse_config(__pyx_v_self->_session, __pyx_v_c_filepath); } - /* "ssh/session.pyx":275 + /* "ssh/session.pyx":274 * cdef char *c_filepath = b_filepath * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5473,7 +5434,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ } } - /* "ssh/session.pyx":277 + /* "ssh/session.pyx":276 * with nogil: * rc = c_ssh.ssh_options_parse_config(self._session, c_filepath) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5481,14 +5442,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ * def options_set_port(self, int port): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 277, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":271 + /* "ssh/session.pyx":270 * raise NotImplementedError * * def options_parse_config(self, filepath): # <<<<<<<<<<<<<< @@ -5508,7 +5469,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_52options_parse_config(struct _ return __pyx_r; } -/* "ssh/session.pyx":279 +/* "ssh/session.pyx":278 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5528,7 +5489,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_55options_set_port(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_set_port (wrapper)", 0); assert(__pyx_arg_port); { - __pyx_v_port = __Pyx_PyInt_As_int(__pyx_arg_port); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L3_error) + __pyx_v_port = __Pyx_PyInt_As_int(__pyx_arg_port); if (unlikely((__pyx_v_port == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 278, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -5554,7 +5515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set_port", 0); - /* "ssh/session.pyx":281 + /* "ssh/session.pyx":280 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5569,7 +5530,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":282 + /* "ssh/session.pyx":281 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_set( # <<<<<<<<<<<<<< @@ -5579,7 +5540,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, SSH_OPTIONS_PORT, (&__pyx_v_port)); } - /* "ssh/session.pyx":281 + /* "ssh/session.pyx":280 * def options_set_port(self, int port): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -5598,7 +5559,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx } } - /* "ssh/session.pyx":284 + /* "ssh/session.pyx":283 * rc = c_ssh.ssh_options_set( * self._session, c_ssh.ssh_options_e.SSH_OPTIONS_PORT, &port) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5606,14 +5567,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx * def options_set(self, Option option, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 284, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 283, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":279 + /* "ssh/session.pyx":278 * return handle_error_codes(rc, self._session) * * def options_set_port(self, int port): # <<<<<<<<<<<<<< @@ -5632,7 +5593,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_54options_set_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":286 +/* "ssh/session.pyx":285 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5675,11 +5636,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_set(PyObject *__pyx_v case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 286, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, 1); __PYX_ERR(0, 285, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 286, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "options_set") < 0)) __PYX_ERR(0, 285, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -5692,13 +5653,13 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_57options_set(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 286, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("options_set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 285, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.options_set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 286, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 285, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_56options_set(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_option, __pyx_v_value); /* function exit code */ @@ -5724,19 +5685,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_set", 0); - /* "ssh/session.pyx":295 + /* "ssh/session.pyx":294 * :type option: :py:class:`ssh.options.Option` * """ * cdef bytes b_value = to_bytes(value) # <<<<<<<<<<<<<< * cdef char *c_value * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_value = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":298 + /* "ssh/session.pyx":297 * cdef char *c_value * cdef int rc * c_value = b_value # <<<<<<<<<<<<<< @@ -5745,12 +5706,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ */ if (unlikely(__pyx_v_b_value == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 298, __pyx_L1_error) + __PYX_ERR(0, 297, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L1_error) __pyx_v_c_value = __pyx_t_2; - /* "ssh/session.pyx":299 + /* "ssh/session.pyx":298 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5765,7 +5726,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":300 + /* "ssh/session.pyx":299 * c_value = b_value * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) # <<<<<<<<<<<<<< @@ -5775,7 +5736,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ __pyx_v_rc = ssh_options_set(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_c_value); } - /* "ssh/session.pyx":299 + /* "ssh/session.pyx":298 * cdef int rc * c_value = b_value * with nogil: # <<<<<<<<<<<<<< @@ -5794,7 +5755,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ } } - /* "ssh/session.pyx":301 + /* "ssh/session.pyx":300 * with nogil: * rc = c_ssh.ssh_options_set(self._session, option._option, c_value) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -5802,14 +5763,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ * def options_get(self, Option option): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 301, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 300, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":286 + /* "ssh/session.pyx":285 * return handle_error_codes(rc, self._session) * * def options_set(self, Option option, value): # <<<<<<<<<<<<<< @@ -5829,7 +5790,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_56options_set(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":303 +/* "ssh/session.pyx":302 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -5847,7 +5808,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_59options_get(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_get (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 303, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_option), __pyx_ptype_3ssh_7options_Option, 1, "option", 0))) __PYX_ERR(0, 302, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_58options_get(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7options_Option *)__pyx_v_option)); /* function exit code */ @@ -5874,7 +5835,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get", 0); - /* "ssh/session.pyx":308 + /* "ssh/session.pyx":307 * """ * cdef char *_value * cdef char **value = NULL # <<<<<<<<<<<<<< @@ -5883,7 +5844,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v_value = NULL; - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":310 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5898,7 +5859,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":312 + /* "ssh/session.pyx":311 * cdef bytes b_value * with nogil: * rc = c_ssh.ssh_options_get( # <<<<<<<<<<<<<< @@ -5908,7 +5869,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_v_rc = ssh_options_get(__pyx_v_self->_session, __pyx_v_option->_option, __pyx_v_value); } - /* "ssh/session.pyx":311 + /* "ssh/session.pyx":310 * cdef int rc * cdef bytes b_value * with nogil: # <<<<<<<<<<<<<< @@ -5927,7 +5888,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ } } - /* "ssh/session.pyx":314 + /* "ssh/session.pyx":313 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5937,20 +5898,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ __pyx_t_1 = ((__pyx_v_rc < 0) != 0); if (unlikely(__pyx_t_1)) { - /* "ssh/session.pyx":315 + /* "ssh/session.pyx":314 * self._session, option._option, value) * if rc < 0: * raise OptionError # <<<<<<<<<<<<<< * _value = value[0] * b_value = _value */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_OptionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __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, 315, __pyx_L1_error) + __PYX_ERR(0, 314, __pyx_L1_error) - /* "ssh/session.pyx":314 + /* "ssh/session.pyx":313 * rc = c_ssh.ssh_options_get( * self._session, option._option, value) * if rc < 0: # <<<<<<<<<<<<<< @@ -5959,7 +5920,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ } - /* "ssh/session.pyx":316 + /* "ssh/session.pyx":315 * if rc < 0: * raise OptionError * _value = value[0] # <<<<<<<<<<<<<< @@ -5968,19 +5929,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ __pyx_v__value = (__pyx_v_value[0]); - /* "ssh/session.pyx":317 + /* "ssh/session.pyx":316 * raise OptionError * _value = value[0] * b_value = _value # <<<<<<<<<<<<<< * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_value = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":318 + /* "ssh/session.pyx":317 * _value = value[0] * b_value = _value * c_ssh.ssh_string_free_char(_value) # <<<<<<<<<<<<<< @@ -5989,7 +5950,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ */ ssh_string_free_char(__pyx_v__value); - /* "ssh/session.pyx":319 + /* "ssh/session.pyx":318 * b_value = _value * c_ssh.ssh_string_free_char(_value) * return to_str(b_value) # <<<<<<<<<<<<<< @@ -5997,14 +5958,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ * def options_get_port(self, unsigned int port_target): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 319, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_value); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":303 + /* "ssh/session.pyx":302 * return handle_error_codes(rc, self._session) * * def options_get(self, Option option): # <<<<<<<<<<<<<< @@ -6024,7 +5985,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_58options_get(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":321 +/* "ssh/session.pyx":320 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6044,7 +6005,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_61options_get_port(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("options_get_port (wrapper)", 0); assert(__pyx_arg_port_target); { - __pyx_v_port_target = __Pyx_PyInt_As_unsigned_int(__pyx_arg_port_target); if (unlikely((__pyx_v_port_target == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) + __pyx_v_port_target = __Pyx_PyInt_As_unsigned_int(__pyx_arg_port_target); if (unlikely((__pyx_v_port_target == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6070,7 +6031,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("options_get_port", 0); - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":322 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6085,7 +6046,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":324 + /* "ssh/session.pyx":323 * cdef int rc * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) # <<<<<<<<<<<<<< @@ -6095,7 +6056,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx __pyx_v_rc = ssh_options_get_port(__pyx_v_self->_session, (&__pyx_v_port_target)); } - /* "ssh/session.pyx":323 + /* "ssh/session.pyx":322 * def options_get_port(self, unsigned int port_target): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6114,7 +6075,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx } } - /* "ssh/session.pyx":325 + /* "ssh/session.pyx":324 * with nogil: * rc = c_ssh.ssh_options_get_port(self._session, &port_target) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6122,14 +6083,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx * def send_ignore(self, bytes data): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 325, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":321 + /* "ssh/session.pyx":320 * return to_str(b_value) * * def options_get_port(self, unsigned int port_target): # <<<<<<<<<<<<<< @@ -6148,7 +6109,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_60options_get_port(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":327 +/* "ssh/session.pyx":326 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6166,7 +6127,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_63send_ignore(PyObject *__pyx_v PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("send_ignore (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 327, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 326, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_62send_ignore(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_data)); /* function exit code */ @@ -6191,7 +6152,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_ignore", 0); - /* "ssh/session.pyx":328 + /* "ssh/session.pyx":327 * * def send_ignore(self, bytes data): * cdef char *c_data = data # <<<<<<<<<<<<<< @@ -6200,12 +6161,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ */ if (unlikely(__pyx_v_data == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 328, __pyx_L1_error) + __PYX_ERR(0, 327, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 327, __pyx_L1_error) __pyx_v_c_data = __pyx_t_1; - /* "ssh/session.pyx":330 + /* "ssh/session.pyx":329 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6220,7 +6181,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ #endif /*try:*/ { - /* "ssh/session.pyx":331 + /* "ssh/session.pyx":330 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) # <<<<<<<<<<<<<< @@ -6230,7 +6191,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ __pyx_v_rc = ssh_send_ignore(__pyx_v_self->_session, __pyx_v_c_data); } - /* "ssh/session.pyx":330 + /* "ssh/session.pyx":329 * cdef char *c_data = data * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6249,7 +6210,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ } } - /* "ssh/session.pyx":332 + /* "ssh/session.pyx":331 * with nogil: * rc = c_ssh.ssh_send_ignore(self._session, c_data) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6257,14 +6218,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ * def send_debug(self, bytes message, int always_display): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 332, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":327 + /* "ssh/session.pyx":326 * return handle_error_codes(rc, self._session) * * def send_ignore(self, bytes data): # <<<<<<<<<<<<<< @@ -6283,7 +6244,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_62send_ignore(struct __pyx_obj_ return __pyx_r; } -/* "ssh/session.pyx":334 +/* "ssh/session.pyx":333 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6326,11 +6287,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_debug(PyObject *__pyx_v_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_always_display)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 334, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, 1); __PYX_ERR(0, 333, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 334, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "send_debug") < 0)) __PYX_ERR(0, 333, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -6339,17 +6300,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_65send_debug(PyObject *__pyx_v_ values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_message = ((PyObject*)values[0]); - __pyx_v_always_display = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_always_display == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error) + __pyx_v_always_display = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_always_display == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 333, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 334, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("send_debug", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 333, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.send_debug", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 334, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_message), (&PyBytes_Type), 1, "message", 1))) __PYX_ERR(0, 333, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_64send_debug(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_message, __pyx_v_always_display); /* function exit code */ @@ -6374,7 +6335,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("send_debug", 0); - /* "ssh/session.pyx":335 + /* "ssh/session.pyx":334 * * def send_debug(self, bytes message, int always_display): * cdef char *c_message = message # <<<<<<<<<<<<<< @@ -6383,12 +6344,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 */ if (unlikely(__pyx_v_message == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 335, __pyx_L1_error) + __PYX_ERR(0, 334, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_message); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L1_error) __pyx_v_c_message = __pyx_t_1; - /* "ssh/session.pyx":337 + /* "ssh/session.pyx":336 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6403,7 +6364,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":338 + /* "ssh/session.pyx":337 * cdef int rc * with nogil: * rc = c_ssh.ssh_send_debug( # <<<<<<<<<<<<<< @@ -6413,7 +6374,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 __pyx_v_rc = ssh_send_debug(__pyx_v_self->_session, __pyx_v_c_message, __pyx_v_always_display); } - /* "ssh/session.pyx":337 + /* "ssh/session.pyx":336 * cdef char *c_message = message * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6432,7 +6393,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 } } - /* "ssh/session.pyx":340 + /* "ssh/session.pyx":339 * rc = c_ssh.ssh_send_debug( * self._session, c_message, always_display) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6440,14 +6401,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 * def gssapi_set_creds(self, creds): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 340, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":334 + /* "ssh/session.pyx":333 * return handle_error_codes(rc, self._session) * * def send_debug(self, bytes message, int always_display): # <<<<<<<<<<<<<< @@ -6466,7 +6427,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_64send_debug(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":342 +/* "ssh/session.pyx":341 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6496,7 +6457,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gssapi_set_creds", 0); - /* "ssh/session.pyx":343 + /* "ssh/session.pyx":342 * * def gssapi_set_creds(self, creds): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -6504,9 +6465,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE * def service_request(self, bytes service): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 343, __pyx_L1_error) + __PYX_ERR(0, 342, __pyx_L1_error) - /* "ssh/session.pyx":342 + /* "ssh/session.pyx":341 * return handle_error_codes(rc, self._session) * * def gssapi_set_creds(self, creds): # <<<<<<<<<<<<<< @@ -6523,7 +6484,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_66gssapi_set_creds(CYTHON_UNUSE return __pyx_r; } -/* "ssh/session.pyx":345 +/* "ssh/session.pyx":344 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6541,7 +6502,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_69service_request(PyObject *__p PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("service_request (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 345, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_service), (&PyBytes_Type), 1, "service", 1))) __PYX_ERR(0, 344, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_68service_request(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject*)__pyx_v_service)); /* function exit code */ @@ -6566,7 +6527,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("service_request", 0); - /* "ssh/session.pyx":347 + /* "ssh/session.pyx":346 * def service_request(self, bytes service): * cdef int rc * cdef char *c_service = service # <<<<<<<<<<<<<< @@ -6575,12 +6536,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ */ if (unlikely(__pyx_v_service == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 347, __pyx_L1_error) + __PYX_ERR(0, 346, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_service); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L1_error) __pyx_v_c_service = __pyx_t_1; - /* "ssh/session.pyx":348 + /* "ssh/session.pyx":347 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6595,7 +6556,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":349 + /* "ssh/session.pyx":348 * cdef char *c_service = service * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) # <<<<<<<<<<<<<< @@ -6605,7 +6566,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ __pyx_v_rc = ssh_service_request(__pyx_v_self->_session, __pyx_v_c_service); } - /* "ssh/session.pyx":348 + /* "ssh/session.pyx":347 * cdef int rc * cdef char *c_service = service * with nogil: # <<<<<<<<<<<<<< @@ -6624,7 +6585,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ } } - /* "ssh/session.pyx":350 + /* "ssh/session.pyx":349 * with nogil: * rc = c_ssh.ssh_service_request(self._session, c_service) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6632,14 +6593,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ * # These are also excluded from Windows builds. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 350, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":345 + /* "ssh/session.pyx":344 * raise NotImplementedError * * def service_request(self, bytes service): # <<<<<<<<<<<<<< @@ -6658,7 +6619,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_68service_request(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":354 +/* "ssh/session.pyx":353 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6676,7 +6637,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_71set_agent_channel(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_agent_channel (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 354, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_channel), __pyx_ptype_3ssh_7channel_Channel, 1, "channel", 0))) __PYX_ERR(0, 353, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_70set_agent_channel(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_7channel_Channel *)__pyx_v_channel)); /* function exit code */ @@ -6699,7 +6660,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_channel", 0); - /* "ssh/session.pyx":356 + /* "ssh/session.pyx":355 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6714,7 +6675,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":357 + /* "ssh/session.pyx":356 * cdef int rc * with nogil: * rc = c_ssh.ssh_set_agent_channel( # <<<<<<<<<<<<<< @@ -6724,7 +6685,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py __pyx_v_rc = ssh_set_agent_channel(__pyx_v_self->_session, __pyx_v_channel->_channel); } - /* "ssh/session.pyx":356 + /* "ssh/session.pyx":355 * def set_agent_channel(self, Channel channel): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -6743,7 +6704,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py } } - /* "ssh/session.pyx":359 + /* "ssh/session.pyx":358 * rc = c_ssh.ssh_set_agent_channel( * self._session, channel._channel) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6751,14 +6712,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py * def set_agent_socket(self, socket not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 359, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 359, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 358, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":354 + /* "ssh/session.pyx":353 * # These are also excluded from Windows builds. * IF not ON_WINDOWS: * def set_agent_channel(self, Channel channel): # <<<<<<<<<<<<<< @@ -6777,7 +6738,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_70set_agent_channel(struct __py return __pyx_r; } -/* "ssh/session.pyx":361 +/* "ssh/session.pyx":360 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6796,7 +6757,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_73set_agent_socket(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_agent_socket (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_socket) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 361, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "socket"); __PYX_ERR(0, 360, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_72set_agent_socket(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_socket)); @@ -6821,17 +6782,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_agent_socket", 0); - /* "ssh/session.pyx":363 + /* "ssh/session.pyx":362 * def set_agent_socket(self, socket not None): * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) # <<<<<<<<<<<<<< * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) */ - __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = PyObject_AsFileDescriptor(__pyx_v_socket); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 362, __pyx_L1_error) __pyx_v__sock = __pyx_t_1; - /* "ssh/session.pyx":364 + /* "ssh/session.pyx":363 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6846,7 +6807,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":365 + /* "ssh/session.pyx":364 * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) # <<<<<<<<<<<<<< @@ -6856,7 +6817,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx __pyx_v_rc = ssh_set_agent_socket(__pyx_v_self->_session, __pyx_v__sock); } - /* "ssh/session.pyx":364 + /* "ssh/session.pyx":363 * cdef int rc * cdef c_ssh.socket_t _sock = PyObject_AsFileDescriptor(socket) * with nogil: # <<<<<<<<<<<<<< @@ -6875,7 +6836,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx } } - /* "ssh/session.pyx":366 + /* "ssh/session.pyx":365 * with nogil: * rc = c_ssh.ssh_set_agent_socket(self._session, _sock) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -6883,14 +6844,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx * def set_blocking(self, int blocking): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 366, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 366, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":361 + /* "ssh/session.pyx":360 * return handle_error_codes(rc, self._session) * * def set_agent_socket(self, socket not None): # <<<<<<<<<<<<<< @@ -6909,7 +6870,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_72set_agent_socket(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":368 +/* "ssh/session.pyx":367 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -6929,7 +6890,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_75set_blocking(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking (wrapper)", 0); assert(__pyx_arg_blocking); { - __pyx_v_blocking = __Pyx_PyInt_As_int(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 368, __pyx_L3_error) + __pyx_v_blocking = __Pyx_PyInt_As_int(__pyx_arg_blocking); if (unlikely((__pyx_v_blocking == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 367, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -6949,7 +6910,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_blocking", 0); - /* "ssh/session.pyx":369 + /* "ssh/session.pyx":368 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6964,7 +6925,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":370 + /* "ssh/session.pyx":369 * def set_blocking(self, int blocking): * with nogil: * c_ssh.ssh_set_blocking(self._session, blocking) # <<<<<<<<<<<<<< @@ -6974,7 +6935,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj ssh_set_blocking(__pyx_v_self->_session, __pyx_v_blocking); } - /* "ssh/session.pyx":369 + /* "ssh/session.pyx":368 * * def set_blocking(self, int blocking): * with nogil: # <<<<<<<<<<<<<< @@ -6993,7 +6954,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj } } - /* "ssh/session.pyx":368 + /* "ssh/session.pyx":367 * return handle_error_codes(rc, self._session) * * def set_blocking(self, int blocking): # <<<<<<<<<<<<<< @@ -7008,7 +6969,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_74set_blocking(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":372 +/* "ssh/session.pyx":371 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7051,11 +7012,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_counters(PyObject *__pyx_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rcounter)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 372, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, 1); __PYX_ERR(0, 371, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 372, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_counters") < 0)) __PYX_ERR(0, 371, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -7068,7 +7029,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_77set_counters(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 372, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_counters", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.set_counters", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -7089,7 +7050,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("set_counters", 0); - /* "ssh/session.pyx":373 + /* "ssh/session.pyx":372 * * def set_counters(self, scounter, rcounter): * raise NotImplementedError # <<<<<<<<<<<<<< @@ -7097,9 +7058,9 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st * def set_fd_except(self): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); - __PYX_ERR(0, 373, __pyx_L1_error) + __PYX_ERR(0, 372, __pyx_L1_error) - /* "ssh/session.pyx":372 + /* "ssh/session.pyx":371 * c_ssh.ssh_set_blocking(self._session, blocking) * * def set_counters(self, scounter, rcounter): # <<<<<<<<<<<<<< @@ -7116,7 +7077,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_76set_counters(CYTHON_UNUSED st return __pyx_r; } -/* "ssh/session.pyx":375 +/* "ssh/session.pyx":374 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7143,7 +7104,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_except", 0); - /* "ssh/session.pyx":376 + /* "ssh/session.pyx":375 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7158,7 +7119,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":377 + /* "ssh/session.pyx":376 * def set_fd_except(self): * with nogil: * c_ssh.ssh_set_fd_except(self._session) # <<<<<<<<<<<<<< @@ -7168,7 +7129,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob ssh_set_fd_except(__pyx_v_self->_session); } - /* "ssh/session.pyx":376 + /* "ssh/session.pyx":375 * * def set_fd_except(self): * with nogil: # <<<<<<<<<<<<<< @@ -7187,7 +7148,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob } } - /* "ssh/session.pyx":375 + /* "ssh/session.pyx":374 * raise NotImplementedError * * def set_fd_except(self): # <<<<<<<<<<<<<< @@ -7202,7 +7163,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_78set_fd_except(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":379 +/* "ssh/session.pyx":378 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7229,7 +7190,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_toread", 0); - /* "ssh/session.pyx":380 + /* "ssh/session.pyx":379 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7244,7 +7205,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":381 + /* "ssh/session.pyx":380 * def set_fd_toread(self): * with nogil: * c_ssh.ssh_set_fd_toread(self._session) # <<<<<<<<<<<<<< @@ -7254,7 +7215,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob ssh_set_fd_toread(__pyx_v_self->_session); } - /* "ssh/session.pyx":380 + /* "ssh/session.pyx":379 * * def set_fd_toread(self): * with nogil: # <<<<<<<<<<<<<< @@ -7273,7 +7234,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob } } - /* "ssh/session.pyx":379 + /* "ssh/session.pyx":378 * c_ssh.ssh_set_fd_except(self._session) * * def set_fd_toread(self): # <<<<<<<<<<<<<< @@ -7288,7 +7249,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_80set_fd_toread(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":383 +/* "ssh/session.pyx":382 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7315,7 +7276,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("set_fd_towrite", 0); - /* "ssh/session.pyx":384 + /* "ssh/session.pyx":383 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7330,7 +7291,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":385 + /* "ssh/session.pyx":384 * def set_fd_towrite(self): * with nogil: * c_ssh.ssh_set_fd_towrite(self._session) # <<<<<<<<<<<<<< @@ -7340,7 +7301,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o ssh_set_fd_towrite(__pyx_v_self->_session); } - /* "ssh/session.pyx":384 + /* "ssh/session.pyx":383 * * def set_fd_towrite(self): * with nogil: # <<<<<<<<<<<<<< @@ -7359,7 +7320,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o } } - /* "ssh/session.pyx":383 + /* "ssh/session.pyx":382 * c_ssh.ssh_set_fd_toread(self._session) * * def set_fd_towrite(self): # <<<<<<<<<<<<<< @@ -7374,7 +7335,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_82set_fd_towrite(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":387 +/* "ssh/session.pyx":386 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7401,7 +7362,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("silent_disconnect", 0); - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":387 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7416,7 +7377,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":389 + /* "ssh/session.pyx":388 * def silent_disconnect(self): * with nogil: * c_ssh.ssh_silent_disconnect(self._session) # <<<<<<<<<<<<<< @@ -7426,7 +7387,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py ssh_silent_disconnect(__pyx_v_self->_session); } - /* "ssh/session.pyx":388 + /* "ssh/session.pyx":387 * * def silent_disconnect(self): * with nogil: # <<<<<<<<<<<<<< @@ -7445,7 +7406,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py } } - /* "ssh/session.pyx":387 + /* "ssh/session.pyx":386 * c_ssh.ssh_set_fd_towrite(self._session) * * def silent_disconnect(self): # <<<<<<<<<<<<<< @@ -7460,7 +7421,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_84silent_disconnect(struct __py return __pyx_r; } -/* "ssh/session.pyx":391 +/* "ssh/session.pyx":390 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7494,7 +7455,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_none", 0); - /* "ssh/session.pyx":393 + /* "ssh/session.pyx":392 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7509,16 +7470,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":394 + /* "ssh/session.pyx":393 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 394, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 393, __pyx_L4_error) - /* "ssh/session.pyx":395 + /* "ssh/session.pyx":394 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) # <<<<<<<<<<<<<< @@ -7528,7 +7489,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob __pyx_v_rc = ssh_userauth_none(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":393 + /* "ssh/session.pyx":392 * def userauth_none(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7554,7 +7515,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob } } - /* "ssh/session.pyx":396 + /* "ssh/session.pyx":395 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_none(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7562,14 +7523,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob * def userauth_list(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 395, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":391 + /* "ssh/session.pyx":390 * c_ssh.ssh_silent_disconnect(self._session) * * def userauth_none(self): # <<<<<<<<<<<<<< @@ -7588,7 +7549,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_86userauth_none(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":398 +/* "ssh/session.pyx":397 * return handle_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7622,7 +7583,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_list", 0); - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":399 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7637,16 +7598,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":401 + /* "ssh/session.pyx":400 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 401, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 400, __pyx_L4_error) - /* "ssh/session.pyx":402 + /* "ssh/session.pyx":401 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) # <<<<<<<<<<<<<< @@ -7656,7 +7617,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob __pyx_v_rc = ssh_userauth_list(__pyx_v_self->_session, NULL); } - /* "ssh/session.pyx":400 + /* "ssh/session.pyx":399 * def userauth_list(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7682,7 +7643,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob } } - /* "ssh/session.pyx":403 + /* "ssh/session.pyx":402 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_list(self._session, NULL) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7690,14 +7651,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob * def userauth_try_publickey(self, SSHKey pubkey not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 403, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 402, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":398 + /* "ssh/session.pyx":397 * return handle_error_codes(rc, self._session) * * def userauth_list(self): # <<<<<<<<<<<<<< @@ -7716,7 +7677,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_88userauth_list(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":405 +/* "ssh/session.pyx":404 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7734,7 +7695,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_91userauth_try_publickey(PyObje PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_try_publickey (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 405, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pubkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "pubkey", 0))) __PYX_ERR(0, 404, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_pubkey)); /* function exit code */ @@ -7758,7 +7719,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_try_publickey", 0); - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":406 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7773,16 +7734,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct #endif /*try:*/ { - /* "ssh/session.pyx":408 + /* "ssh/session.pyx":407 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 408, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 407, __pyx_L4_error) - /* "ssh/session.pyx":409 + /* "ssh/session.pyx":408 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_try_publickey( # <<<<<<<<<<<<<< @@ -7792,7 +7753,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct __pyx_v_rc = ssh_userauth_try_publickey(__pyx_v_self->_session, NULL, __pyx_v_pubkey->_key); } - /* "ssh/session.pyx":407 + /* "ssh/session.pyx":406 * def userauth_try_publickey(self, SSHKey pubkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7818,7 +7779,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct } } - /* "ssh/session.pyx":411 + /* "ssh/session.pyx":410 * rc = c_ssh.ssh_userauth_try_publickey( * self._session, NULL, pubkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7826,14 +7787,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct * def userauth_publickey(self, SSHKey privkey not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 411, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":405 + /* "ssh/session.pyx":404 * return handle_error_codes(rc, self._session) * * def userauth_try_publickey(self, SSHKey pubkey not None): # <<<<<<<<<<<<<< @@ -7852,7 +7813,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_90userauth_try_publickey(struct return __pyx_r; } -/* "ssh/session.pyx":413 +/* "ssh/session.pyx":412 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7870,7 +7831,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_93userauth_publickey(PyObject * PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_publickey (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 413, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_privkey), __pyx_ptype_3ssh_3key_SSHKey, 0, "privkey", 0))) __PYX_ERR(0, 412, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_92userauth_publickey(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((struct __pyx_obj_3ssh_3key_SSHKey *)__pyx_v_privkey)); /* function exit code */ @@ -7894,7 +7855,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey", 0); - /* "ssh/session.pyx":415 + /* "ssh/session.pyx":414 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7909,16 +7870,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p #endif /*try:*/ { - /* "ssh/session.pyx":416 + /* "ssh/session.pyx":415 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 416, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 415, __pyx_L4_error) - /* "ssh/session.pyx":417 + /* "ssh/session.pyx":416 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey( # <<<<<<<<<<<<<< @@ -7928,7 +7889,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p __pyx_v_rc = ssh_userauth_publickey(__pyx_v_self->_session, NULL, __pyx_v_privkey->_key); } - /* "ssh/session.pyx":415 + /* "ssh/session.pyx":414 * def userauth_publickey(self, SSHKey privkey not None): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -7954,7 +7915,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p } } - /* "ssh/session.pyx":419 + /* "ssh/session.pyx":418 * rc = c_ssh.ssh_userauth_publickey( * self._session, NULL, privkey._key) * return handle_auth_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -7962,14 +7923,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p * # ssh_userauth_agent is excluded from libssh.h on Windows. */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 419, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_auth_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 418, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":413 + /* "ssh/session.pyx":412 * return handle_auth_error_codes(rc, self._session) * * def userauth_publickey(self, SSHKey privkey not None): # <<<<<<<<<<<<<< @@ -7988,7 +7949,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_92userauth_publickey(struct __p return __pyx_r; } -/* "ssh/session.pyx":423 +/* "ssh/session.pyx":422 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8007,7 +7968,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_95userauth_agent(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_agent (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_username) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 423, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 422, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_94userauth_agent(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_username)); @@ -8035,19 +7996,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_agent", 0); - /* "ssh/session.pyx":424 + /* "ssh/session.pyx":423 * IF not ON_WINDOWS: * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 424, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":425 + /* "ssh/session.pyx":424 * def userauth_agent(self, username not None): * cdef bytes b_username = to_bytes(username) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8056,12 +8017,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 425, __pyx_L1_error) + __PYX_ERR(0, 424, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 424, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":426 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8076,16 +8037,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":428 + /* "ssh/session.pyx":427 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_error_codes(rc, self._session) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 428, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 427, __pyx_L4_error) - /* "ssh/session.pyx":429 + /* "ssh/session.pyx":428 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) # <<<<<<<<<<<<<< @@ -8095,7 +8056,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o __pyx_v_rc = ssh_userauth_agent(__pyx_v_self->_session, __pyx_v_c_username); } - /* "ssh/session.pyx":427 + /* "ssh/session.pyx":426 * cdef char *c_username = b_username * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8121,7 +8082,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o } } - /* "ssh/session.pyx":430 + /* "ssh/session.pyx":429 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_agent(self._session, c_username) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8129,14 +8090,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o * def userauth_publickey_auto(self, passphrase not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 430, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":423 + /* "ssh/session.pyx":422 * # ssh_userauth_agent is excluded from libssh.h on Windows. * IF not ON_WINDOWS: * def userauth_agent(self, username not None): # <<<<<<<<<<<<<< @@ -8156,7 +8117,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_94userauth_agent(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":432 +/* "ssh/session.pyx":431 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8175,7 +8136,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_97userauth_publickey_auto(PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_publickey_auto (wrapper)", 0); if (unlikely(((PyObject *)__pyx_v_passphrase) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 432, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "passphrase"); __PYX_ERR(0, 431, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), ((PyObject *)__pyx_v_passphrase)); @@ -8203,19 +8164,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_publickey_auto", 0); - /* "ssh/session.pyx":433 + /* "ssh/session.pyx":432 * * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) # <<<<<<<<<<<<<< * cdef char *c_passphrase = b_passphrase * cdef int rc */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_passphrase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_passphrase = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":434 + /* "ssh/session.pyx":433 * def userauth_publickey_auto(self, passphrase not None): * cdef bytes b_passphrase = to_bytes(passphrase) * cdef char *c_passphrase = b_passphrase # <<<<<<<<<<<<<< @@ -8224,12 +8185,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc */ if (unlikely(__pyx_v_b_passphrase == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 434, __pyx_L1_error) + __PYX_ERR(0, 433, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_passphrase); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 433, __pyx_L1_error) __pyx_v_c_passphrase = __pyx_t_2; - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":435 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8244,16 +8205,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc #endif /*try:*/ { - /* "ssh/session.pyx":437 + /* "ssh/session.pyx":436 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 437, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 436, __pyx_L4_error) - /* "ssh/session.pyx":438 + /* "ssh/session.pyx":437 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_publickey_auto( # <<<<<<<<<<<<<< @@ -8263,7 +8224,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc __pyx_v_rc = ssh_userauth_publickey_auto(__pyx_v_self->_session, NULL, __pyx_v_c_passphrase); } - /* "ssh/session.pyx":436 + /* "ssh/session.pyx":435 * cdef char *c_passphrase = b_passphrase * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8289,7 +8250,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc } } - /* "ssh/session.pyx":440 + /* "ssh/session.pyx":439 * rc = c_ssh.ssh_userauth_publickey_auto( * self._session, NULL, c_passphrase) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8297,14 +8258,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc * def userauth_password(self, username not None, password not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 440, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 440, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":432 + /* "ssh/session.pyx":431 * return handle_error_codes(rc, self._session) * * def userauth_publickey_auto(self, passphrase not None): # <<<<<<<<<<<<<< @@ -8324,7 +8285,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_96userauth_publickey_auto(struc return __pyx_r; } -/* "ssh/session.pyx":442 +/* "ssh/session.pyx":441 * return handle_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8367,11 +8328,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_password(PyObject *_ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_password)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 442, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, 1); __PYX_ERR(0, 441, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 442, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_password") < 0)) __PYX_ERR(0, 441, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8384,17 +8345,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_99userauth_password(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 442, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_password", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 441, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_password", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); 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, 442, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 441, __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, 442, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "password"); __PYX_ERR(0, 441, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_98userauth_password(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_password); @@ -8424,31 +8385,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_password", 0); - /* "ssh/session.pyx":443 + /* "ssh/session.pyx":442 * * def userauth_password(self, username not None, password not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":444 + /* "ssh/session.pyx":443 * def userauth_password(self, username not None, password not None): * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef char *c_password = b_password */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_password); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_password = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":445 + /* "ssh/session.pyx":444 * cdef bytes b_username = to_bytes(username) * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8457,12 +8418,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 445, __pyx_L1_error) + __PYX_ERR(0, 444, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 444, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":446 + /* "ssh/session.pyx":445 * cdef bytes b_password = to_bytes(password) * cdef char *c_username = b_username * cdef char *c_password = b_password # <<<<<<<<<<<<<< @@ -8471,12 +8432,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py */ if (unlikely(__pyx_v_b_password == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 446, __pyx_L1_error) + __PYX_ERR(0, 445, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_password); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 445, __pyx_L1_error) __pyx_v_c_password = __pyx_t_2; - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":447 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8491,16 +8452,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":449 + /* "ssh/session.pyx":448 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 449, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 448, __pyx_L4_error) - /* "ssh/session.pyx":450 + /* "ssh/session.pyx":449 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_password( # <<<<<<<<<<<<<< @@ -8510,7 +8471,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py __pyx_v_rc = ssh_userauth_password(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_password); } - /* "ssh/session.pyx":448 + /* "ssh/session.pyx":447 * cdef char *c_password = b_password * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8536,7 +8497,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py } } - /* "ssh/session.pyx":452 + /* "ssh/session.pyx":451 * rc = c_ssh.ssh_userauth_password( * self._session, c_username, c_password) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8544,14 +8505,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py * def userauth_kbdint(self, username not None, submethods not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 452, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 451, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); 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; - /* "ssh/session.pyx":442 + /* "ssh/session.pyx":441 * return handle_error_codes(rc, self._session) * * def userauth_password(self, username not None, password not None): # <<<<<<<<<<<<<< @@ -8572,7 +8533,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_98userauth_password(struct __py return __pyx_r; } -/* "ssh/session.pyx":454 +/* "ssh/session.pyx":453 * return handle_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8615,11 +8576,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_kbdint(PyObject *__ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_submethods)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, 1); __PYX_ERR(0, 453, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 454, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint") < 0)) __PYX_ERR(0, 453, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -8632,17 +8593,17 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_101userauth_kbdint(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 454, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 453, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); 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, 454, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "username"); __PYX_ERR(0, 453, __pyx_L1_error) } if (unlikely(((PyObject *)__pyx_v_submethods) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 454, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "submethods"); __PYX_ERR(0, 453, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_100userauth_kbdint(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_username, __pyx_v_submethods); @@ -8672,31 +8633,31 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint", 0); - /* "ssh/session.pyx":455 + /* "ssh/session.pyx":454 * * def userauth_kbdint(self, username not None, submethods not None): * cdef bytes b_username = to_bytes(username) # <<<<<<<<<<<<<< * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_username); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_username = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":456 + /* "ssh/session.pyx":455 * def userauth_kbdint(self, username not None, submethods not None): * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) # <<<<<<<<<<<<<< * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 456, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_submethods); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_submethods = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":457 + /* "ssh/session.pyx":456 * cdef bytes b_username = to_bytes(username) * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username # <<<<<<<<<<<<<< @@ -8705,12 +8666,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_username == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 457, __pyx_L1_error) + __PYX_ERR(0, 456, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 457, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_username); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 456, __pyx_L1_error) __pyx_v_c_username = __pyx_t_2; - /* "ssh/session.pyx":458 + /* "ssh/session.pyx":457 * cdef bytes b_submethods = to_bytes(submethods) * cdef char *c_username = b_username * cdef char *c_submethods = b_submethods # <<<<<<<<<<<<<< @@ -8719,12 +8680,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx */ if (unlikely(__pyx_v_b_submethods == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 458, __pyx_L1_error) + __PYX_ERR(0, 457, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 458, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_submethods); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 457, __pyx_L1_error) __pyx_v_c_submethods = __pyx_t_2; - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":459 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8739,16 +8700,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":461 + /* "ssh/session.pyx":460 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) */ - __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 461, __pyx_L4_error) + __pyx_t_3 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 460, __pyx_L4_error) - /* "ssh/session.pyx":462 + /* "ssh/session.pyx":461 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint( # <<<<<<<<<<<<<< @@ -8758,7 +8719,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx __pyx_v_rc = ssh_userauth_kbdint(__pyx_v_self->_session, __pyx_v_c_username, __pyx_v_c_submethods); } - /* "ssh/session.pyx":460 + /* "ssh/session.pyx":459 * cdef char *c_submethods = b_submethods * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -8784,7 +8745,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx } } - /* "ssh/session.pyx":464 + /* "ssh/session.pyx":463 * rc = c_ssh.ssh_userauth_kbdint( * self._session, c_username, c_submethods) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -8792,14 +8753,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx * def userauth_kbdint_getinstruction(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 464, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 463, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":454 + /* "ssh/session.pyx":453 * return handle_error_codes(rc, self._session) * * def userauth_kbdint(self, username not None, submethods not None): # <<<<<<<<<<<<<< @@ -8820,7 +8781,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_100userauth_kbdint(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":466 +/* "ssh/session.pyx":465 * return handle_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8854,7 +8815,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getinstruction", 0); - /* "ssh/session.pyx":469 + /* "ssh/session.pyx":468 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8869,16 +8830,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi #endif /*try:*/ { - /* "ssh/session.pyx":470 + /* "ssh/session.pyx":469 * cdef const_char *_instruction * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( * self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 470, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 469, __pyx_L4_error) - /* "ssh/session.pyx":471 + /* "ssh/session.pyx":470 * with nogil: * _check_connected(self._session) * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( # <<<<<<<<<<<<<< @@ -8888,7 +8849,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_v__instruction = ssh_userauth_kbdint_getinstruction(__pyx_v_self->_session); } - /* "ssh/session.pyx":469 + /* "ssh/session.pyx":468 * cdef bytes b_instruction * cdef const_char *_instruction * with nogil: # <<<<<<<<<<<<<< @@ -8914,20 +8875,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi } } - /* "ssh/session.pyx":473 + /* "ssh/session.pyx":472 * _instruction = c_ssh.ssh_userauth_kbdint_getinstruction( * self._session) * b_instruction = to_str(_instruction) # <<<<<<<<<<<<<< * return b_instruction * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__instruction)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 473, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 472, __pyx_L1_error) __pyx_v_b_instruction = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":474 + /* "ssh/session.pyx":473 * self._session) * b_instruction = to_str(_instruction) * return b_instruction # <<<<<<<<<<<<<< @@ -8939,7 +8900,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi __pyx_r = __pyx_v_b_instruction; goto __pyx_L0; - /* "ssh/session.pyx":466 + /* "ssh/session.pyx":465 * return handle_error_codes(rc, self._session) * * def userauth_kbdint_getinstruction(self): # <<<<<<<<<<<<<< @@ -8959,7 +8920,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_102userauth_kbdint_getinstructi return __pyx_r; } -/* "ssh/session.pyx":476 +/* "ssh/session.pyx":475 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -8993,7 +8954,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getname", 0); - /* "ssh/session.pyx":479 + /* "ssh/session.pyx":478 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9008,16 +8969,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru #endif /*try:*/ { - /* "ssh/session.pyx":480 + /* "ssh/session.pyx":479 * cdef const_char *_name * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 480, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L4_error) - /* "ssh/session.pyx":481 + /* "ssh/session.pyx":480 * with nogil: * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) # <<<<<<<<<<<<<< @@ -9027,7 +8988,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_v__name = ssh_userauth_kbdint_getname(__pyx_v_self->_session); } - /* "ssh/session.pyx":479 + /* "ssh/session.pyx":478 * cdef bytes b_name * cdef const_char *_name * with nogil: # <<<<<<<<<<<<<< @@ -9053,20 +9014,20 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru } } - /* "ssh/session.pyx":482 + /* "ssh/session.pyx":481 * _check_connected(self._session) * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) # <<<<<<<<<<<<<< * return b_name * */ - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(((char *)__pyx_v__name)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 482, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 481, __pyx_L1_error) __pyx_v_b_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":483 + /* "ssh/session.pyx":482 * _name = c_ssh.ssh_userauth_kbdint_getname(self._session) * b_name = to_str(_name) * return b_name # <<<<<<<<<<<<<< @@ -9078,7 +9039,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru __pyx_r = __pyx_v_b_name; goto __pyx_L0; - /* "ssh/session.pyx":476 + /* "ssh/session.pyx":475 * return b_instruction * * def userauth_kbdint_getname(self): # <<<<<<<<<<<<<< @@ -9098,7 +9059,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_104userauth_kbdint_getname(stru return __pyx_r; } -/* "ssh/session.pyx":485 +/* "ssh/session.pyx":484 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9131,7 +9092,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnprompts", 0); - /* "ssh/session.pyx":487 + /* "ssh/session.pyx":486 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9146,16 +9107,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( #endif /*try:*/ { - /* "ssh/session.pyx":488 + /* "ssh/session.pyx":487 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 488, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 487, __pyx_L4_error) - /* "ssh/session.pyx":489 + /* "ssh/session.pyx":488 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) # <<<<<<<<<<<<<< @@ -9165,7 +9126,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( __pyx_v_rc = ssh_userauth_kbdint_getnprompts(__pyx_v_self->_session); } - /* "ssh/session.pyx":487 + /* "ssh/session.pyx":486 * def userauth_kbdint_getnprompts(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9191,7 +9152,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( } } - /* "ssh/session.pyx":490 + /* "ssh/session.pyx":489 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnprompts(self._session) * return rc # <<<<<<<<<<<<<< @@ -9199,13 +9160,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":485 + /* "ssh/session.pyx":484 * return b_name * * def userauth_kbdint_getnprompts(self): # <<<<<<<<<<<<<< @@ -9224,7 +9185,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_106userauth_kbdint_getnprompts( return __pyx_r; } -/* "ssh/session.pyx":492 +/* "ssh/session.pyx":491 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9267,11 +9228,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_kbdint_getprompt(Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_echo)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 492, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, 1); __PYX_ERR(0, 491, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 492, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_getprompt") < 0)) __PYX_ERR(0, 491, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9279,18 +9240,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_109userauth_kbdint_getprompt(Py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 492, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 491, __pyx_L3_error) __pyx_v_echo = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 492, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_getprompt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 491, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint_getprompt", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 492, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_echo), (&PyBytes_Type), 0, "echo", 1))) __PYX_ERR(0, 491, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_echo); /* function exit code */ @@ -9316,17 +9277,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getprompt", 0); - /* "ssh/session.pyx":495 + /* "ssh/session.pyx":494 * cdef const_char *_prompt * cdef bytes b_prompt * cdef char *c_echo = echo # <<<<<<<<<<<<<< * with nogil: * _check_connected(self._session) */ - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 495, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_echo); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 494, __pyx_L1_error) __pyx_v_c_echo = __pyx_t_1; - /* "ssh/session.pyx":496 + /* "ssh/session.pyx":495 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9341,16 +9302,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st #endif /*try:*/ { - /* "ssh/session.pyx":497 + /* "ssh/session.pyx":496 * cdef char *c_echo = echo * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( * self._session, i, c_echo) */ - __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 497, __pyx_L4_error) + __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 496, __pyx_L4_error) - /* "ssh/session.pyx":498 + /* "ssh/session.pyx":497 * with nogil: * _check_connected(self._session) * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( # <<<<<<<<<<<<<< @@ -9360,7 +9321,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_v__prompt = ssh_userauth_kbdint_getprompt(__pyx_v_self->_session, __pyx_v_i, __pyx_v_c_echo); } - /* "ssh/session.pyx":496 + /* "ssh/session.pyx":495 * cdef bytes b_prompt * cdef char *c_echo = echo * with nogil: # <<<<<<<<<<<<<< @@ -9386,19 +9347,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st } } - /* "ssh/session.pyx":500 + /* "ssh/session.pyx":499 * _prompt = c_ssh.ssh_userauth_kbdint_getprompt( * self._session, i, c_echo) * b_prompt = _prompt # <<<<<<<<<<<<<< * return b_prompt * */ - __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v__prompt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_b_prompt = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "ssh/session.pyx":501 + /* "ssh/session.pyx":500 * self._session, i, c_echo) * b_prompt = _prompt * return b_prompt # <<<<<<<<<<<<<< @@ -9410,7 +9371,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st __pyx_r = __pyx_v_b_prompt; goto __pyx_L0; - /* "ssh/session.pyx":492 + /* "ssh/session.pyx":491 * return rc * * def userauth_kbdint_getprompt(self, unsigned int i, bytes echo not None): # <<<<<<<<<<<<<< @@ -9430,7 +9391,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_108userauth_kbdint_getprompt(st return __pyx_r; } -/* "ssh/session.pyx":503 +/* "ssh/session.pyx":502 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9463,7 +9424,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getnanswers", 0); - /* "ssh/session.pyx":505 + /* "ssh/session.pyx":504 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9478,16 +9439,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( #endif /*try:*/ { - /* "ssh/session.pyx":506 + /* "ssh/session.pyx":505 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 506, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 505, __pyx_L4_error) - /* "ssh/session.pyx":507 + /* "ssh/session.pyx":506 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) # <<<<<<<<<<<<<< @@ -9497,7 +9458,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( __pyx_v_rc = ssh_userauth_kbdint_getnanswers(__pyx_v_self->_session); } - /* "ssh/session.pyx":505 + /* "ssh/session.pyx":504 * def userauth_kbdint_getnanswers(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9523,7 +9484,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( } } - /* "ssh/session.pyx":508 + /* "ssh/session.pyx":507 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_getnanswers(self._session) * return rc # <<<<<<<<<<<<<< @@ -9531,13 +9492,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( * def userauth_kbdint_getanswer(self, unsigned int i): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":503 + /* "ssh/session.pyx":502 * return b_prompt * * def userauth_kbdint_getnanswers(self): # <<<<<<<<<<<<<< @@ -9556,7 +9517,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_110userauth_kbdint_getnanswers( return __pyx_r; } -/* "ssh/session.pyx":510 +/* "ssh/session.pyx":509 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9576,7 +9537,7 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_113userauth_kbdint_getanswer(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("userauth_kbdint_getanswer (wrapper)", 0); assert(__pyx_arg_i); { - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -9603,7 +9564,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_getanswer", 0); - /* "ssh/session.pyx":513 + /* "ssh/session.pyx":512 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9618,16 +9579,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":514 + /* "ssh/session.pyx":513 * cdef bytes b_answer * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * _answer = c_ssh.ssh_userauth_kbdint_getanswer( * self._session, i) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 514, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 513, __pyx_L4_error) - /* "ssh/session.pyx":515 + /* "ssh/session.pyx":514 * with nogil: * _check_connected(self._session) * _answer = c_ssh.ssh_userauth_kbdint_getanswer( # <<<<<<<<<<<<<< @@ -9637,7 +9598,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_v__answer = ssh_userauth_kbdint_getanswer(__pyx_v_self->_session, __pyx_v_i); } - /* "ssh/session.pyx":513 + /* "ssh/session.pyx":512 * cdef const_char *_answer * cdef bytes b_answer * with nogil: # <<<<<<<<<<<<<< @@ -9663,19 +9624,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st } } - /* "ssh/session.pyx":517 + /* "ssh/session.pyx":516 * _answer = c_ssh.ssh_userauth_kbdint_getanswer( * self._session, i) * b_answer = _answer # <<<<<<<<<<<<<< * return b_answer * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__answer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_answer = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":518 + /* "ssh/session.pyx":517 * self._session, i) * b_answer = _answer * return b_answer # <<<<<<<<<<<<<< @@ -9687,7 +9648,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st __pyx_r = __pyx_v_b_answer; goto __pyx_L0; - /* "ssh/session.pyx":510 + /* "ssh/session.pyx":509 * return rc * * def userauth_kbdint_getanswer(self, unsigned int i): # <<<<<<<<<<<<<< @@ -9707,7 +9668,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_112userauth_kbdint_getanswer(st return __pyx_r; } -/* "ssh/session.pyx":520 +/* "ssh/session.pyx":519 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9750,11 +9711,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_kbdint_setanswer(Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_answer)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 520, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, 1); __PYX_ERR(0, 519, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 520, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "userauth_kbdint_setanswer") < 0)) __PYX_ERR(0, 519, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -9762,18 +9723,18 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_115userauth_kbdint_setanswer(Py values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L3_error) + __pyx_v_i = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_i == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L3_error) __pyx_v_answer = ((PyObject*)values[1]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 520, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("userauth_kbdint_setanswer", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 519, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.userauth_kbdint_setanswer", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 520, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_answer), (&PyBytes_Type), 0, "answer", 1))) __PYX_ERR(0, 519, __pyx_L1_error) __pyx_r = __pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_i, __pyx_v_answer); /* function exit code */ @@ -9799,17 +9760,17 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_kbdint_setanswer", 0); - /* "ssh/session.pyx":521 + /* "ssh/session.pyx":520 * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): * cdef char *c_answer = answer # <<<<<<<<<<<<<< * cdef int rc * with nogil: */ - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_answer); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L1_error) __pyx_v_c_answer = __pyx_t_1; - /* "ssh/session.pyx":523 + /* "ssh/session.pyx":522 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9824,16 +9785,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st #endif /*try:*/ { - /* "ssh/session.pyx":524 + /* "ssh/session.pyx":523 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) */ - __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 524, __pyx_L4_error) + __pyx_t_2 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 523, __pyx_L4_error) - /* "ssh/session.pyx":525 + /* "ssh/session.pyx":524 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_kbdint_setanswer( # <<<<<<<<<<<<<< @@ -9843,7 +9804,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st __pyx_v_rc = ssh_userauth_kbdint_setanswer(__pyx_v_self->_session, __pyx_v_i, ((const char *)__pyx_v_c_answer)); } - /* "ssh/session.pyx":523 + /* "ssh/session.pyx":522 * cdef char *c_answer = answer * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9869,7 +9830,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st } } - /* "ssh/session.pyx":527 + /* "ssh/session.pyx":526 * rc = c_ssh.ssh_userauth_kbdint_setanswer( * self._session, i, (c_answer)) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -9877,14 +9838,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st * def userauth_gssapi(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 527, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_3 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 526, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "ssh/session.pyx":520 + /* "ssh/session.pyx":519 * return b_answer * * def userauth_kbdint_setanswer(self, unsigned int i, bytes answer not None): # <<<<<<<<<<<<<< @@ -9903,7 +9864,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_114userauth_kbdint_setanswer(st return __pyx_r; } -/* "ssh/session.pyx":529 +/* "ssh/session.pyx":528 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -9937,7 +9898,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("userauth_gssapi", 0); - /* "ssh/session.pyx":531 + /* "ssh/session.pyx":530 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9952,16 +9913,16 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":532 + /* "ssh/session.pyx":531 * cdef int rc * with nogil: * _check_connected(self._session) # <<<<<<<<<<<<<< * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_error_codes(rc, self._session) */ - __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 532, __pyx_L4_error) + __pyx_t_1 = __pyx_f_3ssh_7session__check_connected(__pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 531, __pyx_L4_error) - /* "ssh/session.pyx":533 + /* "ssh/session.pyx":532 * with nogil: * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) # <<<<<<<<<<<<<< @@ -9971,7 +9932,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx __pyx_v_rc = ssh_userauth_gssapi(__pyx_v_self->_session); } - /* "ssh/session.pyx":531 + /* "ssh/session.pyx":530 * def userauth_gssapi(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -9997,7 +9958,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx } } - /* "ssh/session.pyx":534 + /* "ssh/session.pyx":533 * _check_connected(self._session) * rc = c_ssh.ssh_userauth_gssapi(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10005,14 +9966,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx * def write_knownhost(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 534, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 533, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "ssh/session.pyx":529 + /* "ssh/session.pyx":528 * return handle_error_codes(rc, self._session) * * def userauth_gssapi(self): # <<<<<<<<<<<<<< @@ -10031,7 +9992,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_116userauth_gssapi(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":536 +/* "ssh/session.pyx":535 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10064,7 +10025,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_knownhost", 0); - /* "ssh/session.pyx":538 + /* "ssh/session.pyx":537 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10079,7 +10040,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx #endif /*try:*/ { - /* "ssh/session.pyx":539 + /* "ssh/session.pyx":538 * cdef int rc * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10089,7 +10050,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx __pyx_v_rc = ssh_write_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":538 + /* "ssh/session.pyx":537 * def write_knownhost(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -10108,7 +10069,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx } } - /* "ssh/session.pyx":540 + /* "ssh/session.pyx":539 * with nogil: * rc = c_ssh.ssh_write_knownhost(self._session) * return handle_error_codes(rc, self._session) # <<<<<<<<<<<<<< @@ -10116,14 +10077,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx * def dump_knownhost(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 540, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_handle_error_codes(__pyx_v_rc, __pyx_v_self->_session); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":536 + /* "ssh/session.pyx":535 * return handle_error_codes(rc, self._session) * * def write_knownhost(self): # <<<<<<<<<<<<<< @@ -10142,7 +10103,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_118write_knownhost(struct __pyx return __pyx_r; } -/* "ssh/session.pyx":542 +/* "ssh/session.pyx":541 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10176,7 +10137,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_knownhost", 0); - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":544 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10191,7 +10152,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":546 + /* "ssh/session.pyx":545 * cdef bytes b_known_host * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) # <<<<<<<<<<<<<< @@ -10201,7 +10162,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_v__known_host = ssh_dump_knownhost(__pyx_v_self->_session); } - /* "ssh/session.pyx":545 + /* "ssh/session.pyx":544 * cdef const_char *_known_host * cdef bytes b_known_host * with nogil: # <<<<<<<<<<<<<< @@ -10220,7 +10181,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ } } - /* "ssh/session.pyx":547 + /* "ssh/session.pyx":546 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10230,7 +10191,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_t_1 = ((__pyx_v__known_host == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":548 + /* "ssh/session.pyx":547 * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: * return # <<<<<<<<<<<<<< @@ -10241,7 +10202,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":547 + /* "ssh/session.pyx":546 * with nogil: * _known_host = c_ssh.ssh_dump_knownhost(self._session) * if _known_host is NULL: # <<<<<<<<<<<<<< @@ -10250,19 +10211,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ */ } - /* "ssh/session.pyx":549 + /* "ssh/session.pyx":548 * if _known_host is NULL: * return * b_known_host = _known_host # <<<<<<<<<<<<<< * return b_known_host * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__known_host); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_known_host = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":550 + /* "ssh/session.pyx":549 * return * b_known_host = _known_host * return b_known_host # <<<<<<<<<<<<<< @@ -10274,7 +10235,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ __pyx_r = __pyx_v_b_known_host; goto __pyx_L0; - /* "ssh/session.pyx":542 + /* "ssh/session.pyx":541 * return handle_error_codes(rc, self._session) * * def dump_knownhost(self): # <<<<<<<<<<<<<< @@ -10294,7 +10255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_120dump_knownhost(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":552 +/* "ssh/session.pyx":551 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10328,7 +10289,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_clientbanner", 0); - /* "ssh/session.pyx":555 + /* "ssh/session.pyx":554 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10343,7 +10304,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":556 + /* "ssh/session.pyx":555 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) # <<<<<<<<<<<<<< @@ -10353,7 +10314,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_v__banner = ssh_get_clientbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":555 + /* "ssh/session.pyx":554 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10372,7 +10333,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py } } - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":556 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10382,7 +10343,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":558 + /* "ssh/session.pyx":557 * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10393,7 +10354,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":557 + /* "ssh/session.pyx":556 * with nogil: * _banner = c_ssh.ssh_get_clientbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10402,19 +10363,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py */ } - /* "ssh/session.pyx":559 + /* "ssh/session.pyx":558 * if _banner is NULL: * return * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":560 + /* "ssh/session.pyx":559 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10426,7 +10387,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":552 + /* "ssh/session.pyx":551 * return b_known_host * * def get_clientbanner(self): # <<<<<<<<<<<<<< @@ -10446,7 +10407,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_122get_clientbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":562 +/* "ssh/session.pyx":561 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10480,7 +10441,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_serverbanner", 0); - /* "ssh/session.pyx":565 + /* "ssh/session.pyx":564 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10495,7 +10456,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py #endif /*try:*/ { - /* "ssh/session.pyx":566 + /* "ssh/session.pyx":565 * cdef bytes banner * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) # <<<<<<<<<<<<<< @@ -10505,7 +10466,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_v__banner = ssh_get_serverbanner(__pyx_v_self->_session); } - /* "ssh/session.pyx":565 + /* "ssh/session.pyx":564 * cdef const_char *_banner * cdef bytes banner * with nogil: # <<<<<<<<<<<<<< @@ -10524,7 +10485,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py } } - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":566 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10534,7 +10495,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_t_1 = ((__pyx_v__banner == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":568 + /* "ssh/session.pyx":567 * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: * return # <<<<<<<<<<<<<< @@ -10545,7 +10506,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":567 + /* "ssh/session.pyx":566 * with nogil: * _banner = c_ssh.ssh_get_serverbanner(self._session) * if _banner is NULL: # <<<<<<<<<<<<<< @@ -10554,19 +10515,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py */ } - /* "ssh/session.pyx":569 + /* "ssh/session.pyx":568 * if _banner is NULL: * return * banner = _banner # <<<<<<<<<<<<<< * return banner * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__banner); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_banner = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":570 + /* "ssh/session.pyx":569 * return * banner = _banner * return banner # <<<<<<<<<<<<<< @@ -10578,7 +10539,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py __pyx_r = __pyx_v_banner; goto __pyx_L0; - /* "ssh/session.pyx":562 + /* "ssh/session.pyx":561 * return banner * * def get_serverbanner(self): # <<<<<<<<<<<<<< @@ -10598,7 +10559,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_124get_serverbanner(struct __py return __pyx_r; } -/* "ssh/session.pyx":572 +/* "ssh/session.pyx":571 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10632,7 +10593,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_kex_algo", 0); - /* "ssh/session.pyx":575 + /* "ssh/session.pyx":574 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10647,7 +10608,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":576 + /* "ssh/session.pyx":575 * cdef bytes algo * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) # <<<<<<<<<<<<<< @@ -10657,7 +10618,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_v__algo = ssh_get_kex_algo(__pyx_v_self->_session); } - /* "ssh/session.pyx":575 + /* "ssh/session.pyx":574 * cdef const_char *_algo * cdef bytes algo * with nogil: # <<<<<<<<<<<<<< @@ -10676,7 +10637,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob } } - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":576 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10686,7 +10647,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_t_1 = ((__pyx_v__algo == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":578 + /* "ssh/session.pyx":577 * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: * return # <<<<<<<<<<<<<< @@ -10697,7 +10658,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":577 + /* "ssh/session.pyx":576 * with nogil: * _algo = c_ssh.ssh_get_kex_algo(self._session) * if _algo is NULL: # <<<<<<<<<<<<<< @@ -10706,19 +10667,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob */ } - /* "ssh/session.pyx":579 + /* "ssh/session.pyx":578 * if _algo is NULL: * return * algo = _algo # <<<<<<<<<<<<<< * return algo * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__algo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_algo = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":580 + /* "ssh/session.pyx":579 * return * algo = _algo * return algo # <<<<<<<<<<<<<< @@ -10730,7 +10691,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob __pyx_r = __pyx_v_algo; goto __pyx_L0; - /* "ssh/session.pyx":572 + /* "ssh/session.pyx":571 * return banner * * def get_kex_algo(self): # <<<<<<<<<<<<<< @@ -10750,7 +10711,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_126get_kex_algo(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":582 +/* "ssh/session.pyx":581 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10784,7 +10745,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_in", 0); - /* "ssh/session.pyx":585 + /* "ssh/session.pyx":584 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10799,7 +10760,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o #endif /*try:*/ { - /* "ssh/session.pyx":586 + /* "ssh/session.pyx":585 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) # <<<<<<<<<<<<<< @@ -10809,7 +10770,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_v__cipher = ssh_get_cipher_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":585 + /* "ssh/session.pyx":584 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10828,7 +10789,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o } } - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":586 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10838,7 +10799,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":588 + /* "ssh/session.pyx":587 * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -10849,7 +10810,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":587 + /* "ssh/session.pyx":586 * with nogil: * _cipher = c_ssh.ssh_get_cipher_in(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10858,19 +10819,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o */ } - /* "ssh/session.pyx":589 + /* "ssh/session.pyx":588 * if _cipher is NULL: * return * cipher = _cipher # <<<<<<<<<<<<<< * return cipher * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":590 + /* "ssh/session.pyx":589 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -10882,7 +10843,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":582 + /* "ssh/session.pyx":581 * return algo * * def get_cipher_in(self): # <<<<<<<<<<<<<< @@ -10902,7 +10863,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_128get_cipher_in(struct __pyx_o return __pyx_r; } -/* "ssh/session.pyx":592 +/* "ssh/session.pyx":591 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -10936,7 +10897,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_cipher_out", 0); - /* "ssh/session.pyx":595 + /* "ssh/session.pyx":594 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10951,7 +10912,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":596 + /* "ssh/session.pyx":595 * cdef bytes cipher * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) # <<<<<<<<<<<<<< @@ -10961,7 +10922,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_v__cipher = ssh_get_cipher_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":595 + /* "ssh/session.pyx":594 * cdef const_char *_cipher * cdef bytes cipher * with nogil: # <<<<<<<<<<<<<< @@ -10980,7 +10941,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ } } - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":596 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -10990,7 +10951,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_t_1 = ((__pyx_v__cipher == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":598 + /* "ssh/session.pyx":597 * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: * return # <<<<<<<<<<<<<< @@ -11001,7 +10962,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":597 + /* "ssh/session.pyx":596 * with nogil: * _cipher = c_ssh.ssh_get_cipher_out(self._session) * if _cipher is NULL: # <<<<<<<<<<<<<< @@ -11010,19 +10971,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ */ } - /* "ssh/session.pyx":599 + /* "ssh/session.pyx":598 * if _cipher is NULL: * return * cipher = _cipher # <<<<<<<<<<<<<< * return cipher * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__cipher); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_cipher = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":600 + /* "ssh/session.pyx":599 * return * cipher = _cipher * return cipher # <<<<<<<<<<<<<< @@ -11034,7 +10995,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ __pyx_r = __pyx_v_cipher; goto __pyx_L0; - /* "ssh/session.pyx":592 + /* "ssh/session.pyx":591 * return cipher * * def get_cipher_out(self): # <<<<<<<<<<<<<< @@ -11054,7 +11015,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_130get_cipher_out(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":602 +/* "ssh/session.pyx":601 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11088,7 +11049,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_in", 0); - /* "ssh/session.pyx":605 + /* "ssh/session.pyx":604 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11103,7 +11064,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj #endif /*try:*/ { - /* "ssh/session.pyx":606 + /* "ssh/session.pyx":605 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) # <<<<<<<<<<<<<< @@ -11113,7 +11074,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_v__hmac = ssh_get_hmac_in(__pyx_v_self->_session); } - /* "ssh/session.pyx":605 + /* "ssh/session.pyx":604 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11132,7 +11093,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj } } - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":606 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11142,7 +11103,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":608 + /* "ssh/session.pyx":607 * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11153,7 +11114,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":607 + /* "ssh/session.pyx":606 * with nogil: * _hmac = c_ssh.ssh_get_hmac_in(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11162,19 +11123,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj */ } - /* "ssh/session.pyx":609 + /* "ssh/session.pyx":608 * if _hmac is NULL: * return * hmac = _hmac # <<<<<<<<<<<<<< * return hmac * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":610 + /* "ssh/session.pyx":609 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11186,7 +11147,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":602 + /* "ssh/session.pyx":601 * return cipher * * def get_hmac_in(self): # <<<<<<<<<<<<<< @@ -11206,7 +11167,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_132get_hmac_in(struct __pyx_obj return __pyx_r; } -/* "ssh/session.pyx":612 +/* "ssh/session.pyx":611 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11240,7 +11201,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_hmac_out", 0); - /* "ssh/session.pyx":615 + /* "ssh/session.pyx":614 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11255,7 +11216,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob #endif /*try:*/ { - /* "ssh/session.pyx":616 + /* "ssh/session.pyx":615 * cdef bytes hmac * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) # <<<<<<<<<<<<<< @@ -11265,7 +11226,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_v__hmac = ssh_get_hmac_out(__pyx_v_self->_session); } - /* "ssh/session.pyx":615 + /* "ssh/session.pyx":614 * cdef const_char *_hmac * cdef bytes hmac * with nogil: # <<<<<<<<<<<<<< @@ -11284,7 +11245,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob } } - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":616 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11294,7 +11255,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_t_1 = ((__pyx_v__hmac == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":618 + /* "ssh/session.pyx":617 * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: * return # <<<<<<<<<<<<<< @@ -11305,7 +11266,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":617 + /* "ssh/session.pyx":616 * with nogil: * _hmac = c_ssh.ssh_get_hmac_out(self._session) * if _hmac is NULL: # <<<<<<<<<<<<<< @@ -11314,19 +11275,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob */ } - /* "ssh/session.pyx":619 + /* "ssh/session.pyx":618 * if _hmac is NULL: * return * hmac = _hmac # <<<<<<<<<<<<<< * return hmac * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v__hmac); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_hmac = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":620 + /* "ssh/session.pyx":619 * return * hmac = _hmac * return hmac # <<<<<<<<<<<<<< @@ -11338,7 +11299,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob __pyx_r = __pyx_v_hmac; goto __pyx_L0; - /* "ssh/session.pyx":612 + /* "ssh/session.pyx":611 * return hmac * * def get_hmac_out(self): # <<<<<<<<<<<<<< @@ -11358,7 +11319,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_134get_hmac_out(struct __pyx_ob return __pyx_r; } -/* "ssh/session.pyx":622 +/* "ssh/session.pyx":621 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11393,7 +11354,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error", 0); - /* "ssh/session.pyx":625 + /* "ssh/session.pyx":624 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11408,7 +11369,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 #endif /*try:*/ { - /* "ssh/session.pyx":626 + /* "ssh/session.pyx":625 * cdef bytes b_error * with nogil: * error = c_ssh.ssh_get_error(self._session) # <<<<<<<<<<<<<< @@ -11418,7 +11379,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_v_error = ssh_get_error(__pyx_v_self->_session); } - /* "ssh/session.pyx":625 + /* "ssh/session.pyx":624 * cdef const_char *error * cdef bytes b_error * with nogil: # <<<<<<<<<<<<<< @@ -11437,7 +11398,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 } } - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":626 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11447,7 +11408,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_t_1 = ((__pyx_v_error == NULL) != 0); if (__pyx_t_1) { - /* "ssh/session.pyx":628 + /* "ssh/session.pyx":627 * error = c_ssh.ssh_get_error(self._session) * if error is NULL: * return # <<<<<<<<<<<<<< @@ -11458,7 +11419,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "ssh/session.pyx":627 + /* "ssh/session.pyx":626 * with nogil: * error = c_ssh.ssh_get_error(self._session) * if error is NULL: # <<<<<<<<<<<<<< @@ -11467,19 +11428,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 */ } - /* "ssh/session.pyx":629 + /* "ssh/session.pyx":628 * if error is NULL: * return * b_error = error # <<<<<<<<<<<<<< * return to_str(b_error) * */ - __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_b_error = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "ssh/session.pyx":630 + /* "ssh/session.pyx":629 * return * b_error = error * return to_str(b_error) # <<<<<<<<<<<<<< @@ -11487,14 +11448,14 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 * def get_error_code(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error) - __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_error); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_2 = __pyx_f_3ssh_5utils_to_str(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "ssh/session.pyx":622 + /* "ssh/session.pyx":621 * return hmac * * def get_error(self): # <<<<<<<<<<<<<< @@ -11514,7 +11475,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_136get_error(struct __pyx_obj_3 return __pyx_r; } -/* "ssh/session.pyx":632 +/* "ssh/session.pyx":631 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11546,7 +11507,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_error_code", 0); - /* "ssh/session.pyx":634 + /* "ssh/session.pyx":633 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11561,7 +11522,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ #endif /*try:*/ { - /* "ssh/session.pyx":635 + /* "ssh/session.pyx":634 * cdef int rc * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) # <<<<<<<<<<<<<< @@ -11571,7 +11532,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ __pyx_v_rc = ssh_get_error_code(__pyx_v_self->_session); } - /* "ssh/session.pyx":634 + /* "ssh/session.pyx":633 * def get_error_code(self): * cdef int rc * with nogil: # <<<<<<<<<<<<<< @@ -11590,7 +11551,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ } } - /* "ssh/session.pyx":636 + /* "ssh/session.pyx":635 * with nogil: * rc = c_ssh.ssh_get_error_code(self._session) * return rc # <<<<<<<<<<<<<< @@ -11598,13 +11559,13 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ * def scp_new(self, int mode, location not None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":632 + /* "ssh/session.pyx":631 * return to_str(b_error) * * def get_error_code(self): # <<<<<<<<<<<<<< @@ -11623,7 +11584,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_138get_error_code(struct __pyx_ return __pyx_r; } -/* "ssh/session.pyx":638 +/* "ssh/session.pyx":637 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -11666,11 +11627,11 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_new(PyObject *__pyx_v_se case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_location)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 638, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, 1); __PYX_ERR(0, 637, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 638, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "scp_new") < 0)) __PYX_ERR(0, 637, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -11678,19 +11639,19 @@ static PyObject *__pyx_pw_3ssh_7session_7Session_141scp_new(PyObject *__pyx_v_se values[0] = PyTuple_GET_ITEM(__pyx_args, 0); values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } - __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 638, __pyx_L3_error) + __pyx_v_mode = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_mode == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 637, __pyx_L3_error) __pyx_v_location = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 638, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("scp_new", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 637, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("ssh.session.Session.scp_new", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; if (unlikely(((PyObject *)__pyx_v_location) == Py_None)) { - PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 638, __pyx_L1_error) + PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "location"); __PYX_ERR(0, 637, __pyx_L1_error) } __pyx_r = __pyx_pf_3ssh_7session_7Session_140scp_new(((struct __pyx_obj_3ssh_7session_Session *)__pyx_v_self), __pyx_v_mode, __pyx_v_location); @@ -11718,19 +11679,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss int __pyx_clineno = 0; __Pyx_RefNannySetupContext("scp_new", 0); - /* "ssh/session.pyx":641 + /* "ssh/session.pyx":640 * """Create and initialise SCP channel""" * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) # <<<<<<<<<<<<<< * cdef char *c_location = b_location * with nogil: */ - __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_1 = __pyx_f_3ssh_5utils_to_bytes(__pyx_v_location); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_b_location = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "ssh/session.pyx":642 + /* "ssh/session.pyx":641 * cdef c_ssh.ssh_scp _scp * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location # <<<<<<<<<<<<<< @@ -11739,12 +11700,12 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ if (unlikely(__pyx_v_b_location == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 642, __pyx_L1_error) + __PYX_ERR(0, 641, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_b_location); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error) __pyx_v_c_location = __pyx_t_2; - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":642 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11759,7 +11720,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":644 + /* "ssh/session.pyx":643 * cdef char *c_location = b_location * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) # <<<<<<<<<<<<<< @@ -11768,7 +11729,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __pyx_v__scp = ssh_scp_new(__pyx_v_self->_session, __pyx_v_mode, __pyx_v_c_location); - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":644 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11778,7 +11739,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((__pyx_v__scp == NULL) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11791,7 +11752,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":646 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11800,30 +11761,30 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":648 + /* "ssh/session.pyx":647 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) */ - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 647, __pyx_L8_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 646, __pyx_L8_error) - /* "ssh/session.pyx":647 + /* "ssh/session.pyx":646 * if _scp is NULL: * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L8_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L7_return; } - /* "ssh/session.pyx":646 + /* "ssh/session.pyx":645 * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: * with gil: # <<<<<<<<<<<<<< @@ -11846,7 +11807,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":645 + /* "ssh/session.pyx":644 * with nogil: * _scp = c_ssh.ssh_scp_new(self._session, mode, c_location) * if _scp is NULL: # <<<<<<<<<<<<<< @@ -11855,7 +11816,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ } - /* "ssh/session.pyx":649 + /* "ssh/session.pyx":648 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: # <<<<<<<<<<<<<< @@ -11865,7 +11826,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss __pyx_t_3 = ((ssh_scp_init(__pyx_v__scp) != SSH_OK) != 0); if (__pyx_t_3) { - /* "ssh/session.pyx":650 + /* "ssh/session.pyx":649 * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) # <<<<<<<<<<<<<< @@ -11874,7 +11835,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ ssh_scp_free(__pyx_v__scp); - /* "ssh/session.pyx":651 + /* "ssh/session.pyx":650 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11887,7 +11848,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss #endif /*try:*/ { - /* "ssh/session.pyx":652 + /* "ssh/session.pyx":651 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< @@ -11896,29 +11857,29 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss */ __Pyx_XDECREF(__pyx_r); - /* "ssh/session.pyx":653 + /* "ssh/session.pyx":652 * with gil: * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) # <<<<<<<<<<<<<< * return SCP.from_ptr(_scp, self) */ - __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 652, __pyx_L12_error) + __pyx_t_4 = __pyx_f_3ssh_5utils_handle_error_codes(ssh_get_error_code(__pyx_v_self->_session), __pyx_v_self->_session); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 651, __pyx_L12_error) - /* "ssh/session.pyx":652 + /* "ssh/session.pyx":651 * c_ssh.ssh_scp_free(_scp) * with gil: * return handle_error_codes( # <<<<<<<<<<<<<< * c_ssh.ssh_get_error_code(self._session), self._session) * return SCP.from_ptr(_scp, self) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L12_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L11_return; } - /* "ssh/session.pyx":651 + /* "ssh/session.pyx":650 * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: * c_ssh.ssh_scp_free(_scp) * with gil: # <<<<<<<<<<<<<< @@ -11941,7 +11902,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":649 + /* "ssh/session.pyx":648 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * if c_ssh.ssh_scp_init(_scp) != c_ssh.SSH_OK: # <<<<<<<<<<<<<< @@ -11951,7 +11912,7 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":643 + /* "ssh/session.pyx":642 * cdef bytes b_location = to_bytes(location) * cdef char *c_location = b_location * with nogil: # <<<<<<<<<<<<<< @@ -11984,19 +11945,19 @@ static PyObject *__pyx_pf_3ssh_7session_7Session_140scp_new(struct __pyx_obj_3ss } } - /* "ssh/session.pyx":654 + /* "ssh/session.pyx":653 * return handle_error_codes( * c_ssh.ssh_get_error_code(self._session), self._session) * return SCP.from_ptr(_scp, self) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_3ssh_3scp_SCP->from_ptr(__pyx_v__scp, __pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_3ssh_3scp_SCP->from_ptr(__pyx_v__scp, __pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "ssh/session.pyx":638 + /* "ssh/session.pyx":637 * return rc * * def scp_new(self, int mode, location not None): # <<<<<<<<<<<<<< @@ -12436,7 +12397,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_SSH_READ_PENDING, __pyx_k_SSH_READ_PENDING, sizeof(__pyx_k_SSH_READ_PENDING), 0, 0, 1, 1}, {&__pyx_n_s_SSH_WRITE_PENDING, __pyx_k_SSH_WRITE_PENDING, sizeof(__pyx_k_SSH_WRITE_PENDING), 0, 0, 1, 1}, {&__pyx_n_s_Session, __pyx_k_Session, sizeof(__pyx_k_Session), 0, 0, 1, 1}, - {&__pyx_kp_s_Session_dealloc, __pyx_k_Session_dealloc, sizeof(__pyx_k_Session_dealloc), 0, 0, 1, 0}, {&__pyx_kp_s_Session_is_not_connected, __pyx_k_Session_is_not_connected, sizeof(__pyx_k_Session_is_not_connected), 0, 0, 1, 0}, {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, {&__pyx_n_s_address, __pyx_k_address, sizeof(__pyx_k_address), 0, 0, 1, 1}, @@ -12446,9 +12406,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, {&__pyx_n_s_dest_port, __pyx_k_dest_port, sizeof(__pyx_k_dest_port), 0, 0, 1, 1}, {&__pyx_n_s_echo, __pyx_k_echo, sizeof(__pyx_k_echo), 0, 0, 1, 1}, - {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1}, {&__pyx_n_s_exceptions, __pyx_k_exceptions, sizeof(__pyx_k_exceptions), 0, 0, 1, 1}, - {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1}, {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1}, {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, @@ -12461,7 +12419,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_option, __pyx_k_option, sizeof(__pyx_k_option), 0, 0, 1, 1}, {&__pyx_n_s_password, __pyx_k_password, sizeof(__pyx_k_password), 0, 0, 1, 1}, {&__pyx_n_s_port, __pyx_k_port, sizeof(__pyx_k_port), 0, 0, 1, 1}, - {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, {&__pyx_n_s_rcounter, __pyx_k_rcounter, sizeof(__pyx_k_rcounter), 0, 0, 1, 1}, {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, @@ -12479,7 +12436,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 64, __pyx_L1_error) - __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 224, __pyx_L1_error) + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 223, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -13678,48 +13635,6 @@ static int __Pyx_CheckKeywordStrings( return 0; } -/* WriteUnraisableException */ -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback, CYTHON_UNUSED int nogil) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_PyThreadState_declare -#ifdef WITH_THREAD - PyGILState_STATE state; - if (nogil) - state = PyGILState_Ensure(); -#ifdef _MSC_VER - else state = (PyGILState_STATE)-1; -#endif -#endif - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -#ifdef WITH_THREAD - if (nogil) - PyGILState_Release(state); -#endif -} - /* RaiseDoubleKeywords */ static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, @@ -14489,112 +14404,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__ssh_auth_e(enum ssh_auth_e return (target_type) value;\ } -/* Print */ -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static PyObject *__Pyx_GetStdout(void) { - PyObject *f = PySys_GetObject((char *)"stdout"); - if (!f) { - PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); - } - return f; -} -static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { - int i; - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { - PyObject* v; - if (PyFile_SoftSpace(f, 1)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - v = PyTuple_GET_ITEM(arg_tuple, i); - if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) - goto error; - if (PyString_Check(v)) { - char *s = PyString_AsString(v); - Py_ssize_t len = PyString_Size(v); - if (len > 0) { - switch (s[len-1]) { - case ' ': break; - case '\f': case '\r': case '\n': case '\t': case '\v': - PyFile_SoftSpace(f, 0); - break; - default: break; - } - } - } - } - if (newline) { - if (PyFile_WriteString("\n", f) < 0) - goto error; - PyFile_SoftSpace(f, 0); - } - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; -} -#else -static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { - PyObject* kwargs = 0; - PyObject* result = 0; - PyObject* end_string; - if (unlikely(!__pyx_print)) { - __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print); - if (!__pyx_print) - return -1; - } - if (stream) { - kwargs = PyDict_New(); - if (unlikely(!kwargs)) - return -1; - if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0)) - goto bad; - if (!newline) { - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - goto bad; - if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - goto bad; - } - Py_DECREF(end_string); - } - } else if (!newline) { - if (unlikely(!__pyx_print_kwargs)) { - __pyx_print_kwargs = PyDict_New(); - if (unlikely(!__pyx_print_kwargs)) - return -1; - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - return -1; - if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) { - Py_DECREF(end_string); - return -1; - } - Py_DECREF(end_string); - } - kwargs = __pyx_print_kwargs; - } - result = PyObject_Call(__pyx_print, arg_tuple, kwargs); - if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs)) - Py_DECREF(kwargs); - if (!result) - return -1; - Py_DECREF(result); - return 0; -bad: - if (kwargs != __pyx_print_kwargs) - Py_XDECREF(kwargs); - return -1; -} -#endif - /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_socket_t(socket_t value) { const socket_t neg_one = (socket_t) ((socket_t) 0 - (socket_t) 1), const_zero = (socket_t) 0; @@ -15004,43 +14813,6 @@ static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { return (unsigned int) -1; } -/* PrintOne */ -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static int __Pyx_PrintOne(PyObject* f, PyObject *o) { - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - if (PyFile_SoftSpace(f, 0)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) - goto error; - if (PyFile_WriteString("\n", f) < 0) - goto error; - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; - /* the line below is just to avoid C compiler - * warnings about unused functions */ - return __Pyx_Print(f, NULL, 0); -} -#else -static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { - int res; - PyObject* arg_tuple = PyTuple_Pack(1, o); - if (unlikely(!arg_tuple)) - return -1; - res = __Pyx_Print(stream, arg_tuple, 1); - Py_DECREF(arg_tuple); - return res; -} -#endif - /* CIntToPy */ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; diff --git a/ssh/session.pyx b/ssh/session.pyx index 6eb53f4b..617f9d53 100644 --- a/ssh/session.pyx +++ b/ssh/session.pyx @@ -65,7 +65,6 @@ cdef class Session: def __dealloc__(self): if self._session is not NULL: - print("Session dealloc") c_ssh.ssh_free(self._session) self._session = NULL From 2164197ca47e6da41d812357c8178d39c298dd94 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:16:19 +0100 Subject: [PATCH 17/50] Updated cfg --- ci/appveyor/build_ssh.bat | 9 +++++---- ci/osx-wheel.sh | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 90d27c66..3203bf32 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -32,9 +32,10 @@ cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER% cmake --build . --config Release cd .. -ls -ls src/lib/Release -cp src/lib/static/Release/ssh.lib %PYTHON%/libs/ -# cp src/lib/Release/ssh.dll ssh/ +ls src/ +ls src/src +ls src/src/Release +cp src/src/static/Release/ssh.lib %PYTHON%/libs/ +# cp src/src/Release/ssh.dll ssh/ ls %PYTHON%/libs/ ls ssh/ diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index ef5dd71e..217ff62a 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -12,13 +12,14 @@ pip3 install -U setuptools pip pip3 install -U delocate wheel pip3 wheel . ls -lhtr /usr/local/lib/ -cp /usr/local/lib/libssh* ssh/ +# cp /usr/local/lib/libssh* ssh/ delocate-listdeps --all *.whl delocate-wheel -v *.whl delocate-listdeps --all *.whl ls -l *.whl -rm -f ssh/*.dylib /usr/local/lib/libssh* +# rm -f ssh/*.dylib /usr/local/lib/libssh* +rm -f /usr/local/lib/libssh* pip3 install -v *.whl pwd; mkdir -p temp; cd temp; pwd python3 -c "from ssh.session import Session; Session()" && echo "Import successfull" From e3eef9ed047846425a4682a3e530d4225de71d41 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:22:43 +0100 Subject: [PATCH 18/50] Updated cfg --- ci/osx-wheel.sh | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 217ff62a..7d5de1fa 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -10,24 +10,20 @@ set -x python -V pip3 install -U setuptools pip pip3 install -U delocate wheel -pip3 wheel . +SYSTEM_LIBSSH=1 python3 setup.py bdist_wheel ls -lhtr /usr/local/lib/ # cp /usr/local/lib/libssh* ssh/ -delocate-listdeps --all *.whl -delocate-wheel -v *.whl -delocate-listdeps --all *.whl +delocate-listdeps dist/*.whl +delocate-wheel -v -w wheels dist/*.whl +delocate-listdeps wheels/*.whl -ls -l *.whl +ls -l wheels/*.whl # rm -f ssh/*.dylib /usr/local/lib/libssh* rm -f /usr/local/lib/libssh* -pip3 install -v *.whl +pip3 install -v wheels/*.whl pwd; mkdir -p temp; cd temp; pwd python3 -c "from ssh.session import Session; Session()" && echo "Import successfull" cd ..; pwd set +x deactivate set -x - -mkdir -p wheels -mv *.whl wheels/ -ls -lh wheels From b6a7deb32aa310be7e7df69b027b25a66a934d8e Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:36:02 +0100 Subject: [PATCH 19/50] Updated cfg --- .circleci/config.yml | 10 +++------- MANIFEST.in | 1 - ci/appveyor/build_ssh.bat | 5 +---- ci/osx-wheel.sh | 2 -- 4 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ac19f318..95d4bea1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,9 +40,6 @@ jobs: name: Test osx: parameters: - pyenv_ver: - type: string - default: "3.8.3" xcode_ver: type: string default: "11.6.0" @@ -50,9 +47,7 @@ jobs: xcode: << parameters.xcode_ver >> environment: HOMEBREW_NO_AUTO_UPDATE: 1 - # PYENV: 3.6.11 - PYENV: << parameters.pyenv_ver >> - # SYSTEM_LIBSSH: 1 + SYSTEM_LIBSSH: 1 steps: - checkout - run: @@ -65,7 +60,6 @@ jobs: name: Build Wheel command: | ./ci/osx-wheel.sh - # ./ci/pyenv-wheel.sh - store_artifacts: path: wheels - run: @@ -137,3 +131,5 @@ workflows: filters: tags: only: /.*/ + # branches: + # ignore: /.*/ diff --git a/MANIFEST.in b/MANIFEST.in index fbde741e..5254337e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -6,7 +6,6 @@ include LICENSE include COPYING include ssh/*.pyx include ssh/*.pxd -include ssh/*.dylib recursive-include libssh * include ci/build_ssh.sh include _setup_libssh.py diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 3203bf32..7f91fb4b 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -32,10 +32,7 @@ cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER% cmake --build . --config Release cd .. -ls src/ -ls src/src ls src/src/Release -cp src/src/static/Release/ssh.lib %PYTHON%/libs/ -# cp src/src/Release/ssh.dll ssh/ +cp src/src/Release/ssh.lib %PYTHON%/libs/ ls %PYTHON%/libs/ ls ssh/ diff --git a/ci/osx-wheel.sh b/ci/osx-wheel.sh index 7d5de1fa..537754e4 100755 --- a/ci/osx-wheel.sh +++ b/ci/osx-wheel.sh @@ -12,13 +12,11 @@ pip3 install -U setuptools pip pip3 install -U delocate wheel SYSTEM_LIBSSH=1 python3 setup.py bdist_wheel ls -lhtr /usr/local/lib/ -# cp /usr/local/lib/libssh* ssh/ delocate-listdeps dist/*.whl delocate-wheel -v -w wheels dist/*.whl delocate-listdeps wheels/*.whl ls -l wheels/*.whl -# rm -f ssh/*.dylib /usr/local/lib/libssh* rm -f /usr/local/lib/libssh* pip3 install -v wheels/*.whl pwd; mkdir -p temp; cd temp; pwd From af4dfd9d8f64681848d385a9df09bdf9a3a27176 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:40:23 +0100 Subject: [PATCH 20/50] Updated cfg --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 95d4bea1..27b7cdf6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -128,6 +128,11 @@ workflows: # ignore: /.*/ - osx: context: Docker + matrix: + parameters: + xcode_ver: + - "11.6.0" + - "11.1.0" filters: tags: only: /.*/ From 7f38213a1a33ad75823ae823b9de4fe2112d98f4 Mon Sep 17 00:00:00 2001 From: Panos Date: Tue, 18 Aug 2020 23:54:23 +0100 Subject: [PATCH 21/50] Updated cfg --- .appveyor.yml | 6 +++--- .circleci/config.yml | 2 +- ci/appveyor/build_krb.bat | 1 + ci/appveyor/build_ssh.bat | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1ea3b52f..5606d5d9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,7 @@ install: - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip - - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ + - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib/*.lib %APPVEYOR_BUILD_FOLDER% # - 7z e openssl-%OPENSSL_VER%.tar.gz # - ps: ls openssl-%OPENSSL_VER% # - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% @@ -84,12 +84,12 @@ install: # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls - # - cinst nasm + - cinst nmake build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" - # - refreshenv # - "%CMD_IN_ENV% ci\\appveyor\\rebuild_openssl_vs2015.cmd" + - refreshenv - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" diff --git a/.circleci/config.yml b/.circleci/config.yml index 27b7cdf6..5b6a1037 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -127,12 +127,12 @@ workflows: # branches: # ignore: /.*/ - osx: - context: Docker matrix: parameters: xcode_ver: - "11.6.0" - "11.1.0" + context: Docker filters: tags: only: /.*/ diff --git a/ci/appveyor/build_krb.bat b/ci/appveyor/build_krb.bat index bfc3d680..72bcdc17 100755 --- a/ci/appveyor/build_krb.bat +++ b/ci/appveyor/build_krb.bat @@ -1,3 +1,4 @@ +refreshenv set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib set CPU=AMD64 setenv /x64 /release diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 7f91fb4b..b18ef06b 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -22,7 +22,7 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ -DWITH_GSSAPI=ON ^ - -DWITH_STATIC_LIB=ON ^ + -DBUILD_SHARED_LIBS=OFF ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% From e5910c7c9ae8bddb4beac1a017549ad014fa860b Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:04:44 +0100 Subject: [PATCH 22/50] Updated cfg --- .circleci/config.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b6a1037..b664f7f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -109,23 +109,23 @@ workflows: version: 2.1 main: jobs: - # - python_test: - # matrix: - # parameters: - # python_ver: - # - "3.6" - # - "3.7" - # - "3.8" - # filters: - # tags: - # ignore: /.*/ - # - manylinux: - # context: Docker - # filters: - # tags: - # only: /.*/ - # branches: - # ignore: /.*/ + - python_test: + matrix: + parameters: + python_ver: + - "3.6" + - "3.7" + - "3.8" + filters: + tags: + ignore: /.*/ + - manylinux: + context: Docker + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ - osx: matrix: parameters: @@ -136,5 +136,5 @@ workflows: filters: tags: only: /.*/ - # branches: - # ignore: /.*/ + branches: + ignore: /.*/ From 4e62dbedb282398fb353c511185ad56be24ca4ef Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:06:29 +0100 Subject: [PATCH 23/50] Updated appveyor cfg --- .appveyor.yml | 2 +- ci/appveyor/build_krb.bat | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5606d5d9..ce4b88b9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -84,7 +84,7 @@ install: # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls - - cinst nmake + - cinst make build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" diff --git a/ci/appveyor/build_krb.bat b/ci/appveyor/build_krb.bat index 72bcdc17..877d80ee 100755 --- a/ci/appveyor/build_krb.bat +++ b/ci/appveyor/build_krb.bat @@ -3,6 +3,6 @@ set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib set CPU=AMD64 setenv /x64 /release cd kfw-4.1/src -nmake -nmake install +make +make install cd ../.. From 8c94d5c90b8e77ef65f429fe8e00e4c4a3135e23 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:10:34 +0100 Subject: [PATCH 24/50] updated krb script --- ci/appveyor/build_krb.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/appveyor/build_krb.bat b/ci/appveyor/build_krb.bat index 877d80ee..1f241e14 100755 --- a/ci/appveyor/build_krb.bat +++ b/ci/appveyor/build_krb.bat @@ -3,6 +3,7 @@ set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib set CPU=AMD64 setenv /x64 /release cd kfw-4.1/src +make -f Makefile.in prep-windows make make install cd ../.. From 9a36d9c352cdecf5e7121dd6528767773a8bf998 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:16:08 +0100 Subject: [PATCH 25/50] Updated cfg --- .appveyor.yml | 1 + setup.py | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index ce4b88b9..397013df 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -94,6 +94,7 @@ build_script: - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" - rm -f ssh/*.c + - python -V - "%CMD_IN_ENV% python setup.py build_ext -I ci/appveyor/include" - "%CMD_IN_ENV% python setup.py build" - "%CMD_IN_ENV% python setup.py install" diff --git a/setup.py b/setup.py index e5e5f0c6..57e866c6 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,6 @@ else: USING_CYTHON = True -if platform.system() == 'Windows' and platform.python_version_tuple()[0] == "2": - raise ImportError("ssh-python requires Python 3 or above on Windows platforms.") - _PYTHON_MAJOR_VERSION = int(platform.python_version_tuple()[0]) ON_WINDOWS = platform.system() == 'Windows' SYSTEM_LIBSSH = bool(os.environ.get('SYSTEM_LIBSSH', 0)) From 93bf04b550bfb07ebc7621a4afee2c1298aa087e Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:19:59 +0100 Subject: [PATCH 26/50] Updated appveyor --- .appveyor.yml | 11 ++--------- ci/appveyor/build_ssh.bat | 4 ++++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 397013df..7f613f40 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -76,12 +76,6 @@ install: - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib/*.lib %APPVEYOR_BUILD_FOLDER% - # - 7z e openssl-%OPENSSL_VER%.tar.gz - # - ps: ls openssl-%OPENSSL_VER% - # - ps: SUBST T: %APPVEYOR_BUILD_FOLDER% - # - 7z x openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017.zip - # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libssl-1_1.dll ssh\ - # - cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1-x%PYTHON_ARCH%.dll ssh\ || cp openssl-%OPENSSL_VER%-x%PYTHON_ARCH%-VC2017\libcrypto-1_1.dll ssh\ - ps: ls ssh - ps: ls - cinst make @@ -89,13 +83,12 @@ install: build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" # - "%CMD_IN_ENV% ci\\appveyor\\rebuild_openssl_vs2015.cmd" - - refreshenv - - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" + # - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" - rm -f ssh/*.c - python -V - - "%CMD_IN_ENV% python setup.py build_ext -I ci/appveyor/include" + - "%CMD_IN_ENV% python setup.py build_ext -I libssh/include" - "%CMD_IN_ENV% python setup.py build" - "%CMD_IN_ENV% python setup.py install" diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index b18ef06b..747f80d8 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -32,7 +32,11 @@ cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER% cmake --build . --config Release cd .. +ECHO "libssh libs" ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ +cp src/src/Release/ssh.lib ssh/ +ECHO "Python libs" ls %PYTHON%/libs/ +ECHO "ssh/ libs" ls ssh/ From 6f5286086bf9d87e020481b956949cff08f78709 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:47:21 +0100 Subject: [PATCH 27/50] Updated cfg --- ci/appveyor/build_ssh.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 747f80d8..d144aa5d 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -22,7 +22,7 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ -DWITH_GSSAPI=ON ^ - -DBUILD_SHARED_LIBS=OFF ^ + rem -DBUILD_SHARED_LIBS=OFF ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% From c10dc406d4b96c0d7bfeb8082bfe1f36e8f8a7b1 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 00:50:35 +0100 Subject: [PATCH 28/50] Updated cfg --- ci/appveyor/build_ssh.bat | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index d144aa5d..132342b3 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -22,7 +22,6 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ -DWITH_GSSAPI=ON ^ - rem -DBUILD_SHARED_LIBS=OFF ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% From 28c56376e8d16575e286ac95d5686658ff3bc54c Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:03:04 +0100 Subject: [PATCH 29/50] Updated cfg --- .appveyor.yml | 4 +++- ci/appveyor/build_ssh.bat | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 7f613f40..0bca782a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -75,7 +75,9 @@ install: - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - 7z x kfw-4.1-src.zip - - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib/*.lib %APPVEYOR_BUILD_FOLDER% + - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib + - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin + - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ - ps: ls ssh - ps: ls - cinst make diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 132342b3..964b236a 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -21,6 +21,7 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DCMAKE_BUILD_TYPE=Release ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ + -DLIBSSH_STATIC=1 ^ -DWITH_GSSAPI=ON ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% @@ -34,7 +35,7 @@ cd .. ECHO "libssh libs" ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ -cp src/src/Release/ssh.lib ssh/ +rem cp src/src/Release/* ssh/ ECHO "Python libs" ls %PYTHON%/libs/ ECHO "ssh/ libs" From 86a73de3134e4fa7c76009c43eebc4abb55994c1 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:10:19 +0100 Subject: [PATCH 30/50] Updated cfg --- ci/appveyor/build_ssh.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 964b236a..1dfae199 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -21,7 +21,7 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DCMAKE_BUILD_TYPE=Release ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ - -DLIBSSH_STATIC=1 ^ + -DBUILD_STATIC_LIB=ON ^ -DWITH_GSSAPI=ON ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% From 84131af092b598382c88c041a3d70453d06a430c Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:16:40 +0100 Subject: [PATCH 31/50] Updated [ci skip] --- ci/appveyor/build_ssh.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 1dfae199..b0f15a9d 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -3,7 +3,7 @@ IF "%PYTHON_VERSION%" == "2.7" (exit 0) mkdir src cd src -set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%" +set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%\lib\VC\static" ls %OPENSSL_DIR% ls %OPENSSL_DIR%\lib\VC @@ -35,7 +35,7 @@ cd .. ECHO "libssh libs" ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ -rem cp src/src/Release/* ssh/ +cp src/src/Release/ssh.lib ssh/ ECHO "Python libs" ls %PYTHON%/libs/ ECHO "ssh/ libs" From d4ee79a46290447859d0ec3fe7d607a214b84bf7 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:21:46 +0100 Subject: [PATCH 32/50] Updated --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0bca782a..6f856254 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -96,7 +96,7 @@ build_script: test_script: - cd dist - - python ..\\ci\\appveyor\\import_test.py + # - python ..\\ci\\appveyor\\import_test.py - cd .. after_test: From efb8cf75cdee68c02ab489fb5f0aea17bcc7320e Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:36:22 +0100 Subject: [PATCH 33/50] Updated --- ci/appveyor/build_ssh.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index b0f15a9d..0d1918ac 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -22,6 +22,7 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ -DBUILD_STATIC_LIB=ON ^ + -DBUILD_SHARED_LIBS=OFF ^ -DWITH_GSSAPI=ON ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% @@ -36,6 +37,8 @@ ECHO "libssh libs" ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ cp src/src/Release/ssh.lib ssh/ +ECHO "Build dir libs" +ls ECHO "Python libs" ls %PYTHON%/libs/ ECHO "ssh/ libs" From de654b7247b89fe17dfeff731856aa0153d07cee Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:38:52 +0100 Subject: [PATCH 34/50] Updated --- ci/appveyor/build_ssh.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 0d1918ac..01df8e50 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -3,7 +3,7 @@ IF "%PYTHON_VERSION%" == "2.7" (exit 0) mkdir src cd src -set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%\lib\VC\static" +set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%" ls %OPENSSL_DIR% ls %OPENSSL_DIR%\lib\VC From f148d80a0e67675c31f6f80e4a564b8dbfa57dd9 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 01:46:52 +0100 Subject: [PATCH 35/50] Updated cfg --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6f856254..0bca782a 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -96,7 +96,7 @@ build_script: test_script: - cd dist - # - python ..\\ci\\appveyor\\import_test.py + - python ..\\ci\\appveyor\\import_test.py - cd .. after_test: From 3d2008466b48a8b15414921f85f46e7ec822aa90 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:15:49 +0100 Subject: [PATCH 36/50] Updated cfg --- .appveyor.yml | 25 ++++++++++----- .circleci/config.yml | 66 +++++++++++++++++++-------------------- ci/appveyor/build_ssh.bat | 7 ++--- setup.py | 8 ++--- 4 files changed, 56 insertions(+), 50 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 0bca782a..5f08814f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -42,6 +42,11 @@ install: throw "There are newer queued builds for this pull request, failing early." } - ECHO "Installed SDKs:" - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\"" + - set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%" + - set VCLIBDIR=%WINDIR%\System32 + - cp %VCLIBDIR%/vcruntime*.dll ssh/ + - cp %VCLIBDIR%/msvcp*.dll ssh/ + - cp %OPENSSL_DIR%/bin/*.dll ssh/ # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart @@ -71,16 +76,16 @@ install: - mv -f .git .git.bak - 7z x ci\appveyor\zlib1211.zip # - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz - - appveyor DownloadFile http://www.p-nand-q.com/programming/windows/openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip - - 7z x kfw-4.1-src.zip - - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib - - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin - - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ + # - appveyor DownloadFile http://www.p-nand-q.com/programming/windows/openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z + # - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z + # - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip + # - 7z x kfw-4.1-src.zip + # - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib + # - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin + # - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ - ps: ls ssh - ps: ls - - cinst make + # - cinst make build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" @@ -88,11 +93,15 @@ build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" + - ps: ls src/src + - ps: ls src/src/Release - rm -f ssh/*.c - python -V - "%CMD_IN_ENV% python setup.py build_ext -I libssh/include" - "%CMD_IN_ENV% python setup.py build" - "%CMD_IN_ENV% python setup.py install" + - ps: ls ssh + - ps: ls test_script: - cd dist diff --git a/.circleci/config.yml b/.circleci/config.yml index b664f7f4..dd5085a6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -105,36 +105,36 @@ jobs: name: Upload Wheels command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* -workflows: - version: 2.1 - main: - jobs: - - python_test: - matrix: - parameters: - python_ver: - - "3.6" - - "3.7" - - "3.8" - filters: - tags: - ignore: /.*/ - - manylinux: - context: Docker - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ - - osx: - matrix: - parameters: - xcode_ver: - - "11.6.0" - - "11.1.0" - context: Docker - filters: - tags: - only: /.*/ - branches: - ignore: /.*/ +# workflows: +# version: 2.1 +# main: +# jobs: +# - python_test: +# matrix: +# parameters: +# python_ver: +# - "3.6" +# - "3.7" +# - "3.8" +# filters: +# tags: +# ignore: /.*/ +# - manylinux: +# context: Docker +# filters: +# tags: +# only: /.*/ +# branches: +# ignore: /.*/ +# - osx: +# matrix: +# parameters: +# xcode_ver: +# - "11.6.0" +# - "11.1.0" +# context: Docker +# filters: +# tags: +# only: /.*/ +# branches: +# ignore: /.*/ diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 01df8e50..571853e7 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -3,8 +3,6 @@ IF "%PYTHON_VERSION%" == "2.7" (exit 0) mkdir src cd src -set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%" - ls %OPENSSL_DIR% ls %OPENSSL_DIR%\lib\VC ls %OPENSSL_DIR%\lib\VC\static @@ -21,8 +19,6 @@ cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DCMAKE_BUILD_TYPE=Release ^ -DZLIB_LIBRARY=C:/zlib/lib/zlibstatic.lib ^ -DZLIB_INCLUDE_DIR=C:/zlib/include ^ - -DBUILD_STATIC_LIB=ON ^ - -DBUILD_SHARED_LIBS=OFF ^ -DWITH_GSSAPI=ON ^ -DOPENSSL_ROOT_DIR=%OPENSSL_DIR% @@ -36,7 +32,8 @@ cd .. ECHO "libssh libs" ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ -cp src/src/Release/ssh.lib ssh/ +REM cp src/src/Release/ssh.lib ssh/ +cp src/src/Release/ssh.dll ssh/ ECHO "Build dir libs" ls ECHO "Python libs" diff --git a/setup.py b/setup.py index 57e866c6..5afab92f 100644 --- a/setup.py +++ b/setup.py @@ -53,12 +53,10 @@ 'cython_directives': cython_directives, 'cython_compile_time_env': { 'ON_WINDOWS': ON_WINDOWS, + # 'LIBSSH_STATIC': 1, }} \ if USING_CYTHON else {} -if USING_CYTHON: - sys.stdout.write("Cython arguments: %s%s" % (cython_args, os.linesep)) - runtime_library_dirs = ["$ORIGIN/."] if not SYSTEM_LIBSSH else None _lib_dir = os.path.abspath("./src/lib") if not SYSTEM_LIBSSH else "/usr/local/lib" @@ -82,12 +80,14 @@ if ON_WINDOWS: package_data['ssh'].extend([ 'libcrypto*.dll', 'libssl*.dll', + 'ssh.dll', 'msvcp*.dll', 'vcruntime*.dll', ]) - cython_args['LIBSSH_STATIC'] = '1' + # cython_args['LIBSSH_STATIC'] = '1' cmdclass = versioneer.get_cmdclass() if USING_CYTHON: cmdclass['build_ext'] = build_ext + sys.stdout.write("Cython arguments: %s%s" % (cython_args, os.linesep)) sys.stdout.write("Windows platform: %s, Python major version: %s.%s" % (ON_WINDOWS, _PYTHON_MAJOR_VERSION, os.sep)) From 56acd7fb8f8edf84d1915aff58eb7e592a6f881f Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:32:51 +0100 Subject: [PATCH 37/50] Updated cfg --- .appveyor.yml | 19 ++++--------------- ci/appveyor/build_ssh.bat | 21 +-------------------- ci/appveyor/import_test.py | 2 ++ setup.py | 2 -- 4 files changed, 7 insertions(+), 37 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5f08814f..74640877 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -51,7 +51,7 @@ install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + # - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" # Check that we have the expected version and architecture for Python - "python --version" @@ -59,14 +59,14 @@ install: # Upgrade to the latest version of pip to avoid it displaying warnings # about it being out of date. - # - "pip install --disable-pip-version-check --user --upgrade pip" + # - "pip install --disable-pip-version-check --user -U pip" # Install the build dependencies of the project. If some dependencies contain # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - - "%CMD_IN_ENV% pip install -U wheel setuptools twine cython" + - pip install -U pip wheel setuptools twine cython # .c files need to be generated on Windows to handle platform # specific code. @@ -75,33 +75,22 @@ install: - python ci/appveyor/fix_version.py . - mv -f .git .git.bak - 7z x ci\appveyor\zlib1211.zip - # - appveyor DownloadFile https://www.openssl.org/source/openssl-%OPENSSL_VER%.tar.gz - # - appveyor DownloadFile http://www.p-nand-q.com/programming/windows/openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z - # - 7z x openssl-%OPENSSL_VER%-64bit-release-static-vs2015.7z # - appveyor DownloadFile https://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-src.zip # - 7z x kfw-4.1-src.zip - # - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/lib - # - ls openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin - # - cp openssl-%OPENSSL_VER%-64bit-release-static-VS2015/bin/*.dll ssh/ - ps: ls ssh - ps: ls - # - cinst make build_script: - # - "%CMD_IN_ENV% ci\\appveyor\\build_openssl.bat" - # - "%CMD_IN_ENV% ci\\appveyor\\rebuild_openssl_vs2015.cmd" # - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" - - ps: ls src/src - ps: ls src/src/Release - rm -f ssh/*.c - python -V - - "%CMD_IN_ENV% python setup.py build_ext -I libssh/include" + - "%CMD_IN_ENV% python setup.py build_ext" - "%CMD_IN_ENV% python setup.py build" - "%CMD_IN_ENV% python setup.py install" - ps: ls ssh - - ps: ls test_script: - cd dist diff --git a/ci/appveyor/build_ssh.bat b/ci/appveyor/build_ssh.bat index 571853e7..a7f0f42b 100755 --- a/ci/appveyor/build_ssh.bat +++ b/ci/appveyor/build_ssh.bat @@ -3,17 +3,7 @@ IF "%PYTHON_VERSION%" == "2.7" (exit 0) mkdir src cd src -ls %OPENSSL_DIR% -ls %OPENSSL_DIR%\lib\VC -ls %OPENSSL_DIR%\lib\VC\static - -IF "%MSVC%" == "Visual Studio 9" ( - ECHO "Building without platform set" - set CMAKE_PLATFORM="NMake Makefiles" -) ELSE ( - ECHO "Building with platform %MSVC%" - set CMAKE_PLATFORM="%MSVC%" -) +set CMAKE_PLATFORM="%MSVC%" cmake ..\libssh -G %CMAKE_PLATFORM% ^ -DCMAKE_BUILD_TYPE=Release ^ @@ -29,14 +19,5 @@ cp %OPENSSL_DIR%\lib\VC\libssl%PYTHON_ARCH%MD.lib %APPVEYOR_BUILD_FOLDER% cmake --build . --config Release cd .. -ECHO "libssh libs" -ls src/src/Release cp src/src/Release/ssh.lib %PYTHON%/libs/ -REM cp src/src/Release/ssh.lib ssh/ cp src/src/Release/ssh.dll ssh/ -ECHO "Build dir libs" -ls -ECHO "Python libs" -ls %PYTHON%/libs/ -ECHO "ssh/ libs" -ls ssh/ diff --git a/ci/appveyor/import_test.py b/ci/appveyor/import_test.py index 15be5e6c..70fc9266 100644 --- a/ci/appveyor/import_test.py +++ b/ci/appveyor/import_test.py @@ -11,3 +11,5 @@ sys.exit(0) print("{} {}".format(system(), python_version_tuple()[0])) raise +else: + print("Import successful") diff --git a/setup.py b/setup.py index 5afab92f..fe6cd8c4 100644 --- a/setup.py +++ b/setup.py @@ -53,7 +53,6 @@ 'cython_directives': cython_directives, 'cython_compile_time_env': { 'ON_WINDOWS': ON_WINDOWS, - # 'LIBSSH_STATIC': 1, }} \ if USING_CYTHON else {} @@ -82,7 +81,6 @@ 'libcrypto*.dll', 'libssl*.dll', 'ssh.dll', 'msvcp*.dll', 'vcruntime*.dll', ]) - # cython_args['LIBSSH_STATIC'] = '1' cmdclass = versioneer.get_cmdclass() if USING_CYTHON: From 8ce4a62ada0bfe6b6d362be2ed21bf294233d98d Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:35:13 +0100 Subject: [PATCH 38/50] Updated cfg --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 74640877..a3321d2c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -59,14 +59,14 @@ install: # Upgrade to the latest version of pip to avoid it displaying warnings # about it being out of date. - # - "pip install --disable-pip-version-check --user -U pip" + - "pip install --disable-pip-version-check --user -U pip" # Install the build dependencies of the project. If some dependencies contain # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - - pip install -U pip wheel setuptools twine cython + - pip install -U wheel setuptools twine cython # .c files need to be generated on Windows to handle platform # specific code. From 72a362c96d9678e80949a75115959c2c10b7be32 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:35:39 +0100 Subject: [PATCH 39/50] Updated cfg --- .appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index a3321d2c..448fa358 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -51,7 +51,7 @@ install: # Prepend newly installed Python to the PATH of this build (this cannot be # done from inside the powershell script as it would require to restart # the parent CMD process). - # - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" # Check that we have the expected version and architecture for Python - "python --version" @@ -59,14 +59,14 @@ install: # Upgrade to the latest version of pip to avoid it displaying warnings # about it being out of date. - - "pip install --disable-pip-version-check --user -U pip" + # - "pip install --disable-pip-version-check --user -U pip" # Install the build dependencies of the project. If some dependencies contain # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - - pip install -U wheel setuptools twine cython + - pip install -U pip wheel setuptools twine cython # .c files need to be generated on Windows to handle platform # specific code. From d3578f0ac5f9df19d2c3c395aa4726308eec5fd1 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:37:02 +0100 Subject: [PATCH 40/50] Updated cfg --- .appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 448fa358..74809a69 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -60,13 +60,13 @@ install: # Upgrade to the latest version of pip to avoid it displaying warnings # about it being out of date. # - "pip install --disable-pip-version-check --user -U pip" - + - python -m pip install --upgrade pip # Install the build dependencies of the project. If some dependencies contain # compiled extensions and are not provided as pre-built wheel packages, # pip will build them from source using the MSVC compiler matching the # target Python version and architecture # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - - pip install -U pip wheel setuptools twine cython + - pip install -U wheel setuptools twine cython # .c files need to be generated on Windows to handle platform # specific code. From e9f6fc295a2b740bfc03dfeb7096783a159d0a35 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:41:23 +0100 Subject: [PATCH 41/50] Updated cfg --- .appveyor.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 74809a69..6315f490 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -56,16 +56,6 @@ install: # Check that we have the expected version and architecture for Python - "python --version" - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - # Upgrade to the latest version of pip to avoid it displaying warnings - # about it being out of date. - # - "pip install --disable-pip-version-check --user -U pip" - - python -m pip install --upgrade pip - # Install the build dependencies of the project. If some dependencies contain - # compiled extensions and are not provided as pre-built wheel packages, - # pip will build them from source using the MSVC compiler matching the - # target Python version and architecture - # - "%CMD_IN_ENV% pip install -r requirements_dev.txt" - pip install -U wheel setuptools twine cython # .c files need to be generated on Windows to handle platform @@ -82,14 +72,14 @@ install: build_script: # - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" - - "%CMD_IN_ENV% ci\\appveyor\\build_zlib.bat" - - "%CMD_IN_ENV% ci\\appveyor\\build_ssh.bat" + - ci\\appveyor\\build_zlib.bat + - ci\\appveyor\\build_ssh.bat - ps: ls src/src/Release - rm -f ssh/*.c - python -V - - "%CMD_IN_ENV% python setup.py build_ext" - - "%CMD_IN_ENV% python setup.py build" - - "%CMD_IN_ENV% python setup.py install" + - python setup.py build_ext + - python setup.py build + - python setup.py install - ps: ls ssh test_script: From 52325fbfa77a6748d5f9c8993a1d7ae0f8a38964 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:57:29 +0100 Subject: [PATCH 42/50] Updated cfg --- .appveyor.yml | 12 +----- ci/appveyor/run_with_env.cmd | 71 ------------------------------------ 2 files changed, 2 insertions(+), 81 deletions(-) delete mode 100644 ci/appveyor/run_with_env.cmd diff --git a/.appveyor.yml b/.appveyor.yml index 6315f490..edbe9913 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,9 +1,5 @@ environment: global: - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - # CMD_IN_ENV: "cmd /E:ON /V:ON /C %APPVEYOR_BUILD_FOLDER%\\ci\\appveyor\\run_with_env.cmd" PYTHONUNBUFFERED: 1 OPENSSL_VER: 1.1.0c SYSTEM_LIBSSH: 1 @@ -40,8 +36,6 @@ install: https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` throw "There are newer queued builds for this pull request, failing early." } - - ECHO "Installed SDKs:" - - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\"" - set OPENSSL_DIR="C:\OpenSSL-v11-Win%PYTHON_ARCH%" - set VCLIBDIR=%WINDIR%\System32 - cp %VCLIBDIR%/vcruntime*.dll ssh/ @@ -71,7 +65,7 @@ install: - ps: ls build_script: - # - "%CMD_IN_ENV% ci\\appveyor\\build_krb.bat" + # - ci\\appveyor\\build_krb.bat - ci\\appveyor\\build_zlib.bat - ci\\appveyor\\build_ssh.bat - ps: ls src/src/Release @@ -88,12 +82,10 @@ test_script: - cd .. after_test: - # If tests are successful, create binary packages for the project. - - "%CMD_IN_ENV% python setup.py bdist_wheel" + - python setup.py bdist_wheel - mv dist/* . artifacts: - # Archive the generated packages in the ci.appveyor.com build report. - path: "*.whl" deploy_script: diff --git a/ci/appveyor/run_with_env.cmd b/ci/appveyor/run_with_env.cmd deleted file mode 100644 index 68379b1f..00000000 --- a/ci/appveyor/run_with_env.cmd +++ /dev/null @@ -1,71 +0,0 @@ -:: To build extensions for 64 bit Python 3.5 or later no special environment needs -:: to be configured for the Python extension code alone, however, all dependent -:: libraries also need to be compiled with the same SDK in order to be able to -:: link them together. -:: -:: This script sets SDK version and environment for all commands. -:: -:: To build extensions for 64 bit Python 3.4 or earlier, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) -:: -:: To build extensions for 64 bit Python 2, we need to configure environment -:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) -:: -:: 32 bit builds do not require specific environment configurations. -:: -:: Note: this script needs to be run with the /E:ON and /V:ON flags for the -:: cmd interpreter, at least for (SDK v7.0) -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows -:: https://stackoverflow.com/a/13751649/163740 -:: -:: Original Author: Olivier Grisel -:: License: CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/ -:: This version based on updates for python 3.5 by Phil Elson at: -:: https://github.com/pelson/Obvious-CI/tree/master/scripts -:: Further updates to always correctly set SDK version and environment so -:: that compiled library dependencies use same SDK as Python extension. - -@ECHO OFF - -SET COMMAND_TO_RUN=%* -SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows - -SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%" -SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1% -IF %MAJOR_PYTHON_VERSION% == "2" ( - SET WINDOWS_SDK_VERSION="v7.0" - SET SET_SDK_64=Y -) ELSE IF %MAJOR_PYTHON_VERSION% == "3" ( - SET WINDOWS_SDK_VERSION="v7.1" - IF %MINOR_PYTHON_VERSION% LEQ 4 ( - SET SET_SDK_64=Y - ) ELSE ( - SET SET_SDK_64=N - ) -) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 -) - -"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - -IF "%PYTHON_ARCH%"=="64" ( - IF %SET_SDK_64% == Y ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - ) - ECHO Setting MSVC %WINDOWS_SDK_VERSION% build environment for 64 bit architecture - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) ELSE ( - ECHO Setting MSVC %WINDOWS_SDK_VERSION% build environment for 32 bit architecture - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x86 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) From fb065be43cb48db3217be11543f32ba6225dc5cd Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 14:59:52 +0100 Subject: [PATCH 43/50] Removed unused CI files --- ci/appveyor/build_openssl.bat | 8 - ci/appveyor/copy_openssl_pys.py | 55 ------ ci/appveyor/include/stdint.h | 235 ------------------------- ci/appveyor/rebuild_openssl_vs2015.cmd | 126 ------------- ci/travis/pyenv-wheel.sh | 43 ----- 5 files changed, 467 deletions(-) delete mode 100755 ci/appveyor/build_openssl.bat delete mode 100644 ci/appveyor/copy_openssl_pys.py delete mode 100644 ci/appveyor/include/stdint.h delete mode 100755 ci/appveyor/rebuild_openssl_vs2015.cmd delete mode 100755 ci/travis/pyenv-wheel.sh diff --git a/ci/appveyor/build_openssl.bat b/ci/appveyor/build_openssl.bat deleted file mode 100755 index 47c8e310..00000000 --- a/ci/appveyor/build_openssl.bat +++ /dev/null @@ -1,8 +0,0 @@ -cd "openssl-%OPENSSL_VER%" - -perl Configure VC-WIN64A --no-shared -nmake -dumpbin /headers libcrypto-1_1x64.dll -ls libcrypto* -cp libcrypto* ../ -cd .. diff --git a/ci/appveyor/copy_openssl_pys.py b/ci/appveyor/copy_openssl_pys.py deleted file mode 100644 index aa2a42e7..00000000 --- a/ci/appveyor/copy_openssl_pys.py +++ /dev/null @@ -1,55 +0,0 @@ -#! -*- Encoding: utf-8 -*- - -import os -import sys -import shutil -import re - -def extension(filename): - k = filename.rfind(".") - if k > 0: - return filename[k:].lower() - -def change_extension(filename, new_extension): - k = filename.rfind(".") - if k > 0: - return filename[:k] + new_extension - - return filename + new_extension - -def ensure_files(target, source): - try: - print("%r => %r" % (source, target, )) - for filename in os.listdir(target): - if extension(filename) in (".dll", ".exe", ): - source_path = os.path.join(source, change_extension(filename, ".pdb")) - if os.path.exists(source_path): - target_path = os.path.join(target, change_extension(filename, ".pdb")) - print("copy %r => %r" % (source_path, target_path, )) - shutil.copy2(source_path, target_path) - except: - pass - -def main(openssl_version): - for vs in ("vs2010", "vs2013", "vs2015"): - for architecture in ("win32", "win64"): - bitness = "32bit" - if architecture == "win64": - bitness = "64bit" - - for build in ("release", "debug"): - target_name = "t:\\openssl-%s-%s-%s-%s" % (openssl_version, bitness, build, vs, ) - build_name = "" - if build == "debug": - build_name = ".dbg" - source_name = "t:\\openssl-src-%s-%s\\out32dll%s" % (architecture, vs, build_name, ) - ensure_files(os.path.join(target_name, "bin"), source_name) - ensure_files(os.path.join(target_name, "lib\\engines"), source_name) - -if __name__ == "__main__": - #main("1.0.0m") - for filename in os.listdir("."): - if filename.endswith(".tar.gz"): - if filename.startswith("openssl-"): - main(filename[8:-7]) - \ No newline at end of file diff --git a/ci/appveyor/include/stdint.h b/ci/appveyor/include/stdint.h deleted file mode 100644 index b7e71123..00000000 --- a/ci/appveyor/include/stdint.h +++ /dev/null @@ -1,235 +0,0 @@ -/* ISO C9x 7.18 Integer types - * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794) - * - * THIS SOFTWARE IS NOT COPYRIGHTED - * - * Contributor: Danny Smith - * - * This source code is offered for use in the public domain. You may - * use, modify or distribute it freely. - * - * This code is distributed in the hope that it will be useful but - * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY - * DISCLAIMED. This includes but is not limited to warranties of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Date: 2000-12-02 - * - * mwb: This was modified in the following ways: - * - * - make it compatible with Visual C++ 6 (which uses - * non-standard keywords and suffixes for 64-bit types) - * - some environments need stddef.h included (for wchar stuff?) - * - handle the fact that Microsoft's limits.h header defines - * SIZE_MAX - * - make corrections for SIZE_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, - * PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, and SIG_ATOMIC_MAX - * to be 64-bit aware. - */ - - -#ifndef _STDINT_H -#define _STDINT_H -#define __need_wint_t -#define __need_wchar_t -#include -#include - -#if _MSC_VER && (_MSC_VER < 1300) -/* using MSVC 6 or earlier - no "long long" type, but might have _int64 type */ -#define __STDINT_LONGLONG __int64 -#define __STDINT_LONGLONG_SUFFIX i64 -#else -#define __STDINT_LONGLONG long long -#define __STDINT_LONGLONG_SUFFIX LL -#endif - -#if !defined( PASTE) -#define PASTE2( x, y) x##y -#define PASTE( x, y) PASTE2( x, y) -#endif /* PASTE */ - - -/* 7.18.1.1 Exact-width integer types */ -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned uint32_t; -typedef __STDINT_LONGLONG int64_t; -typedef unsigned __STDINT_LONGLONG uint64_t; - -/* 7.18.1.2 Minimum-width integer types */ -typedef signed char int_least8_t; -typedef unsigned char uint_least8_t; -typedef short int_least16_t; -typedef unsigned short uint_least16_t; -typedef int int_least32_t; -typedef unsigned uint_least32_t; -typedef __STDINT_LONGLONG int_least64_t; -typedef unsigned __STDINT_LONGLONG uint_least64_t; - -/* 7.18.1.3 Fastest minimum-width integer types - * Not actually guaranteed to be fastest for all purposes - * Here we use the exact-width types for 8 and 16-bit ints. - */ -typedef char int_fast8_t; -typedef unsigned char uint_fast8_t; -typedef short int_fast16_t; -typedef unsigned short uint_fast16_t; -typedef int int_fast32_t; -typedef unsigned int uint_fast32_t; -typedef __STDINT_LONGLONG int_fast64_t; -typedef unsigned __STDINT_LONGLONG uint_fast64_t; - -/* 7.18.1.4 Integer types capable of holding object pointers */ -#ifndef _INTPTR_T_DEFINED -#define _INTPTR_T_DEFINED -#ifdef _WIN64 -typedef __STDINT_LONGLONG intptr_t -#else -typedef int intptr_t; -#endif /* _WIN64 */ -#endif /* _INTPTR_T_DEFINED */ - -#ifndef _UINTPTR_T_DEFINED -#define _UINTPTR_T_DEFINED -#ifdef _WIN64 -typedef unsigned __STDINT_LONGLONG uintptr_t -#else -typedef unsigned int uintptr_t; -#endif /* _WIN64 */ -#endif /* _UINTPTR_T_DEFINED */ - -/* 7.18.1.5 Greatest-width integer types */ -typedef __STDINT_LONGLONG intmax_t; -typedef unsigned __STDINT_LONGLONG uintmax_t; - -/* 7.18.2 Limits of specified-width integer types */ -#if !defined ( __cplusplus) || defined (__STDC_LIMIT_MACROS) - -/* 7.18.2.1 Limits of exact-width integer types */ -#define INT8_MIN (-128) -#define INT16_MIN (-32768) -#define INT32_MIN (-2147483647 - 1) -#define INT64_MIN (PASTE( -9223372036854775807, __STDINT_LONGLONG_SUFFIX) - 1) - -#define INT8_MAX 127 -#define INT16_MAX 32767 -#define INT32_MAX 2147483647 -#define INT64_MAX (PASTE( 9223372036854775807, __STDINT_LONGLONG_SUFFIX)) - -#define UINT8_MAX 0xff /* 255U */ -#define UINT16_MAX 0xffff /* 65535U */ -#define UINT32_MAX 0xffffffff /* 4294967295U */ -#define UINT64_MAX (PASTE( 0xffffffffffffffffU, __STDINT_LONGLONG_SUFFIX)) /* 18446744073709551615ULL */ - -/* 7.18.2.2 Limits of minimum-width integer types */ -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST64_MIN INT64_MIN - -#define INT_LEAST8_MAX INT8_MAX -#define INT_LEAST16_MAX INT16_MAX -#define INT_LEAST32_MAX INT32_MAX -#define INT_LEAST64_MAX INT64_MAX - -#define UINT_LEAST8_MAX UINT8_MAX -#define UINT_LEAST16_MAX UINT16_MAX -#define UINT_LEAST32_MAX UINT32_MAX -#define UINT_LEAST64_MAX UINT64_MAX - -/* 7.18.2.3 Limits of fastest minimum-width integer types */ -#define INT_FAST8_MIN INT8_MIN -#define INT_FAST16_MIN INT16_MIN -#define INT_FAST32_MIN INT32_MIN -#define INT_FAST64_MIN INT64_MIN - -#define INT_FAST8_MAX INT8_MAX -#define INT_FAST16_MAX INT16_MAX -#define INT_FAST32_MAX INT32_MAX -#define INT_FAST64_MAX INT64_MAX - -#define UINT_FAST8_MAX UINT8_MAX -#define UINT_FAST16_MAX UINT16_MAX -#define UINT_FAST32_MAX UINT32_MAX -#define UINT_FAST64_MAX UINT64_MAX - -/* 7.18.2.4 Limits of integer types capable of holding - object pointers */ -#ifdef _WIN64 -#define INTPTR_MIN INT64_MIN -#define INTPTR_MAX INT64_MAX -#define UINTPTR_MAX UINT64_MAX -#else -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX -#endif /* _WIN64 */ - -/* 7.18.2.5 Limits of greatest-width integer types */ -#define INTMAX_MIN INT64_MIN -#define INTMAX_MAX INT64_MAX -#define UINTMAX_MAX UINT64_MAX - -/* 7.18.3 Limits of other integer types */ -#define PTRDIFF_MIN INTPTR_MIN -#define PTRDIFF_MAX INTPTR_MAX - -#define SIG_ATOMIC_MIN INTPTR_MIN -#define SIG_ATOMIC_MAX INTPTR_MAX - -/* we need to check for SIZE_MAX already defined because MS defines it in limits.h */ -#ifndef SIZE_MAX -#define SIZE_MAX UINTPTR_MAX -#endif - -#ifndef WCHAR_MIN /* also in wchar.h */ -#define WCHAR_MIN 0 -#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */ -#endif - -/* - * wint_t is unsigned short for compatibility with MS runtime - */ -#define WINT_MIN 0 -#define WINT_MAX ((wint_t)-1) /* UINT16_MAX */ - -#endif /* !defined ( __cplusplus) || defined __STDC_LIMIT_MACROS */ - - -/* 7.18.4 Macros for integer constants */ -#if !defined ( __cplusplus) || defined (__STDC_CONSTANT_MACROS) - -/* 7.18.4.1 Macros for minimum-width integer constants - - Accoding to Douglas Gwyn : - "This spec was changed in ISO/IEC 9899:1999 TC1; in ISO/IEC - 9899:1999 as initially published, the expansion was required - to be an integer constant of precisely matching type, which - is impossible to accomplish for the shorter types on most - platforms, because C99 provides no standard way to designate - an integer constant with width less than that of type int. - TC1 changed this to require just an integer constant - *expression* with *promoted* type." -*/ - -#define INT8_C(val) ((int8_t) + (val)) -#define UINT8_C(val) ((uint8_t) + (val##U)) -#define INT16_C(val) ((int16_t) + (val)) -#define UINT16_C(val) ((uint16_t) + (val##U)) - -#define INT32_C(val) val##L -#define UINT32_C(val) val##UL -#define INT64_C(val) (PASTE( val, __STDINT_LONGLONG_SUFFIX)) -#define UINT64_C(val)(PASTE( PASTE( val, U), __STDINT_LONGLONG_SUFFIX)) - -/* 7.18.4.2 Macros for greatest-width integer constants */ -#define INTMAX_C(val) INT64_C(val) -#define UINTMAX_C(val) UINT64_C(val) - -#endif /* !defined ( __cplusplus) || defined __STDC_CONSTANT_MACROS */ - -#endif diff --git a/ci/appveyor/rebuild_openssl_vs2015.cmd b/ci/appveyor/rebuild_openssl_vs2015.cmd deleted file mode 100755 index 6b6064e1..00000000 --- a/ci/appveyor/rebuild_openssl_vs2015.cmd +++ /dev/null @@ -1,126 +0,0 @@ -@echo off - -setlocal - -where /q perl -IF ERRORLEVEL 1 ( - ECHO Perl cannot be found. Please ensure it is installed and placed in your PATH. - PAUSE - EXIT /B -) - -where /q nasm -IF ERRORLEVEL 1 ( - ECHO nasm cannot be found. Please ensure it is installed and placed in your PATH. - PAUSE - EXIT /B -) - - -T: -set OPENSSL_VERSION="%OPENSSL_VER%" -set SEVENZIP="C:\Program Files\7-Zip\7z.exe" -set VS2015="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat" -set VS2015_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat" - - -REM Remove openssl source directories -IF NOT EXIST "T:\openssl-src-win32" GOTO NO_WIN32_SOURCE -DEL "T:\openssl-src-win32" /Q /F /S -RMDIR /S /Q "T:\openssl-src-win32" -:NO_WIN32_SOURCE - -IF NOT EXIST "T:\openssl-src-win64" GOTO NO_WIN64_SOURCE -DEL "T:\openssl-src-win64" /Q /F /S -RMDIR /S /Q "T:\openssl-src-win64" -:NO_WIN64_SOURCE - -IF NOT EXIST "T:\openssl-%OPENSSL_VERSION%" GOTO NO_OPENSSL_SOURCE -DEL "T:\openssl-%OPENSSL_VERSION%" /Q /F /S -RMDIR /S /Q "T:\openssl-%OPENSSL_VERSION%" -:NO_OPENSSL_SOURCE - -del openssl-%OPENSSL_VERSION%.tar -%SEVENZIP% e openssl-%OPENSSL_VERSION%.tar.gz -%SEVENZIP% x openssl-%OPENSSL_VERSION%.tar -ren openssl-%OPENSSL_VERSION% openssl-src-win32-VS2015 -%SEVENZIP% x openssl-%OPENSSL_VERSION%.tar -ren openssl-%OPENSSL_VERSION% openssl-src-win64-VS2015 - -CALL %VS2015% - -cd \openssl-src-win32-VS2015 -perl Configure VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 -nmake -nmake test -nmake install - -perl Configure debug-VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 -nmake -nmake test -nmake install - -perl Configure VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 -nmake -nmake test -nmake install - -perl Configure debug-VC-WIN32 --prefix=T:\openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 -nmake -nmake test -nmake install - -CALL %VS2015_AMD64% - -cd \openssl-src-win64-VS2015 -perl Configure VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 -nmake -nmake test -nmake install - -perl Configure debug-VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 -nmake -nmake test -nmake install - -cd \openssl-src-win64-VS2015 -perl Configure VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 -nmake -nmake test -nmake install - -perl Configure debug-VC-WIN64A --prefix=T:\openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 -nmake -nmake test -nmake install - -cd \ -python copy_openssl_pys.py - -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015.7z openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015\* -%SEVENZIP% a -r openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015.7z openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015\* - -DEL openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 /Q /F /S -DEL openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 /Q /F /S - -RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-debug-DLL-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-release-DLL-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-debug-DLL-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-release-DLL-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-debug-static-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-32bit-release-static-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-debug-static-VS2015 -RMDIR /S /Q openssl-%OPENSSL_VERSION%-64bit-release-static-VS2015 - diff --git a/ci/travis/pyenv-wheel.sh b/ci/travis/pyenv-wheel.sh deleted file mode 100755 index efb866d7..00000000 --- a/ci/travis/pyenv-wheel.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -xe - -brew install pyenv || brew outdated pyenv || brew upgrade pyenv - -export PYENV_VERSION=${PYENV:-3.6.4} -if [[ ! -d "$HOME/.pyenv/versions/$PYENV_VERSION" ]]; then - pyenv install $PYENV_VERSION -fi -pyenv global $PYENV_VERSION -pyenv versions - -set +x -eval "$(pyenv init -)" -set -x - -which python -python -m pip install -U virtualenv -python -m virtualenv -p "$(which python)" venv - -set +x -source venv/bin/activate -set -x - -python -V -python -m pip install -U setuptools pip -pip install -U delocate wheel -pip wheel . -delocate-listdeps --all *.whl -delocate-wheel -v *.whl -delocate-listdeps --all *.whl - -ls -l *.whl -rm -f *.dylib -pip install -v *.whl -pwd; mkdir -p temp; cd temp; pwd -python -c "from ssh.session import Session; Session()" -cd ..; pwd -set +x -deactivate -set -x - -mv -f *.whl wheels/ -ls -lh wheels From deacdcca95201c54109ad9f000afc508a35660b2 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 15:06:45 +0100 Subject: [PATCH 44/50] Re-enable circle CI builds --- .circleci/config.yml | 69 +++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index dd5085a6..105067e2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -38,6 +38,7 @@ jobs: python setup.py sdist cd dist; pip install *; cd .. name: Test + osx: parameters: xcode_ver: @@ -66,6 +67,7 @@ jobs: name: Upload Wheel command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/* + manylinux: machine: image: ubuntu-1604:201903-01 @@ -105,36 +107,37 @@ jobs: name: Upload Wheels command: | twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/* -# workflows: -# version: 2.1 -# main: -# jobs: -# - python_test: -# matrix: -# parameters: -# python_ver: -# - "3.6" -# - "3.7" -# - "3.8" -# filters: -# tags: -# ignore: /.*/ -# - manylinux: -# context: Docker -# filters: -# tags: -# only: /.*/ -# branches: -# ignore: /.*/ -# - osx: -# matrix: -# parameters: -# xcode_ver: -# - "11.6.0" -# - "11.1.0" -# context: Docker -# filters: -# tags: -# only: /.*/ -# branches: -# ignore: /.*/ + +workflows: + version: 2.1 + main: + jobs: + - python_test: + matrix: + parameters: + python_ver: + - "3.6" + - "3.7" + - "3.8" + filters: + tags: + ignore: /.*/ + - manylinux: + context: Docker + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ + - osx: + matrix: + parameters: + xcode_ver: + - "11.6.0" + - "11.1.0" + context: Docker + filters: + tags: + only: /.*/ + branches: + ignore: /.*/ From 8d118550c8625b11cdb6e80cdfe748eeb53a4034 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 15:11:58 +0100 Subject: [PATCH 45/50] Updated cfg --- .appveyor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index edbe9913..46576c51 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,6 @@ environment: global: PYTHONUNBUFFERED: 1 - OPENSSL_VER: 1.1.0c SYSTEM_LIBSSH: 1 PYPI_USER: secure: 2m0jy6JD/R9RExIosOT6YA== From 5507ddd0bac68b4e4626727e4deb3fe1ef99b99e Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 15:14:15 +0100 Subject: [PATCH 46/50] Added windows py2 check --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index fe6cd8c4..d1038bda 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,10 @@ ON_WINDOWS = platform.system() == 'Windows' SYSTEM_LIBSSH = bool(os.environ.get('SYSTEM_LIBSSH', 0)) +if ON_WINDOWS and _PYTHON_MAJOR_VERSION < 3: + raise ImportError( + "ssh-python requires Python 3 or above on Windows platforms.") + # Only build libssh if running a build if (len(sys.argv) >= 2 and not ( '--help' in sys.argv[1:] or From 55d0b4b34046071e004539b299a75e40c3bf05a0 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 17:50:40 +0100 Subject: [PATCH 47/50] Updated msvc package files --- .appveyor.yml | 1 + setup.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 46576c51..019c2d97 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -39,6 +39,7 @@ install: - set VCLIBDIR=%WINDIR%\System32 - cp %VCLIBDIR%/vcruntime*.dll ssh/ - cp %VCLIBDIR%/msvcp*.dll ssh/ + - cp %VCLIBDIR%/msvcr*.dll ssh/ - cp %OPENSSL_DIR%/bin/*.dll ssh/ # Prepend newly installed Python to the PATH of this build (this cannot be diff --git a/setup.py b/setup.py index d1038bda..4da27fba 100644 --- a/setup.py +++ b/setup.py @@ -83,7 +83,7 @@ if ON_WINDOWS: package_data['ssh'].extend([ 'libcrypto*.dll', 'libssl*.dll', - 'ssh.dll', 'msvcp*.dll', 'vcruntime*.dll', + 'ssh.dll', 'msvc*.dll', 'vcruntime*.dll', ]) cmdclass = versioneer.get_cmdclass() From 5ebdd049dbdfaf9f2ffe9af1054138ed1809205d Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 18:12:38 +0100 Subject: [PATCH 48/50] Updated changelog --- Changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog.rst b/Changelog.rst index 99c24413..1e15011f 100644 --- a/Changelog.rst +++ b/Changelog.rst @@ -15,6 +15,8 @@ Packaging ---------- * Added manylinux 2010 binary wheels. +* Added OSX 10.14 and 10.15 binary wheels for Python 3.8 +* Added Windows 64-bit binary wheels for Python 3.6/3.7/3.8 0.3.0 ++++++++ From 63a344e9ead99c57b019c28d6c5bd36edabe39de Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 18:18:49 +0100 Subject: [PATCH 49/50] Updated appveyor cfg --- .appveyor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 019c2d97..164f177b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,3 +1,9 @@ +max_jobs: 5 +build: + parallel: true + verbosity: minimal +skip_branch_with_pr: true + environment: global: PYTHONUNBUFFERED: 1 From d3e917d7ffe9ba739f6a9d93f7244eeba31be7c2 Mon Sep 17 00:00:00 2001 From: Panos Date: Wed, 19 Aug 2020 18:23:02 +0100 Subject: [PATCH 50/50] Updated readme --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 23906b47..dca38abe 100644 --- a/README.rst +++ b/README.rst @@ -15,6 +15,9 @@ Bindings for libssh_ C library. :target: https://pypi.python.org/pypi/ssh-python .. image:: https://img.shields.io/pypi/pyversions/ssh-python.svg :target: https://pypi.python.org/pypi/ssh-python +.. image:: https://ci.appveyor.com/api/projects/status/2t4bmmtjvfy5s1in/branch/master?svg=true + :target: https://ci.appveyor.com/project/pkittenis/ssh-python + Installation _____________