comparison roundup/password.py @ 7702:70a6ee453ddc

fix: fix failing test when crypt is missing. In 3.13 crypt is gone and there is no replacement as it's supplied by a .so as _crypt. Don't hardcode the crypt method in the array, add it (next to last) only if crypt was detected.
author John Rouillard <rouilj@ieee.org>
date Mon, 20 Nov 2023 17:12:46 -0500
parents a2ecc31c43ac
children 897c23876e9f
comparison
equal deleted inserted replaced
7701:5a35cfee727a 7702:70a6ee453ddc
393 1 393 1
394 >>> 'not sekrit' != p 394 >>> 'not sekrit' != p
395 1 395 1
396 """ 396 """
397 397
398 deprecated_schemes = ["SSHA", "SHA", "MD5", "crypt", "plaintext"] 398 deprecated_schemes = ["SSHA", "SHA", "MD5", "plaintext"]
399 if crypt:
400 # place just before plaintext if crypt is available
401 deprecated_schemes.insert(-1, "crypt")
399 experimental_schemes = ["PBKDF2S5"] 402 experimental_schemes = ["PBKDF2S5"]
400 known_schemes = ["PBKDF2"] + experimental_schemes + \ 403 known_schemes = ["PBKDF2"] + experimental_schemes + \
401 deprecated_schemes 404 deprecated_schemes
402 405
403 def __init__(self, plaintext=None, scheme=None, encrypted=None, 406 def __init__(self, plaintext=None, scheme=None, encrypted=None,

Roundup Issue Tracker: http://roundup-tracker.org/