-
Notifications
You must be signed in to change notification settings - Fork 278
Make length and hashes optional in snapshot/timestamp metadata #996
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I will work on that issue. I have one question though: I am planning to add additional parameters to |
I suggest to choose them so that the default behavior of these functions matches their current behavior. |
My initial feeling was that we should default to the current behaviour, but I wonder whether there's an argument to be made for not providing default values. If we don't have default values, we force implementers to explicitly choose whether they want to include lengths and hashes, rather than inheriting a default. Furthermore I think the specification suggesting the fields are optional implies that they would not be included by default, and thus would expect similar behaviour from a reference implementation. Conversely, I think the current values probably are sensible defaults, particularly for i.e. the PEP 458 implementation. I'm curious to read what others think. |
I feel like security by default should be implied here and use |
@joshuagl can you close this one? It's fixed by the above pr. |
Fixed in #1031 |
Description of issue or feature request:
As per the specification (v1.0.1)
length
andhashes
fields in timestamp and snapshot metadata are optional. The reference implementation should reflect this.Current behavior:
reposoitory_lib.generate_timestamp_metadata
)repository_lib.generate_snapshot_metadata
)Expected behavior:
Add option to include/exclude these fields in the relevant functions in
repository_lib
. Since these functions are usually called viawrite/writeall
the option should be made available there too. It's also conceivable to configure this via attributes on the Repository object.The text was updated successfully, but these errors were encountered: