kivy / kivy/python-for-android
Flask recipe doesn't work anymore
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Description
Werkzerug is upgraded to 3.X, so flask 2.0.3 will use werkzerug 3.X by default, which will raise the following error:
`ImportError: cannot import name 'url_quote' from 'werkzeug.urls'`
To solve the problem, flask recipe requirements should be updated like this:
`pythonforandroid/recipes/flask/__init__.py`
`python_depends = ['jinja2', 'werkzeug==2.2.2', 'markupsafe', 'itsdangerous', 'click']`
or flask recipe shoud be updated to 3.X.
More details:
https://stackoverflow.com/questions/77213053/why-did-flask-start-failing-with-importerror-cannot-import-name-url-quote-fr
Contributor guide
Research direction
Start in pythonforandroid/recipes/flask/__init__.py and inspect how the recipe declares its Flask and Werkzeug dependencies. Reproduce the reported url_quote ImportError during a Flask recipe build, then verify that the selected dependency update allows the recipe to build and import Flask successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100