Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Snapshot and Timestamp default content

オープン
#2,307 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
security

調査の方向性

まず Snapshot と Timestamp のコンストラクター、および Repository.snapshot() と Repository.timestamp() メソッドを読んで、それらのデフォルトメタデータが生成チェックにどのような影響を与えるかを理解します。提案されているデフォルト値 empty-dict と MetaFile(0) を、既存の MetaFile の有効性ルールと比較します。新しく構築されたオブジェクトが、snapshot または timestamp のメタデータが生成済みであると誤って示さなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Snapshot and Timestamp constructors try to be clever:

self.meta = meta if meta is not None else {"targets.json": MetaFile(1)}

and

self.snapshot_meta = snapshot_meta or MetaFile(1)

So they set the metafile content without knowing what it really should be

this is annoying as Repository.snapshot() and Repository.timestamp() now think a snapshot and timestamp are not needed -- even though none have been generated yet.

I can work around this but especially for snapshot the default value seems wrong: empty dict would be more correct -- the meta dict should be filled by a conscious decision not by a default value that might be right.

For timestamp there might not be a correct value though. I think MetaFile(0) would be best (although it requires loosening the check for valid MetaFiles): it's at least clear that timestamp doesn't have a snapshot version yet

主要言語
Python
スター
1.7k
フォーク
304
平均マージ
1日 2時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

theupdateframework/python-tuf のほかの issue

theupdateframework/python-tuf の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。