)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"60a50b190ca7588e24888dece326e1fc2c389bf0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace filter() to meet python2,3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In Python3 [1], if we need filter on python3, raplace"},{"line_number":10,"context_line":"filter(lambda obj: test(obj), data) with:"},{"line_number":11,"context_line":"[obj for obj in data if test(obj)]."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_c1711c78","line":9,"range":{"start_line":9,"start_character":46,"end_line":9,"end_character":53},"updated":"2016-08-29 11:39:11.000000000","message":"nit typo: replace","commit_id":"dd643e3573c2f3e24998d6adf34e95d05da8c51b"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"0ae89884b28b2ca83e0d7b8a71a9e26f67c34c13","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace filter() to meet python2,3"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In Python3 [1], if we need filter on python3, raplace"},{"line_number":10,"context_line":"filter(lambda obj: test(obj), data) with:"},{"line_number":11,"context_line":"[obj for obj in data if test(obj)]."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa7ab95a_4cf0e3fe","line":9,"range":{"start_line":9,"start_character":46,"end_line":9,"end_character":53},"in_reply_to":"fa7ab95a_c1711c78","updated":"2016-08-29 11:47:58.000000000","message":"Done","commit_id":"dd643e3573c2f3e24998d6adf34e95d05da8c51b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ea588a46edf85e2047abb4ca4c1360aad2692358","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Nguyen Phuong An \u003cAnNP@vn.fujitsu.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-14 15:03:16 +0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Prevent use filter()"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In Python3 [1], if we need filter on python3, replace"},{"line_number":10,"context_line":"filter(lambda obj: test(obj), data) with:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7a8ec9b2_fd870a10","line":7,"updated":"2016-09-14 08:24:33.000000000","message":".. when a list is needed","commit_id":"b9678fee13fc71a010e425d23355192f0a47e66d"}],"HACKING.rst":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"72c8e4016d84bf965506eab066efa0b6dabc6e44","unresolved":false,"context_lines":[{"line_number":29,"context_line":"- [N340] Check usage of \u003cmodule\u003e.i18n (and neutron.i18n)"},{"line_number":30,"context_line":"- [N341] Check usage of _ from python builtins"},{"line_number":31,"context_line":"- [N342] String interpolation should be delayed at logging calls."},{"line_number":32,"context_line":"- [N343] Python 3: Do not use filter."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Creating Unit Tests"},{"line_number":35,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a8ec9b2_695fc072","line":32,"range":{"start_line":32,"start_character":3,"end_line":32,"end_character":7},"updated":"2016-09-14 07:11:36.000000000","message":"Maybe we should rely on that https://review.openstack.org/#/c/367340/7/HACKING.rst will get merge too and think in advance to not cause conflicts and rename this to N344. What do you think?","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"c251bcf6f6a246c93043b633a8d88e1e19574be6","unresolved":false,"context_lines":[{"line_number":29,"context_line":"- [N340] Check usage of \u003cmodule\u003e.i18n (and neutron.i18n)"},{"line_number":30,"context_line":"- [N341] Check usage of _ from python builtins"},{"line_number":31,"context_line":"- [N342] String interpolation should be delayed at logging calls."},{"line_number":32,"context_line":"- [N343] Python 3: Do not use filter."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Creating Unit Tests"},{"line_number":35,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a8ec9b2_229a2d15","line":32,"range":{"start_line":32,"start_character":3,"end_line":32,"end_character":7},"in_reply_to":"7a8ec9b2_695fc072","updated":"2016-09-14 08:15:29.000000000","message":"Thanks for suggestion. Done.","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ea588a46edf85e2047abb4ca4c1360aad2692358","unresolved":false,"context_lines":[{"line_number":29,"context_line":"- [N340] Check usage of \u003cmodule\u003e.i18n (and neutron.i18n)"},{"line_number":30,"context_line":"- [N341] Check usage of _ from python builtins"},{"line_number":31,"context_line":"- [N342] String interpolation should be delayed at logging calls."},{"line_number":32,"context_line":"- [N344] Python 3: Do not use filter."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Creating Unit Tests"},{"line_number":35,"context_line":"-------------------"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a8ec9b2_3d825201","line":32,"updated":"2016-09-14 08:24:33.000000000","message":".. when a list is needed","commit_id":"b9678fee13fc71a010e425d23355192f0a47e66d"}],"neutron/hacking/checks.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"72c8e4016d84bf965506eab066efa0b6dabc6e44","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_29369803","line":387,"range":{"start_line":387,"start_character":20,"end_line":387,"end_character":36},"updated":"2016-09-14 07:11:36.000000000","message":"I\u0027d add a space after lambda. Current RE will match\n\n filter(lambdafoo\n\nwhere lambdafoo could be a parameter for custom defined filter function.","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"72c8e4016d84bf965506eab066efa0b6dabc6e44","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_49e8447d","line":387,"range":{"start_line":387,"start_character":7,"end_line":387,"end_character":16},"updated":"2016-09-14 07:11:36.000000000","message":"This is going to compile static regular expression per processed line. You should define a constant \n\n filter_match \u003d re.compile(r\"\u003cexpression\u003e\")\n\non module level and then re-use it here:\n\n if filter_match.match(logical_line):","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fcef4a40973740e423b86862854a9922bc58feb1","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_470f4be1","line":387,"updated":"2016-09-14 07:41:04.000000000","message":"python caches regexes so it\u0027s not a big deal\n\nhttp://stackoverflow.com/questions/452104/is-it-worth-using-pythons-re-compile","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"c251bcf6f6a246c93043b633a8d88e1e19574be6","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_c220a9fa","line":387,"range":{"start_line":387,"start_character":20,"end_line":387,"end_character":36},"in_reply_to":"7a8ec9b2_29369803","updated":"2016-09-14 08:15:29.000000000","message":"Thanks for great review. I\u0027ve updated it in new patch-set.","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":15471,"name":"Nguyen Phuong An","email":"annp.cs51@gmail.com","username":"An-FVL"},"change_message_id":"c251bcf6f6a246c93043b633a8d88e1e19574be6","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_e2e2059f","line":387,"in_reply_to":"7a8ec9b2_470f4be1","updated":"2016-09-14 08:15:29.000000000","message":"Hi Jakub and Kevin,\n\nThanks for teaching me. As Kevin\u0027s comment, I\u0027d like to keep my code.","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3d9c91688ba2873ee608d011a64aee68febac047","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_7d4bfa2b","line":387,"in_reply_to":"7a8ec9b2_470f4be1","updated":"2016-09-14 08:19:20.000000000","message":"Interesting, didn\u0027t know about the caching. Though the results are still slightly better with pre-compiled:\nhttp://paste.openstack.org/show/576054/\n\nFrankly, I expected it to be much worse.","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cf93ade8e8d7eaef6f1431160ff10900c1652525","unresolved":false,"context_lines":[{"line_number":384,"context_line":"@flake8ext"},{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N343 - Use list comprehension instead of filter\"\"\""},{"line_number":387,"context_line":"    if re.search(r\".*filter\\(lambda\", logical_line):"},{"line_number":388,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":389,"context_line":"        yield(0, msg)"},{"line_number":390,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a8ec9b2_48d03754","line":387,"in_reply_to":"7a8ec9b2_7d4bfa2b","updated":"2016-09-14 09:17:52.000000000","message":"I didn\u0027t know about caching, but:\n\njakub\u0027s test shows like there\u0027s a big difference between compilation or not (like 3.2 times faster)\n\nI have a vague memory of us fixing something in an agent loop related to re.search slowness","commit_id":"72cea76c5afce15432d2732deb2e74720885e348"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8563f91eeda87f68034e2adf5050dc443e2f5477","unresolved":false,"context_lines":[{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N344 - Use list comprehension instead of filter.\"\"\""},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    if re.search(r\".*filter\\(lambda \", logical_line):"},{"line_number":389,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":390,"context_line":"        yield(0, msg)"},{"line_number":391,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_68bb33c5","line":388,"updated":"2016-09-14 09:19:09.000000000","message":"Jakubs test in previous PS indicates that compile is 3.2 times faster.\n\nShouldn\u0027t we compile the regex at the top of the module since we\u0027re going to pass this over all lines? \n\nhttp://paste.openstack.org/show/576054/","commit_id":"b9678fee13fc71a010e425d23355192f0a47e66d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a6ad80995b0fab6b8bae9ba2cfc372d1e40048ef","unresolved":false,"context_lines":[{"line_number":385,"context_line":"def check_python3_no_filter(logical_line):"},{"line_number":386,"context_line":"    \"\"\"N344 - Use list comprehension instead of filter.\"\"\""},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    if re.search(r\".*filter\\(lambda \", logical_line):"},{"line_number":389,"context_line":"        msg \u003d (\"N343: Use list comprehension instead of filter on python3.\")"},{"line_number":390,"context_line":"        yield(0, msg)"},{"line_number":391,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_889f9f02","line":388,"in_reply_to":"7a8ec9b2_68bb33c5","updated":"2016-09-14 09:26:35.000000000","message":"I mean they are pretty fast using re.match directly. But bear in mind Neutron has hundreds of thousands lines of code. So I\u0027d still prefer compile() over match().","commit_id":"b9678fee13fc71a010e425d23355192f0a47e66d"}],"neutron/tests/tempest/api/test_subnetpools.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"205f5a11f57cca7437e7b3fcc44b8cafa060eae6","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        body \u003d self._create_subnetpool(description\u003d\u0027d1\u0027)"},{"line_number":111,"context_line":"        self.assertEqual(\u0027d1\u0027, body[\u0027description\u0027])"},{"line_number":112,"context_line":"        sub_id \u003d body[\u0027id\u0027]"},{"line_number":113,"context_line":"        subnet_pools \u003d [x for x in self.client.list_subnetpools()"},{"line_number":114,"context_line":"                        if x[\u0027id\u0027] \u003d\u003d sub_id]"},{"line_number":115,"context_line":"        body \u003d subnet_pools[0]"},{"line_number":116,"context_line":"        self.assertEqual(\u0027d1\u0027, body[\u0027description\u0027])"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a89bdaa_818bad1d","line":113,"updated":"2016-09-12 10:28:02.000000000","message":"[\u0027subnetpools\u0027]","commit_id":"acad8c21e503ab30df6e3f0ae797388fd9324c86"}],"neutron/tests/unit/hacking/test_checks.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"ea588a46edf85e2047abb4ca4c1360aad2692358","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    def test_check_python3_filter(self):"},{"line_number":343,"context_line":"        f \u003d checks.check_python3_no_filter"},{"line_number":344,"context_line":"        self.assertLineFails(f, \"filter(lambda obj: test(obj), data)\")"},{"line_number":345,"context_line":"        self.assertLinePasses(f, \"[obj for obj in data if test(obj)]\")"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"# The following is borrowed from hacking/tests/test_doctest.py."},{"line_number":348,"context_line":"# Tests defined in docstring is easier to understand"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a8ec9b2_1d303656","line":345,"updated":"2016-09-14 08:24:33.000000000","message":"I\u0027d also assert that filter() without lambda and lambda without filter passes.","commit_id":"b9678fee13fc71a010e425d23355192f0a47e66d"}]}
