I am using Flask-Session and recently installed or upgraded to itsdangerous 1.0.0. Now I get the error ImportError: cannot import name \'want_bytes\'
. Why is this e
itsdangerous 1.1.0 contains a temporary fix for this. You can upgrade itsdangerous and continue to use Flask-Session right now. There is no need to pin to itsdangerous==0.24.
itsdangerous 1.0.0 was recently released, removing non-public top-level imports. Flask-Session appears to have been using such an import, from itsdangerous import want_bytes
.
This has been reported to Flask-Session and a fix will hopefully be released eventually.
The file structure of the itsdangerous package has changed. The function resides in the session.py file. Changing the import statements from:
from itsdangerous import Signer, BadSignature, want_bytes
to
from itsdangerous import Signer, BadSignature
from itsdangerous.encoding import want_bytes
works for me.