Open
Description
Background
Python Azure Function apps on runtime version 4.1038 on Linux Consumption that are pinned to Flask<=2.2.2
may see ImportError: cannot import name 'url_quote' from 'werkzeug.urls'
during function indexing and function execution.
Root Cause
To address a security vulnerability, the 4.1038 Python worker image now brings in Werkzeug~=3.1.3
. For consumption, the Werkzeug
version brought in the image is loaded first and causes a conflict with older Flask
versions.
Mitigations
- Add
PYTHON_ISOLATE_WORKER_DEPENDENCIES = 1
as an App Setting - Update to
Flask >= 3.0