Skip to content

Commit

Permalink
FEAT: Switch default hash-algo to sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
jayeff committed Sep 8, 2023
1 parent 6417769 commit ee5a65e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pypiserver/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class DEFAULTS:
AUTHENTICATE = ["update"]
FALLBACK_URL = "https://pypi.org/simple/"
HEALTH_ENDPOINT = "/health"
HASH_ALGO = "md5"
HASH_ALGO = "sha256"
INTERFACE = "0.0.0.0"
LOG_FRMT = "%(asctime)s|%(name)s|%(levelname)s|%(thread)d|%(message)s"
LOG_ERR_FRMT = "%(body)s: %(exception)s \n%(traceback)s"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ def test_fallback_url_default(main):

def test_hash_algo_default(main):
main([])
assert main.app._pypiserver_config.hash_algo == "md5"
assert main.app._pypiserver_config.hash_algo == "sha256"


def test_hash_algo(main):
main(["--hash-algo=sha256"])
assert main.app._pypiserver_config.hash_algo == "sha256"
main(["--hash-algo=md5"])
assert main.app._pypiserver_config.hash_algo == "md5"


def test_hash_algo_off(main):
Expand Down

0 comments on commit ee5a65e

Please sign in to comment.