Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-google-auth for openSUSE:Factory checked in at 2026-05-24 19:34:49 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-google-auth (Old) and /work/SRC/openSUSE:Factory/.python-google-auth.new.2084 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-google-auth" Sun May 24 19:34:49 2026 rev:67 rq:1354646 version:2.52.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-google-auth/python-google-auth.changes 2026-05-08 16:42:15.221406516 +0200 +++ /work/SRC/openSUSE:Factory/.python-google-auth.new.2084/python-google-auth.changes 2026-05-24 19:35:22.190580323 +0200 @@ -1,0 +2,10 @@ +Mon May 11 08:11:04 UTC 2026 - John Paul Adrian Glaubitz <[email protected]> + +- Update to version 2.52.0 + * make _CLOUD_RESOURCE_MANAGER URL universe-domain-aware (#16546) + * implement in-place Regional Access Boundary configuration and + add public RAB getters (#16987) +- from version 2.51.0 + * Drop support for Python 3.8 and 3.9 (#16946) + +------------------------------------------------------------------- Old: ---- google_auth-2.50.0.tar.gz New: ---- google_auth-2.52.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-google-auth.spec ++++++ --- /var/tmp/diff_new_pack.zd0LOJ/_old 2026-05-24 19:35:23.210622060 +0200 +++ /var/tmp/diff_new_pack.zd0LOJ/_new 2026-05-24 19:35:23.210622060 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-google-auth -Version: 2.50.0 +Version: 2.52.0 Release: 0 Summary: Google Authentication Library License: Apache-2.0 ++++++ google_auth-2.50.0.tar.gz -> google_auth-2.52.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/PKG-INFO new/google_auth-2.52.0/PKG-INFO --- old/google_auth-2.50.0/PKG-INFO 2026-04-30 23:00:49.015156500 +0200 +++ new/google_auth-2.52.0/PKG-INFO 2026-05-07 21:27:57.138338600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: google-auth -Version: 2.50.0 +Version: 2.52.0 Summary: Google Authentication Library Home-page: https://github.com/googleapis/google-auth-library-python Author: Google Cloud Platform @@ -8,8 +8,6 @@ License: Apache 2.0 Keywords: google auth oauth client Classifier: Programming Language :: Python :: 3 -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: Programming Language :: Python :: 3.12 @@ -23,14 +21,14 @@ Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP -Requires-Python: >=3.8 +Requires-Python: >=3.10 License-File: LICENSE Requires-Dist: pyasn1-modules>=0.2.1 Requires-Dist: cryptography>=38.0.3 Provides-Extra: cryptography Requires-Dist: cryptography>=38.0.3; extra == "cryptography" Provides-Extra: aiohttp -Requires-Dist: aiohttp<4.0.0,>=3.6.2; extra == "aiohttp" +Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "aiohttp" Requires-Dist: requests<3.0.0,>=2.20.0; extra == "aiohttp" Provides-Extra: enterprise-cert Requires-Dist: pyopenssl; extra == "enterprise-cert" @@ -55,7 +53,7 @@ Requires-Dist: responses; extra == "testing" Requires-Dist: urllib3; extra == "testing" Requires-Dist: packaging; extra == "testing" -Requires-Dist: aiohttp<4.0.0,>=3.6.2; extra == "testing" +Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "testing" Requires-Dist: requests<3.0.0,>=2.20.0; extra == "testing" Requires-Dist: aioresponses; extra == "testing" Requires-Dist: pytest-asyncio; extra == "testing" @@ -116,18 +114,7 @@ Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.8 - -**NOTE**: -Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in -October 2024 and October 2025, respectively. -We recommend that all developers upgrade to Python 3.10 and newer as soon as -they can. Support for end-of-life Python runtimes will be removed from this -library in future updates. -Previous releases that support end-of-life Python versions will continue to be available -for download, but future releases will only target supported versions. - -.. _unsupported: https://devguide.python.org/versions/#unsupported-versions +Python >= 3.10 Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/README.rst new/google_auth-2.52.0/README.rst --- old/google_auth-2.50.0/README.rst 2026-04-30 23:00:16.000000000 +0200 +++ new/google_auth-2.52.0/README.rst 2026-05-07 21:26:31.000000000 +0200 @@ -35,18 +35,7 @@ Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.8 - -**NOTE**: -Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in -October 2024 and October 2025, respectively. -We recommend that all developers upgrade to Python 3.10 and newer as soon as -they can. Support for end-of-life Python runtimes will be removed from this -library in future updates. -Previous releases that support end-of-life Python versions will continue to be available -for download, but future releases will only target supported versions. - -.. _unsupported: https://devguide.python.org/versions/#unsupported-versions +Python >= 3.10 Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google/auth/__init__.py new/google_auth-2.52.0/google/auth/__init__.py --- old/google_auth-2.50.0/google/auth/__init__.py 2026-04-30 23:00:15.000000000 +0200 +++ new/google_auth-2.52.0/google/auth/__init__.py 2026-05-07 21:26:31.000000000 +0200 @@ -15,8 +15,6 @@ """Google Auth Library for Python.""" import logging -import sys -import warnings from google.auth import version as google_auth_version from google.auth._default import ( @@ -32,26 +30,5 @@ __all__ = ["default", "load_credentials_from_file", "load_credentials_from_dict"] -class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER - """ - Deprecation warning raised when Python 3.7 runtime is detected. - Python 3.7 support will be dropped after January 1, 2024. - """ - - pass - - -# Raise warnings for deprecated versions -eol_message = ( - "You are using a Python version {} past its end of life. Google will update " - "google-auth with critical bug fixes on a best-effort basis, but not " - "with any other fixes or features. Please upgrade your Python version, " - "and then update google-auth." -) -if sys.version_info.major == 3 and sys.version_info.minor == 8: # pragma: NO COVER - warnings.warn(eol_message.format("3.8"), FutureWarning) -elif sys.version_info.major == 3 and sys.version_info.minor == 9: # pragma: NO COVER - warnings.warn(eol_message.format("3.9"), FutureWarning) - # Set default logging handler to avoid "No handler found" warnings. logging.getLogger(__name__).addHandler(logging.NullHandler()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google/auth/credentials.py new/google_auth-2.52.0/google/auth/credentials.py --- old/google_auth-2.50.0/google/auth/credentials.py 2026-04-30 23:00:10.000000000 +0200 +++ new/google_auth-2.52.0/google/auth/credentials.py 2026-05-07 21:26:32.000000000 +0200 @@ -309,6 +309,16 @@ _regional_access_boundary_utils._RegionalAccessBoundaryManager() ) + @property + def regional_access_boundary(self): + """Optional[str]: The encoded Regional Access Boundary locations.""" + return self._rab_manager._data.encoded_locations + + @property + def regional_access_boundary_expiry(self): + """Optional[datetime.datetime]: The expiration time of the Regional Access Boundary.""" + return self._rab_manager._data.expiry + @abc.abstractmethod def _perform_refresh_token(self, request): """Refreshes the access token. @@ -361,39 +371,37 @@ new_manager._data = self._rab_manager._data target._rab_manager = new_manager - def _with_regional_access_boundary(self, seed): - """Returns a copy of these credentials with the the regional_access_boundary - set to the provided seed. This is intended for internal use only as invalid + def _set_regional_access_boundary(self, seed): + """Applies the regional_access_boundary provided via the seed on these + credentials. This is intended for internal use only as invalid seeds would produce unexpected results until automatic recovery is supported. Currently this is used by the gcloud CLI and therefore changes to the contract MUST be backwards compatible (e.g. the method signature must be - unchanged and a copy of the credenials with the RAB set must be returned). + unchanged and the credentials with the RAB set must be returned). Returns: - google.auth.credentials.Credentials: A new credentials instance. + google.auth.credentials.Credentials: The credentials instance. """ - creds = self._make_copy() - creds._rab_manager.set_initial_regional_access_boundary( + self._rab_manager.set_initial_regional_access_boundary( encoded_locations=seed.get("encodedLocations", None), expiry=seed.get("expiry", None), ) - return creds + return self - def _with_blocking_regional_access_boundary_lookup(self): - """Returns a copy of these credentials with the blocking lookup mode enabled. + def _set_blocking_regional_access_boundary_lookup(self): + """Enables the blocking lookup mode on these credentials. This is intended for internal use only as blocking lookup requires additional care and consideration. Currently this is used by the gcloud CLI and therefore changes to the contract MUST be backwards compatible (e.g. the - method signature must be unchanged and a copy of the credentials with the + method signature must be unchanged and the credentials with the blocking lookup flag set to true must be returned). Returns: - google.auth.credentials.Credentials: A new credentials instance. + google.auth.credentials.Credentials: The credentials instance. """ - creds = self._make_copy() - creds._rab_manager.enable_blocking_lookup() - return creds + self._rab_manager.enable_blocking_lookup() + return self def _maybe_start_regional_access_boundary_refresh(self, request, url): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google/auth/external_account.py new/google_auth-2.52.0/google/auth/external_account.py --- old/google_auth-2.50.0/google/auth/external_account.py 2026-04-30 23:00:14.000000000 +0200 +++ new/google_auth-2.52.0/google/auth/external_account.py 2026-05-07 21:26:32.000000000 +0200 @@ -60,7 +60,7 @@ # The token exchange requested_token_type. This is always an access_token. _STS_REQUESTED_TOKEN_TYPE = "urn:ietf:params:oauth:token-type:access_token" # Cloud resource manager URL used to retrieve project information. -_CLOUD_RESOURCE_MANAGER = "https://cloudresourcemanager.googleapis.com/v1/projects/" +_CLOUD_RESOURCE_MANAGER = "https://cloudresourcemanager.{universe_domain}/v1/projects/" # Default Google sts token url. _DEFAULT_TOKEN_URL = "https://sts.{universe_domain}/v1/token" @@ -172,6 +172,9 @@ self._token_url = self._token_url.replace( "{universe_domain}", self._universe_domain ) + self._cloud_resource_manager_url = _CLOUD_RESOURCE_MANAGER.replace( + "{universe_domain}", self._universe_domain + ) self._token_info_url = token_info_url self._credential_source = credential_source self._service_account_impersonation_url = service_account_impersonation_url @@ -404,7 +407,7 @@ project_number = self.project_number or self._workforce_pool_user_project if project_number and scopes: headers = {} - url = _CLOUD_RESOURCE_MANAGER + project_number + url = "{}{}".format(self._cloud_resource_manager_url, project_number) self.before_request(request, "GET", url, headers) response = request(url=url, method="GET", headers=headers) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google/auth/version.py new/google_auth-2.52.0/google/auth/version.py --- old/google_auth-2.50.0/google/auth/version.py 2026-04-30 23:00:11.000000000 +0200 +++ new/google_auth-2.52.0/google/auth/version.py 2026-05-07 21:26:31.000000000 +0200 @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.50.0" +__version__ = "2.52.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google/oauth2/__init__.py new/google_auth-2.52.0/google/oauth2/__init__.py --- old/google_auth-2.50.0/google/oauth2/__init__.py 2026-04-30 23:00:14.000000000 +0200 +++ new/google_auth-2.52.0/google/oauth2/__init__.py 2026-05-07 21:26:32.000000000 +0200 @@ -13,28 +13,3 @@ # limitations under the License. """Google OAuth 2.0 Library for Python.""" - -import sys -import warnings - - -class Python37DeprecationWarning(DeprecationWarning): # pragma: NO COVER - """ - Deprecation warning raised when Python 3.7 runtime is detected. - Python 3.7 support will be dropped after January 1, 2024. - """ - - pass - - -# Raise warnings for deprecated versions -eol_message = ( - "You are using a Python version {} past its end of life. Google will update " - "google-auth with critical bug fixes on a best-effort basis, but not " - "with any other fixes or features. Please upgrade your Python version, " - "and then update google-auth." -) -if sys.version_info.major == 3 and sys.version_info.minor == 8: # pragma: NO COVER - warnings.warn(eol_message.format("3.8"), FutureWarning) -elif sys.version_info.major == 3 and sys.version_info.minor == 9: # pragma: NO COVER - warnings.warn(eol_message.format("3.9"), FutureWarning) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google_auth.egg-info/PKG-INFO new/google_auth-2.52.0/google_auth.egg-info/PKG-INFO --- old/google_auth-2.50.0/google_auth.egg-info/PKG-INFO 2026-04-30 23:00:48.000000000 +0200 +++ new/google_auth-2.52.0/google_auth.egg-info/PKG-INFO 2026-05-07 21:27:57.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: google-auth -Version: 2.50.0 +Version: 2.52.0 Summary: Google Authentication Library Home-page: https://github.com/googleapis/google-auth-library-python Author: Google Cloud Platform @@ -8,8 +8,6 @@ License: Apache 2.0 Keywords: google auth oauth client Classifier: Programming Language :: Python :: 3 -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: Programming Language :: Python :: 3.12 @@ -23,14 +21,14 @@ Classifier: Operating System :: MacOS :: MacOS X Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP -Requires-Python: >=3.8 +Requires-Python: >=3.10 License-File: LICENSE Requires-Dist: pyasn1-modules>=0.2.1 Requires-Dist: cryptography>=38.0.3 Provides-Extra: cryptography Requires-Dist: cryptography>=38.0.3; extra == "cryptography" Provides-Extra: aiohttp -Requires-Dist: aiohttp<4.0.0,>=3.6.2; extra == "aiohttp" +Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "aiohttp" Requires-Dist: requests<3.0.0,>=2.20.0; extra == "aiohttp" Provides-Extra: enterprise-cert Requires-Dist: pyopenssl; extra == "enterprise-cert" @@ -55,7 +53,7 @@ Requires-Dist: responses; extra == "testing" Requires-Dist: urllib3; extra == "testing" Requires-Dist: packaging; extra == "testing" -Requires-Dist: aiohttp<4.0.0,>=3.6.2; extra == "testing" +Requires-Dist: aiohttp<4.0.0,>=3.8.0; extra == "testing" Requires-Dist: requests<3.0.0,>=2.20.0; extra == "testing" Requires-Dist: aioresponses; extra == "testing" Requires-Dist: pytest-asyncio; extra == "testing" @@ -116,18 +114,7 @@ Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.8 - -**NOTE**: -Python 3.8 and Python 3.9 were marked as `unsupported`_ by the python community in -October 2024 and October 2025, respectively. -We recommend that all developers upgrade to Python 3.10 and newer as soon as -they can. Support for end-of-life Python runtimes will be removed from this -library in future updates. -Previous releases that support end-of-life Python versions will continue to be available -for download, but future releases will only target supported versions. - -.. _unsupported: https://devguide.python.org/versions/#unsupported-versions +Python >= 3.10 Unsupported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google_auth.egg-info/SOURCES.txt new/google_auth-2.52.0/google_auth.egg-info/SOURCES.txt --- old/google_auth-2.50.0/google_auth.egg-info/SOURCES.txt 2026-04-30 23:00:48.000000000 +0200 +++ new/google_auth-2.52.0/google_auth.egg-info/SOURCES.txt 2026-05-07 21:27:57.000000000 +0200 @@ -115,7 +115,6 @@ tests/test_metrics.py tests/test_packaging.py tests/test_pluggable.py -tests/test_version_warnings.py tests/aio/test__helpers.py tests/compute_engine/__init__.py tests/compute_engine/test__metadata.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/google_auth.egg-info/requires.txt new/google_auth-2.52.0/google_auth.egg-info/requires.txt --- old/google_auth-2.50.0/google_auth.egg-info/requires.txt 2026-04-30 23:00:48.000000000 +0200 +++ new/google_auth-2.52.0/google_auth.egg-info/requires.txt 2026-05-07 21:27:57.000000000 +0200 @@ -2,7 +2,7 @@ cryptography>=38.0.3 [aiohttp] -aiohttp<4.0.0,>=3.6.2 +aiohttp<4.0.0,>=3.8.0 requests<3.0.0,>=2.20.0 [cryptography] @@ -39,7 +39,7 @@ responses urllib3 packaging -aiohttp<4.0.0,>=3.6.2 +aiohttp<4.0.0,>=3.8.0 requests<3.0.0,>=2.20.0 aioresponses pytest-asyncio diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/setup.py new/google_auth-2.52.0/setup.py --- old/google_auth-2.50.0/setup.py 2026-04-30 23:00:16.000000000 +0200 +++ new/google_auth-2.52.0/setup.py 2026-05-07 21:26:33.000000000 +0200 @@ -29,7 +29,7 @@ requests_extra_require = ["requests >= 2.20.0, < 3.0.0"] -aiohttp_extra_require = ["aiohttp >= 3.6.2, < 4.0.0", *requests_extra_require] +aiohttp_extra_require = ["aiohttp >= 3.8.0, < 4.0.0", *requests_extra_require] pyjwt_extra_require = ["pyjwt>=2.0"] @@ -112,13 +112,11 @@ package_data={"google.auth": ["py.typed"], "google.oauth2": ["py.typed"]}, install_requires=DEPENDENCIES, extras_require=extras, - python_requires=">=3.8", + python_requires=">=3.10", license="Apache 2.0", keywords="google auth oauth client", classifiers=[ "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/compute_engine/test_credentials.py new/google_auth-2.52.0/tests/compute_engine/test_credentials.py --- old/google_auth-2.50.0/tests/compute_engine/test_credentials.py 2026-04-30 23:00:15.000000000 +0200 +++ new/google_auth-2.52.0/tests/compute_engine/test_credentials.py 2026-05-07 21:26:32.000000000 +0200 @@ -451,13 +451,13 @@ kwargs = mock_metadata_get.call_args[1] assert "bindCertificateFingerprint" not in kwargs.get("params", {}) - def test_with_blocking_regional_access_boundary_lookup(self): + def test_set_blocking_regional_access_boundary_lookup(self): creds = self.credentials assert not creds._rab_manager._use_blocking_regional_access_boundary_lookup - new_creds = creds._with_blocking_regional_access_boundary_lookup() - assert new_creds._rab_manager._use_blocking_regional_access_boundary_lookup - assert new_creds is not creds + new_creds = creds._set_blocking_regional_access_boundary_lookup() + assert creds._rab_manager._use_blocking_regional_access_boundary_lookup + assert new_creds is creds class TestIDTokenCredentials(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/oauth2/test_credentials.py new/google_auth-2.52.0/tests/oauth2/test_credentials.py --- old/google_auth-2.50.0/tests/oauth2/test_credentials.py 2026-04-30 23:00:15.000000000 +0200 +++ new/google_auth-2.52.0/tests/oauth2/test_credentials.py 2026-05-07 21:26:33.000000000 +0200 @@ -96,13 +96,13 @@ assert credentials.rapt_token == self.RAPT_TOKEN assert credentials.refresh_handler is None - def test_with_blocking_regional_access_boundary_lookup(self): + def test_set_blocking_regional_access_boundary_lookup(self): creds = self.make_credentials() assert not creds._rab_manager._use_blocking_regional_access_boundary_lookup - new_creds = creds._with_blocking_regional_access_boundary_lookup() - assert new_creds._rab_manager._use_blocking_regional_access_boundary_lookup - assert new_creds is not creds + new_creds = creds._set_blocking_regional_access_boundary_lookup() + assert creds._rab_manager._use_blocking_regional_access_boundary_lookup + assert new_creds is creds def test_get_cred_info(self): credentials = self.make_credentials() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/test__regional_access_boundary_utils.py new/google_auth-2.52.0/tests/test__regional_access_boundary_utils.py --- old/google_auth-2.50.0/tests/test__regional_access_boundary_utils.py 2026-04-30 23:00:26.000000000 +0200 +++ new/google_auth-2.52.0/tests/test__regional_access_boundary_utils.py 2026-05-07 21:26:35.000000000 +0200 @@ -224,23 +224,47 @@ creds._rab_manager.apply_headers(headers) assert headers == {} - def test_with_blocking_regional_access_boundary_lookup(self): + def test_set_blocking_regional_access_boundary_lookup(self): creds = CredentialsImpl() assert not creds._rab_manager._use_blocking_regional_access_boundary_lookup - new_creds = creds._with_blocking_regional_access_boundary_lookup() - assert new_creds._rab_manager._use_blocking_regional_access_boundary_lookup + new_creds = creds._set_blocking_regional_access_boundary_lookup() + assert new_creds is creds + assert creds._rab_manager._use_blocking_regional_access_boundary_lookup - def test_with_regional_access_boundary(self): + def test_set_regional_access_boundary(self): creds = CredentialsImpl() seed = { "encodedLocations": "0xABC", "expiry": _helpers.utcnow() + datetime.timedelta(hours=1), } - new_creds = creds._with_regional_access_boundary(seed) - assert new_creds._rab_manager._data.encoded_locations == "0xABC" - assert new_creds._rab_manager._data.expiry == seed["expiry"] - assert new_creds._rab_manager._data.cooldown_expiry is None + new_creds = creds._set_regional_access_boundary(seed) + assert new_creds is creds + assert creds._rab_manager._data.encoded_locations == "0xABC" + assert creds._rab_manager._data.expiry == seed["expiry"] + assert creds._rab_manager._data.cooldown_expiry is None + + def test_regional_access_boundary_getter(self): + creds = CredentialsImpl() + assert creds.regional_access_boundary is None + + seed = { + "encodedLocations": "0xABC", + "expiry": _helpers.utcnow() + datetime.timedelta(hours=1), + } + creds._set_regional_access_boundary(seed) + assert creds.regional_access_boundary == "0xABC" + + def test_regional_access_boundary_expiry_getter(self): + creds = CredentialsImpl() + assert creds.regional_access_boundary_expiry is None + + seed = { + "encodedLocations": "0xABC", + "expiry": _helpers.utcnow() + datetime.timedelta(hours=1), + } + creds._set_regional_access_boundary(seed) + assert creds.regional_access_boundary_expiry == seed["expiry"] def test_copy_regional_access_boundary_state(self): source_creds = CredentialsImpl() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/test_credentials.py new/google_auth-2.52.0/tests/test_credentials.py --- old/google_auth-2.50.0/tests/test_credentials.py 2026-04-30 23:00:15.000000000 +0200 +++ new/google_auth-2.52.0/tests/test_credentials.py 2026-05-07 21:26:32.000000000 +0200 @@ -403,7 +403,7 @@ lookup.return_value = {"encodedLocations": "0xA30"} creds = CredentialsImpl() - creds = creds._with_blocking_regional_access_boundary_lookup() + creds = creds._set_blocking_regional_access_boundary_lookup() request = mock.Mock() headers = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/test_external_account.py new/google_auth-2.52.0/tests/test_external_account.py --- old/google_auth-2.50.0/tests/test_external_account.py 2026-04-30 23:00:16.000000000 +0200 +++ new/google_auth-2.52.0/tests/test_external_account.py 2026-05-07 21:26:32.000000000 +0200 @@ -2135,6 +2135,42 @@ # Only 2 requests to STS and cloud resource manager should be sent. assert len(request.call_args_list) == 2 + def test_cloud_resource_manager_url_with_default_universe_domain(self): + credentials = self.make_credentials() + assert credentials._cloud_resource_manager_url == ( + "https://cloudresourcemanager.googleapis.com/v1/projects/" + ) + + def test_cloud_resource_manager_url_with_custom_universe_domain(self): + credentials = self.make_credentials(universe_domain="example.com") + assert credentials._cloud_resource_manager_url == ( + "https://cloudresourcemanager.example.com/v1/projects/" + ) + + def test_get_project_id_cloud_resource_manager_custom_universe_domain(self): + custom_universe_domain = "example.com" + request = self.make_mock_request( + status=http_client.OK, + data=self.SUCCESS_RESPONSE.copy(), + cloud_resource_manager_status=http_client.OK, + cloud_resource_manager_data=self.CLOUD_RESOURCE_MANAGER_SUCCESS_RESPONSE, + ) + credentials = self.make_credentials( + scopes=self.SCOPES, + universe_domain=custom_universe_domain, + ) + + project_id = credentials.get_project_id(request) + + assert project_id == self.PROJECT_ID + # Verify that the cloud resource manager request used the custom universe domain URL. + assert len(request.call_args_list) == 2 + crm_request_kwargs = request.call_args_list[1][1] + expected_url = "https://cloudresourcemanager.{}/v1/projects/{}".format( + custom_universe_domain, self.PROJECT_NUMBER + ) + assert crm_request_kwargs["url"] == expected_url + def test_refresh_with_existing_impersonated_credentials(self): credentials = self.make_credentials( service_account_impersonation_url=self.SERVICE_ACCOUNT_IMPERSONATION_URL diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/google_auth-2.50.0/tests/test_version_warnings.py new/google_auth-2.52.0/tests/test_version_warnings.py --- old/google_auth-2.50.0/tests/test_version_warnings.py 2026-04-30 23:00:11.000000000 +0200 +++ new/google_auth-2.52.0/tests/test_version_warnings.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,63 +0,0 @@ -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is 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 importlib -import sys -from unittest import mock -import warnings - -import pytest - -import google.auth -import google.oauth2 - - [email protected]("module", [google.auth, google.oauth2]) [email protected]( - "version, expected_warning", - [ - ((3, 8), True), - ((3, 9), True), - ((3, 10), False), - ((3, 13), False), - ], -) -def test_python_version_warnings(module, version, expected_warning): - # Mock sys.version_info - # We use a MagicMock that has major and minor attributes - mock_version = mock.Mock() - mock_version.major = version[0] - mock_version.minor = version[1] - - with mock.patch.object(sys, "version_info", mock_version): - with warnings.catch_warnings(record=True) as caught_warnings: - warnings.simplefilter("always") - importlib.reload(module) - - future_warnings = [ - w - for w in caught_warnings - if issubclass(w.category, FutureWarning) - and "past its end of life" in str(w.message) - ] - - if expected_warning: - assert ( - len(future_warnings) > 0 - ), f"Expected FutureWarning for Python {version} in {module.__name__}" - assert str(version[1]) in str(future_warnings[0].message) - else: - assert ( - len(future_warnings) == 0 - ), f"Did not expect FutureWarning for Python {version} in {module.__name__}"
