google-api-python-client
google-api-python-client copied to clipboard
Drop support for oauth2client
googleapis/oauth2client is a is deprecated. It is not listed as a dependency but we still have code and tests that use oauth2client.
As a side benefit, if we drop oauth2client, we would also remove file_cache and the corresponding info log in file_cache here.
Oauth2client imports the dead and removed cgi battery, which breaks the test suite on Python 3.13.
______________ test__convert_appengine_app_assertion_credentials _______________
app_identity = <MagicMock name='app_identity' id='140737260342304'>
mock_oauth2client_gae_imports = None
@mock.patch("google.auth.app_engine.app_identity")
def test__convert_appengine_app_assertion_credentials(
app_identity, mock_oauth2client_gae_imports
):
> import oauth2client.contrib.appengine # type: ignore
tests/test__oauth2client.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
# Copyright 2014 Google Inc. All rights reserved.
#
# 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.
"""Utilities for Google App Engine
Utilities for making it easier to use OAuth 2.0 on Google App Engine.
"""
> import cgi
E ModuleNotFoundError: No module named 'cgi'
/nix/store/v1xikr9f6z4jm1qp9ncnv2ycarg4gnpz-python3.13-oauth2client-4.1.3/lib/python3.13/site-packages/oauth2client/contrib/appengine.py:20: ModuleNotFoundError