)]}'
{"bandit/core/context.py":[{"author":{"_account_id":11861,"name":"Travis McPeak","email":"tmcpeak@us.ibm.com","username":"travis-mcpeak"},"change_message_id":"137637146bcbf277061a4da92e90015a095589fe","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        :return: String value of a standalone string"},{"line_number":147,"context_line":"        \u0027\u0027\u0027"},{"line_number":148,"context_line":"        if \u0027str\u0027 in self._context:"},{"line_number":149,"context_line":"            return self._context[\u0027str\u0027]"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            return None"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_c7b56f31","line":149,"updated":"2015-08-19 14:03:06.000000000","message":"this was in place to prevent an error on strange unicode strings if I remember correctly.  Wish we had the test case :(","commit_id":"0e2508a9168a0e9f5a762de477b7273d4d1d1821"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"654c04ac6bad3a397afaa731fd7176715a311657","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        :return: String value of a standalone string"},{"line_number":147,"context_line":"        \u0027\u0027\u0027"},{"line_number":148,"context_line":"        if \u0027str\u0027 in self._context:"},{"line_number":149,"context_line":"            return self._context[\u0027str\u0027]"},{"line_number":150,"context_line":"        else:"},{"line_number":151,"context_line":"            return None"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_c61f1508","line":149,"in_reply_to":"fa1b9901_c7b56f31","updated":"2015-09-01 22:21:45.000000000","message":"I tried to find a way to cause the error, but couldn\u0027t. Basically what safe_str is trying to do is take a value from a Str node and have a special condition if you can\u0027t do str(that_value) - specifically an UnicodeEncodeError. This can\u0027t happen in py2 as far as I can tell and is just wrong in py3.\n\nIf something needs encoding, that should be explicit in cases where we get unicode, rather than \"if casting to str() fails\".","commit_id":"0e2508a9168a0e9f5a762de477b7273d4d1d1821"}],"bandit/core/test_properties.py":[{"author":{"_account_id":11716,"name":"Tim Kelsey","email":"timothy.kelsey@uk.ibm.com","username":"tkelsey"},"change_message_id":"a0b7d7e839cb0d385b8fcdc3489085067d0a91e3","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                holder \u003d getattr(ast, a)"},{"line_number":67,"context_line":"            except AttributeError:"},{"line_number":68,"context_line":"                if a \u003d\u003d \u0027Bytes\u0027:"},{"line_number":69,"context_line":"                    logger.debug(\"check on AST.Bytes requested, but not \""},{"line_number":70,"context_line":"                                 \"available in current python\")"},{"line_number":71,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_a2f3899d","line":68,"updated":"2015-08-19 14:26:03.000000000","message":"This is a good idea, but I suspect we will have a few cases where py2/3 differences  will trigger this check. Perhaps generalise this to check against a set of known Py3 only AST types?","commit_id":"0e2508a9168a0e9f5a762de477b7273d4d1d1821"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"0f4ec1dad5182220b7690e3da2688c4c1e5c7886","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                holder \u003d getattr(ast, a)"},{"line_number":67,"context_line":"            except AttributeError:"},{"line_number":68,"context_line":"                if a \u003d\u003d \u0027Bytes\u0027:"},{"line_number":69,"context_line":"                    logger.debug(\"check on AST.Bytes requested, but not \""},{"line_number":70,"context_line":"                                 \"available in current python\")"},{"line_number":71,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa1b9901_4a3963a3","line":68,"in_reply_to":"fa1b9901_a2f3899d","updated":"2015-08-19 15:03:19.000000000","message":"So I absolutely hate having special cases here. If this becomes our dumping ground for py2/py3 compatibility all will go wrong.\n\nWe already have a way for registering checks based on different versions of python in one or two other plugins. We can provide a convenience way of declaring this for plugin authors, but this should be done in the check with something like\n\n\n    if six.PY2:\n        check_nodes \u003d (\u0027Str\u0027,)\n    elif six.PY3:\n        check_nodes \u003d (\u0027Str\u0027, \u0027Bytes\u0027)\n\n\n    @checks(*check_nodes)\n     def ...","commit_id":"0e2508a9168a0e9f5a762de477b7273d4d1d1821"}]}
