Fix Flask 2.0 Warnings in Flask-Login, Flask-WTF & Flask-Debugtoolbar
In this video we'll go over 3 pull requests that fix a few deprecation warnings in 3 popular Flask extensions.
I recently updated an app to use Flask 2.0 and all 3 of those libraries started to throw deprecation warnings. I decided to contribute back to those projects and fix them in a few pull requests. This video goes over creating those PRs.
The takeaway here is don’t be afraid to contribute code to an unfamiliar code base. I never looked at the source code of these projects prior to adding these PRs.
# Going Over Everything
Timestamps
- 0:13 – Flask 2.0 recently came out
- 0:50 – Let’s be proactive and make PRs on libraries we use
- 3:39 – Reading a deprecation warning
- 4:46 – If you’re going to open an issue, consider a PR instead
- 5:49 – Addressing the warning for Flask-Login
- 7:39 – Addressing the warning for Flask-WTF
- 9:53 – Tracking down an issue for a less helpful deprecation warning
- 13:19 – Addressing the warning for Flask-Debugtoolbar
- 15:42 – Popping open a Python interpreter to test the core of our patch
- 17:51 – If you want to make an open source maintainer’s day, open a PR
Reference Links
- https://palletsprojects.com/blog/flask-2-0-released/
- Build a SAAS App with Flask course
- https://github.com/nickjj
- https://github.com/maxcountryman/flask-login/issues/584
- https://github.com/maxcountryman/flask-login/pull/585
- https://github.com/lepture/flask-wtf/pull/434
- https://github.com/flask-debugtoolbar/flask-debugtoolbar/pull/157
What was the last PR you added to an open source project? Let me know below.