MongoDBSessionInterface does not work on Python 3.x due to an exception being raised when the session is read back from MongoDB. This happens due to the str() call in line 401 of sessions.py in the current head (see https://github.com/fengsp/flask-session/blob/master/flask_session/sessions.py#L401), since type(document['val']) == bytes, and casting it to a str makes it unsuitable for pickle.loads. Removing the call to str() resolves the problem.
MongoDBSessionInterface
does not work on Python 3.x due to an exception being raised when the session is read back from MongoDB. This happens due to thestr()
call in line 401 ofsessions.py
in the current head (see https://github.com/fengsp/flask-session/blob/master/flask_session/sessions.py#L401), sincetype(document['val']) == bytes
, and casting it to astr
makes it unsuitable forpickle.loads
. Removing the call tostr()
resolves the problem.