Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-google-api-python-client for 
openSUSE:Factory checked in at 2022-04-16 00:14:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-api-python-client (Old)
 and      /work/SRC/openSUSE:Factory/.python-google-api-python-client.new.1941 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-google-api-python-client"

Sat Apr 16 00:14:38 2022 rev:20 rq:970293 version:2.44.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-google-api-python-client/python-google-api-python-client.changes
  2021-12-02 22:31:07.946469742 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-google-api-python-client.new.1941/python-google-api-python-client.changes
        2022-04-16 00:15:01.797711647 +0200
@@ -1,0 +2,12 @@
+Thu Apr 14 19:30:07 UTC 2022 - Ben Greiner <c...@bnavigator.de>
+
+- Update to 2.44.0
+  * * : update the api
+  * deps: require google-api-core>=1.31.5, >=2.3.2 (#1715) (8308e5d)
+  * remove adsense.v1.4.json (#1616) (5d3e588)
+  * expose library version at googleapiclient.version (#1623) (83db1d7)
+  * deps: require uritemplate 3.0.1 (#1629) (1c4cfdb)
+- Do not test deprecated oauth2client anymore:
+  * add opensuse-remove-oauth2client-tests.patch
+
+-------------------------------------------------------------------

Old:
----
  google-api-python-client-2.31.0.tar.gz

New:
----
  google-api-python-client-2.44.0.tar.gz
  opensuse-remove-oauth2client-tests.patch

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

Other differences:
------------------
++++++ python-google-api-python-client.spec ++++++
--- /var/tmp/diff_new_pack.ztEXXF/_old  2022-04-16 00:15:02.705712859 +0200
+++ /var/tmp/diff_new_pack.ztEXXF/_new  2022-04-16 00:15:02.717712875 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-google-api-python-client
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,36 +16,35 @@
 #
 
 
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%{?!python_module:%define python_module() python3-%{**}}
 %define skip_python2 1
-%define skip_python36 1
 Name:           python-google-api-python-client
-Version:        2.31.0
+Version:        2.44.0
 Release:        0
 Summary:        Google APIs Python Client
 License:        Apache-2.0
 URL:            https://github.com/google/google-api-python-client
 Source:         
https://files.pythonhosted.org/packages/source/g/google-api-python-client/google-api-python-client-%{version}.tar.gz
-BuildRequires:  %{python_module google-api-core >= 1.21.0}
+# PATCH-FIX-OPENSUSE opensuse-remove-oauth2client-tests.patch -- upstream 
wants to support and test deprecated oauth2client indefinitely, but
+# the distro has to remove it at some point
+Patch0:         opensuse-remove-oauth2client-tests.patch
+BuildRequires:  %{python_module google-api-core >= 1.31.5}
 BuildRequires:  %{python_module google-auth >= 1.16.0}
 BuildRequires:  %{python_module google-auth-httplib2 >= 0.1.0}
 BuildRequires:  %{python_module httplib2 >= 0.15.0}
 BuildRequires:  %{python_module mock}
-BuildRequires:  %{python_module oauth2client}
 BuildRequires:  %{python_module pandas}
 BuildRequires:  %{python_module parameterized}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
-BuildRequires:  %{python_module six >= 1.13.0}
-BuildRequires:  %{python_module uritemplate  >= 3.0.0}
+BuildRequires:  %{python_module uritemplate  >= 3.0.1}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
-Requires:       python-google-api-core >= 1.21.0
+Requires:       python-google-api-core >= 1.31.5
 Requires:       python-google-auth >= 1.16.0
 Requires:       python-google-auth-httplib2 >= 0.1.0
 Requires:       python-httplib2 >= 0.15.0
-Requires:       python-six >= 1.13.0
-Requires:       python-uritemplate >= 3.0.0
+Requires:       python-uritemplate >= 3.0.1
 # Package renamed in SLE 12, do not remove Provides, Obsolete directives
 # until after SLE 12 EOL
 Provides:       google-api-python-client = %{version}
@@ -57,7 +56,7 @@
 Google APIs Client Library for Python
 
 %prep
-%setup -q -n google-api-python-client-%{version}
+%autosetup -p1 -n google-api-python-client-%{version}
 
 %build
 %python_build
@@ -67,14 +66,18 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-# DiscoveryFromDocument::test_api_endpoint_override_from_client_options and
-# DiscoveryFromDocument::test_api_endpoint_override_from_client_options_dict 
fail with "server unavailable"
 # DiscoveryErrors::test_credentials_and_credentials_file_mutually_exclusive 
fails with "socket.gaierror: [Errno -3] Temporary failure in name resolution"
-%pytest --ignore=samples -k "not 
(test_api_endpoint_override_from_client_options and Document) and not 
test_credentials_and_credentials_file_mutually_exclusive"
+donttest="test_credentials_and_credentials_file_mutually_exclusive"
+# don't test deprecated oaut2client usage
+donttest="$donttest or TestAuthWithOAuth2Client or 
test_oauth2client_crendentials"
+# test_http.py uses mocked Credentials class and API from deprecated 
oauth2client
+%pytest --ignore=samples --ignore tests/test_http.py -k "not ($donttest)"
 
 %files %{python_files}
 %doc README.md
 %license LICENSE
-%{python_sitelib}/*
+%{python_sitelib}/apiclient
+%{python_sitelib}/googleapiclient
+%{python_sitelib}/google_api_python_client-%{version}*-info
 
 %changelog

++++++ google-api-python-client-2.31.0.tar.gz -> 
google-api-python-client-2.44.0.tar.gz ++++++
/work/SRC/openSUSE:Factory/python-google-api-python-client/google-api-python-client-2.31.0.tar.gz
 
/work/SRC/openSUSE:Factory/.python-google-api-python-client.new.1941/google-api-python-client-2.44.0.tar.gz
 differ: char 5, line 1

++++++ opensuse-remove-oauth2client-tests.patch ++++++
Index: google-api-python-client-2.44.0/tests/test__auth.py
===================================================================
--- google-api-python-client-2.44.0.orig/tests/test__auth.py
+++ google-api-python-client-2.44.0/tests/test__auth.py
@@ -18,7 +18,6 @@ import mock
 import google.auth.credentials
 import google_auth_httplib2
 import httplib2
-import oauth2client.client
 
 from googleapiclient import _auth
 
@@ -26,11 +25,9 @@ from googleapiclient import _auth
 class TestAuthWithGoogleAuth(unittest.TestCase):
     def setUp(self):
         _auth.HAS_GOOGLE_AUTH = True
-        _auth.HAS_OAUTH2CLIENT = False
 
     def tearDown(self):
         _auth.HAS_GOOGLE_AUTH = True
-        _auth.HAS_OAUTH2CLIENT = True
 
     def test_default_credentials(self):
         with mock.patch("google.auth.default", autospec=True) as default:
@@ -103,75 +100,12 @@ class TestAuthWithGoogleAuth(unittest.Te
         self.assertGreater(authorized_http.http.timeout, 0)
 
 
-class TestAuthWithOAuth2Client(unittest.TestCase):
-    def setUp(self):
-        _auth.HAS_GOOGLE_AUTH = False
-        _auth.HAS_OAUTH2CLIENT = True
-
-    def tearDown(self):
-        _auth.HAS_GOOGLE_AUTH = True
-        _auth.HAS_OAUTH2CLIENT = True
-
-    def test_default_credentials(self):
-        default_patch = mock.patch(
-            "oauth2client.client.GoogleCredentials.get_application_default"
-        )
-
-        with default_patch as default:
-            default.return_value = mock.sentinel.credentials
-
-            credentials = _auth.default_credentials()
-
-            self.assertEqual(credentials, mock.sentinel.credentials)
-
-    def test_credentials_from_file(self):
-        with self.assertRaises(EnvironmentError):
-            credentials = _auth.credentials_from_file("credentials.json")
-
-    def test_default_credentials_with_scopes_and_quota_project(self):
-        with self.assertRaises(EnvironmentError):
-            credentials = _auth.default_credentials(
-                scopes=["1", "2"], quota_project_id="my-project"
-            )
-
-    def test_with_scopes_non_scoped(self):
-        credentials = mock.Mock(spec=oauth2client.client.Credentials)
-
-        returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
-
-        self.assertEqual(credentials, returned)
-
-    def test_with_scopes_scoped(self):
-        credentials = mock.Mock(spec=oauth2client.client.GoogleCredentials)
-        credentials.create_scoped_required.return_value = True
-
-        returned = _auth.with_scopes(credentials, mock.sentinel.scopes)
-
-        self.assertNotEqual(credentials, returned)
-        self.assertEqual(returned, credentials.create_scoped.return_value)
-        credentials.create_scoped.assert_called_once_with(mock.sentinel.scopes)
-
-    def test_authorized_http(self):
-        credentials = mock.Mock(spec=oauth2client.client.Credentials)
-
-        authorized_http = _auth.authorized_http(credentials)
-
-        http = credentials.authorize.call_args[0][0]
-
-        self.assertEqual(authorized_http, credentials.authorize.return_value)
-        self.assertIsInstance(http, httplib2.Http)
-        self.assertIsInstance(http.timeout, int)
-        self.assertGreater(http.timeout, 0)
-
-
 class TestAuthWithoutAuth(unittest.TestCase):
     def setUp(self):
         _auth.HAS_GOOGLE_AUTH = False
-        _auth.HAS_OAUTH2CLIENT = False
 
     def tearDown(self):
         _auth.HAS_GOOGLE_AUTH = True
-        _auth.HAS_OAUTH2CLIENT = True
 
     def test_default_credentials(self):
         with self.assertRaises(EnvironmentError):
Index: google-api-python-client-2.44.0/tests/test_discovery.py
===================================================================
--- google-api-python-client-2.44.0.orig/tests/test_discovery.py
+++ google-api-python-client-2.44.0/tests/test_discovery.py
@@ -82,8 +82,6 @@ from googleapiclient.http import MediaUp
 from googleapiclient.http import tunnel_patch
 from googleapiclient.model import JsonModel
 from googleapiclient.schema import Schemas
-from oauth2client import GOOGLE_TOKEN_URI
-from oauth2client.client import OAuth2Credentials, GoogleCredentials
 
 
 from googleapiclient import _helpers as util
@@ -1420,14 +1418,6 @@ class Discovery(unittest.TestCase):
         self.assertTrue(getattr(plus, "activities"))
         self.assertTrue(getattr(plus, "people"))
 
-    def test_oauth2client_credentials(self):
-        credentials = mock.Mock(spec=GoogleCredentials)
-        credentials.create_scoped_required.return_value = False
-
-        discovery = read_datafile("plus.json")
-        service = build_from_document(discovery, credentials=credentials)
-        self.assertEqual(service._http, credentials.authorize.return_value)
-
     def test_google_auth_credentials(self):
         credentials = mock.Mock(spec=google.auth.credentials.Credentials)
         discovery = read_datafile("plus.json")
@@ -2088,36 +2078,6 @@ class Discovery(unittest.TestCase):
         http.request = wrapped_request
         return http
 
-    def _dummy_token(self):
-        access_token = "foo"
-        client_id = "some_client_id"
-        client_secret = "cOuDdkfjxxnv+"
-        refresh_token = "1/0/a.df219fjls0"
-        token_expiry = datetime.datetime.utcnow()
-        user_agent = "refresh_checker/1.0"
-        return OAuth2Credentials(
-            access_token,
-            client_id,
-            client_secret,
-            refresh_token,
-            token_expiry,
-            GOOGLE_TOKEN_URI,
-            user_agent,
-        )
-
-    def test_pickle_with_credentials(self):
-        credentials = self._dummy_token()
-        http = self._dummy_zoo_request()
-        http = credentials.authorize(http)
-        self.assertTrue(hasattr(http.request, "credentials"))
-
-        zoo = build("zoo", "v1", http=http, static_discovery=False)
-        pickled_zoo = pickle.dumps(zoo)
-        new_zoo = pickle.loads(pickled_zoo)
-        self.assertEqual(sorted(zoo.__dict__.keys()), 
sorted(new_zoo.__dict__.keys()))
-        new_http = new_zoo._http
-        self.assertFalse(hasattr(new_http.request, "credentials"))
-
     def test_resumable_media_upload_no_content(self):
         self.http = HttpMock(datafile("zoo.json"), {"status": "200"})
         zoo = build("zoo", "v1", http=self.http, static_discovery=False)

Reply via email to