dvc: use pydrive2 instead of pydrive

PyDrive2 is our maintained fork.
This commit is contained in:
Ruslan Kuprieiev
2020-01-15 19:13:29 +02:00
parent 0be0931fcd
commit 97a29a1f7e
2 changed files with 7 additions and 7 deletions
+6 -6
View File
@@ -34,7 +34,7 @@ class GDriveMissedCredentialKeyError(DvcException):
@decorator
def _wrap_pydrive_retriable(call):
from apiclient import errors
from pydrive.files import ApiRequestError
from pydrive2.files import ApiRequestError
try:
result = call()
@@ -61,7 +61,7 @@ gdrive_retry = compose(
class RemoteGDrive(RemoteBASE):
scheme = Schemes.GDRIVE
path_cls = CloudURLInfo
REQUIRES = {"pydrive": "pydrive"}
REQUIRES = {"pydrive2": "pydrive2"}
GDRIVE_USER_CREDENTIALS_DATA = "GDRIVE_USER_CREDENTIALS_DATA"
DEFAULT_USER_CREDENTIALS_FILE = "gdrive-user-credentials.json"
@@ -177,11 +177,11 @@ class RemoteGDrive(RemoteBASE):
@property
@wrap_with(threading.RLock())
def drive(self):
from pydrive.auth import RefreshError
from pydrive2.auth import RefreshError
if not hasattr(self, "_gdrive"):
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from pydrive2.auth import GoogleAuth
from pydrive2.drive import GoogleDrive
if os.getenv(RemoteGDrive.GDRIVE_USER_CREDENTIALS_DATA):
with open(
@@ -227,7 +227,7 @@ class RemoteGDrive(RemoteBASE):
self.gdrive_user_credentials_path, str(exc)
)
)
# Handle pydrive.auth.AuthenticationError and others auth failures
# Handle pydrive2.auth.AuthenticationError and others auth failures
except Exception as exc:
raise DvcException(
"Google Drive authentication failed"
+1 -1
View File
@@ -86,7 +86,7 @@ gs = ["google-cloud-storage==1.19.0"]
# google-api-python-client is internal dependency of pydrive. After merge of
# https://github.com/gsuitedevs/PyDrive/pull/180 into pydrive's master,
# usage of google-api-python-client can be removed from DVC.
gdrive = ["pydrive>=1.3.1", "google-api-python-client>=1.2"]
gdrive = ["pydrive2>=1.4.0", "google-api-python-client>=1.2"]
s3 = ["boto3>=1.9.201"]
azure = ["azure-storage-blob==2.1.0"]
oss = ["oss2==2.6.1"]