-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the configurable digest_name for simple JSON (#1442)
* Use the configurable digest_name for simple JSON PEP 691 specifies that each file's hashes dictionary must contain only hash algorithms that can be passed, without arguments, to hashlib.new(). PyPI has started using a "blake2b_256" key for digests, which is blake2b with the digest size set to 32 bytes, and makes it so that contents of "digests" can't just be reused for the hashes dictionary. This commit uses the value of configuration option digest_name to pick a single supported key/value pair from the digests for use in the hashes dictionary. * Fix format value lookup list.sort() modifies a list in-place and returns None. * Define digests supported by Simple API files * Update simple API tests for digest changes * Validate digest_name config using simple module * Update digest name test in test_main module Switch InvalidDigestFormat base class to ValueError. * Add PR #1442 changelog entry * Fix StrEnum usage on Python >=3.11
- Loading branch information
Showing
7 changed files
with
101 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters