Remove legacy support for pickled Credentials.
Reviewed in http://codereview.appspot.com/5323055/.
diff --git a/oauth2client/appengine.py b/oauth2client/appengine.py
index 3f2b727..1bc2aaa 100644
--- a/oauth2client/appengine.py
+++ b/oauth2client/appengine.py
@@ -75,7 +75,6 @@
a two legged flow, and therefore has all of the required information to
generate and refresh its own access tokens.
- AssertionFlowCredentials objects may be safely pickled and unpickled.
"""
def __init__(self, scope,
@@ -197,14 +196,10 @@
return None
if len(value) == 0:
return None
- credentials = None
try:
credentials = Credentials.new_from_json(value)
except ValueError:
- try:
- credentials = pickle.loads(value)
- except ValueError:
- credentials = None
+ credentials = None
return credentials
def validate(self, value):
diff --git a/oauth2client/file.py b/oauth2client/file.py
index 60a6385..34a5f48 100644
--- a/oauth2client/file.py
+++ b/oauth2client/file.py
@@ -20,7 +20,6 @@
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
-import pickle
import threading
@@ -74,18 +73,11 @@
except IOError:
return credentials
- # First try reading as JSON, and if that fails fall back to pickle.
try:
credentials = Credentials.new_from_json(content)
credentials.set_store(self)
except ValueError:
- # TODO(jcgregorio) On a future release remove this path to finally remove
- # all pickle support.
- try:
- credentials = pickle.loads(content)
- credentials.set_store(self)
- except:
- pass
+ pass
return credentials
diff --git a/oauth2client/multistore_file.py b/oauth2client/multistore_file.py
index 02e36d1..cf43dd9 100644
--- a/oauth2client/multistore_file.py
+++ b/oauth2client/multistore_file.py
@@ -35,7 +35,6 @@
import fcntl
import logging
import os
-import pickle
import threading
try: # pragma: no cover