(original) (raw)
changeset: 98491:4da7edbf78d4 user: Victor Stinner victor.stinner@gmail.com date: Fri Oct 02 23:00:39 2015 +0200 files: Doc/library/crypt.rst Lib/crypt.py Misc/NEWS description: Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not supported. Check if it is supported, it may not be supported on OpenBSD for example. diff -r 45640def1e3d -r 4da7edbf78d4 Doc/library/crypt.rst --- a/Doc/library/crypt.rst Fri Oct 02 23:29:13 2015 +0300 +++ b/Doc/library/crypt.rst Fri Oct 02 23:00:39 2015 +0200 @@ -64,7 +64,7 @@ A list of available password hashing algorithms, as ``crypt.METHOD_*`` objects. This list is sorted from strongest to - weakest, and is guaranteed to have at least ``crypt.METHOD_CRYPT``. + weakest. Module Functions diff -r 45640def1e3d -r 4da7edbf78d4 Lib/crypt.py --- a/Lib/crypt.py Fri Oct 02 23:29:13 2015 +0300 +++ b/Lib/crypt.py Fri Oct 02 23:00:39 2015 +0200 @@ -54,9 +54,8 @@ METHOD_SHA512 = _Method('SHA512', '6', 16, 106) methods = [] -for _method in (METHOD_SHA512, METHOD_SHA256, METHOD_MD5): +for _method in (METHOD_SHA512, METHOD_SHA256, METHOD_MD5, METHOD_CRYPT): _result = crypt('', _method) if _result and len(_result) == _method.total_size: methods.append(_method) -methods.append(METHOD_CRYPT) del _result, _method diff -r 45640def1e3d -r 4da7edbf78d4 Misc/NEWS --- a/Misc/NEWS Fri Oct 02 23:29:13 2015 +0300 +++ b/Misc/NEWS Fri Oct 02 23:00:39 2015 +0200 @@ -40,6 +40,10 @@ Library ------- +- Issue #25287: Don't add crypt.METHOD_CRYPT to crypt.methods if it's not + supported. Check if it is supported, it may not be supported on OpenBSD for + example. + - Issue #23600: Default implementation of tzinfo.fromutc() was returning wrong results in some cases. /victor.stinner@gmail.com