# DeprecationWarning: 'werkzeug.urls.url_quote' 已弃用，将在 Werkzeug 3.0 中移除。请改用 urllib.parse.quote。

- **ID:** `python/flask-werkzeug-proxy-fix-deprecated`
- **领域:** python
- **类别:** module_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

应用代码导入了 Werkzeug 3.x 中已移除的 werkzeug.urls 辅助函数。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.x | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   from urllib.parse import quote, unquote
quote('a b')
   ```
2. **** (80% 成功率)
   ```
   from werkzeug.urls import url_parse  # still available where applicable
   ```

## 无效尝试

- **** — Hides the issue until the import raises ImportError. (85% 失败率)
- **** — Blocks other security fixes and modern Flask compat. (80% 失败率)
