Replies: 1 comment
-
There has been an update to a dependency of Flask-Login that breaks things. There are two ways to fix this new issue. The first way is to pin the Werkzeug library version: Werkzeug==2.0.3
Flask>=2.0.0
Flask-Login==0.5.0 The other, perhaps better way, way is to update Flask-Login to the latest version: Flask>=2.0.0
Flask-Login>=0.6.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There was a recent change to some sub-dependencies of Flask that cause older versions of Flask to crash. Specifically the MarkupSafe-2.1.0 and itsdangerous-2.1.0 libraries have removed features that Flask and its Jinja dependency were relying on.
It is possible to fix this issue by pinning the older versions of both of those libraries in the requirements.txt file:
However, the recommended way to address the issue would be to update the version of Flask itself. Flask 2.0 was released in May of 2021, right after the React to Python book was initially published. Changing the Flask version to install in the requirements.txt file is fairly straightforward:
Because Flask 2 is relatively new, it's probably a good idea to not pin it to a specific version, as we did above. While the new version introduces a number of changes that my break some larger applications, it should be fine for the simple examples presented in the book.
Beta Was this translation helpful? Give feedback.
All reactions