)]}'
{"swift/common/middleware/crypto/keymaster.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b2e759319268fb29fb5f972d07a7ec5f715445cb","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from swift.common.middleware.crypto.crypto_utils import CRYPTO_KEY_CALLBACK"},{"line_number":20,"context_line":"from swift.common.swob import Request, HTTPException"},{"line_number":21,"context_line":"from swift.common.utils import readconf, base64decode"},{"line_number":22,"context_line":"from swift.common.wsgi import WSGIContext"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_9f83f356","line":21,"updated":"2017-12-14 20:45:49.000000000","message":"ouch importing this way makes it seem even *easier* to get mixed up with the stdlib version from base64... oh well...","commit_id":"31dd95ee91589be937565692a1610ba49db29706"}],"swift/common/utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b2e759319268fb29fb5f972d07a7ec5f715445cb","unresolved":false,"context_lines":[{"line_number":4337,"context_line":"    return None"},{"line_number":4338,"context_line":""},{"line_number":4339,"context_line":""},{"line_number":4340,"context_line":"def base64decode(value, allow_line_breaks\u003dFalse):"},{"line_number":4341,"context_line":"    \u0027\u0027\u0027"},{"line_number":4342,"context_line":"    Validate and decode Base64-encoded data."},{"line_number":4343,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_f9281f98","line":4340,"updated":"2017-12-14 20:45:49.000000000","message":"I think this name is too similar to the builtin base64.b64decode\n\nI think it would be better to highlight how it\u0027s different from the builtin in the name somehow...\n\nstrict_b64decode\n\n... maybe?","commit_id":"31dd95ee91589be937565692a1610ba49db29706"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"b2e759319268fb29fb5f972d07a7ec5f715445cb","unresolved":false,"context_lines":[{"line_number":3921,"context_line":"                    pass"},{"line_number":3922,"context_line":"                else:"},{"line_number":3923,"context_line":"                    failures.append(\u0027%r \u003d\u003e %r (expected to raise ValueError)\u0027 %"},{"line_number":3924,"context_line":"                                    (value, result))"},{"line_number":3925,"context_line":"            else:"},{"line_number":3926,"context_line":"                try:"},{"line_number":3927,"context_line":"                    result \u003d utils.base64decode(value)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_9f9a13c3","line":3924,"updated":"2017-12-14 20:45:49.000000000","message":"this is pretty good!  I was playing around with using this test on the stdlib version to better understand the behavior differences and I think the only change might have been to make the test more robust to different exceptions...\n\n    diff --git a/test/unit/common/test_utils.py b/test/unit/common/test_utils.py\n    index 376e297..4c76c37 100644\n    --- a/test/unit/common/test_utils.py\n    +++ b/test/unit/common/test_utils.py\n    @@ -38,6 +38,7 @@ import string\n     import sys\n     import json\n     import math\n    +import inspect\n     \n     import six\n     from six import BytesIO, StringIO\n    @@ -3914,14 +3915,16 @@ cluster_dfw1 \u003d http://dfw1.host/v1/\n     \n             failures \u003d []\n             for value, expected in expectations.items():\n    -            if expected is ValueError:\n    +            if inspect.isclass(expected) and issubclass(expected, Exception):\n                     try:\n                         result \u003d utils.base64decode(value)\n    -                except ValueError:\n    -                    pass\n    +                except Exception as e:\n    +                    if not isinstance(e, expected):\n    +                        failures.append(\u0027%r raised %r (expected to raise %r)\u0027 %\n    +                                        (value, e, expected))\n                     else:\n    -                    failures.append(\u0027%r \u003d\u003e %r (expected to raise ValueError)\u0027 %\n    -                                    (value, result))\n    +                    failures.append(\u0027%r \u003d\u003e %r (expected to raise %r)\u0027 %\n    +                                    (value, result, expected))\n                 else:\n                     try:\n                         result \u003d utils.base64decode(value)\n\n\n.... i wonder if that could be improved even further ...","commit_id":"31dd95ee91589be937565692a1610ba49db29706"}]}
