Skip to content

Commit 980c308

Browse files
epalltheacodes
authored andcommitted
Make apiclient.sample_tools optional (#525)
It depends heavily on oauth2client, which has been dropped as a required dependency
1 parent a1da982 commit 980c308

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apiclient/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
from googleapiclient import http
1111
from googleapiclient import mimeparse
1212
from googleapiclient import model
13-
from googleapiclient import sample_tools
13+
try:
14+
from googleapiclient import sample_tools
15+
except ImportError:
16+
# Silently ignore, because the vast majority of consumers won't use it and
17+
# it has deep dependence on oauth2client, an optional dependency.
18+
sample_tools = None
1419
from googleapiclient import schema
1520

1621
__version__ = googleapiclient.__version__

0 commit comments

Comments
 (0)