omab/python-social-auth — pull request #16 by Flyflo (2013-06-30 09:38:55+00:00)
Title: Fix OpenId auth with Flask 0.10

Flask is [now using](http://flask.pocoo.org/docs/upgrading/#upgrading-to-010) JSON instead of pickle to serialize session cookies.
python-openid adds two objects (```_yadis_services__openid_consumer_```, ```_openid_consumer_last_token```) that can't be serialized with JSON resulting in an error ```is not JSON serializable``` (a similar issue can be be found [here](https://github.com/openid/python-openid/issues/17)).

This pull request is mainly copy-pasted from [this commit](https://github.com/mitsuhiko/flask-openid/commit/a7993a1f1f4e76e8df801dd436b5ae869a1a4de1) and adds a session wrapper that will take care of pickle.dumps and pickle.loads the two objects so they can be serialized to JSON.