Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Generate digital attestations for PyPI (PEP 740)#198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugovk merged 2 commits intopython:mainfromhugovk:attest
Oct 6, 2024

Conversation

hugovk
Copy link
Member

@hugovkhugovk commentedSep 27, 2024
edited
Loading

PEP 740 ("Index support for digital attestations") introduces signatures which links the PyPI package to the GitHub repo, and helps users verify the source and authenticity of packages.

PyPI is still implementing support, but we can already start using it, which should also help them test out.

Comment on lines +51 to +52
with:
attestations: true
Copy link
Member

Choose a reason for hiding this comment

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

So this is what actually generates the attestations, and even though the feature is still experimental we can still enable it here (and in the other repos) and letgh-action-pypi-publish deal with potential API changes, right?

I guess the other changes are unrelated, but it was convenient to bundle them together.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yes, pretty much. There's a chance we may need to change config here too, butgh-action-pypi-publish should deal with most of it.

ezio-melotti reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, do you know what caused the changes below?
Some of them seem backward, at least coming from Python (e.g. removing the double space before# and adding spaces within[] and{}), at least coming from Python.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

They nearly all came from the pyproject-fmt upgrade from 1.x to 2.x.

We needed to bump actionlint so it wouldn't fail on the new attestations config, then I updated the other pre-commit at the same time.

One pyproject-fmt change is to align all the comments. Before, we just so happened to manually align them. Now, it automatically does it. I'm not sure why pyproject-fmt chose a single space, but it's a TOML file, not a Python file.

(Looks like it's using thisTOML formatter which hasalign_comments but no option for how many spaces.)


I manually adjusted this into a single line:

include = ["python_docs_theme/",]

to:

include = ["python_docs_theme/" ]

The extra spaces are also from pyproject-fmt, and common in examples in the spec:https://toml.io/en/v1.0.0

Again, this TOML not Python. I guess I might slightly prefer more a Python-y style, but having an autoformatter keep things consistent, and easier to compare across projects, is much more valuable for me.

ezio-melotti reacted with thumbs up emoji
Copy link
Member

Choose a reason for hiding this comment

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

Yep, I figured that TOML might be following different conventions, and it makes sense to be consistent with those.
Thanks for looking into this!

hugovk reacted with thumbs up emoji
@hugovkhugovk merged commit3e81cef intopython:mainOct 6, 2024
10 checks passed
@hugovkhugovk deleted the attest branchOctober 6, 2024 11:11
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ezio-melottiezio-melottiezio-melotti approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugovk@ezio-melotti

[8]ページ先頭

©2009-2025 Movatter.jp