)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31245,"name":"Daniel Bengtsson","email":"dbengt@redhat.com","username":"damani42"},"change_message_id":"772b4463c9f99ecc51a3976d19e2dbf87b52f2a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"66eb5505_5fa656fd","updated":"2022-01-13 11:21:09.000000000","message":"Any update about this patch? It\u0027s still relevant?","commit_id":"c80a68365fc2323fb4e9e289da242b681d5d8e6a"}],"oslo_utils/secretutils.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfff2d1a27396375062b78abfd2973229df9cf9d","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"try:"},{"line_number":45,"context_line":"    constant_time_compare \u003d hmac.compare_digest"},{"line_number":46,"context_line":"except AttributeError:"},{"line_number":47,"context_line":"    constant_time_compare \u003d _constant_time_compare"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"df59f0d5_ebca5ce2","line":45,"updated":"2021-06-25 11:47:05.000000000","message":"fwiw, this is always present since Python 3.3 so we can probably deprecate this now [1]\n\n[1] https://docs.python.org/3/library/hmac.html#hmac.compare_digest","commit_id":"c80a68365fc2323fb4e9e289da242b681d5d8e6a"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"dfff2d1a27396375062b78abfd2973229df9cf9d","unresolved":true,"context_lines":[{"line_number":49,"context_line":"if \u0027md5\u0027 not in hashlib.algorithms_available:"},{"line_number":50,"context_line":"    raise ValueError(\u0027md5 is not supported on this \u0027"},{"line_number":51,"context_line":"                     \u0027system, supported are %s\u0027"},{"line_number":52,"context_line":"                     % \u0027, \u0027.join(hashlib.algorithms_available))"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"try:"},{"line_number":55,"context_line":"    _ \u003d hashlib.md5(usedforsecurity\u003dFalse)  # nosec"}],"source_content_type":"text/x-python","patch_set":1,"id":"5fbc3029_c38496b2","line":52,"updated":"2021-06-25 11:47:05.000000000","message":"This seems like a bit of a hammer. This will prevent someone using this entire module if md5 isn\u0027t available. Could we instead do something like:\n\n  try:\n      ...\n  except (TypeError, AttributeError):\n      ...\n\ni.e. extend the exception handlers so we\u0027ll simply handle the AttributeError that will be raised (I think. Can you check?) if the \u0027md5\u0027 function is not available in the first case, falling back to the legacy implementation. That\u0027ll simply mean a user can import this module. If they attempt to actually call the \u0027md5\u0027 function (as oposed to the \u0027constant_time_compare\u0027 function) then they will see an AttributeError.\n\nRealistically, all calling code will need to add this check for \u0027md5\u0027 not supported. I don\u0027t think this is something we can handle unless we want to have an md5 function that returns something other than md5 😄","commit_id":"c80a68365fc2323fb4e9e289da242b681d5d8e6a"}]}
