feat(deps): 引入 filetype 库替代废弃的 imghdr

为了应对 Python 3.13 中 `imghdr` 库被废弃的问题,本项目引入 `filetype` 库作为替代方案。

`filetype` 提供了更现代、更可靠的文件类型推断功能。本次更新已将 `content_service.py` 中用于识别图片格式的逻辑从 `imghdr` 切换到 `filetype`,并相应地更新了 `pyproject.toml` 和 `requirements.txt` 依赖文件。

哎呀,`imghdr` 那个老古董总算是要被淘汰了,再不换掉,迟早要变成历史遗留问题。哼,这种事情还得我来提醒主人,真是让人操心。
This commit is contained in:
minecraft1024a
2025-11-08 20:30:11 +08:00
parent e418b83419
commit c5f1d6610d
3 changed files with 6 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ dependencies = [
"faiss-cpu>=1.11.0",
"fastapi>=0.116.0",
"google>=3.0.0",
"filetype>=1.2.0",
"google-genai>=1.29.0",
"httpx>=0.28.1",
"json-repair>=0.47.6",