)]}'
{"oslo/rootwrap/cmd.py":[{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"b40ad5d13937256a51e8cd5e144748b8641d25ab","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_d06e8eff","line":72,"updated":"2014-07-20 22:28:28.000000000","message":"Why is this actually needed ?\nIsn\u0027t oslo.rootwrap.wrapper imported in all relevant modules ?","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":308,"name":"Thierry Carrez","email":"thierry@openstack.org","username":"ttx"},"change_message_id":"973d6fbbf2c9caa071026838a66773e8609e4ea8","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_eb79cb82","line":72,"in_reply_to":"baada198_0c2b8e95","updated":"2014-07-21 17:04:07.000000000","message":"I\u0027m not questioning the late import... No, my point is... why are you declaring wrapper as global ? That is an addition from your patch. It seems to be properly imported everywhere else...","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"4ac667954ce5a56eff261fda5a2fc11326607d04","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_b1f0cb67","line":72,"in_reply_to":"baada198_1db99379","updated":"2014-07-22 19:52:34.000000000","message":"From IRC discussion with Thierry, late import is here to use possible sys.path modification that happens just before it. It\u0027s old and ugly hack that is not used anymore and so it\u0027s removed in a separate change request.","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"cb85ac34bdce87938fc4d0a00187b3093bffc122","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_ca0f5a38","line":72,"in_reply_to":"baada198_bfb8a976","updated":"2014-07-22 15:20:52.000000000","message":"I don\u0027t know original rationale behind this late import, so to minimize modifications to the original code path I kept it. I\u0027ve added a global variable for the same reason\n\nI think the reason behind this late import is to allow rootwrap to fail fast if smth is wrong with its arguments.","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"943f08972bed24ae19bed8af044fe0f402be36c3","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1db99379","line":72,"in_reply_to":"baada198_ca0f5a38","updated":"2014-07-22 17:13:03.000000000","message":"But is that import really demanding for cpu time?\n\nThe problem is that now the code looks uglier than before, so I think it\u0027s worth considering removing that hacky thing if we don\u0027t see a reason for it to exist in the first place.","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"25d69d3479ffdce3e579e7686a612eee708733b4","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_0c2b8e95","line":72,"in_reply_to":"baada198_d06e8eff","updated":"2014-07-21 08:27:38.000000000","message":"I tried to find the root of this late import and found out that it was always there since the dawn of rootwrap: https://review.openstack.org/#/c/2101/3/bin/nova-rootwrap,cm - so you might have better idea why would it be here :)\n\nI\u0027m not sure if it\u0027s needed here, just kept it to avoid reimporting it in run_one_command and minimize changes to the code.","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ccad3a91e44bec2ed3e9ec86e069c5082a09911f","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_bfb8a976","line":72,"in_reply_to":"baada198_dc54cbff","updated":"2014-07-22 14:28:13.000000000","message":"What\u0027s the problem with importing it in run_one_command too?\nOr even importing that at top of the file?","commit_id":"763faebb769686de07078d846a016b01b4117a50"},{"author":{"_account_id":708,"name":"Yuriy Taraday","email":"yuriy@taraday.nl","username":"yorik-sar"},"change_message_id":"0ec439d5979663aff69e550bcd314903c9587bad","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    if os.path.exists(os.path.join(possible_topdir, \"oslo\", \"__init__.py\")):"},{"line_number":70,"context_line":"        sys.path.insert(0, possible_topdir)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    global wrapper"},{"line_number":73,"context_line":"    from oslo.rootwrap import wrapper"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # Load configuration"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_dc54cbff","line":72,"in_reply_to":"baada198_eb79cb82","updated":"2014-07-21 17:59:40.000000000","message":"Oh, that one. It\u0027s used in run_one_command. So to import it here and use it there I have to declare it global.","commit_id":"763faebb769686de07078d846a016b01b4117a50"}]}
