)]}'
{"blacklist.txt":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":2,"context_line":"hacking"},{"line_number":3,"context_line":"mccabe"},{"line_number":4,"context_line":"pep8"},{"line_number":5,"context_line":"pip"},{"line_number":6,"context_line":"pyflakes"},{"line_number":7,"context_line":"pylint"}],"source_content_type":"text/plain","patch_set":4,"id":"3a50d1a3_8a36a9b2","line":5,"updated":"2015-08-01 00:08:17.000000000","message":"From the other review - this seems wrong. Why is pip being blacklisted?\n\n https://review.openstack.org/#/c/204198/5/blacklist.txt","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}],"openstack_requirements/cmds/validate.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"05dbba1cd3a08cbb339ca29784ee4a902e57ea08","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstack_requirements import requirement"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def main():"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":25,"context_line":"    parser.add_argument("},{"line_number":26,"context_line":"        \u0027global_requirements\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_9ea5b248","line":23,"updated":"2015-07-25 18:30:22.000000000","message":"This entry point should be at least smoke tested - we\u0027re going to be depending on it working reliably in the gate. Rather than presuming stdout as the stream, if you pass an out\u003dNone parameter here, and then do:\n\n if out is None:\n     out \u003d sys.stdout\n\nThen do your print() below with file\u003dout, it will be easily testable.\n\nThe other entry points in this repo are tested in a test file matching their name, e.g. \nopenstack_requirements/tests/test_edit_constraint.py tests \u0027edit-constraint\u0027, so this would be\n\ntest_validate.py","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"78674f91299e7d42b52956a7a2a7b5b31a47479f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstack_requirements import requirement"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def main():"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":25,"context_line":"    parser.add_argument("},{"line_number":26,"context_line":"        \u0027global_requirements\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_99d3e803","line":23,"in_reply_to":"3a50d1a3_9ea5b248","updated":"2015-07-29 16:35:24.000000000","message":"I\u0027ve moved the logic out of the main program and added tests for that portion.","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"05dbba1cd3a08cbb339ca29784ee4a902e57ea08","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    for n, line in enumerate(constraints_content.splitlines(), 1):"},{"line_number":43,"context_line":"        c \u003d requirement.parse_line(line)"},{"line_number":44,"context_line":"        spec \u003d c.specifiers"},{"line_number":45,"context_line":"        if not spec.startswith(\u0027\u003d\u003d\u003d\u0027):"},{"line_number":46,"context_line":"            print("},{"line_number":47,"context_line":"                \u0027Invalid constraint line %d %r, does not have 3 \"\u003d\"\u0027 %"},{"line_number":48,"context_line":"                (n, line)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_5e988a1b","line":45,"updated":"2015-07-25 18:30:22.000000000","message":"This cross-check is sufficient logic I believe it should be tested: and thus it should be in the requirement module. Perhaps in parse - parse(content, require_exact\u003dTrue) ?\n\nOr in constraints.check_compatible: you can inspect the specifiers there and generate a very similar error - just without the line number (unless we start preserving that too, which I think would be reasonable).","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstack_requirements import requirement"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def main():"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":25,"context_line":"    parser.add_argument("},{"line_number":26,"context_line":"        \u0027global_requirements\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_2ae2f501","line":23,"updated":"2015-08-01 00:08:17.000000000","message":"For testing this probably wants to take a stdout parameter.\n\n def main(stdout\u003dNone):\n     if stdout is None:\n         stdout \u003d sys.stdout\n\nThough AFAICT its not being tested, so thats probably YAGNI for now.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a30c032765d0a8841d97792b1c6a61bd3e9fd44d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from openstack_requirements import requirement"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def main():"},{"line_number":24,"context_line":"    parser \u003d argparse.ArgumentParser()"},{"line_number":25,"context_line":"    parser.add_argument("},{"line_number":26,"context_line":"        \u0027global_requirements\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_e16c900a","line":23,"in_reply_to":"3a50d1a3_2ae2f501","updated":"2015-08-03 20:37:05.000000000","message":"Yeah, I\u0027m not convinced we need to go to those lengths now that most of the logic lives somewhere else and is being tested.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}],"openstack_requirements/constraints.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"05dbba1cd3a08cbb339ca29784ee4a902e57ea08","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param global_reqs: A set of global requirements after parsing."},{"line_number":34,"context_line":"    :param constraints: The same from upper-constraints.txt."},{"line_number":35,"context_line":"    :return: A list of the parsed package tuples that failed."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def satisfied(reqs, name, version, failures):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_5e664a2a","line":35,"updated":"2015-07-25 18:30:22.000000000","message":"If I read this code correctly, the return value is actually a list of errors, where each error is a string describing the error.","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"78674f91299e7d42b52956a7a2a7b5b31a47479f","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    :param global_reqs: A set of global requirements after parsing."},{"line_number":34,"context_line":"    :param constraints: The same from upper-constraints.txt."},{"line_number":35,"context_line":"    :return: A list of the parsed package tuples that failed."},{"line_number":36,"context_line":"    \"\"\""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def satisfied(reqs, name, version, failures):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a50d1a3_5ee54635","line":35,"in_reply_to":"3a50d1a3_5e664a2a","updated":"2015-07-29 16:35:24.000000000","message":"I moved this as-is from its other location. Fixed.","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    :return: A list of the error messages for constraints that failed."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def satisfied(reqs, name, version, failures):"},{"line_number":90,"context_line":"        if name not in reqs:"},{"line_number":91,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_aa336512","line":88,"updated":"2015-08-01 00:08:17.000000000","message":"nit: blank line here isn\u0027t needed (and is against the docstring PEP).. unless of course hacking decides its needed and makes us cry.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def satisfied(reqs, name, version, failures):"},{"line_number":90,"context_line":"        if name not in reqs:"},{"line_number":91,"context_line":"            return True"},{"line_number":92,"context_line":"        tested \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_2d0e8f32","line":89,"updated":"2015-08-01 00:08:17.000000000","message":"This doesn\u0027t use really need to use any locals - its result isn\u0027t evaluated.\n\nso perhaps make it a global:\n\n def _satisfied(...)\n     result \u003d []\n   ...\n      result.append(\u0027Constraint for ....)\n    return  result","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a30c032765d0a8841d97792b1c6a61bd3e9fd44d","unresolved":false,"context_lines":[{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    \"\"\""},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    def satisfied(reqs, name, version, failures):"},{"line_number":90,"context_line":"        if name not in reqs:"},{"line_number":91,"context_line":"            return True"},{"line_number":92,"context_line":"        tested \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_2131180c","line":89,"in_reply_to":"3a50d1a3_2d0e8f32","updated":"2015-08-03 20:37:05.000000000","message":"IIRC, you wrote this and I\u0027m just moving it to a new file. So let\u0027s leave it alone and consider improving it in another patch.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}],"openstack_requirements/tests/test_constraints.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        results \u003d list(constraints.check_blacklist_coverage("},{"line_number":72,"context_line":"            global_reqs, good_constraints, blacklist, \u0027test\u0027))"},{"line_number":73,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":74,"context_line":"        self.assertIn(\"\u0027bar\u0027 appears in global-requirements.txt\", results[0])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_caa91126","line":74,"updated":"2015-08-01 00:08:17.000000000","message":"So I\u0027m still really not sure about this test.\n\nThe test_both test is checking folk don\u0027t manually add something to upper-constraints thats blacklisted. Thats good. (Or equally they didn\u0027t forget to pass blacklist to generate-constraints).\n\nHowever this is testing that something added to global-requirements is pinned.\n\nBut - I\u0027m not sure we need to make this an error, because:\n\n - if its not present, the periodic job that runs generate-constraints will add it for us.\n - projects using this can only add code using this in a narrow window - and they\u0027ll be pinned as soon as generate-constraints\u0027s proposed merge has come through.\n\nOTOH I don\u0027t think its harmful to check this *except* that you\u0027re also blacklisting pip, but I think that is a holdover from earlier versions, as pip is also in your hardcoded ignore list in constraints.py.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a30c032765d0a8841d97792b1c6a61bd3e9fd44d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        results \u003d list(constraints.check_blacklist_coverage("},{"line_number":72,"context_line":"            global_reqs, good_constraints, blacklist, \u0027test\u0027))"},{"line_number":73,"context_line":"        self.assertEqual(1, len(results))"},{"line_number":74,"context_line":"        self.assertIn(\"\u0027bar\u0027 appears in global-requirements.txt\", results[0])"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_7c1a6370","line":74,"in_reply_to":"3a50d1a3_caa91126","updated":"2015-08-03 20:37:05.000000000","message":"I do think we want people to update the constraints file themselves, because I want folks who suggest adding new requirements to understand what that means to the project. I want them to know that we test with different versions in different situations, and that they have to think about those things when they propose changes to the requirements. So I\u0027ll fix the pip blacklist thing (I think you\u0027re right, that\u0027s a rebase or merge mistake), but I would prefer to leave the test.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}],"openstack_requirements/tests/test_integration.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        global_reqs \u003d requirement.parse(\"oslo.concurrency\u003e\u003d2.3.0\\nbar\u003e1.0\\n\")"},{"line_number":39,"context_line":"        bad_constraints \u003d requirement.parse(\"oslo.concurrency\u003d\u003d\u003d2.2.0\\n\")"},{"line_number":40,"context_line":"        results \u003d constraints.check_compatible(global_reqs, bad_constraints)"},{"line_number":41,"context_line":"        self.assertNotEqual([], results)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_constraint_above_range(self):"},{"line_number":44,"context_line":"        global_reqs \u003d requirement.parse(\"foo\u003e\u003d1.2,\u003c2.0\\nbar\u003e1.0\\n\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a50d1a3_6a5c7d7d","line":41,"updated":"2015-08-01 00:08:17.000000000","message":"Since these are now all testing functions from \u0027constraints\u0027 - perhaps this file should just be renamed to test_constraints.py?","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a30c032765d0a8841d97792b1c6a61bd3e9fd44d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        global_reqs \u003d requirement.parse(\"oslo.concurrency\u003e\u003d2.3.0\\nbar\u003e1.0\\n\")"},{"line_number":39,"context_line":"        bad_constraints \u003d requirement.parse(\"oslo.concurrency\u003d\u003d\u003d2.2.0\\n\")"},{"line_number":40,"context_line":"        results \u003d constraints.check_compatible(global_reqs, bad_constraints)"},{"line_number":41,"context_line":"        self.assertNotEqual([], results)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_constraint_above_range(self):"},{"line_number":44,"context_line":"        global_reqs \u003d requirement.parse(\"foo\u003e\u003d1.2,\u003c2.0\\nbar\u003e1.0\\n\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a4dcd0f_fc2433b0","line":41,"in_reply_to":"3a50d1a3_6a5c7d7d","updated":"2015-08-03 20:37:05.000000000","message":"That makes sense.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}],"setup.cfg":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"05dbba1cd3a08cbb339ca29784ee4a902e57ea08","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    edit-constraints \u003d openstack_requirements.cmds.edit_constraint:main"},{"line_number":27,"context_line":"    generate-constraints \u003d openstack_requirements.cmds.generate:main"},{"line_number":28,"context_line":"    update-requirements \u003d openstack_requirements.cmds.update:main"},{"line_number":29,"context_line":"    validate \u003d openstack_requirements.cmds.validate:main"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"3a50d1a3_3e4a5e84","line":29,"updated":"2015-07-25 18:30:22.000000000","message":"I think this name is too generic - we get installed into various wider contexts. How about validate-requirements ?","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"78674f91299e7d42b52956a7a2a7b5b31a47479f","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    edit-constraints \u003d openstack_requirements.cmds.edit_constraint:main"},{"line_number":27,"context_line":"    generate-constraints \u003d openstack_requirements.cmds.generate:main"},{"line_number":28,"context_line":"    update-requirements \u003d openstack_requirements.cmds.update:main"},{"line_number":29,"context_line":"    validate \u003d openstack_requirements.cmds.validate:main"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"3a50d1a3_3eee3a22","line":29,"in_reply_to":"3a50d1a3_3e4a5e84","updated":"2015-07-29 16:35:24.000000000","message":"I\u0027m not sure why this is installed anywhere other than this tox environment, but ok.","commit_id":"485af898538b2524bdcf28f2eeacecbedb94f4f5"}],"tox.ini":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"75cb86f62e1d7ad2dfeac41a7779095719ea692a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[tox]"},{"line_number":2,"context_line":"minversion \u003d 1.6"},{"line_number":3,"context_line":"skipsdist \u003d True"},{"line_number":4,"context_line":"envlist \u003d validate,py27,pep8"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"[testenv]"},{"line_number":7,"context_line":"usedevelop \u003d True"}],"source_content_type":"text/x-properties","patch_set":4,"id":"3a50d1a3_aadfe50a","line":4,"updated":"2015-08-01 00:08:17.000000000","message":"Why are we dropping pypy?","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"a30c032765d0a8841d97792b1c6a61bd3e9fd44d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"[tox]"},{"line_number":2,"context_line":"minversion \u003d 1.6"},{"line_number":3,"context_line":"skipsdist \u003d True"},{"line_number":4,"context_line":"envlist \u003d validate,py27,pep8"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"[testenv]"},{"line_number":7,"context_line":"usedevelop \u003d True"}],"source_content_type":"text/x-properties","patch_set":4,"id":"1a4dcd0f_bc3eabb6","line":4,"in_reply_to":"3a50d1a3_aadfe50a","updated":"2015-08-03 20:37:05.000000000","message":"I dropped it from the list of default environments that one gets when running just \"tox\" so that folks can more cleanly run the primary set of tests before submitting changes. It still runs in the gate.","commit_id":"ce9e678054954c7fe60f7753035ea9a54474119e"}]}
