flask-bcrypt icon indicating copy to clipboard operation
flask-bcrypt copied to clipboard

Python 3.10 support

Open JWKennington opened this issue 3 years ago • 2 comments

The latest versions of flask-bcrypt don't support python 3.10, though many of the flask extensions we use have. This causes a problem since the 0.7.1 release of flask-bcrypt isn't updated for the latest version of werkzeug, which causes the following import error on python 3.10 environments

File "..env/lib/python3.9/site-packages/flask_bcrypt.py", line 21, in <module>
    from werkzeug.security import safe_str_cmp
ImportError: cannot import name 'safe_str_cmp' from 'werkzeug.security'

JWKennington avatar Jun 26 '22 18:06 JWKennington

I just ran into the same issue, but was using version 0.7. Upgrading to 1.0.1 solved for me, and that line is not in the current version of the file anymore.

robertlayton avatar Jul 03 '22 03:07 robertlayton

Issues with werkzeug > 2.2 (sometimes even with > 2.1) are common with many flask addons like flask-login and flask-restx. According to #86 this has already been fixed with 1.0.0. If that is not an option you might consider downgrading to werkzeug to a minor version < 2.1 (and therefore to a minor version of flask < 2.1 as well). Btw I don't get what this is issue has to do with python 3.10.

bliepp avatar Sep 24 '22 19:09 bliepp