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 2023-07-19 19:11:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-scp (Old)
 and      /work/SRC/openSUSE:Factory/.python-scp.new.5570 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-scp"

Wed Jul 19 19:11:36 2023 rev:14 rq:1099489 version:0.14.5

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-scp/python-scp.changes    2023-07-10 
16:40:57.670922087 +0200
+++ /work/SRC/openSUSE:Factory/.python-scp.new.5570/python-scp.changes  
2023-07-19 19:11:54.201011600 +0200
@@ -1,0 +2,7 @@
+Tue Jul 18 18:53:34 UTC 2023 - Antonio Teixeira <[email protected]>
+
+- Update to 0.14.5:
+  * Update docstrings to clarify sanitation and use of wildcards
+  * Make sure to close the local file on errors
+
+-------------------------------------------------------------------

Old:
----
  scp-0.14.4.tar.gz

New:
----
  scp-0.14.5.tar.gz

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

Other differences:
------------------
++++++ python-scp.spec ++++++
--- /var/tmp/diff_new_pack.XExBx5/_old  2023-07-19 19:11:54.857015437 +0200
+++ /var/tmp/diff_new_pack.XExBx5/_new  2023-07-19 19:11:54.861015460 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-scp
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 # Copyright (c) 2017-2021, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,7 +19,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-scp
-Version:        0.14.4
+Version:        0.14.5
 Release:        0
 Summary:        SSH scp module for paramiko
 License:        LGPL-2.1-or-later

++++++ scp-0.14.4.tar.gz -> scp-0.14.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scp.py-0.14.4/.github/workflows/test.yml 
new/scp.py-0.14.5/.github/workflows/test.yml
--- old/scp.py-0.14.4/.github/workflows/test.yml        2022-02-23 
17:06:46.000000000 +0100
+++ new/scp.py-0.14.5/.github/workflows/test.yml        2023-01-30 
20:30:13.000000000 +0100
@@ -8,16 +8,19 @@
   build:
     strategy:
       matrix:
+        os: [ubuntu-latest]
         python-version:
           - "2.7"
-          - "3.5"
           - "3.7"
           - "3.8"
           - "3.9"
-    runs-on: ubuntu-latest
+        include:
+          - os: ubuntu-20.04
+            python: "3.5"
+    runs-on: ${{ matrix.os }}
     steps:
-    - uses: actions/checkout@v2
-    - uses: actions/setup-python@v2
+    - uses: actions/checkout@v3
+    - uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
     - run: pip install readme_renderer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scp.py-0.14.4/CHANGELOG.md 
new/scp.py-0.14.5/CHANGELOG.md
--- old/scp.py-0.14.4/CHANGELOG.md      2022-02-23 17:06:46.000000000 +0100
+++ new/scp.py-0.14.5/CHANGELOG.md      2023-01-30 20:30:13.000000000 +0100
@@ -1,5 +1,10 @@
 # Changelog
 
+## 0.14.5 (2023-01-30)
+
+- Update docstrings to clarify sanitation and use of wildcards
+- Make sure to close the local file on errors
+
 ## 0.14.4 (2022-02-23)
 
 - Update type hints for pyright
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scp.py-0.14.4/scp.py new/scp.py-0.14.5/scp.py
--- old/scp.py-0.14.4/scp.py    2022-02-23 17:06:46.000000000 +0100
+++ new/scp.py-0.14.5/scp.py    2023-01-30 20:30:13.000000000 +0100
@@ -5,7 +5,7 @@
 Utilities for sending files over ssh using the scp1 protocol.
 """
 
-__version__ = '0.14.4'
+__version__ = '0.14.5'
 
 import locale
 import os
@@ -131,7 +131,8 @@
         @param progress4: callback - called with (filename, size, sent, 
peername)
             during transfers. peername is a tuple contains (IP, PORT)
         @param sanitize: function - called with filename, should return
-            safe or escaped string.  Uses _sh_quote by default.
+            safe or escaped string. Uses _sh_quote by default. Set to ``False``
+            to disable.
         @type progress: function(string, int, int, tuple)
         """
         self.transport = transport
@@ -151,7 +152,10 @@
         self._depth = 0
         self._rename = False
         self._utime = None
-        self.sanitize = sanitize
+        if sanitize is False:
+            self.sanitize = lambda x: x
+        else:
+            self.sanitize = sanitize
         self._dirtimes = {}
         self.peername = self.transport.getpeername()
         self.scp_command = SCP_COMMAND
@@ -236,9 +240,9 @@
         """
         Transfer files and directories from remote host to localhost.
 
-        @param remote_path: path to retrieve from remote host. since this is
-            evaluated by scp on the remote host, shell wildcards and
-            environment variables may be used.
+        @param remote_path: path to retrieve from remote host. Note that
+            wildcards will be escaped unless you changed the `sanitize`
+            function.
         @type remote_path: str
         @param local_path: path in which to receive files locally
         @type local_path: str
@@ -307,8 +311,10 @@
             if self.preserve_times:
                 self._send_time(mtime, atime)
             fl = open(name, 'rb')
-            self._send_file(fl, name, mode, size)
-            fl.close()
+            try:
+                self._send_file(fl, name, mode, size)
+            finally:
+                fl.close()
 
     def _send_file(self, fl, name, mode, size):
         basename = asbytes(os.path.basename(name))
@@ -496,16 +502,15 @@
             msg = chan.recv(512)
             if msg and msg[0:1] != b'\x00':
                 raise SCPException(asunicode(msg[1:]))
-        except SocketTimeout:
-            chan.close()
-            raise SCPException('Error receiving, socket.timeout')
 
-        file_hdl.truncate()
-        try:
+            file_hdl.truncate()
             os.utime(path, self._utime)
             self._utime = None
             os.chmod(path, mode)
             # should we notify the other end?
+        except SocketTimeout:
+            chan.close()
+            raise SCPException('Error receiving, socket.timeout')
         finally:
             file_hdl.close()
         # '\x00' confirmation sent in _recv_all
@@ -598,9 +603,8 @@
 
     @param transport: an paramiko L{Transport}
     @type transport: L{Transport}
-    @param remote_path: path to retrieve from remote host. since this is
-        evaluated by scp on the remote host, shell wildcards and environment
-        variables may be used.
+    @param remote_path: path to retrieve from remote host. Note that wildcards
+        will be escaped unless you changed the `sanitize` function.
     @type remote_path: str
     @param local_path: path in which to receive files locally
     @type local_path: str
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/scp.py-0.14.4/setup.py new/scp.py-0.14.5/setup.py
--- old/scp.py-0.14.4/setup.py  2022-02-23 17:06:46.000000000 +0100
+++ new/scp.py-0.14.5/setup.py  2023-01-30 20:30:13.000000000 +0100
@@ -10,7 +10,7 @@
     description = fp.read()
 setup(
         name = 'scp',
-        version = '0.14.4',
+        version = '0.14.5',
         author = 'James Bardin',
         author_email = '[email protected]',
         maintainer="Remi Rampin",
@@ -28,13 +28,9 @@
             'License :: OSI Approved :: GNU Library or Lesser General Public 
License (LGPL)',
             'Operating System :: OS Independent',
             'Programming Language :: Python',
-            'Programming Language :: Python :: 2',
             'Programming Language :: Python :: 2.6',
             'Programming Language :: Python :: 2.7',
             'Programming Language :: Python :: 3',
-            'Programming Language :: Python :: 3.3',
-            'Programming Language :: Python :: 3.4',
-            'Programming Language :: Python :: 3.5',
             'Topic :: Internet',
         ],
 )

Reply via email to