Sync from SUSE:SLFO:Main python-sshtunnel revision 40aea9375e884d56e68089f711acd699

This commit is contained in:
2025-05-13 17:12:51 +02:00
commit ec416d41a0
4 changed files with 196 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

88
python-sshtunnel.changes Normal file
View File

@@ -0,0 +1,88 @@
-------------------------------------------------------------------
Thu Mar 28 07:19:25 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Require update-alternatives for the scriptlets.
-------------------------------------------------------------------
Tue Mar 26 18:57:48 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Switch build system from setuptools to pyproject.toml
+ Add python-pip and python-wheel to BuildRequires
+ Replace %python_build with %pyproject_wheel
+ Replace %python_install with %pyproject_install
- Limit Python files matched in %files section
-------------------------------------------------------------------
Mon Jan 15 13:49:41 UTC 2024 - Antonio Larrosa <alarrosa@suse.com>
- Use %sle15_python_module_pythons
-------------------------------------------------------------------
Wed Apr 20 07:47:51 UTC 2022 - pgajdos@suse.com
- do not require python-mock for build
-------------------------------------------------------------------
Mon Feb 1 22:00:48 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 0.4.0:
+ Change the daemon mod flag for all tunnel threads (is not fully backward
compatible) to prevent unexpected hangs (`#219`_) + Add docker based end to end
functinal tests for Mongo/Postgres/MySQL
+ Add docker based end to end hangs tests
+ Fix host key directory detection
+ Unify default ssh config folder to `~/.ssh`
+ Increase open connection timeout to 10 secods
+ Change default with context behavior to use `.stop(force=True)` on exit
+ Remove useless `daemon_forward_servers = True` hack for hangs prevention
+ Set transport keepalive to 5 second by default
+ Set default transport timeout to 0.1
+ Deprecate and remove `block_on_close` option
+ Fix "deadlocks" / "tunneling hangs"
+ Add `.stop(force=True)` for force close active connections
+ Fixes bug with orphan thread for a tunnel that is DOWN
+ Support IPv6 without proxy command. Use built-in paramiko create socket
logic. The logic tries to use ipv6 socket family first, then ipv4 socket
family.
-------------------------------------------------------------------
Mon Jul 22 12:49:32 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.1.5:
* Introduce block_on_close attribute
-------------------------------------------------------------------
Thu Mar 7 15:08:15 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Remove test runner exception as bug is fixed upstream
-------------------------------------------------------------------
Thu Aug 23 14:27:09 UTC 2018 - alarrosa@suse.com
- Update to 0.1.4
* Allow loading pkeys from ~/.ssh
-------------------------------------------------------------------
Wed May 9 11:21:33 UTC 2018 - tchvatal@suse.com
- Disable deprecation detector test as it is broken
-------------------------------------------------------------------
Wed May 9 10:59:26 UTC 2018 - tchvatal@suse.com
- Switch to pytest and run tests directly instead of running them
in tox virtual enviroment
-------------------------------------------------------------------
Wed May 9 10:55:00 UTC 2018 - tchvatal@suse.com
- Use %license to install license
- Really execute tests
- Really switch to github url as pypi deployment does not contain
the tests
-------------------------------------------------------------------
Mon May 7 08:23:14 UTC 2018 - adrian.glaubitz@suse.com
- Initial build
+ Version 0.1.3

82
python-sshtunnel.spec Normal file
View File

@@ -0,0 +1,82 @@
#
# spec file for package python-sshtunnel
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-sshtunnel
Version: 0.4.0
Release: 0
Summary: SSH tunnels to remote server
License: MIT
Group: Development/Languages/Python
URL: https://github.com/pahaz/sshtunnel/
Source: https://files.pythonhosted.org/packages/source/s/sshtunnel/sshtunnel-%{version}.tar.gz
BuildRequires: %{python_module paramiko >= 2.7.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
# for the tests to validate some things
BuildRequires: fdupes
BuildRequires: openssh
BuildRequires: python-rpm-macros
Requires: openssh
Requires: python-paramiko >= 2.7.2
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
The sshtunnel package allows one to create SSH tunnels using local
or remote port forwarding. Thus, it provides a Python wrapper to
the same functionality provided by the SSH command using the -L
and -R parameters.
%prep
%setup -q -n sshtunnel-%{version}
# Remove shebang line
sed -i '1{\,^#!%{_bindir}/env python,d}' sshtunnel.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/sshtunnel
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# https://github.com/pahaz/sshtunnel/issues/259
sed -i 's:import mock:from unittest import mock:' tests/test_forwarder.py
%pytest
%post
%python_install_alternative sshtunnel
%postun
%python_uninstall_alternative sshtunnel
%files %{python_files}
%license LICENSE
%doc *.rst
%python_alternative %{_bindir}/sshtunnel
%pycache_only %{python_sitelib}/__pycache__/sshtunnel*pyc
%{python_sitelib}/sshtunnel.py
%{python_sitelib}/sshtunnel-{%version}.dist-info
%changelog

BIN
sshtunnel-0.4.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.