Skip to content

[Bug]: Consumption Apps failing with "Error: cannot import name 'url_quote' from 'werkzeug.urls" #1674

Open
@hallvictoria

Description

@hallvictoria

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

  1. Add PYTHON_ISOLATE_WORKER_DEPENDENCIES = 1 as an App Setting
  2. Update to Flask >= 3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions