结论
requirements-lock.txt 与 launcher/requirements-small.txt(内容一致)目前有 4 条按 PyPI 声明即可证伪的自相约束 。这不是"可能不兼容",是解析器必然报冲突:
#
违反
声明方
锁里的值
1
tokenizers<0.22,>=0.21
transformers==4.52.1
0.23.2 ✗
2
mpmath<1.4,>=1.1.0
sympy==1.14.0
1.4.1 ✗
3
antlr4-python3-runtime==4.9.*
hydra-core==1.3.7
4.13.2 ✗
4
antlr4-python3-runtime==4.9.*
omegaconf==2.3.1
4.13.2 ✗
来源:7095f86 build(deps): bump the minor-and-patch group with 7 updates (#87)。#92 只修了 pydantic-core 那一对,这四条还留着。
为什么这三条正是当初手工降定的值
CHANGELOG.md「便携钉装自洽修复」记着:全新 WinPython 上 pip install -r requirements-small.txt 报 ResolutionImpossible,当时按 .venv 实测对齐了 9 项,其中就有 antlr4 4.9.3 / mpmath 1.3.0 / tokenizers 0.21.0 + transformers 4.52.1 。#87 把这三项又推上去了,等于把那次修复撤销了一半。
可行解(算术已核)
仓库自有代码的 API 面(降低"5.x 会不会炸"的不确定度)
自有代码只从 transformers 取 4 个顶层符号:AutoModel、AutoTokenizer、LlamaTokenizerFast、PreTrainedTokenizer。但 app/integrated_app/vendor/ 下的上游建模代码是否用到 5.x 已移除的 API,元数据看不出来,必须真机跑一次加载 。
建议的最小动作
立即回退 mpmath→1.3.x、antlr4-python3-runtime→4.9.3(无争议,纯恢复被 build(deps): bump the minor-and-patch group with 7 updates #87 撤销的手工修复);
tokenizers 二选一(退 0.21.x 保 4.52.1,或与 build(deps): bump transformers from 4.52.1 to 5.17.0 #88 +build(deps): bump huggingface-hub from 0.36.2 to 1.32.0 #91 一起进 5.x),并跑一次便携包解析 + 真机加载;
把"跨包交叉约束"也纳入 CI 门禁:feat(ci)+fix(security): 钉版下界棘轮门禁 + CSRF 静默降级改硬失败 #81 的 check_pin_floors.py 现在只查下界 ,查不出这类上界/== 冲突(本 issue 四条它一条都抓不到)。我把它扩展成同时做交叉约束校验,判据就是上面这四条 + 已知的 pydantic-core 那对。
(本 issue 全部结论来自 PyPI requires_dist 元数据与 git 历史,未做任何下载/安装。)
结论
requirements-lock.txt与launcher/requirements-small.txt(内容一致)目前有 4 条按 PyPI 声明即可证伪的自相约束。这不是"可能不兼容",是解析器必然报冲突:tokenizers<0.22,>=0.21transformers==4.52.1mpmath<1.4,>=1.1.0sympy==1.14.0antlr4-python3-runtime==4.9.*hydra-core==1.3.7antlr4-python3-runtime==4.9.*omegaconf==2.3.1来源:
7095f86 build(deps): bump the minor-and-patch group with 7 updates (#87)。#92 只修了pydantic-core那一对,这四条还留着。为什么这三条正是当初手工降定的值
CHANGELOG.md「便携钉装自洽修复」记着:全新 WinPython 上pip install -r requirements-small.txt报ResolutionImpossible,当时按.venv实测对齐了 9 项,其中就有 antlr4 4.9.3 / mpmath 1.3.0 / tokenizers 0.21.0 + transformers 4.52.1。#87 把这三项又推上去了,等于把那次修复撤销了一半。可行解(算术已核)
mpmath→ 只能回到<1.4(即 1.3.x),sympy没有放宽的余地;antlr4-python3-runtime→ 只能回到4.9.*。这两条没有前进路径。tokenizers 0.23.2是唯一的例外,它有两条路:tokenizers回到0.21.x,transformers保持 4.52.1;transformers上 5.x。注意 4.x 全线(实测 4.56.2 / 4.57.0 / 4.57.6)都要求tokenizers<=0.23.0,>=0.22.0—— 0.23.2 高于所有 4.x 的天花板,所以"升到 4.57.x"救不了它。transformers 5.17.0还要求huggingface-hub>=1.5.0,<2.0,而 4.52.1 要求hub<1.0—— 两个区间无交集,所以 build(deps): bump transformers from 4.52.1 to 5.17.0 #88 必须与 build(deps): bump huggingface-hub from 0.36.2 to 1.32.0 #91(hub 1.32.0)同时合入才可能解析。其余新约束本地已满足:regex>=2025.10.22(锁里 2026.9.10 ✔)、safetensors>=0.8.0✔、requires_python>=3.10✔。仓库自有代码的 API 面(降低"5.x 会不会炸"的不确定度)
自有代码只从 transformers 取 4 个顶层符号:
AutoModel、AutoTokenizer、LlamaTokenizerFast、PreTrainedTokenizer。但app/integrated_app/vendor/下的上游建模代码是否用到 5.x 已移除的 API,元数据看不出来,必须真机跑一次加载。建议的最小动作
mpmath→1.3.x、antlr4-python3-runtime→4.9.3(无争议,纯恢复被 build(deps): bump the minor-and-patch group with 7 updates #87 撤销的手工修复);tokenizers二选一(退 0.21.x 保 4.52.1,或与 build(deps): bump transformers from 4.52.1 to 5.17.0 #88+build(deps): bump huggingface-hub from 0.36.2 to 1.32.0 #91 一起进 5.x),并跑一次便携包解析 + 真机加载;check_pin_floors.py现在只查下界,查不出这类上界/==冲突(本 issue 四条它一条都抓不到)。我把它扩展成同时做交叉约束校验,判据就是上面这四条 + 已知的 pydantic-core 那对。(本 issue 全部结论来自 PyPI
requires_dist元数据与 git 历史,未做任何下载/安装。)