Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-sshtunnel for 
openSUSE:Factory checked in at 2026-05-21 18:33:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sshtunnel (Old)
 and      /work/SRC/openSUSE:Factory/.python-sshtunnel.new.2084 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-sshtunnel"

Thu May 21 18:33:26 2026 rev:11 rq:1354474 version:0.4.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sshtunnel/python-sshtunnel.changes        
2025-08-25 20:41:56.873767787 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-sshtunnel.new.2084/python-sshtunnel.changes  
    2026-05-21 18:34:33.800406509 +0200
@@ -1,0 +2,8 @@
+Thu Feb 12 01:49:37 UTC 2026 - Steve Kowalik <[email protected]>
+
+- Add patch support-unittest-mock.patch:
+  * Convert sed call to a patch to use unittest.mock.
+- Add patch support-paramiko-4.patch:
+  * Support paramiko 4.0+ changes.
+
+-------------------------------------------------------------------

New:
----
  support-paramiko-4.patch
  support-unittest-mock.patch

----------(New B)----------
  New:  * Convert sed call to a patch to use unittest.mock.
- Add patch support-paramiko-4.patch:
  * Support paramiko 4.0+ changes.
  New:
- Add patch support-unittest-mock.patch:
  * Convert sed call to a patch to use unittest.mock.
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-sshtunnel.spec ++++++
--- /var/tmp/diff_new_pack.B6kayY/_old  2026-05-21 18:34:34.528436762 +0200
+++ /var/tmp/diff_new_pack.B6kayY/_new  2026-05-21 18:34:34.528436762 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-sshtunnel
 #
-# Copyright (c) 2025 SUSE LLC and contributors
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,10 +27,13 @@
 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}
+# PATCH-FIX-UPSTREAM gh#pahaz/sshtunnel#310
+Patch0:         support-unittest-mock.patch
+# PATCH-FIX-UPSTREAM 
gh#pahaz/sshtunnel#307/changes/e199cb1467516189703d14b1ce8d540b879f1a1b
+Patch1:         support-paramiko-4.patch
+BuildRequires:  %{python_module paramiko >= 4}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
@@ -40,7 +43,7 @@
 BuildRequires:  openssh
 BuildRequires:  python-rpm-macros
 Requires:       openssh
-Requires:       python-paramiko >= 2.7.2
+Requires:       python-paramiko >= 4
 BuildArch:      noarch
 %if %{with libalternatives}
 BuildRequires:  alts
@@ -58,7 +61,7 @@
 and -R parameters.
 
 %prep
-%setup -q -n sshtunnel-%{version}
+%autosetup -p1 -n sshtunnel-%{version}
 # Remove shebang line
 sed -i '1{\,^#!%{_bindir}/env python,d}' sshtunnel.py
 
@@ -71,8 +74,6 @@
 %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
 
 %pre

++++++ support-paramiko-4.patch ++++++
>From e199cb1467516189703d14b1ce8d540b879f1a1b Mon Sep 17 00:00:00 2001
From: kalyanr <[email protected]>
Date: Wed, 29 Oct 2025 07:19:45 +0530
Subject: [PATCH] remove DSS key references; upgrade paramiko dependency to
 version 4.0

---
 README.rst              | 4 ++--
 setup.py                | 2 +-
 sshtunnel.py            | 9 ++++-----
 tests/test_forwarder.py | 8 +++-----
 4 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/README.rst b/README.rst
index 7400816e..ff277335 100644
--- a/README.rst
+++ b/README.rst
@@ -255,9 +255,9 @@ CLI usage
       -k SSH_HOST_KEY, --ssh_host_key SSH_HOST_KEY
                             Gateway's host key
       -K KEY_FILE, --private_key_file KEY_FILE
-                            RSA/DSS/ECDSA private key file
+                            RSA/ECDSA private key file
       -S KEY_PASSWORD, --private_key_password KEY_PASSWORD
-                            RSA/DSS/ECDSA private key password
+                            RSA/ECDSA private key password
       -t, --threaded        Allow concurrent connections to each tunnel
       -v, --verbose         Increase output verbosity (default: ERROR)
       -V, --version         Show version number and quit
diff --git a/setup.py b/setup.py
index ccaaab8c..ae6c7afd 100644
--- a/setup.py
+++ b/setup.py
@@ -97,7 +97,7 @@
     # requirements files see:
     # https://packaging.python.org/en/latest/requirements.html
     install_requires=[
-        'paramiko>=2.7.2',
+        'paramiko>=4.0',
     ],
 
     # List additional groups of dependencies here (e.g. development
diff --git a/sshtunnel.py b/sshtunnel.py
index a7db0c44..c512a012 100644
--- a/sshtunnel.py
+++ b/sshtunnel.py
@@ -1090,7 +1090,6 @@ def get_keys(logger=None, host_pkey_directories=None, 
allow_agent=False):
             host_pkey_directories = [DEFAULT_SSH_DIRECTORY]
 
         paramiko_key_types = {'rsa': paramiko.RSAKey,
-                              'dsa': paramiko.DSSKey,
                               'ecdsa': paramiko.ECDSAKey}
         if hasattr(paramiko, 'Ed25519Key'):
             # NOQA: new in paramiko>=2.2: 
http://docs.paramiko.org/en/stable/api/keys.html#module-paramiko.ed25519key
@@ -1286,7 +1285,7 @@ def read_private_key_file(pkey_file,
 
         Arguments:
             pkey_file (str):
-                File containing a private key (RSA, DSS or ECDSA)
+                File containing a private key (RSA or ECDSA)
         Keyword Arguments:
             pkey_password (Optional[str]):
                 Password to decrypt the private key
@@ -1295,7 +1294,7 @@ def read_private_key_file(pkey_file,
             paramiko.Pkey
         """
         ssh_pkey = None
-        key_types = (paramiko.RSAKey, paramiko.DSSKey, paramiko.ECDSAKey)
+        key_types = (paramiko.RSAKey, paramiko.ECDSAKey)
         if hasattr(paramiko, 'Ed25519Key'):
             # NOQA: new in paramiko>=2.2: 
http://docs.paramiko.org/en/stable/api/keys.html#module-paramiko.ed25519key
             key_types += (paramiko.Ed25519Key, )
@@ -1806,7 +1805,7 @@ def _parse_arguments(args=None):
         dest='ssh_private_key',
         metavar='KEY_FILE',
         type=str,
-        help='RSA/DSS/ECDSA private key file'
+        help='RSA/ECDSA private key file'
     )
 
     parser.add_argument(
@@ -1814,7 +1813,7 @@ def _parse_arguments(args=None):
         dest='ssh_private_key_password',
         metavar='KEY_PASSWORD',
         type=str,
-        help='RSA/DSS/ECDSA private key password'
+        help='RSA/ECDSA private key password'
     )
 
     parser.add_argument(
diff --git a/tests/test_forwarder.py b/tests/test_forwarder.py
index 40662d08..02af1758 100644
--- a/tests/test_forwarder.py
+++ b/tests/test_forwarder.py
@@ -81,11 +81,9 @@ def capture_stdout_stderr():
 
 SSH_USERNAME = get_random_string()
 SSH_PASSWORD = get_random_string()
-SSH_DSS = b'\x44\x78\xf0\xb9\xa2\x3c\xc5\x18\x20\x09\xff\x75\x5b\xc1\xd2\x6c'
 SSH_RSA = b'\x60\x73\x38\x44\xcb\x51\x86\x65\x7f\xde\xda\xa2\x2b\x5a\x57\xd5'
 ECDSA = b'\x25\x19\xeb\x55\xe6\xa1\x47\xff\x4f\x38\xd2\x75\x6f\xa5\xd5\x60'
 FINGERPRINTS = {
-    'ssh-dss': SSH_DSS,
     'ssh-rsa': SSH_RSA,
     'ecdsa-sha2-nistp256': ECDSA,
 }
@@ -1202,7 +1200,7 @@ def test_parse_arguments_short(self):
                 '-P={0}'.format(SSH_PASSWORD),  # GW password
                 '-R', '10.0.0.1:8080', '10.0.0.2:8080',  # remote bind list
                 '-L', ':8081', ':8082',  # local bind list
-                '-k={0}'.format(SSH_DSS),  # hostkey
+                '-k={0}'.format(SSH_RSA),  # hostkey
                 '-K={0}'.format(__file__),  # pkey file
                 '-S={0}'.format(SSH_PASSWORD),  # pkey password
                 '-t',  # concurrent connections (threaded)
@@ -1232,7 +1230,7 @@ def test_parse_arguments_long(self):
              '--password={0}'.format(SSH_PASSWORD),  # GW password
              '--remote_bind_address', '10.0.0.1:8080', '10.0.0.2:8080',
              '--local_bind_address', ':8081', ':8082',  # local bind list
-             '--ssh_host_key={0}'.format(SSH_DSS),  # hostkey
+             '--ssh_host_key={0}'.format(SSH_RSA),  # hostkey
              '--private_key_file={0}'.format(__file__),  # pkey file
              '--private_key_password={0}'.format(SSH_PASSWORD),
              '--threaded',  # concurrent connections (threaded)
@@ -1254,7 +1252,7 @@ def _test_parser(self, parser):
                              [('10.0.0.1', 8080), ('10.0.0.2', 8080)])
         self.assertListEqual(parser['local_bind_addresses'],
                              [('', 8081), ('', 8082)])
-        self.assertEqual(parser['ssh_host_key'], str(SSH_DSS))
+        self.assertEqual(parser['ssh_host_key'], str(SSH_RSA))
         self.assertEqual(parser['ssh_private_key'], __file__)
         self.assertEqual(parser['ssh_private_key_password'], SSH_PASSWORD)
         self.assertTrue(parser['threaded'])

++++++ support-unittest-mock.patch ++++++
>From 5949d2a227af0d7f81288c37c540523bd68faf2a Mon Sep 17 00:00:00 2001
From: Steve Kowalik <[email protected]>
Date: Thu, 12 Feb 2026 12:40:08 +1100
Subject: [PATCH] Attempt to import unittest.mock first

As the standard library has included mock since 3.3, we should attempt
to use it first. Add a fallback if we can't import it, and only install
it if required with a marker.

Closes #259
---
 tests/requirements.txt  | 2 +-
 tests/test_forwarder.py | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/tests/requirements.txt b/tests/requirements.txt
index 6a91ea46..c8b4f880 100644
--- a/tests/requirements.txt
+++ b/tests/requirements.txt
@@ -1,5 +1,5 @@
 coveralls
-mock
+mock; python_version < '3.3'
 pytest
 pytest-cov
 pytest-xdist
diff --git a/tests/test_forwarder.py b/tests/test_forwarder.py
index 40662d08..b5734ab1 100644
--- a/tests/test_forwarder.py
+++ b/tests/test_forwarder.py
@@ -14,12 +14,16 @@
 from functools import partial
 from contextlib import contextmanager
 
-import mock
 import paramiko
 import sshtunnel
 import shutil
 import tempfile
 
+try:
+    from unittest import mock
+except ImportError:
+    import mock
+
 if sys.version_info[0] == 2:
     from cStringIO import StringIO
     if sys.version_info < (2, 7):

Reply via email to