simplekv: simplekv 0.11.1 breaks flask-kvsession 0.6.2 on Python 2.7
simplekv 0.11.1 breaks flask-kvsession 0.6.2
sid_s created by kvsession is of type str
rather than the expected type unicode
Traceback (most recent call last):
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/flask/app.py", line 1479, in full_dispatch_request
response = self.process_response(response)
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/flask/app.py", line 1693, in process_response
self.save_session(ctx.session, response)
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/flask/app.py", line 837, in save_session
return self.session_interface.save_session(self, session, response)
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/flask_kvsession/__init__.py", line 193, in save_session
store.put(session.sid_s, data, ttl)
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/simplekv/decorator.py", line 73, in put
self._dstore.put(self._map_key(key), *args, **kwargs))
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/simplekv/decorator.py", line 104, in _map_key
self._check_valid_key(key)
File "/opt/my-flask-app/ENV/local/lib/python2.7/site-packages/simplekv/__init__.py", line 190, in _check_valid_key
raise ValueError('%r is not a unicode string' % key)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (4 by maintainers)
Commits related to this issue
- send bytes into simplekv, not unicode seems to be broken in a recent update https://github.com/mbr/simplekv/issues/57 — committed to topher200/assertion-context by tbrown-wordstream 7 years ago
@hachreak 0.11.2 is out. Give it a try and tell me if the problem has gone away for you.
@fmarczin with
0.11.2
it looks working! 😄Same issue on Invenio and derivated! 👍