Hello community,
here is the log from the commit of package python-sshtunnel for
openSUSE:Factory checked in at 2019-07-22 17:20:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sshtunnel (Old)
and /work/SRC/openSUSE:Factory/.python-sshtunnel.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sshtunnel"
Mon Jul 22 17:20:01 2019 rev:4 rq:717579 version:0.1.5
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sshtunnel/python-sshtunnel.changes
2019-03-10 09:36:01.408166929 +0100
+++
/work/SRC/openSUSE:Factory/.python-sshtunnel.new.4126/python-sshtunnel.changes
2019-07-22 17:20:02.397900218 +0200
@@ -1,0 +2,6 @@
+Mon Jul 22 12:49:32 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.1.5:
+ * Introduce block_on_close attribute
+
+-------------------------------------------------------------------
Old:
----
sshtunnel-0.1.4.tar.gz
New:
----
sshtunnel-0.1.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sshtunnel.spec ++++++
--- /var/tmp/diff_new_pack.IwhrPj/_old 2019-07-22 17:20:02.917900076 +0200
+++ /var/tmp/diff_new_pack.IwhrPj/_new 2019-07-22 17:20:02.921900075 +0200
@@ -18,12 +18,12 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sshtunnel
-Version: 0.1.4
+Version: 0.1.5
Release: 0
Summary: SSH tunnels to remote server
License: MIT
Group: Development/Languages/Python
-URL: https://pypi.org/project/sshtunnel/
+URL: https://github.com/pahaz/sshtunnel/
Source:
https://files.pythonhosted.org/packages/source/s/sshtunnel/sshtunnel-%{version}.tar.gz
BuildRequires: %{python_module mock}
BuildRequires: %{python_module paramiko >= 1.15.2}
@@ -58,7 +58,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_expand py.test-%{$python_version}
+%pytest
%post
%python_install_alternative sshtunnel
++++++ sshtunnel-0.1.4.tar.gz -> sshtunnel-0.1.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/.circleci/config.yml
new/sshtunnel-0.1.5/.circleci/config.yml
--- old/sshtunnel-0.1.4/.circleci/config.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/sshtunnel-0.1.5/.circleci/config.yml 2019-06-13 12:27:43.000000000
+0200
@@ -0,0 +1,93 @@
+version: 2
+
+jobs:
+ build:
+ docker: &docker
+ - image: circleci/python:latest
+ steps: &steps
+ - run: sudo chmod -R a+r /tmp
+ - checkout
+ - restore_cache: &restore_cache
+ keys:
+ - v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum "sshtunnel.py"
}}
+ - run: &install_sshtunnel
+ name: Install sshtunnel
+ command: sudo python setup.py install
+ - run: sudo pip install mock pytest{,-cov,-xdist} coveralls
+ - run: pip list
+ - save_cache: &save_cache
+ paths:
+ - ~/.cache/pip
+ key: v2-deps-{{ .Environment.CIRCLE_JOB }}-{{ checksum
"sshtunnel.py" }}
+ - run: py.test --showlocals --cov sshtunnel --durations=10 -n4 tests
+ -W ignore::DeprecationWarning
+ - run: coveralls
+
+ python_2.7:
+ docker:
+ - image: circleci/python:2.7
+ steps: *steps
+
+ python_3.4:
+ docker:
+ - image: circleci/python:3.4
+ steps: *steps
+
+ python_3.5:
+ docker:
+ - image: circleci/python:3.5
+ steps: *steps
+
+ python_3.6:
+ docker:
+ - image: circleci/python:3.6
+ steps: *steps
+
+ docs:
+ docker: *docker
+ steps:
+ - checkout
+ - run: *install_sshtunnel
+ - restore_cache: *restore_cache
+ - run: sudo pip install -r docs/requirements-docs.txt
+ - run: sphinx-build -WavE -b html docs _build/html
+ - save_cache: *save_cache
+
+ syntax:
+ docker: *docker
+ steps:
+ - checkout
+ - run: *install_sshtunnel
+ - restore_cache: *restore_cache
+ - run:
+ name: installing testing dependencies
+ command: sudo pip install bashtest check-manifest docutils flake8
+ mccabe pygments readme twine
+ - run:
+ name: checking MANIFEST.in
+ command: sudo check-manifest --ignore "tox.ini,tests*,*.yml"
+ - run:
+ name: checking RST syntax
+ command: sudo python setup.py sdist ; twine check dist/*
+ - run:
+ name: checking PEP8 compliancy
+ command: flake8 --ignore=W504 .
+ - run:
+ name: checking CLI help
+ command: bashtest README.rst
+ - save_cache: *save_cache
+
+workflows:
+ version: 2
+ tests:
+ jobs:
+ - build # python3.7
+ - python_2.7
+ - python_3.4
+ - python_3.5
+ - python_3.6
+ syntax_and_docs:
+ jobs:
+ - syntax
+ - docs
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/LICENSE new/sshtunnel-0.1.5/LICENSE
--- old/sshtunnel-0.1.4/LICENSE 2018-06-11 13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/LICENSE 2019-06-13 12:27:43.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2014-2016 Pahaz Blinov
+Copyright (c) 2014-2019 Pahaz Blinov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/MANIFEST.in
new/sshtunnel-0.1.5/MANIFEST.in
--- old/sshtunnel-0.1.4/MANIFEST.in 2018-06-11 13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/MANIFEST.in 2019-06-13 12:27:43.000000000 +0200
@@ -1,9 +1,5 @@
# Include the data files recursive-include data *
-# If using Python 2.6 or less, then have to include package data, even though
-# it's already declared in setup.py
-# include sample/*.dat
-
include LICENSE
include *.rst
include docs/conf.py
@@ -11,3 +7,5 @@
include docs/*.rst
include docs/*.txt
include tests/*
+include .circleci/*
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/PKG-INFO new/sshtunnel-0.1.5/PKG-INFO
--- old/sshtunnel-0.1.4/PKG-INFO 2018-06-12 13:14:41.000000000 +0200
+++ new/sshtunnel-0.1.5/PKG-INFO 2019-06-13 12:29:55.000000000 +0200
@@ -1,13 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sshtunnel
-Version: 0.1.4
+Version: 0.1.5
Summary: Pure python SSH tunnels
Home-page: https://github.com/pahaz/sshtunnel
Author: Pahaz Blinov
Author-email: [email protected]
License: MIT
-Download-URL:
https://pypi.python.org/packages/source/s/sshtunnel/sshtunnel-0.1.4.zip
-Description-Content-Type: UNKNOWN
+Download-URL:
https://pypi.python.org/packages/source/s/sshtunnel/sshtunnel-0.1.5.zip
Description: |CircleCI| |AppVeyor| |readthedocs| |coveralls| |version|
|pyversions| |license|
@@ -112,7 +111,7 @@
``pahaz.urfuclub.ru``, password authentication and randomly assigned
local bind
port.
- .. code-block:: py
+ .. code-block:: python
from sshtunnel import SSHTunnelForwarder
@@ -137,12 +136,12 @@
assuming password protected pkey authentication, remote server's SSH
service is
listening on port 443 and that port is open in the firewall (**Fig2**):
- .. code-block:: py
+ .. code-block:: python
import paramiko
- from sshtunnel import SSHTunnelForwarder
+ import sshtunnel
- with SSHTunnelForwarder(
+ with sshtunnel.open_tunnel(
(REMOTE_SERVER_IP, 443),
ssh_username="",
ssh_pkey="/var/ssh/rsa_key",
@@ -164,12 +163,12 @@
Example of a port forwarding for the Vagrant MySQL local port:
- .. code-block:: py
+ .. code-block:: python
- from sshtunnel import SSHTunnelForwarder
+ from sshtunnel import open_tunnel
from time import sleep
- with SSHTunnelForwarder(
+ with open_tunnel(
('localhost', 2222),
ssh_username="vagrant",
ssh_password="vagrant",
@@ -189,6 +188,42 @@
(bash)$ python -m sshtunnel -U vagrant -P vagrant -L :3306 -R
127.0.0.1:3306 -p 2222 localhost
+ Example 4
+ ---------
+
+ Opening an SSH session jumping over two tunnels. SSH transport and
tunnels
+ will be daemonised, which will not wait for the connections to stop at
close
+ time.
+
+ .. code-block:: python
+
+ import sshtunnel
+ from paramiko import SSHClient
+
+
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('GW1_ip', 20022),
+ remote_bind_address=('GW2_ip', 22),
+ block_on_close=False
+ ) as tunnel1:
+ print('Connection to tunnel1 (GW1_ip:GW1_port) OK...')
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('localhost', tunnel1.local_bind_port),
+ remote_bind_address=('target_ip', 22),
+ ssh_username='GW2_user',
+ ssh_password='GW2_pwd',
+ block_on_close=False
+ ) as tunnel2:
+ print('Connection to tunnel2 (GW2_ip:GW2_port) OK...')
+ with SSHClient() as ssh:
+ ssh.connect('localhost',
+ port=tunnel2.local_bind_port,
+ username='target_user',
+ password='target_pwd',
+ )
+ ssh.exec_command(...)
+
+
CLI usage
=========
@@ -202,7 +237,7 @@
ssh_address
Pure python ssh tunnel utils
- Version 0.1.4
+ Version 0.1.5
positional arguments:
ssh_address SSH server IP address (GW for SSH tunnels)
@@ -289,6 +324,9 @@
CHANGELOG
=========
+ - v.0.1.5 (`JM Fernández`_)
+ + Introduce `block_on_close` attribute
+
- v.0.1.4 (`Niels Zeilemaker`_)
+ Allow loading pkeys from `~/.ssh`
@@ -420,3 +458,6 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Provides-Extra: build_sphinx
+Provides-Extra: dev
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/README.rst
new/sshtunnel-0.1.5/README.rst
--- old/sshtunnel-0.1.4/README.rst 2018-06-12 12:53:46.000000000 +0200
+++ new/sshtunnel-0.1.5/README.rst 2019-06-13 12:27:43.000000000 +0200
@@ -102,7 +102,7 @@
``pahaz.urfuclub.ru``, password authentication and randomly assigned local bind
port.
-.. code-block:: py
+.. code-block:: python
from sshtunnel import SSHTunnelForwarder
@@ -127,12 +127,12 @@
assuming password protected pkey authentication, remote server's SSH service is
listening on port 443 and that port is open in the firewall (**Fig2**):
-.. code-block:: py
+.. code-block:: python
import paramiko
- from sshtunnel import SSHTunnelForwarder
+ import sshtunnel
- with SSHTunnelForwarder(
+ with sshtunnel.open_tunnel(
(REMOTE_SERVER_IP, 443),
ssh_username="",
ssh_pkey="/var/ssh/rsa_key",
@@ -154,12 +154,12 @@
Example of a port forwarding for the Vagrant MySQL local port:
-.. code-block:: py
+.. code-block:: python
- from sshtunnel import SSHTunnelForwarder
+ from sshtunnel import open_tunnel
from time import sleep
- with SSHTunnelForwarder(
+ with open_tunnel(
('localhost', 2222),
ssh_username="vagrant",
ssh_password="vagrant",
@@ -179,6 +179,42 @@
(bash)$ python -m sshtunnel -U vagrant -P vagrant -L :3306 -R
127.0.0.1:3306 -p 2222 localhost
+Example 4
+---------
+
+Opening an SSH session jumping over two tunnels. SSH transport and tunnels
+will be daemonised, which will not wait for the connections to stop at close
+time.
+
+.. code-block:: python
+
+ import sshtunnel
+ from paramiko import SSHClient
+
+
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('GW1_ip', 20022),
+ remote_bind_address=('GW2_ip', 22),
+ block_on_close=False
+ ) as tunnel1:
+ print('Connection to tunnel1 (GW1_ip:GW1_port) OK...')
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('localhost', tunnel1.local_bind_port),
+ remote_bind_address=('target_ip', 22),
+ ssh_username='GW2_user',
+ ssh_password='GW2_pwd',
+ block_on_close=False
+ ) as tunnel2:
+ print('Connection to tunnel2 (GW2_ip:GW2_port) OK...')
+ with SSHClient() as ssh:
+ ssh.connect('localhost',
+ port=tunnel2.local_bind_port,
+ username='target_user',
+ password='target_pwd',
+ )
+ ssh.exec_command(...)
+
+
CLI usage
=========
@@ -192,7 +228,7 @@
ssh_address
Pure python ssh tunnel utils
- Version 0.1.4
+ Version 0.1.5
positional arguments:
ssh_address SSH server IP address (GW for SSH tunnels)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/changelog.rst
new/sshtunnel-0.1.5/changelog.rst
--- old/sshtunnel-0.1.4/changelog.rst 2018-06-12 12:57:30.000000000 +0200
+++ new/sshtunnel-0.1.5/changelog.rst 2019-06-13 12:27:43.000000000 +0200
@@ -16,6 +16,9 @@
CHANGELOG
=========
+- v.0.1.5 (`JM Fernández`_)
+ + Introduce `block_on_close` attribute
+
- v.0.1.4 (`Niels Zeilemaker`_)
+ Allow loading pkeys from `~/.ssh`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/docs/conf.py
new/sshtunnel-0.1.5/docs/conf.py
--- old/sshtunnel-0.1.4/docs/conf.py 2018-06-11 13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/docs/conf.py 2019-06-13 12:27:43.000000000 +0200
@@ -16,6 +16,8 @@
import sys
import os
+import sshtunnel
+
# Patch to disable warning on non-local image
import sphinx.environment
from docutils.utils import get_source_line
@@ -61,7 +63,7 @@
# General information about the project.
project = 'sshtunnel'
-copyright = '2014-2016, Pahaz Blinov and contributors'
+copyright = '2014-2019, Pahaz Blinov and contributors'
author = 'Pahaz Blinov'
# The version info for the project you're documenting, acts as replacement for
@@ -69,9 +71,9 @@
# built documents.
#
# The short X.Y version.
-version = '0.0.8'
+version = sshtunnel.__version__
# The full version, including alpha/beta/rc tags.
-release = '0.0.8'
+release = sshtunnel.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/docs/index.rst
new/sshtunnel-0.1.5/docs/index.rst
--- old/sshtunnel-0.1.4/docs/index.rst 2018-06-11 13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/docs/index.rst 2019-06-13 12:27:43.000000000 +0200
@@ -8,9 +8,6 @@
API
===
-.. toctree::
- :maxdepth: 3
-
.. automodule:: sshtunnel
:members:
:member-order: bysource
@@ -21,4 +18,4 @@
License
=======
-.. include:: ../LICENSE
\ No newline at end of file
+.. include:: ../LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/docs/requirements-docs.txt
new/sshtunnel-0.1.5/docs/requirements-docs.txt
--- old/sshtunnel-0.1.4/docs/requirements-docs.txt 2018-06-11
13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/docs/requirements-docs.txt 2019-06-13
12:27:43.000000000 +0200
@@ -1,3 +1,3 @@
-docutils==0.12
-sphinx==1.3.5
-sphinxcontrib-napoleon==0.5.0
+docutils
+sphinx
+sphinxcontrib-napoleon
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/setup.py new/sshtunnel-0.1.5/setup.py
--- old/sshtunnel-0.1.4/setup.py 2018-06-11 13:57:40.000000000 +0200
+++ new/sshtunnel-0.1.5/setup.py 2019-06-13 12:27:43.000000000 +0200
@@ -119,6 +119,9 @@
# dependencies). You can install these using the following syntax,
# for example:
# $ pip install -e .[dev,test]
+ tests_require=[
+ 'tox>=1.8.1',
+ ],
extras_require={
'dev': ['check-manifest'],
'test': [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/sshtunnel.egg-info/PKG-INFO
new/sshtunnel-0.1.5/sshtunnel.egg-info/PKG-INFO
--- old/sshtunnel-0.1.4/sshtunnel.egg-info/PKG-INFO 2018-06-12
13:14:41.000000000 +0200
+++ new/sshtunnel-0.1.5/sshtunnel.egg-info/PKG-INFO 2019-06-13
12:29:55.000000000 +0200
@@ -1,13 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sshtunnel
-Version: 0.1.4
+Version: 0.1.5
Summary: Pure python SSH tunnels
Home-page: https://github.com/pahaz/sshtunnel
Author: Pahaz Blinov
Author-email: [email protected]
License: MIT
-Download-URL:
https://pypi.python.org/packages/source/s/sshtunnel/sshtunnel-0.1.4.zip
-Description-Content-Type: UNKNOWN
+Download-URL:
https://pypi.python.org/packages/source/s/sshtunnel/sshtunnel-0.1.5.zip
Description: |CircleCI| |AppVeyor| |readthedocs| |coveralls| |version|
|pyversions| |license|
@@ -112,7 +111,7 @@
``pahaz.urfuclub.ru``, password authentication and randomly assigned
local bind
port.
- .. code-block:: py
+ .. code-block:: python
from sshtunnel import SSHTunnelForwarder
@@ -137,12 +136,12 @@
assuming password protected pkey authentication, remote server's SSH
service is
listening on port 443 and that port is open in the firewall (**Fig2**):
- .. code-block:: py
+ .. code-block:: python
import paramiko
- from sshtunnel import SSHTunnelForwarder
+ import sshtunnel
- with SSHTunnelForwarder(
+ with sshtunnel.open_tunnel(
(REMOTE_SERVER_IP, 443),
ssh_username="",
ssh_pkey="/var/ssh/rsa_key",
@@ -164,12 +163,12 @@
Example of a port forwarding for the Vagrant MySQL local port:
- .. code-block:: py
+ .. code-block:: python
- from sshtunnel import SSHTunnelForwarder
+ from sshtunnel import open_tunnel
from time import sleep
- with SSHTunnelForwarder(
+ with open_tunnel(
('localhost', 2222),
ssh_username="vagrant",
ssh_password="vagrant",
@@ -189,6 +188,42 @@
(bash)$ python -m sshtunnel -U vagrant -P vagrant -L :3306 -R
127.0.0.1:3306 -p 2222 localhost
+ Example 4
+ ---------
+
+ Opening an SSH session jumping over two tunnels. SSH transport and
tunnels
+ will be daemonised, which will not wait for the connections to stop at
close
+ time.
+
+ .. code-block:: python
+
+ import sshtunnel
+ from paramiko import SSHClient
+
+
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('GW1_ip', 20022),
+ remote_bind_address=('GW2_ip', 22),
+ block_on_close=False
+ ) as tunnel1:
+ print('Connection to tunnel1 (GW1_ip:GW1_port) OK...')
+ with sshtunnel.open_tunnel(
+ ssh_address_or_host=('localhost', tunnel1.local_bind_port),
+ remote_bind_address=('target_ip', 22),
+ ssh_username='GW2_user',
+ ssh_password='GW2_pwd',
+ block_on_close=False
+ ) as tunnel2:
+ print('Connection to tunnel2 (GW2_ip:GW2_port) OK...')
+ with SSHClient() as ssh:
+ ssh.connect('localhost',
+ port=tunnel2.local_bind_port,
+ username='target_user',
+ password='target_pwd',
+ )
+ ssh.exec_command(...)
+
+
CLI usage
=========
@@ -202,7 +237,7 @@
ssh_address
Pure python ssh tunnel utils
- Version 0.1.4
+ Version 0.1.5
positional arguments:
ssh_address SSH server IP address (GW for SSH tunnels)
@@ -289,6 +324,9 @@
CHANGELOG
=========
+ - v.0.1.5 (`JM Fernández`_)
+ + Introduce `block_on_close` attribute
+
- v.0.1.4 (`Niels Zeilemaker`_)
+ Allow loading pkeys from `~/.ssh`
@@ -420,3 +458,6 @@
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
+Provides-Extra: build_sphinx
+Provides-Extra: dev
+Provides-Extra: test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/sshtunnel.egg-info/SOURCES.txt
new/sshtunnel-0.1.5/sshtunnel.egg-info/SOURCES.txt
--- old/sshtunnel-0.1.4/sshtunnel.egg-info/SOURCES.txt 2018-06-12
13:14:41.000000000 +0200
+++ new/sshtunnel-0.1.5/sshtunnel.egg-info/SOURCES.txt 2019-06-13
12:29:55.000000000 +0200
@@ -7,6 +7,7 @@
setup.cfg
setup.py
sshtunnel.py
+.circleci/config.yml
docs/Makefile
docs/conf.py
docs/index.rst
@@ -18,7 +19,6 @@
sshtunnel.egg-info/requires.txt
sshtunnel.egg-info/top_level.txt
tests/__init__.py
-tests/__init__.pyc
tests/test_forwarder.py
tests/testconfig
tests/testrsa.key
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/sshtunnel-0.1.4/sshtunnel.py
new/sshtunnel-0.1.5/sshtunnel.py
--- old/sshtunnel-0.1.4/sshtunnel.py 2018-06-12 12:53:46.000000000 +0200
+++ new/sshtunnel-0.1.5/sshtunnel.py 2019-06-13 12:27:43.000000000 +0200
@@ -36,13 +36,13 @@
input_ = input
-__version__ = '0.1.4'
+__version__ = '0.1.5'
__author__ = 'pahaz'
DEFAULT_LOGLEVEL = logging.ERROR #: default level if no logger passed (ERROR)
TUNNEL_TIMEOUT = 1.0 #: Timeout (seconds) for tunnel connection
-DAEMON = False
+_DAEMON = False #: Use daemon threads in connections
TRACE_LEVEL = 1
_CONNECTION_COUNTER = 1
_LOCK = threading.Lock()
@@ -314,7 +314,7 @@
self.remote_address,
hexlify(data)
))
- chan.send(data)
+ chan.sendall(data)
if chan in rqst: # else
if not chan.recv_ready():
break
@@ -323,7 +323,7 @@
TRACE_LEVEL,
'<<< IN {0} recv: {1} <<<'.format(self.info, hexlify(data))
)
- self.request.send(data)
+ self.request.sendall(data)
def handle(self):
uid = get_connection_id()
@@ -415,7 +415,7 @@
Allow concurrent connections to each tunnel
"""
# If True, cleanly stop threads created by ThreadingMixIn when quitting
- daemon_threads = DAEMON
+ daemon_threads = _DAEMON
class _UnixStreamForwardServer(UnixStreamServer):
@@ -459,7 +459,7 @@
Allow concurrent connections to each tunnel
"""
# If True, cleanly stop threads created by ThreadingMixIn when quitting
- daemon_threads = DAEMON
+ daemon_threads = _DAEMON
class SSHTunnelForwarder(object):
@@ -614,9 +614,8 @@
host_pkey_directories (list):
Look for pkeys in folders on this list, for example ['~/.ssh'].
- An empty list disables this feature
- Default: ``None``
+ Default: ``None`` (disabled)
.. versionadded:: 0.1.4
@@ -720,8 +719,8 @@
"""
skip_tunnel_checkup = True
- daemon_forward_servers = DAEMON #: flag tunnel threads in daemon mode
- daemon_transport = DAEMON #: flag SSH transport thread in daemon mode
+ daemon_forward_servers = _DAEMON #: flag tunnel threads in daemon mode
+ daemon_transport = _DAEMON #: flag SSH transport thread in daemon mode
def local_is_up(self, target):
"""
@@ -1090,7 +1089,7 @@
logger.warning('Private key file not found: {0}'
.format(ssh_pkey))
if isinstance(ssh_pkey, paramiko.pkey.PKey):
- ssh_loaded_pkeys.append(ssh_pkey)
+ ssh_loaded_pkeys.insert(0, ssh_pkey)
if not ssh_password and not ssh_loaded_pkeys:
raise ValueError('No password or public key available!')
@@ -1580,6 +1579,12 @@
.. versionadded:: 0.1.0
+ block_on_close (boolean):
+ Wait until all connections are done during close by changing the
+ value of :attr:`~SSHTunnelForwarder.block_on_close`
+
+ Default: True
+
.. note::
A value of ``debug_level`` set to 1 == ``TRACE`` enables tracing mode
.. note::
@@ -1617,6 +1622,7 @@
ssh_port = kwargs.pop('ssh_port', None)
skip_tunnel_checkup = kwargs.pop('skip_tunnel_checkup', True)
+ block_on_close = kwargs.pop('block_on_close', _DAEMON)
if not args:
if isinstance(ssh_address_or_host, tuple):
args = (ssh_address_or_host, )
@@ -1624,6 +1630,8 @@
args = ((ssh_address_or_host, ssh_port), )
forwarder = SSHTunnelForwarder(*args, **kwargs)
forwarder.skip_tunnel_checkup = skip_tunnel_checkup
+ forwarder.daemon_forward_servers = not block_on_close
+ forwarder.daemon_transport = not block_on_close
return forwarder
Binary files old/sshtunnel-0.1.4/tests/__init__.pyc and
new/sshtunnel-0.1.5/tests/__init__.pyc differ