Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-scp for openSUSE:Factory checked in at 2022-02-22 21:18:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-scp (Old) and /work/SRC/openSUSE:Factory/.python-scp.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-scp" Tue Feb 22 21:18:13 2022 rev:11 rq:956646 version:0.14.3 Changes: -------- --- /work/SRC/openSUSE:Factory/python-scp/python-scp.changes 2022-01-04 19:37:50.277957406 +0100 +++ /work/SRC/openSUSE:Factory/.python-scp.new.1958/python-scp.changes 2022-02-22 21:18:51.594293603 +0100 @@ -1,0 +2,6 @@ +Tue Feb 22 09:22:56 UTC 2022 - Dirk M??ller <[email protected]> + +- update to 0.14.3: + * Add type hints + +------------------------------------------------------------------- Old: ---- scp-0.14.2.tar.gz New: ---- scp-0.14.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-scp.spec ++++++ --- /var/tmp/diff_new_pack.zCFSSe/_old 2022-02-22 21:18:52.118293699 +0100 +++ /var/tmp/diff_new_pack.zCFSSe/_new 2022-02-22 21:18:52.122293700 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-scp -Version: 0.14.2 +Version: 0.14.3 Release: 0 Summary: SSH scp module for paramiko License: LGPL-2.1-or-later ++++++ scp-0.14.2.tar.gz -> scp-0.14.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scp.py-0.14.2/CHANGELOG.md new/scp.py-0.14.3/CHANGELOG.md --- old/scp.py-0.14.2/CHANGELOG.md 2021-12-15 15:59:16.000000000 +0100 +++ new/scp.py-0.14.3/CHANGELOG.md 2022-02-15 15:34:27.000000000 +0100 @@ -1,5 +1,9 @@ # Changelog +## 0.14.3 (2022-02-15) + +- Add type hints + ## 0.14.2 (2021-12-15) - Don't fail if the remote path is a PurePath not a Path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scp.py-0.14.2/scp.py new/scp.py-0.14.3/scp.py --- old/scp.py-0.14.2/scp.py 2021-12-15 15:59:16.000000000 +0100 +++ new/scp.py-0.14.3/scp.py 2022-02-15 15:34:27.000000000 +0100 @@ -5,7 +5,7 @@ Utilities for sending files over ssh using the scp1 protocol. """ -__version__ = '0.14.2' +__version__ = '0.14.3' import locale import os @@ -13,9 +13,6 @@ from socket import timeout as SocketTimeout -# this is quote from the shlex module, added in py3.3 -_find_unsafe = re.compile(br'[^\w@%+=:,./~-]').search - SCP_COMMAND = b'scp' PATH_TYPES = (str, bytes) @@ -31,6 +28,20 @@ except NameError: pass +try: + from typing import IO, TYPE_CHECKING, AnyStr, Callable, Iterable, Optional, Tuple, Union + + if TYPE_CHECKING: + import paramiko.transport + + # unconditionally adding pathlib here because typing only works in python3 anyways and it's in stdlib + PathTypes = Union[str, bytes, "pathlib.PurePath"] +except ImportError: + pass + + +# this is quote from the shlex module, added in py3.3 +_find_unsafe = re.compile(br'[^\w@%+=:,./~-]').search def _sh_quote(s): """Return a shell-escaped version of the string `s`.""" @@ -102,6 +113,7 @@ """ def __init__(self, transport, buff_size=16384, socket_timeout=10.0, progress=None, progress4=None, sanitize=_sh_quote): + # type: (paramiko.transport.Transport, int, float, Optional[Callable[[bytes, int, int], None]], Optional[Callable[[bytes, int, int, Tuple[str, int]], None]], Callable[[bytes], bytes]) -> None """ Create an scp1 client. @@ -150,6 +162,7 @@ def put(self, files, remote_path=b'.', recursive=False, preserve_times=False): + # type: (Union[PathTypes, Iterable[PathTypes]], Union[str, bytes], bool, bool) -> None """ Transfer files and directories to remote host. @@ -187,6 +200,7 @@ self.close() def putfo(self, fl, remote_path, mode='0644', size=None): + # type: (IO[AnyStr], Union[str, bytes], Union[str, bytes], Optional[int]) -> None """ Transfer file-like object to remote host. @@ -215,6 +229,7 @@ def get(self, remote_path, local_path='', recursive=False, preserve_times=False): + # type: (PathTypes, Union[str, bytes], bool, bool) -> None """ Transfer files and directories from remote host to localhost. @@ -546,6 +561,7 @@ def put(transport, files, remote_path=b'.', recursive=False, preserve_times=False): + # type: (paramiko.transport.Transport, Union[PathTypes, Iterable[PathTypes]], Union[str, bytes], bool, bool) -> None """ Transfer files and directories to remote host. @@ -570,6 +586,7 @@ def get(transport, remote_path, local_path='', recursive=False, preserve_times=False): + # type: (paramiko.transport.Transport, PathTypes, Union[str, bytes], bool, bool) -> None """ Transfer files and directories from remote host to localhost. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scp.py-0.14.2/setup.py new/scp.py-0.14.3/setup.py --- old/scp.py-0.14.2/setup.py 2021-12-15 15:59:16.000000000 +0100 +++ new/scp.py-0.14.3/setup.py 2022-02-15 15:34:27.000000000 +0100 @@ -10,7 +10,7 @@ description = fp.read() setup( name = 'scp', - version = '0.14.2', + version = '0.14.3', author = 'James Bardin', author_email = '[email protected]', maintainer="Remi Rampin", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scp.py-0.14.2/test.py new/scp.py-0.14.3/test.py --- old/scp.py-0.14.2/test.py 2021-12-15 15:59:16.000000000 +0100 +++ new/scp.py-0.14.3/test.py 2022-02-15 15:34:27.000000000 +0100 @@ -9,11 +9,8 @@ from scp import SCPClient, SCPException, put, get import tempfile import types -try: - import unittest2 as unittest - sys.modules['unittest'] = unittest -except ImportError: - import unittest +import unittest + try: import pathlib except ImportError:
