question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LoginManager fails because of Werkzeug dependency

See original GitHub issue

After Werkzeug updated to v 2.1.0, LoginManager cannot import werkzeug.security.safe_str_cmp. This is because Werkzeug has removed several deprecated code elements (see https://github.com/pallets/werkzeug/pull/2276). The Werkzeug changelog suggests using hashlib and hmac instead to provide that functionality.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:12
  • Comments:6

github_iconTop GitHub Comments

1reaction
endersonmenezescommented, Mar 28, 2022

Just for complement, on official documentation says.

Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use [hmac.compare_digest()](https://docs.python.org/3/library/hmac.html#hmac.compare_digest) instead.

In main branch its correct on line 62 and 63, buts the pypi version is outdated.

0reactions
davidismcommented, Mar 29, 2022

Duplicate of #584

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating to Flask 2.0 / Werkzeug 2.0 causes a deprecation ...
Describe the bug Updating to Flask 2.0 / Werkzeug 2.0 causes a deprecation ... LoginManager fails because of Werkzeug dependency #636.
Read more >
The Flask Mega-Tutorial Part V: User Logins - miguelgrinberg ...
Since it is a dependency, Werkzeug is already installed in your virtual environment. The following Python shell session demonstrates how to ...
Read more >
ImportError: cannot import name 'safe_str_cmp' from ...
I just updated from stable to the current rc (rc3) from the UI and now octopi won't start. This is the error in...
Read more >
When installing Pipfile there is a collision of dependency ...
When installing the Pipfile i'm getting the error 'ERROR: Could not find a version that matches werkzeug< ...
Read more >
Flask User Accounts & Authentication in with Flask-Login
Create an interactive Flask application by supporting user accounts! Handle account creation, log-ins, walled content, and user-specific features.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found