Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Switch from pickle to jsonpickle #614

Merged
merged 1 commit into from
Aug 12, 2016
Merged

Conversation

waprin
Copy link
Contributor

@waprin waprin commented Aug 11, 2016

Addresses #594. As the reporter mentions the PickleSerializer is not recommended. The flow object can't be encoded with json.dumps, we could add a custom serializer but this jsonpickle library seems to work and is super simple so figured I would try that.

/cc @huwshimi

@@ -36,6 +35,8 @@
from oauth2client.contrib.django_util import get_storage
from oauth2client.contrib.django_util import signals

import jsonpickle

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

from six.moves.urllib import parse

from oauth2client import client
from oauth2client.contrib import django_util
from oauth2client.contrib.django_util import get_storage
from oauth2client.contrib.django_util import signals


This comment was marked as spam.

@@ -180,9 +181,10 @@ def test_callback_works(self, pickle):
self.assertEqual(
response.status_code, django.http.HttpResponseRedirect.status_code)
self.assertEqual(response['Location'], self.RETURN_URL)
jsonpickle_mock.decode.assert_called_once_with(pickled_flow)

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Aug 11, 2016

LGTM. I'll let someone else have a pass first before merging

@waprin
Copy link
Contributor Author

waprin commented Aug 12, 2016

@jonparrott hey, i just met you, and this is crazy, but LGTM, so merge me maybe?

@theacodes
Copy link
Contributor

:D I never get to use any Carly Rae Jepsen gifs.

carly

@theacodes theacodes merged commit c9b4b07 into googleapis:master Aug 12, 2016
@waprin waprin mentioned this pull request Sep 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants