diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2 index e9789d8a5d..9cb924a529 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/base.py.j2 @@ -98,8 +98,6 @@ class {{ service.name }}Transport(abc.ABC): host += ':443' self._host = host - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes @@ -114,11 +112,12 @@ class {{ service.name }}Transport(abc.ABC): if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # If the credentials are service account credentials, then always try to use self signed JWT. if always_use_jwt_access and isinstance(credentials, service_account.Credentials) and hasattr(service_account.Credentials, "with_always_use_jwt_access"): diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2 index 7cdaf82da5..11e9e41f3a 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2 @@ -108,8 +108,6 @@ class {{ service.name }}Transport(abc.ABC): self._extended_operations_services: Dict[str, Any] = {} {% endif %} - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -123,11 +121,12 @@ class {{ service.name }}Transport(abc.ABC): if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/gapic/templates/mypy.ini.j2 b/gapic/templates/mypy.ini.j2 index 574c5aed39..a3cb5c2921 100644 --- a/gapic/templates/mypy.ini.j2 +++ b/gapic/templates/mypy.ini.j2 @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py index 4aebab9170..d1f8c36c11 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/base.py @@ -85,8 +85,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/asset/mypy.ini b/tests/integration/goldens/asset/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/asset/mypy.ini +++ b/tests/integration/goldens/asset/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py index c9c8fd9472..5eca520ccd 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/base.py @@ -82,8 +82,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -97,11 +95,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/credentials/mypy.ini b/tests/integration/goldens/credentials/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/credentials/mypy.ini +++ b/tests/integration/goldens/credentials/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/base.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/base.py index ca6cf24f12..654a746911 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/base.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/base.py @@ -93,8 +93,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -108,11 +106,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/eventarc/mypy.ini b/tests/integration/goldens/eventarc/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/eventarc/mypy.ini +++ b/tests/integration/goldens/eventarc/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py index 625a388594..a9ce0fc3ef 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/base.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/base.py index f9d40b5621..d30a4213a5 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py index fef46ac38e..776ba557f3 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging/mypy.ini b/tests/integration/goldens/logging/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/logging/mypy.ini +++ b/tests/integration/goldens/logging/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/base.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/base.py index 625a388594..a9ce0fc3ef 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/base.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/config_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/base.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/base.py index f9d40b5621..d30a4213a5 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/base.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/logging_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py index fef46ac38e..776ba557f3 100755 --- a/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py +++ b/tests/integration/goldens/logging_internal/google/cloud/logging_v2/services/metrics_service_v2/transports/base.py @@ -88,8 +88,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -103,11 +101,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/logging_internal/mypy.ini b/tests/integration/goldens/logging_internal/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/logging_internal/mypy.ini +++ b/tests/integration/goldens/logging_internal/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py index 0eb82cc696..54f7d694a3 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py @@ -85,8 +85,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/redis/mypy.ini b/tests/integration/goldens/redis/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/redis/mypy.ini +++ b/tests/integration/goldens/redis/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True diff --git a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/base.py b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/base.py index 8e1decc081..c442745a86 100755 --- a/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/base.py +++ b/tests/integration/goldens/redis_selective/google/cloud/redis_v1/services/cloud_redis/transports/base.py @@ -85,8 +85,6 @@ def __init__( be used for service account credentials. """ - scopes_kwargs = {"scopes": scopes, "default_scopes": self.AUTH_SCOPES} - # Save the scopes. self._scopes = scopes if not hasattr(self, "_ignore_credentials"): @@ -100,11 +98,12 @@ def __init__( if credentials_file is not None: credentials, _ = google.auth.load_credentials_from_file( credentials_file, - **scopes_kwargs, - quota_project_id=quota_project_id + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, ) elif credentials is None and not self._ignore_credentials: - credentials, _ = google.auth.default(**scopes_kwargs, quota_project_id=quota_project_id) + credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id, default_scopes=self.AUTH_SCOPES) # Don't apply audience if the credentials file passed from user. if hasattr(credentials, "with_gdch_audience"): credentials = credentials.with_gdch_audience(api_audience if api_audience else host) diff --git a/tests/integration/goldens/redis_selective/mypy.ini b/tests/integration/goldens/redis_selective/mypy.ini index 574c5aed39..a3cb5c2921 100755 --- a/tests/integration/goldens/redis_selective/mypy.ini +++ b/tests/integration/goldens/redis_selective/mypy.ini @@ -1,3 +1,3 @@ [mypy] -python_version = 3.7 +python_version = 3.14 namespace_packages = True