Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-google-resumable-media for 
openSUSE:Factory checked in at 2023-05-11 14:13:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-resumable-media (Old)
 and      /work/SRC/openSUSE:Factory/.python-google-resumable-media.new.1533 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-google-resumable-media"

Thu May 11 14:13:57 2023 rev:17 rq:1086489 version:2.5.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-google-resumable-media/python-google-resumable-media.changes
      2023-03-07 16:51:21.305907167 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-google-resumable-media.new.1533/python-google-resumable-media.changes
    2023-05-11 14:13:58.717507158 +0200
@@ -1,0 +2,7 @@
+Thu May 11 10:52:03 UTC 2023 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to 2.5.0
+  Features
+  * Add support to retry known connection errors (#375)
+
+-------------------------------------------------------------------

Old:
----
  google-resumable-media-2.4.1.tar.gz

New:
----
  google-resumable-media-2.5.0.tar.gz

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

Other differences:
------------------
++++++ python-google-resumable-media.spec ++++++
--- /var/tmp/diff_new_pack.XillQS/_old  2023-05-11 14:13:59.209509583 +0200
+++ /var/tmp/diff_new_pack.XillQS/_new  2023-05-11 14:13:59.213509602 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-google-resumable-media
-Version:        2.4.1
+Version:        2.5.0
 Release:        0
 Summary:        Utilities for Google Media Downloads and Resumable Uploads
 License:        Apache-2.0

++++++ google-resumable-media-2.4.1.tar.gz -> 
google-resumable-media-2.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/google-resumable-media-2.4.1/PKG-INFO 
new/google-resumable-media-2.5.0/PKG-INFO
--- old/google-resumable-media-2.4.1/PKG-INFO   2023-01-19 22:32:45.372634000 
+0100
+++ new/google-resumable-media-2.5.0/PKG-INFO   2023-04-24 21:02:52.186299300 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: google-resumable-media
-Version: 2.4.1
+Version: 2.5.0
 Summary: Utilities for Google Media Downloads and Resumable Uploads
 Home-page: https://github.com/googleapis/google-resumable-media-python
 Author: Google Cloud Platform
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-resumable-media-2.4.1/google/resumable_media/requests/_request_helpers.py
 
new/google-resumable-media-2.5.0/google/resumable_media/requests/_request_helpers.py
--- 
old/google-resumable-media-2.4.1/google/resumable_media/requests/_request_helpers.py
        2023-01-19 22:29:29.000000000 +0100
+++ 
new/google-resumable-media-2.5.0/google/resumable_media/requests/_request_helpers.py
        2023-04-24 21:00:19.000000000 +0200
@@ -17,6 +17,7 @@
 This utilities are explicitly catered to ``requests``-like transports.
 """
 
+import http.client
 import requests.exceptions
 import urllib3.exceptions  # type: ignore
 
@@ -35,10 +36,16 @@
 _DEFAULT_READ_TIMEOUT = 60
 
 _CONNECTION_ERROR_CLASSES = (
+    http.client.BadStatusLine,
+    http.client.IncompleteRead,
+    http.client.ResponseNotReady,
     requests.exceptions.ConnectionError,
     requests.exceptions.ChunkedEncodingError,
     requests.exceptions.Timeout,
+    urllib3.exceptions.PoolError,
     urllib3.exceptions.ProtocolError,
+    urllib3.exceptions.SSLError,
+    urllib3.exceptions.TimeoutError,
     ConnectionError,  # Python 3.x only, superclass of ConnectionResetError.
 )
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-resumable-media-2.4.1/google_resumable_media.egg-info/PKG-INFO 
new/google-resumable-media-2.5.0/google_resumable_media.egg-info/PKG-INFO
--- old/google-resumable-media-2.4.1/google_resumable_media.egg-info/PKG-INFO   
2023-01-19 22:32:45.000000000 +0100
+++ new/google-resumable-media-2.5.0/google_resumable_media.egg-info/PKG-INFO   
2023-04-24 21:02:52.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: google-resumable-media
-Version: 2.4.1
+Version: 2.5.0
 Summary: Utilities for Google Media Downloads and Resumable Uploads
 Home-page: https://github.com/googleapis/google-resumable-media-python
 Author: Google Cloud Platform
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/google-resumable-media-2.4.1/setup.py 
new/google-resumable-media-2.5.0/setup.py
--- old/google-resumable-media-2.4.1/setup.py   2023-01-19 22:29:29.000000000 
+0100
+++ new/google-resumable-media-2.5.0/setup.py   2023-04-24 21:00:19.000000000 
+0200
@@ -35,7 +35,7 @@
 
 setuptools.setup(
     name='google-resumable-media',
-    version = "2.4.1",
+    version = "2.5.0",
     description='Utilities for Google Media Downloads and Resumable Uploads',
     author='Google Cloud Platform',
     author_email='googleapis-publis...@google.com',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/google-resumable-media-2.4.1/tests/unit/requests/test__helpers.py 
new/google-resumable-media-2.5.0/tests/unit/requests/test__helpers.py
--- old/google-resumable-media-2.4.1/tests/unit/requests/test__helpers.py       
2023-01-19 22:29:29.000000000 +0100
+++ new/google-resumable-media-2.5.0/tests/unit/requests/test__helpers.py       
2023-04-24 21:00:19.000000000 +0200
@@ -165,14 +165,18 @@
 
     @mock.patch("time.sleep")
     @mock.patch("random.randint")
-    def test_success_with_retry_connection_error(self, randint_mock, 
sleep_mock):
-        randint_mock.side_effect = [125, 625, 375]
+    def test_retry_success_http_standard_lib_connection_errors(
+        self, randint_mock, sleep_mock
+    ):
+        randint_mock.side_effect = [125, 625, 500, 875, 375]
 
-        response = _make_response(http.client.NOT_FOUND)
+        status_code = int(http.client.OK)
+        response = _make_response(status_code)
         responses = [
-            ConnectionResetError,  # Subclass of ConnectionError
-            urllib3.exceptions.ConnectionError,
-            requests.exceptions.ConnectionError,
+            http.client.BadStatusLine(""),
+            http.client.IncompleteRead(""),
+            http.client.ResponseNotReady,
+            ConnectionError,
             response,
         ]
         func = mock.Mock(side_effect=responses, spec=[])
@@ -183,28 +187,29 @@
         )
 
         assert ret_val == responses[-1]
-
-        assert func.call_count == 4
-        assert func.mock_calls == [mock.call()] * 4
-
-        assert randint_mock.call_count == 3
-        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 3
-
-        assert sleep_mock.call_count == 3
+        assert func.call_count == 5
+        assert func.mock_calls == [mock.call()] * 5
+        assert randint_mock.call_count == 4
+        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 4
+        assert sleep_mock.call_count == 4
         sleep_mock.assert_any_call(1.125)
         sleep_mock.assert_any_call(2.625)
-        sleep_mock.assert_any_call(4.375)
+        sleep_mock.assert_any_call(4.500)
+        sleep_mock.assert_any_call(8.875)
 
     @mock.patch("time.sleep")
     @mock.patch("random.randint")
-    def test_success_with_retry_chunked_encoding_error(self, randint_mock, 
sleep_mock):
-        randint_mock.side_effect = [125, 625, 375]
+    def test_retry_success_requests_lib_connection_errors(
+        self, randint_mock, sleep_mock
+    ):
+        randint_mock.side_effect = [125, 625, 500, 875]
 
         status_code = int(http.client.OK)
         response = _make_response(status_code)
         responses = [
+            requests.exceptions.ConnectionError,
             requests.exceptions.ChunkedEncodingError,
-            requests.exceptions.ChunkedEncodingError,
+            requests.exceptions.Timeout,
             response,
         ]
         func = mock.Mock(side_effect=responses, spec=[])
@@ -215,27 +220,27 @@
         )
 
         assert ret_val == responses[-1]
-
-        assert func.call_count == 3
-        assert func.mock_calls == [mock.call()] * 3
-
-        assert randint_mock.call_count == 2
-        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 2
-
-        assert sleep_mock.call_count == 2
+        assert func.call_count == 4
+        assert func.mock_calls == [mock.call()] * 4
+        assert randint_mock.call_count == 3
+        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 3
+        assert sleep_mock.call_count == 3
         sleep_mock.assert_any_call(1.125)
         sleep_mock.assert_any_call(2.625)
+        sleep_mock.assert_any_call(4.500)
 
     @mock.patch("time.sleep")
     @mock.patch("random.randint")
-    def test_success_with_retry_client_timeout(self, randint_mock, sleep_mock):
-        randint_mock.side_effect = [125, 625, 375]
+    def test_retry_success_urllib3_connection_errors(self, randint_mock, 
sleep_mock):
+        randint_mock.side_effect = [125, 625, 500, 875, 375]
 
         status_code = int(http.client.OK)
         response = _make_response(status_code)
         responses = [
-            requests.exceptions.Timeout,
-            requests.exceptions.Timeout,
+            urllib3.exceptions.PoolError(None, ""),
+            urllib3.exceptions.ProtocolError,
+            urllib3.exceptions.SSLError,
+            urllib3.exceptions.TimeoutError,
             response,
         ]
         func = mock.Mock(side_effect=responses, spec=[])
@@ -246,16 +251,15 @@
         )
 
         assert ret_val == responses[-1]
-
-        assert func.call_count == 3
-        assert func.mock_calls == [mock.call()] * 3
-
-        assert randint_mock.call_count == 2
-        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 2
-
-        assert sleep_mock.call_count == 2
+        assert func.call_count == 5
+        assert func.mock_calls == [mock.call()] * 5
+        assert randint_mock.call_count == 4
+        assert randint_mock.mock_calls == [mock.call(0, 1000)] * 4
+        assert sleep_mock.call_count == 4
         sleep_mock.assert_any_call(1.125)
         sleep_mock.assert_any_call(2.625)
+        sleep_mock.assert_any_call(4.500)
+        sleep_mock.assert_any_call(8.875)
 
     @mock.patch("time.sleep")
     @mock.patch("random.randint")

Reply via email to