)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7a8a51dd14d1767b1e97254970b2e6b2b4e3ea7b","unresolved":false,"context_lines":[{"line_number":29,"context_line":" - Testing?  (For a start, it passes all current tox tests.)"},{"line_number":30,"context_line":" - Make sure we\u0027re okay with default behavior (I personally quite like"},{"line_number":31,"context_line":"   not having to think about it :) ), or consider multiprocessing"},{"line_number":32,"context_line":"   elements that might be tweaked or made optional."},{"line_number":33,"context_line":" - Look at options for bringing back progress indicator, although I\u0027m"},{"line_number":34,"context_line":"   wondering if that will be missed."},{"line_number":35,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9a1a9d01_a7672424","line":32,"updated":"2015-09-28 17:05:53.000000000","message":"There have been numerous problems as a result of introducing multiprocessing in Flake8 that have been resolved over time. I thoroughly encourage you to go look at the closed issues and how they have been resolved. The biggest boon to solving these or providing immediate fixes is having a flag that controls how many processes are spawned and if set to 0 or 1, turning it off altogether.","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"}],"bandit/core/manager.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":34,"context_line":"def parallel_run_tests(b_conf, b_ma, b_ts, debug, fname):"},{"line_number":35,"context_line":"    \u0027\u0027\u0027Runs all tests for a single file, via the NodeVisitor"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    Implemented as a class-level function, so it can be passed into and"},{"line_number":38,"context_line":"    executed by the multiprocessing library."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    :return: -"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_a69ad3c3","line":37,"updated":"2015-09-10 11:19:29.000000000","message":"s/class-level/module-level/, but I\u0027m not sure what this comment is saying - you can map methods using Pool.map(_async).","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"                results, scores \u003d _execute_ast_visitor("},{"line_number":51,"context_line":"                    fname, fdata, b_conf, b_ma, b_ts, debug"},{"line_number":52,"context_line":"                )"},{"line_number":53,"context_line":"            except KeyboardInterrupt as e:"},{"line_number":54,"context_line":"                sys.exit(2)"},{"line_number":55,"context_line":"    except IOError as e:"},{"line_number":56,"context_line":"        skipped \u003d e.strerror"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_92110e60","line":53,"updated":"2015-09-10 11:19:29.000000000","message":"e is unused here. Also, does this propagate KeyboardInterrupt properly? Multiprocessing docs say that \"If the remote call raised an exception then that exception will be reraised by get().\", so maybe letting KeyboardInterrupt bubble up is a better idea?","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                    fname, fdata, b_conf, b_ma, b_ts, debug"},{"line_number":52,"context_line":"                )"},{"line_number":53,"context_line":"            except KeyboardInterrupt as e:"},{"line_number":54,"context_line":"                sys.exit(2)"},{"line_number":55,"context_line":"    except IOError as e:"},{"line_number":56,"context_line":"        skipped \u003d e.strerror"},{"line_number":57,"context_line":"    except SyntaxError as e:"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_a6fe5303","line":54,"updated":"2015-09-10 11:19:29.000000000","message":"http://bugs.python.org/issue9205 suggests that you really shouldn\u0027t sys.exit() from child processes. It\u0027s only fixed in 3.5","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    \u0027\u0027\u0027"},{"line_number":72,"context_line":"    results \u003d []"},{"line_number":73,"context_line":"    scores \u003d None"},{"line_number":74,"context_line":"    if fdata is not None:"},{"line_number":75,"context_line":"        res \u003d b_node_visitor.BanditNodeVisitor("},{"line_number":76,"context_line":"            fname, b_conf, b_ma, b_ts, debug"},{"line_number":77,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_86ad4f9d","line":74,"updated":"2015-09-10 11:19:29.000000000","message":"That\u0027s always true. \"with open(...)\" can\u0027t return None. Actually, I\u0027d just pull the whole function into wherever it\u0027s called, because it doesn\u0027t actually do anything new. Just the \"res \u003d ...\" part will take the same space as the call to this function.","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":264,"context_line":"            parallel_run_tests, self.b_conf, self.b_ma, self.b_ts, self.debug"},{"line_number":265,"context_line":"        )"},{"line_number":266,"context_line":"        # pass the pool the partial fun and the list of files in scope"},{"line_number":267,"context_line":"        p \u003d pool.map_async(func, self.files_list)"},{"line_number":268,"context_line":"        returned \u003d []"},{"line_number":269,"context_line":"        # poll pool for results, exiting if KeyboardInterrupt received"},{"line_number":270,"context_line":"        # we use p.get(timeout) so we can respond to ctrl-c immediately"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_f22deafd","line":267,"updated":"2015-09-10 11:19:29.000000000","message":"I don\u0027t see why map_async is used here. Can\u0027t we just map() if there\u0027s nothing to do while waiting for results? Unless you want to add a callback for progress reporting later, but in that case a TODO would be good.","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7a8a51dd14d1767b1e97254970b2e6b2b4e3ea7b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # poll pool for results, exiting if KeyboardInterrupt received"},{"line_number":270,"context_line":"        # we use p.get(timeout) so we can respond to ctrl-c immediately"},{"line_number":271,"context_line":"        try:"},{"line_number":272,"context_line":"            interim_results \u003d p.get(timeout\u003d0xFFFF)"},{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_476e4802","line":272,"updated":"2015-09-28 17:05:53.000000000","message":"+1","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # poll pool for results, exiting if KeyboardInterrupt received"},{"line_number":270,"context_line":"        # we use p.get(timeout) so we can respond to ctrl-c immediately"},{"line_number":271,"context_line":"        try:"},{"line_number":272,"context_line":"            interim_results \u003d p.get(timeout\u003d0xFFFF)"},{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_52a3769e","line":272,"updated":"2015-09-10 11:19:29.000000000","message":"This seems to suggest that timeout is some kind of a mask/bitvec. I have no idea how long this is going to wait. How about:\n\n    p.get(timeout\u003d5*60)","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":270,"context_line":"        # we use p.get(timeout) so we can respond to ctrl-c immediately"},{"line_number":271,"context_line":"        try:"},{"line_number":272,"context_line":"            interim_results \u003d p.get(timeout\u003d0xFFFF)"},{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"},{"line_number":276,"context_line":"            sys.exit(2)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_b284520b","line":273,"updated":"2015-09-10 11:19:29.000000000","message":"I\u0027m not sure I understand why it\u0027s interim_results / returned. Can\u0027t we just:\n\n    returned \u003d p.get(timeout...)\n\n?","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            interim_results \u003d p.get(timeout\u003d0xFFFF)"},{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"},{"line_number":276,"context_line":"            sys.exit(2)"},{"line_number":277,"context_line":"        pool.close()"},{"line_number":278,"context_line":"        pool.join()"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_32f7e25a","line":275,"updated":"2015-09-10 11:19:29.000000000","message":"Do we need a pool.terminate() before exit, or will the children get reaped here automatically?","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":12000,"name":"Ian Cordasco","email":"sigmavirus24@gmail.com","username":"sigmavirus24"},"change_message_id":"7a8a51dd14d1767b1e97254970b2e6b2b4e3ea7b","unresolved":false,"context_lines":[{"line_number":272,"context_line":"            interim_results \u003d p.get(timeout\u003d0xFFFF)"},{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"},{"line_number":276,"context_line":"            sys.exit(2)"},{"line_number":277,"context_line":"        pool.close()"},{"line_number":278,"context_line":"        pool.join()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a1a9d01_67710ce0","line":275,"updated":"2015-09-28 17:05:53.000000000","message":"Stanislaw, I believe they are reaped automatically.","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":273,"context_line":"            returned.extend(interim_results)"},{"line_number":274,"context_line":"        except KeyboardInterrupt:"},{"line_number":275,"context_line":"            print(\u0027Terminating scan - Ctrl-C received\u0027)"},{"line_number":276,"context_line":"            sys.exit(2)"},{"line_number":277,"context_line":"        pool.close()"},{"line_number":278,"context_line":"        pool.join()"},{"line_number":279,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_f2b88ac9","line":276,"updated":"2015-09-10 11:19:29.000000000","message":"multiprocessing.TimeoutError is not handled. It could do a pool.terminate() and log some error + exit.","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"cd7f383f5725f4cb2ed4938bdfe237764ad06e9a","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        logger.debug(\u0027Files skipped: %s\u0027, len(self.skipped))"},{"line_number":296,"context_line":"        logger.debug(\u0027Issues identified: %s\u0027, issues_count)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _execute_ast_visitor(self, fname, fdata, b_ma, b_ts):"},{"line_number":299,"context_line":"        \u0027\u0027\u0027Execute AST parse on each file"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        :param fname: The name of the file being parsed"}],"source_content_type":"text/x-python","patch_set":3,"id":"da20952f_26d1e3fb","line":298,"updated":"2015-09-10 11:19:29.000000000","message":"Not needed anymore, right?","commit_id":"c0af038524cb88d748cd3723fdc1456a19e7c08b"}]}
