Skip to content

Require hashes for build dependencies - #287

Merged
zanieb merged 2 commits into
mainfrom
require-build-hashes
Oct 14, 2026
Merged

zanieb merged 2 commits into
mainfrom
require-build-hashes

Conversation

@zanieb

@zanieb zanieb commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Enable require-build-hashes and pin isolated build dependencies with hashes in the project configuration. Use compatible bounds for flit_core in [build-system].requires so downstream projects can select their own verified backend version without conflicting with an exact package-level pin.

@astral-sh-bot

This comment has been minimized.

Comment thread pyproject.toml
Comment on lines +181 to +184
{ requirement = "flit-core==4.0.2", hashes = [
"sha256:8d80717e28d982b41594ed5b14d4e89fbc5bad55473fde27994a3101db18a94e",
"sha256:b6929defd93884b584d7c87829e0e7b5c26ed6be17b0b873979019314aa841c8",
] },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question as https://github.com/astral-sh/astral-bot/pull/142#discussion_r4262016653: what's the advantage to pinning flit-core twice in the pyproject.toml file? This is going to break Renovate upgrade PRs; can we not pin the declared dependency on line 2 to a hash and avoid this second pin?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't pin a hash there because it's not supported by standards, additionally, that pin does not apply transitively, just to the build backend for this package and not any subsequent package which may use flit-core for builds

breaking renovate for build dependencies is an expected consequence / acceptable trade-off until we have real build dependency locking

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay that makes sense, can we disable updates of flit-core in the renovate config in that case?

@astral-sh-bot

astral-sh-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

This change has no effect on the docstrings that would be added to typeshed. 🤖🎉

@zanieb
zanieb marked this pull request as ready for review October 14, 2026 01:21
@zanieb
zanieb merged commit cb5e2ae into main Oct 14, 2026
30 checks passed
@zanieb
zanieb deleted the require-build-hashes branch October 14, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants