Hello community,

here is the log from the commit of package python-s3transfer for 
openSUSE:Factory checked in at 2019-06-25 22:16:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-s3transfer (Old)
 and      /work/SRC/openSUSE:Factory/.python-s3transfer.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-s3transfer"

Tue Jun 25 22:16:22 2019 rev:9 rq:711560 version:0.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-s3transfer/python-s3transfer.changes      
2019-02-14 14:34:31.279620910 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-s3transfer.new.4615/python-s3transfer.changes
    2019-06-25 22:16:24.224623517 +0200
@@ -1,0 +2,6 @@
+Wed Jun 12 11:58:09 UTC 2019 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- Update to version 0.2.1
+  * enhancment:ProcessPool: Adds user agent suffix.
+
+-------------------------------------------------------------------

Old:
----
  s3transfer-0.2.0.tar.gz

New:
----
  s3transfer-0.2.1.tar.gz

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

Other differences:
------------------
++++++ python-s3transfer.spec ++++++
--- /var/tmp/diff_new_pack.5DqakR/_old  2019-06-25 22:16:25.268625125 +0200
+++ /var/tmp/diff_new_pack.5DqakR/_new  2019-06-25 22:16:25.268625125 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-s3transfer
-Version:        0.2.0
+Version:        0.2.1
 Release:        0
 Summary:        Python S3 transfer manager
 License:        Apache-2.0

++++++ s3transfer-0.2.0.tar.gz -> s3transfer-0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/PKG-INFO 
new/s3transfer-0.2.1/PKG-INFO
--- old/s3transfer-0.2.0/PKG-INFO       2019-02-07 00:14:55.000000000 +0100
+++ new/s3transfer-0.2.1/PKG-INFO       2019-06-04 20:24:40.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: s3transfer
-Version: 0.2.0
+Version: 0.2.1
 Summary: An Amazon S3 Transfer Manager
 Home-page: https://github.com/boto/s3transfer
 Author: Amazon Web Services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/s3transfer/__init__.py 
new/s3transfer-0.2.1/s3transfer/__init__.py
--- old/s3transfer-0.2.0/s3transfer/__init__.py 2019-02-07 00:14:54.000000000 
+0100
+++ new/s3transfer-0.2.1/s3transfer/__init__.py 2019-06-04 20:24:40.000000000 
+0200
@@ -143,7 +143,7 @@
 
 
 __author__ = 'Amazon Web Services'
-__version__ = '0.2.0'
+__version__ = '0.2.1'
 
 
 class NullHandler(logging.Handler):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/s3transfer/constants.py 
new/s3transfer-0.2.1/s3transfer/constants.py
--- old/s3transfer-0.2.0/s3transfer/constants.py        2019-02-07 
00:14:54.000000000 +0100
+++ new/s3transfer-0.2.1/s3transfer/constants.py        2019-06-04 
20:24:40.000000000 +0200
@@ -10,6 +10,9 @@
 # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 # ANY KIND, either express or implied. See the License for the specific
 # language governing permissions and limitations under the License.
+import s3transfer
+
+
 KB = 1024
 MB = KB * KB
 
@@ -20,3 +23,6 @@
     'SSECustomerKeyMD5',
     'RequestPayer',
 ]
+
+USER_AGENT = 's3transfer/%s' % s3transfer.__version__
+PROCESS_USER_AGENT = '%s processpool' % USER_AGENT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/s3transfer/processpool.py 
new/s3transfer-0.2.1/s3transfer/processpool.py
--- old/s3transfer-0.2.0/s3transfer/processpool.py      2019-02-07 
00:14:54.000000000 +0100
+++ new/s3transfer-0.2.1/s3transfer/processpool.py      2019-06-04 
20:24:40.000000000 +0200
@@ -198,11 +198,14 @@
 import multiprocessing
 import threading
 import signal
+from copy import deepcopy
 
 import botocore.session
+from botocore.config import Config
 
 from s3transfer.constants import MB
 from s3transfer.constants import ALLOWED_DOWNLOAD_ARGS
+from s3transfer.constants import PROCESS_USER_AGENT
 from s3transfer.compat import MAXINT
 from s3transfer.compat import BaseManager
 from s3transfer.exceptions import CancelledError
@@ -548,6 +551,13 @@
         if self._client_kwargs is None:
             self._client_kwargs = {}
 
+        client_config = deepcopy(self._client_kwargs.get('config', Config()))
+        if not client_config.user_agent_extra:
+            client_config.user_agent_extra = PROCESS_USER_AGENT
+        else:
+            client_config.user_agent_extra += " " + PROCESS_USER_AGENT
+        self._client_kwargs['config'] = client_config
+
     def create_client(self):
         """Create a botocore S3 client"""
         return botocore.session.Session().create_client(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/s3transfer.egg-info/PKG-INFO 
new/s3transfer-0.2.1/s3transfer.egg-info/PKG-INFO
--- old/s3transfer-0.2.0/s3transfer.egg-info/PKG-INFO   2019-02-07 
00:14:55.000000000 +0100
+++ new/s3transfer-0.2.1/s3transfer.egg-info/PKG-INFO   2019-06-04 
20:24:40.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: s3transfer
-Version: 0.2.0
+Version: 0.2.1
 Summary: An Amazon S3 Transfer Manager
 Home-page: https://github.com/boto/s3transfer
 Author: Amazon Web Services
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/s3transfer-0.2.0/tests/unit/test_processpool.py 
new/s3transfer-0.2.1/tests/unit/test_processpool.py
--- old/s3transfer-0.2.0/tests/unit/test_processpool.py 2019-02-07 
00:14:54.000000000 +0100
+++ new/s3transfer-0.2.1/tests/unit/test_processpool.py 2019-06-04 
20:24:40.000000000 +0200
@@ -20,6 +20,7 @@
 from botocore.exceptions import ClientError
 from botocore.exceptions import ReadTimeoutError
 from botocore.client import BaseClient
+from botocore.config import Config
 
 from tests import unittest
 from tests import skip_if_windows
@@ -27,6 +28,7 @@
 from tests import StreamWithError
 from tests import StubbedClientTest
 from s3transfer.compat import six
+from s3transfer.constants import PROCESS_USER_AGENT
 from s3transfer.exceptions import RetriesExceededError
 from s3transfer.exceptions import CancelledError
 from s3transfer.utils import OSUtils
@@ -143,11 +145,26 @@
         client = ClientFactory().create_client()
         self.assertIsInstance(client, BaseClient)
         self.assertEqual(client.meta.service_model.service_name, 's3')
+        self.assertIn(PROCESS_USER_AGENT, client.meta.config.user_agent)
 
     def test_create_client_with_client_kwargs(self):
         client = ClientFactory({'region_name': 'myregion'}).create_client()
         self.assertEqual(client.meta.region_name, 'myregion')
 
+    def test_user_agent_with_config(self):
+        client = ClientFactory({'config': Config()}).create_client()
+        self.assertIn(PROCESS_USER_AGENT, client.meta.config.user_agent)
+
+    def test_user_agent_with_existing_user_agent_extra(self):
+        config = Config(user_agent_extra='foo/1.0')
+        client = ClientFactory({'config': config}).create_client()
+        self.assertIn(PROCESS_USER_AGENT, client.meta.config.user_agent)
+
+    def test_user_agent_with_existing_user_agent(self):
+        config = Config(user_agent='foo/1.0')
+        client = ClientFactory({'config': config}).create_client()
+        self.assertIn(PROCESS_USER_AGENT, client.meta.config.user_agent)
+
 
 class TestTransferMonitor(unittest.TestCase):
     def setUp(self):


Reply via email to