Closed
Description
Building on #521, dropping oauth2client
from setup.py
in #499 is causing problems importing apiclient.discovery
:
Python 3.6.5 (default, Mar 31 2018, 13:05:03)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from apiclient import discovery
Traceback (most recent call last):
File "/Users/eric/projects/google-api-python-client/googleapiclient/sample_tools.py", line 32, in <module>
from oauth2client import client
ModuleNotFoundError: No module named 'oauth2client'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/eric/projects/google-api-python-client/apiclient/__init__.py", line 13, in <module>
from googleapiclient import sample_tools
File "/Users/eric/projects/google-api-python-client/googleapiclient/sample_tools.py", line 36, in <module>
raise ImportError('googleapiclient.sample_tools requires oauth2client. Please install oauth2client and try again.')
ImportError: googleapiclient.sample_tools requires oauth2client. Please install oauth2client and try again.
$ git grep oauth2client | grep -v -e docs\/ -e CHANGELO
.travis.yml: env: TOXENV=py27-oauth2client1
.travis.yml: env: TOXENV=py27-oauth2client2
.travis.yml: env: TOXENV=py27-oauth2client3
.travis.yml: env: TOXENV=py27-oauth2client4
.travis.yml: env: TOXENV=py34-oauth2client1
.travis.yml: env: TOXENV=py34-oauth2client2
.travis.yml: env: TOXENV=py34-oauth2client3
.travis.yml: env: TOXENV=py34-oauth2client4
.travis.yml: env: TOXENV=py35-oauth2client1
.travis.yml: env: TOXENV=py35-oauth2client2
.travis.yml: env: TOXENV=py35-oauth2client3
.travis.yml: env: TOXENV=py35-oauth2client4
.travis.yml: env: TOXENV=py36-oauth2client1
.travis.yml: env: TOXENV=py36-oauth2client2
.travis.yml: env: TOXENV=py36-oauth2client3
.travis.yml: env: TOXENV=py36-oauth2client4
expandsymlinks.py:IGNORE_IN_SAMPLES = set(['googleapiclient', 'oauth2client', 'uritemplate'])
googleapiclient/_auth.py:"""Helpers for authentication using oauth2client or google-auth."""
googleapiclient/_auth.py: import oauth2client
googleapiclient/_auth.py: import oauth2client.client
googleapiclient/_auth.py: return oauth2client.client.GoogleCredentials.get_application_default()
googleapiclient/_auth.py: 'google-auth or oauth2client.')
googleapiclient/_auth.py: oauth2client.client.Credentials]): The credentials to scope.
googleapiclient/_auth.py: oauth2client.client.Credentials]: The scoped credentials.
googleapiclient/_auth.py: oauth2client.client.Credentials]): The credentials to use.
googleapiclient/_auth.py: # credentials could be a AuthorizedHttp or an oauth2client-decorated
googleapiclient/_auth.py: # oauth2client and google-auth have the same interface for this.
googleapiclient/discovery.py: credentials: oauth2client.Credentials or
googleapiclient/discovery.py: credentials: oauth2client.Credentials or
googleapiclient/discovery_cache/file_cache.py: from oauth2client.contrib.locked_file import LockedFile
googleapiclient/discovery_cache/file_cache.py: # oauth2client < 2.0.0
googleapiclient/discovery_cache/file_cache.py: from oauth2client.locked_file import LockedFile
googleapiclient/discovery_cache/file_cache.py: # oauth2client > 4.0.0 or google-auth
googleapiclient/discovery_cache/file_cache.py: 'file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth')
googleapiclient/sample_tools.py: from oauth2client import client
googleapiclient/sample_tools.py: from oauth2client import file
googleapiclient/sample_tools.py: from oauth2client import tools
googleapiclient/sample_tools.py: raise ImportError('googleapiclient.sample_tools requires oauth2client. Please install oauth2client and try again.')
samples/README.md: <td>Demonstrates oauth2client and the Google+ API from Django</td>
samples/README.md: <td>Demonstrates oauth2client and the Google+ API from Django</td>
samples/README.md: <td>Demonstrates oauth2client and the Google+ API from Django</td>
samples/adexchangeseller/generate_report.py:from oauth2client import client
samples/adexchangeseller/generate_report_with_paging.py:from oauth2client import client
samples/adexchangeseller/get_all_ad_clients.py:from oauth2client import client
samples/adexchangeseller/get_all_ad_units.py:from oauth2client import client
samples/adexchangeseller/get_all_ad_units_for_custom_channel.py:from oauth2client import client
samples/adexchangeseller/get_all_alerts.py:from oauth2client import client
samples/adexchangeseller/get_all_custom_channels.py:from oauth2client import client
samples/adexchangeseller/get_all_custom_channels_for_ad_unit.py:from oauth2client import client
samples/adexchangeseller/get_all_dimensions.py:from oauth2client import client
samples/adexchangeseller/get_all_metrics.py:from oauth2client import client
samples/adexchangeseller/get_all_preferred_deals.py:from oauth2client import client
samples/adexchangeseller/get_all_saved_reports.py:from oauth2client import client
samples/adexchangeseller/get_all_url_channels.py:from oauth2client import client
samples/analytics/core_reporting_v3_reference.py:from oauth2client.client import AccessTokenRefreshError
samples/analytics/hello_analytics_api_v3.py:from oauth2client.client import AccessTokenRefreshError
samples/analytics/management_v3_reference.py:from oauth2client.client import AccessTokenRefreshError
samples/appengine/main.py:from oauth2client import client
samples/appengine/main.py:from oauth2client.contrib import appengine
samples/audit/audit.py:from oauth2client import client
samples/blogger/blogger.py:from oauth2client import client
samples/calendar_api/calendar_sample.py:from oauth2client import client
samples/coordinate/coordinate.py:from oauth2client import client
samples/django_sample/README:Sample app demonstrating using oauth2client and the Google+ API from Django.
samples/django_sample/plus/models.py:from oauth2client.contrib.django_util.models import CredentialsField
samples/django_sample/plus/views.py:from oauth2client.contrib import xsrfutil
samples/django_sample/plus/views.py:from oauth2client.client import flow_from_clientsecrets
samples/django_sample/plus/views.py:from oauth2client.contrib.django_util.storage import DjangoORMStorage
samples/django_sample/requirements.txt:oauth2client==4.1.2
samples/groupssettings/groupsettings.py:from oauth2client.client import flow_from_clientsecrets
samples/groupssettings/groupsettings.py:from oauth2client.file import Storage
samples/groupssettings/groupsettings.py:from oauth2client.tools import run
samples/plus/plus.py:from oauth2client import client
samples/prediction/prediction.py:from oauth2client import client
samples/service_account/tasks.py:from oauth2client.service_account import ServiceAccountCredentials
samples/storage_serviceaccount_appengine/main.py:from oauth2client.contrib.appengine import AppAssertionCredentials
samples/tasks_appengine/main.py:from oauth2client.contrib.appengine import OAuth2Decorator
samples/urlshortener/urlshortener.py:from oauth2client import client
tests/test__auth.py:import oauth2client.client
tests/test__auth.py: 'oauth2client.client.GoogleCredentials.get_application_default')
tests/test__auth.py: credentials = mock.Mock(spec=oauth2client.client.Credentials)
tests/test__auth.py: credentials = mock.Mock(spec=oauth2client.client.GoogleCredentials)
tests/test__auth.py: credentials = mock.Mock(spec=oauth2client.client.Credentials)
tests/test_discovery.py:from oauth2client import GOOGLE_TOKEN_URI
tests/test_discovery.py:from oauth2client.client import OAuth2Credentials, GoogleCredentials
tests/test_discovery.py: def test_oauth2client_credentials(self):
tests/test_http.py:from oauth2client.client import Credentials
tools/gae-zip-creator.sh:export SANITY_MODS="httplib2 apiclient uritemplate oauth2client"
tox.ini:envlist = py{27,34,35,36}-oauth2client{1,2,3,4}
tox.ini: oauth2client1: oauth2client<2dev
tox.ini: oauth2client2: oauth2client>=2,<=3dev
tox.ini: oauth2client3: oauth2client>=3,<=4dev
tox.ini: oauth2client4: oauth2client>=4,<=5dev