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 2022-11-09 12:56:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-google-auth-oauthlib (Old) and /work/SRC/openSUSE:Factory/.python-google-auth-oauthlib.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-auth-oauthlib" Wed Nov 9 12:56:47 2022 rev:11 rq:1034454 version:0.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-google-auth-oauthlib/python-google-auth-oauthlib.changes 2022-10-12 18:27:34.434070571 +0200 +++ /work/SRC/openSUSE:Factory/.python-google-auth-oauthlib.new.1597/python-google-auth-oauthlib.changes 2022-11-09 12:57:08.660249452 +0100 @@ -1,0 +2,15 @@ +Mon Nov 7 17:14:38 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- Update to 0.7.1 + * Include updates to properties from Google Auth lib (#249) +- from version 0.7.0 + * **setup.py:** increase required google-auth version to >= 2.13.0 (f8a15f7) +- from version 0.6.0 + * Update to allow for 3PI credentials (#240) + * Add timeout to run_local_server when waiting for response (#245) + * Update readme to point to current docs url (#241) +- Refresh patches for new version + * python-google-auth-oauthlib-no-mock.patch +- Update Requires from setup.py + +------------------------------------------------------------------- Old: ---- google-auth-oauthlib-0.5.3.tar.gz New: ---- google-auth-oauthlib-0.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-google-auth-oauthlib.spec ++++++ --- /var/tmp/diff_new_pack.UzI0vq/_old 2022-11-09 12:57:09.128252090 +0100 +++ /var/tmp/diff_new_pack.UzI0vq/_new 2022-11-09 12:57:09.132252112 +0100 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-google-auth-oauthlib -Version: 0.5.3 +Version: 0.7.1 Release: 0 Summary: Google authentication library License: Apache-2.0 @@ -30,7 +30,7 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-google-auth +Requires: python-google-auth >= 2.14.0 Requires: python-requests-oauthlib >= 0.7.0 Requires: python-six Requires(post): update-alternatives ++++++ google-auth-oauthlib-0.5.3.tar.gz -> google-auth-oauthlib-0.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/PKG-INFO new/google-auth-oauthlib-0.7.1/PKG-INFO --- old/google-auth-oauthlib-0.5.3/PKG-INFO 2022-09-14 23:36:20.374747800 +0200 +++ new/google-auth-oauthlib-0.7.1/PKG-INFO 2022-11-03 18:30:27.471600500 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-auth-oauthlib -Version: 0.5.3 +Version: 0.7.1 Summary: Google Authentication Library Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib Author: Google Cloud Platform @@ -33,9 +33,7 @@ This library provides `oauthlib`_ integration with `google-auth`_. .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=main - :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib -.. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest - :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ + :target: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg :target: https://pypi.python.org/pypi/google-auth-oauthlib @@ -54,9 +52,9 @@ Documentation ------------- -The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. +The latest documentation is available at `google-auth-oauthlib.googleapis.dev`_. -.. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ +.. _google-auth-oauthlib.googleapis.dev: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html Supported Python Versions ------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/README.rst new/google-auth-oauthlib-0.7.1/README.rst --- old/google-auth-oauthlib-0.5.3/README.rst 2022-09-14 23:33:31.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/README.rst 2022-11-03 18:27:07.000000000 +0100 @@ -6,9 +6,7 @@ This library provides `oauthlib`_ integration with `google-auth`_. .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=main - :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib -.. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest - :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ + :target: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg :target: https://pypi.python.org/pypi/google-auth-oauthlib @@ -27,9 +25,9 @@ Documentation ------------- -The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. +The latest documentation is available at `google-auth-oauthlib.googleapis.dev`_. -.. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ +.. _google-auth-oauthlib.googleapis.dev: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html Supported Python Versions ------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/google_auth_oauthlib/flow.py new/google-auth-oauthlib-0.7.1/google_auth_oauthlib/flow.py --- old/google-auth-oauthlib-0.5.3/google_auth_oauthlib/flow.py 2022-09-14 23:33:31.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/google_auth_oauthlib/flow.py 2022-11-03 18:27:07.000000000 +0100 @@ -449,6 +449,7 @@ success_message=_DEFAULT_WEB_SUCCESS_MESSAGE, open_browser=True, redirect_uri_trailing_slash=True, + timeout_seconds=None, **kwargs ): """Run the flow using the server strategy. @@ -478,6 +479,10 @@ in the user's browser. redirect_uri_trailing_slash (bool): whether or not to add trailing slash when constructing the redirect_uri. Default value is True. + timeout_seconds (int): It will raise an error after the timeout timing + if there are no credentials response. The value is in seconds. + When set to None there is no timeout. + Default value is None. kwargs: Additional keyword arguments passed through to :meth:`authorization_url`. @@ -503,6 +508,7 @@ print(authorization_prompt_message.format(url=auth_url)) + local_server.timeout = timeout_seconds local_server.handle_request() # Note: using https here because oauthlib is very picky that diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/google_auth_oauthlib/helpers.py new/google-auth-oauthlib-0.7.1/google_auth_oauthlib/helpers.py --- old/google-auth-oauthlib-0.5.3/google_auth_oauthlib/helpers.py 2022-09-14 23:33:31.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/google_auth_oauthlib/helpers.py 2022-11-03 18:27:07.000000000 +0100 @@ -24,6 +24,7 @@ import datetime import json +from google.auth import external_account_authorized_user import google.oauth2.credentials import requests_oauthlib @@ -125,14 +126,25 @@ "There is no access token for this session, did you call " "fetch_token?" ) - credentials = google.oauth2.credentials.Credentials( - session.token["access_token"], - refresh_token=session.token.get("refresh_token"), - id_token=session.token.get("id_token"), - token_uri=client_config.get("token_uri"), - client_id=client_config.get("client_id"), - client_secret=client_config.get("client_secret"), - scopes=session.scope, - ) + if "3pi" in client_config: + credentials = external_account_authorized_user.Credentials( + token=session.token["access_token"], + refresh_token=session.token.get("refresh_token"), + token_url=client_config.get("token_uri"), + client_id=client_config.get("client_id"), + client_secret=client_config.get("client_secret"), + token_info_url=client_config.get("token_info_url"), + scopes=session.scope, + ) + else: + credentials = google.oauth2.credentials.Credentials( + session.token["access_token"], + refresh_token=session.token.get("refresh_token"), + id_token=session.token.get("id_token"), + token_uri=client_config.get("token_uri"), + client_id=client_config.get("client_id"), + client_secret=client_config.get("client_secret"), + scopes=session.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.5.3/google_auth_oauthlib.egg-info/PKG-INFO new/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/PKG-INFO --- old/google-auth-oauthlib-0.5.3/google_auth_oauthlib.egg-info/PKG-INFO 2022-09-14 23:36:20.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/PKG-INFO 2022-11-03 18:30:27.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: google-auth-oauthlib -Version: 0.5.3 +Version: 0.7.1 Summary: Google Authentication Library Home-page: https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib Author: Google Cloud Platform @@ -33,9 +33,7 @@ This library provides `oauthlib`_ integration with `google-auth`_. .. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=main - :target: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib -.. |docs| image:: https://readthedocs.org/projects/google-auth-oauthlib/badge/?version=latest - :target: https://google-auth-oauthlib.readthedocs.io/en/latest/ + :target: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg :target: https://pypi.python.org/pypi/google-auth-oauthlib @@ -54,9 +52,9 @@ Documentation ------------- -The latest documentation is available at `google-auth-oauthlib.readthedocs.io`_. +The latest documentation is available at `google-auth-oauthlib.googleapis.dev`_. -.. _google-auth-oauthlib.readthedocs.io: http://google-auth-oauthlib.readthedocs.io/ +.. _google-auth-oauthlib.googleapis.dev: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html Supported Python Versions ------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/google_auth_oauthlib.egg-info/requires.txt new/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/requires.txt --- old/google-auth-oauthlib-0.5.3/google_auth_oauthlib.egg-info/requires.txt 2022-09-14 23:36:20.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/google_auth_oauthlib.egg-info/requires.txt 2022-11-03 18:30:27.000000000 +0100 @@ -1,4 +1,4 @@ -google-auth>=1.0.0 +google-auth>=2.14.0 requests-oauthlib>=0.7.0 [tool] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/setup.py new/google-auth-oauthlib-0.7.1/setup.py --- old/google-auth-oauthlib-0.5.3/setup.py 2022-09-14 23:33:31.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/setup.py 2022-11-03 18:27:07.000000000 +0100 @@ -20,14 +20,14 @@ TOOL_DEPENDENCIES = "click>=6.0.0" -DEPENDENCIES = ("google-auth>=1.0.0", "requests-oauthlib>=0.7.0") +DEPENDENCIES = ("google-auth>=2.14.0", "requests-oauthlib>=0.7.0") with io.open("README.rst", "r") as fh: long_description = fh.read() -version = "0.5.3" +version = "0.7.1" setup( name="google-auth-oauthlib", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google-auth-oauthlib-0.5.3/tests/unit/test_helpers.py new/google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py --- old/google-auth-oauthlib-0.5.3/tests/unit/test_helpers.py 2022-09-14 23:33:31.000000000 +0200 +++ new/google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py 2022-11-03 18:27:07.000000000 +0100 @@ -19,6 +19,8 @@ import mock import pytest +from google.auth import external_account_authorized_user +import google.oauth2.credentials from google_auth_oauthlib import helpers DATA_DIR = os.path.join(os.path.dirname(__file__), "data") @@ -85,6 +87,7 @@ 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 @@ -92,6 +95,35 @@ 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 + + +def test_credentials_from_session_3pi(session): + session.token = { + "access_token": mock.sentinel.access_token, + "refresh_token": mock.sentinel.refresh_token, + "id_token": mock.sentinel.id_token, + "expires_at": 643969200.0, + } + + client_secrets_info = CLIENT_SECRETS_INFO["web"].copy() + client_secrets_info["3pi"] = True + client_secrets_info[ + "token_info_url" + ] = "https://accounts.google.com/o/oauth2/introspect" + credentials = helpers.credentials_from_session(session, client_secrets_info) + + assert isinstance(credentials, external_account_authorized_user.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._client_id == CLIENT_SECRETS_INFO["web"]["client_id"] + assert credentials._client_secret == CLIENT_SECRETS_INFO["web"]["client_secret"] + assert credentials._token_url == CLIENT_SECRETS_INFO["web"]["token_uri"] + assert ( + credentials._token_info_url == "https://accounts.google.com/o/oauth2/introspect" + ) + assert credentials.scopes == session.scope def test_bad_credentials(session): ++++++ python-google-auth-oauthlib-no-mock.patch ++++++ --- /var/tmp/diff_new_pack.UzI0vq/_old 2022-11-09 12:57:09.212252563 +0100 +++ /var/tmp/diff_new_pack.UzI0vq/_new 2022-11-09 12:57:09.216252587 +0100 @@ -1,7 +1,7 @@ -diff -upr google-auth-oauthlib-0.5.1.orig/tests/unit/test_flow.py google-auth-oauthlib-0.5.1/tests/unit/test_flow.py ---- google-auth-oauthlib-0.5.1.orig/tests/unit/test_flow.py 2022-06-08 13:49:08.899236362 +0200 -+++ google-auth-oauthlib-0.5.1/tests/unit/test_flow.py 2022-06-08 13:49:08.903236386 +0200 -@@ -21,7 +21,7 @@ import re +diff -Nru google-auth-oauthlib-0.7.1.orig/tests/unit/test_flow.py google-auth-oauthlib-0.7.1/tests/unit/test_flow.py +--- google-auth-oauthlib-0.7.1.orig/tests/unit/test_flow.py 2022-11-03 18:27:07.000000000 +0100 ++++ google-auth-oauthlib-0.7.1/tests/unit/test_flow.py 2022-11-07 18:14:12.871489341 +0100 +@@ -21,7 +21,7 @@ import random import socket @@ -10,10 +10,10 @@ import pytest import requests import urllib -diff -upr google-auth-oauthlib-0.5.1.orig/tests/unit/test_helpers.py google-auth-oauthlib-0.5.1/tests/unit/test_helpers.py ---- google-auth-oauthlib-0.5.1.orig/tests/unit/test_helpers.py 2022-06-08 13:49:08.899236362 +0200 -+++ google-auth-oauthlib-0.5.1/tests/unit/test_helpers.py 2022-06-08 13:49:08.903236386 +0200 -@@ -16,7 +16,7 @@ import datetime +diff -Nru google-auth-oauthlib-0.7.1.orig/tests/unit/test_helpers.py google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py +--- google-auth-oauthlib-0.7.1.orig/tests/unit/test_helpers.py 2022-11-03 18:27:07.000000000 +0100 ++++ google-auth-oauthlib-0.7.1/tests/unit/test_helpers.py 2022-11-07 18:14:12.867489297 +0100 +@@ -16,7 +16,7 @@ import json import os @@ -21,10 +21,10 @@ +from unittest import mock import pytest - from google_auth_oauthlib import helpers -diff -upr google-auth-oauthlib-0.5.1.orig/tests/unit/test_interactive.py google-auth-oauthlib-0.5.1/tests/unit/test_interactive.py ---- google-auth-oauthlib-0.5.1.orig/tests/unit/test_interactive.py 2022-06-08 13:49:08.899236362 +0200 -+++ google-auth-oauthlib-0.5.1/tests/unit/test_interactive.py 2022-06-08 13:49:08.903236386 +0200 + from google.auth import external_account_authorized_user +diff -Nru google-auth-oauthlib-0.7.1.orig/tests/unit/test_interactive.py google-auth-oauthlib-0.7.1/tests/unit/test_interactive.py +--- google-auth-oauthlib-0.7.1.orig/tests/unit/test_interactive.py 2022-11-03 18:27:07.000000000 +0100 ++++ google-auth-oauthlib-0.7.1/tests/unit/test_interactive.py 2022-11-07 18:14:12.867489297 +0100 @@ -14,7 +14,7 @@ import socket @@ -34,10 +34,10 @@ import pytest -diff -upr google-auth-oauthlib-0.5.1.orig/tests/unit/test_tool.py google-auth-oauthlib-0.5.1/tests/unit/test_tool.py ---- google-auth-oauthlib-0.5.1.orig/tests/unit/test_tool.py 2022-06-08 13:49:08.899236362 +0200 -+++ google-auth-oauthlib-0.5.1/tests/unit/test_tool.py 2022-06-08 13:49:08.903236386 +0200 -@@ -19,7 +19,7 @@ import tempfile +diff -Nru google-auth-oauthlib-0.7.1.orig/tests/unit/test_tool.py google-auth-oauthlib-0.7.1/tests/unit/test_tool.py +--- google-auth-oauthlib-0.7.1.orig/tests/unit/test_tool.py 2022-11-03 18:27:07.000000000 +0100 ++++ google-auth-oauthlib-0.7.1/tests/unit/test_tool.py 2022-11-07 18:14:12.863489253 +0100 +@@ -19,7 +19,7 @@ import click.testing import google.oauth2.credentials