setup-python@v5 can't fetch CPython 3.12 on the self-hosted Gitea runner
(it queries the Gitea API for actions/python-versions, which 404s), so the
job silently fell back to the image's system Python 3.10 + pip 22.0.2. That
old pip lacks PEP 660 editable support, so 'pip install -e' failed with
'build backend is missing the build_editable hook', and 3.10 is below the
project's requires-python>=3.11 (code uses datetime.UTC).
Run the job inside nikolaik/python-nodejs:python3.12-nodejs20 which bundles
Python 3.12, Node 20 (for actions/checkout) and modern pip, removing the
GitHub download dependency entirely.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Self-hosted Gitea runner has flaky/blocked access to github.com, causing
actions/checkout and actions/setup-go to time out intermittently across all
jobs. Replace them with:
- manual git checkout against $GITHUB_SERVER_URL (the Gitea host, reachable
from job containers)
- Go installed from mirrors.aliyun.com
Python job stays on the python3.12-nodejs20 container (fixes the original
PEP 660 editable-install failure). No more github.com network dependency.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
lixu
merged commit 20b9eb0fc9 into main2026-06-24 14:32:51 +08:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
背景
Python (ingestion)job 在 main 上一直失败。根因:自建 Gitea Runner 上setup-python@v5无法下载 CPython 3.12(它会向 Gitea API 查询actions/python-versions仓库,返回 404),于是静默回退到镜像自带的系统 Python 3.10 + pip 22.0.2。旧 pip 不支持 PEP 660 可编辑安装,pip install -e报build backend is missing the build_editable hook;且 3.10 低于项目要求的requires-python>=3.11(代码用了datetime.UTC)。改动
将该 job 放进
nikolaik/python-nodejs:python3.12-nodejs20容器运行,镜像自带 Python 3.12 + Node 20(供 actions/checkout)+ 现代 pip,彻底去掉对 GitHub 下载的依赖,并移除setup-python步骤。验证
在服务器同款容器内用真实源码跑过:install / ruff check / ruff format --check 全过,pytest 36 passed, 6 skipped。