Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-google-auth-oauthlib for
openSUSE:Factory checked in at 2023-01-05 15:01:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-google-auth-oauthlib (Old)
and /work/SRC/openSUSE:Factory/.python-google-auth-oauthlib.new.1563 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-auth-oauthlib"
Thu Jan 5 15:01:05 2023 rev:12 rq:1056090 version:0.8.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-google-auth-oauthlib/python-google-auth-oauthlib.changes
2022-11-09 12:57:08.660249452 +0100
+++
/work/SRC/openSUSE:Factory/.python-google-auth-oauthlib.new.1563/python-google-auth-oauthlib.changes
2023-01-05 15:01:26.097204374 +0100
@@ -1,0 +2,7 @@
+Wed Jan 4 22:20:07 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to v0.8.0:
+ * Add support for Python 3.11
+ * Introduce granted scopes to credentials
+
+-------------------------------------------------------------------
Old:
----
google-auth-oauthlib-0.7.1.tar.gz
New:
----
google-auth-oauthlib-0.8.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-google-auth-oauthlib.spec ++++++
--- /var/tmp/diff_new_pack.6IP4JX/_old 2023-01-05 15:01:26.641207242 +0100
+++ /var/tmp/diff_new_pack.6IP4JX/_new 2023-01-05 15:01:26.645207263 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-google-auth-oauthlib
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,11 +19,11 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without python2
Name: python-google-auth-oauthlib
-Version: 0.7.1
+Version: 0.8.0
Release: 0
Summary: Google authentication library
License: Apache-2.0
-URL:
https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
+URL:
https://github.com/googleapis/google-auth-library-python-oauthlib
Source:
https://files.pythonhosted.org/packages/source/g/google-auth-oauthlib/google-auth-oauthlib-%{version}.tar.gz
# https://github.com/googleapis/google-auth-library-python-oauthlib/issues/207
Patch0: python-google-auth-oauthlib-no-mock.patch
++++++ google-auth-oauthlib-0.7.1.tar.gz -> google-auth-oauthlib-0.8.0.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/google-auth-oauthlib-0.7.1/PKG-INFO
new/google-auth-oauthlib-0.8.0/PKG-INFO
--- old/google-auth-oauthlib-0.7.1/PKG-INFO 2022-11-03 18:30:27.471600500
+0100
+++ new/google-auth-oauthlib-0.8.0/PKG-INFO 2022-12-12 22:57:51.401111100
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: google-auth-oauthlib
-Version: 0.7.1
+Version: 0.8.0
Summary: Google Authentication Library
Home-page:
https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
Author: Google Cloud Platform
@@ -13,6 +13,7 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-auth-oauthlib-0.7.1/google_auth_oauthlib/flow.py
new/google-auth-oauthlib-0.8.0/google_auth_oauthlib/flow.py
--- old/google-auth-oauthlib-0.7.1/google_auth_oauthlib/flow.py 2022-11-03
18:27:07.000000000 +0100
+++ new/google-auth-oauthlib-0.8.0/google_auth_oauthlib/flow.py 2022-12-12
22:54:41.000000000 +0100
@@ -41,7 +41,7 @@
print(profile_info)
# {'name': '...', 'email': '...', ...}
-.. _requests-oauthlib: http://requests-oauthlib.readthedocs.io/en/stable/
+.. _requests-oauthlib: http://requests-oauthlib.readthedocs.io/en/latest/
.. _OAuth 2.0 Authorization Flow:
https://tools.ietf.org/html/rfc6749#section-1.2
.. _Using OAuth 2.0 to Access Google APIs:
@@ -408,8 +408,9 @@
code into the application. The code is then exchanged for a token.
Args:
- authorization_prompt_message (str): The message to display to tell
- the user to navigate to the authorization URL.
+ authorization_prompt_message (str | None): The message to display
to tell
+ the user to navigate to the authorization URL. If None or
empty,
+ don't display anything.
authorization_code_message (str): The message to display when
prompting the user for the authorization code.
kwargs: Additional keyword arguments passed through to
@@ -432,7 +433,8 @@
auth_url, _ = self.authorization_url(**kwargs)
- print(authorization_prompt_message.format(url=auth_url))
+ if authorization_prompt_message:
+ print(authorization_prompt_message.format(url=auth_url))
code = input(authorization_code_message)
@@ -471,8 +473,9 @@
which means that the redirect server will listen
on the ip address specified in the host parameter.
port (int): The port for the local redirect server.
- authorization_prompt_message (str): The message to display to tell
- the user to navigate to the authorization URL.
+ authorization_prompt_message (str | None): The message to display
to tell
+ the user to navigate to the authorization URL. If None or
empty,
+ don't display anything.
success_message (str): The message to display in the web browser
the authorization flow is complete.
open_browser (bool): Whether or not to open the authorization URL
@@ -506,7 +509,8 @@
if open_browser:
webbrowser.open(auth_url, new=1, autoraise=True)
- print(authorization_prompt_message.format(url=auth_url))
+ if authorization_prompt_message:
+ print(authorization_prompt_message.format(url=auth_url))
local_server.timeout = timeout_seconds
local_server.handle_request()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-auth-oauthlib-0.7.1/google_auth_oauthlib/helpers.py
new/google-auth-oauthlib-0.8.0/google_auth_oauthlib/helpers.py
--- old/google-auth-oauthlib-0.7.1/google_auth_oauthlib/helpers.py
2022-11-03 18:27:07.000000000 +0100
+++ new/google-auth-oauthlib-0.8.0/google_auth_oauthlib/helpers.py
2022-12-12 22:54:41.000000000 +0100
@@ -18,7 +18,7 @@
Typically, you'll want to use the higher-level helpers in
:mod:`google_auth_oauthlib.flow`.
-.. _requests-oauthlib: http://requests-oauthlib.readthedocs.io/en/stable/
+.. _requests-oauthlib: http://requests-oauthlib.readthedocs.io/en/latest/
"""
import datetime
@@ -145,6 +145,7 @@
client_id=client_config.get("client_id"),
client_secret=client_config.get("client_secret"),
scopes=session.scope,
+ granted_scopes=session.token.get("scope"),
)
credentials.expiry =
datetime.datetime.utcfromtimestamp(session.token["expires_at"])
return credentials
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/PKG-INFO
new/google-auth-oauthlib-0.8.0/google_auth_oauthlib.egg-info/PKG-INFO
--- old/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/PKG-INFO
2022-11-03 18:30:27.000000000 +0100
+++ new/google-auth-oauthlib-0.8.0/google_auth_oauthlib.egg-info/PKG-INFO
2022-12-12 22:57:51.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: google-auth-oauthlib
-Version: 0.7.1
+Version: 0.8.0
Summary: Google Authentication Library
Home-page:
https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib
Author: Google Cloud Platform
@@ -13,6 +13,7 @@
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/requires.txt
new/google-auth-oauthlib-0.8.0/google_auth_oauthlib.egg-info/requires.txt
--- old/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/requires.txt
2022-11-03 18:30:27.000000000 +0100
+++ new/google-auth-oauthlib-0.8.0/google_auth_oauthlib.egg-info/requires.txt
2022-12-12 22:57:51.000000000 +0100
@@ -1,4 +1,4 @@
-google-auth>=2.14.0
+google-auth>=2.15.0
requests-oauthlib>=0.7.0
[tool]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/google-auth-oauthlib-0.7.1/setup.py
new/google-auth-oauthlib-0.8.0/setup.py
--- old/google-auth-oauthlib-0.7.1/setup.py 2022-11-03 18:27:07.000000000
+0100
+++ new/google-auth-oauthlib-0.8.0/setup.py 2022-12-12 22:54:41.000000000
+0100
@@ -20,14 +20,14 @@
TOOL_DEPENDENCIES = "click>=6.0.0"
-DEPENDENCIES = ("google-auth>=2.14.0", "requests-oauthlib>=0.7.0")
+DEPENDENCIES = ("google-auth>=2.15.0", "requests-oauthlib>=0.7.0")
with io.open("README.rst", "r") as fh:
long_description = fh.read()
-version = "0.7.1"
+version = "0.8.0"
setup(
name="google-auth-oauthlib",
@@ -55,6 +55,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.11",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py
new/google-auth-oauthlib-0.8.0/tests/unit/test_helpers.py
--- old/google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py 2022-11-03
18:27:07.000000000 +0100
+++ new/google-auth-oauthlib-0.8.0/tests/unit/test_helpers.py 2022-12-12
22:54:41.000000000 +0100
@@ -96,6 +96,31 @@
assert credentials._client_secret ==
CLIENT_SECRETS_INFO["web"]["client_secret"]
assert credentials._token_uri == CLIENT_SECRETS_INFO["web"]["token_uri"]
assert credentials.scopes == session.scope
+ assert credentials.granted_scopes is None
+
+
+def test_credentials_from_session_granted_scopes(session):
+ granted_scopes = ["scope1", "scope2"]
+ session.token = {
+ "access_token": mock.sentinel.access_token,
+ "refresh_token": mock.sentinel.refresh_token,
+ "id_token": mock.sentinel.id_token,
+ "expires_at": 643969200.0,
+ "scope": granted_scopes,
+ }
+
+ credentials = helpers.credentials_from_session(session,
CLIENT_SECRETS_INFO["web"])
+
+ assert isinstance(credentials, google.oauth2.credentials.Credentials)
+ assert credentials.token == mock.sentinel.access_token
+ assert credentials.expiry == datetime.datetime(1990, 5, 29, 8, 20, 0)
+ assert credentials._refresh_token == mock.sentinel.refresh_token
+ assert credentials.id_token == mock.sentinel.id_token
+ assert credentials._client_id == CLIENT_SECRETS_INFO["web"]["client_id"]
+ assert credentials._client_secret ==
CLIENT_SECRETS_INFO["web"]["client_secret"]
+ assert credentials._token_uri == CLIENT_SECRETS_INFO["web"]["token_uri"]
+ assert credentials.scopes == session.scope
+ assert credentials.granted_scopes == granted_scopes
def test_credentials_from_session_3pi(session):