Skip to content

chore: 限制 Renovate 不升级 Python 3.15 - #42

Merged
Logic769 merged 1 commit into
masterfrom
chore/renovate-python-guard
Nov 16, 2026
Merged

Logic769 merged 1 commit into
masterfrom
chore/renovate-python-guard

Conversation

@Logic769

Copy link
Copy Markdown
Owner

背景

Renovate 反复创建 Python 3.12 → 3.15 的升级 PR(#26 已关闭,随后又重建 #39、#40),但 3.15 当前不可行:

  • PyPI 的 lxml 6.0.2 只发布 cp313/cp314 wheel,没有 cp315 轮子;
  • python:3.15-slim 未预装 libxml2/libxslt 开发包,pip install lxml 直接失败,Docker 构建无法通过(实测报错 Error: Please make sure the libxml2 and libxslt development packages are installed.)。

改动

在 renovate.json 的 packageRules 末尾新增一条规则:

{
  "matchPackageNames": ["python"],
  "allowedVersions": "<3.15"
}

该规则同时覆盖 Dockerfile 的 python:3.12-slim 基础镜像与 CI 的 python-version(两处 packageName 均为 python),Renovate 不会再为 3.15 创建 PR。

恢复条件

待 lxml 发布 cp315 wheel、python:3.15-slim 补齐 libxml2/libxslt 依赖后,删除此规则即可恢复自动升级。

验证

  • json.load() 解析通过,packageRules 数量 2 → 3;
  • 规则仅按包名 python 约束,不影响 ruff/mypy 与 constraints 规则。

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 684eec46-ef51-4ad3-aa98-1155c4379b47
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ghfind-review ghfind-review Bot added review: high ghfind author score; see https://ghfind.com enhancement New feature or request labels Nov 16, 2026
@Logic769
Logic769 merged commit be4f388 into master Nov 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request review: high ghfind author score; see https://ghfind.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant