)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4e90ccf8b0af0a84f315cb0b405e46a29dc9528f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"On the other hand not performing checks when context.is_admin is"},{"line_number":32,"context_line":"True should not pose a security threat either in noauth mode or"},{"line_number":33,"context_line":"with the keystone middleware. In the former case the software keeps"},{"line_number":34,"context_line":"operating assuming admin rights fro every requests, whereas in the"},{"line_number":35,"context_line":"latter case the keystone middleware will always supply a context"},{"line_number":36,"context_line":"with the appropriate roles, and there is no way for an attacker"},{"line_number":37,"context_line":"to trick keystonemiddleware into generating a context for which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dac4157f_58aaf41a","line":34,"range":{"start_line":34,"start_character":32,"end_line":34,"end_character":35},"updated":"2015-04-20 01:59:32.000000000","message":"s/fro/for/","commit_id":"1871e45f12913d24e5ff4c42e41754972a5c3007"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"40b638b726b6032b40ed0f3fc1d69815a34a3188","unresolved":false,"context_lines":[{"line_number":31,"context_line":"On the other hand not performing checks when context.is_admin is"},{"line_number":32,"context_line":"True should not pose a security threat either in noauth mode or"},{"line_number":33,"context_line":"with the keystone middleware. In the former case the software keeps"},{"line_number":34,"context_line":"operating assuming admin rights fro every requests, whereas in the"},{"line_number":35,"context_line":"latter case the keystone middleware will always supply a context"},{"line_number":36,"context_line":"with the appropriate roles, and there is no way for an attacker"},{"line_number":37,"context_line":"to trick keystonemiddleware into generating a context for which"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dac4157f_5b030510","line":34,"in_reply_to":"dac4157f_58aaf41a","updated":"2015-04-20 09:45:41.000000000","message":"thanks","commit_id":"1871e45f12913d24e5ff4c42e41754972a5c3007"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a91e9fad593ed98353c2d1d151d4c531ddba4800","unresolved":false,"context_lines":[{"line_number":17,"context_line":"function being removed here was the cause of several bugs where the"},{"line_number":18,"context_line":"policy engine was initialized too early in the server bootstrap"},{"line_number":19,"context_line":"process."},{"line_number":20,"context_line":"While this patch removes the feaute is does not remove the"},{"line_number":21,"context_line":"load_admin_roles parameter from context.get_admin_context. Doing so"},{"line_number":22,"context_line":"will break other projects such as neutron-lbaas. The parameter is"},{"line_number":23,"context_line":"preserved albeit ignored, and will be remove once projects consuming"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dac4157f_d5f919ca","line":20,"updated":"2015-04-20 14:06:33.000000000","message":"feature, it does not","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2f5bde9999cc82f8079b51522fce4e993e71e205","unresolved":false,"context_lines":[{"line_number":17,"context_line":"function being removed here was the cause of several bugs where the"},{"line_number":18,"context_line":"policy engine was initialized too early in the server bootstrap"},{"line_number":19,"context_line":"process."},{"line_number":20,"context_line":"While this patch removes the feaute is does not remove the"},{"line_number":21,"context_line":"load_admin_roles parameter from context.get_admin_context. Doing so"},{"line_number":22,"context_line":"will break other projects such as neutron-lbaas. The parameter is"},{"line_number":23,"context_line":"preserved albeit ignored, and will be remove once projects consuming"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dac4157f_b5510565","line":20,"in_reply_to":"dac4157f_d5f919ca","updated":"2015-04-20 14:12:11.000000000","message":"Done","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a91e9fad593ed98353c2d1d151d4c531ddba4800","unresolved":false,"context_lines":[{"line_number":43,"context_line":"is_admin\u003dTrue."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Finally, this patch also does some non-trivial changes in test_l3.py"},{"line_number":46,"context_line":"as some tests where mocking context.to_dict ignoring the is_admin flag."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Partial-Bug: #1446021"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dac4157f_d513595b","line":46,"updated":"2015-04-20 14:06:33.000000000","message":"were","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2f5bde9999cc82f8079b51522fce4e993e71e205","unresolved":false,"context_lines":[{"line_number":43,"context_line":"is_admin\u003dTrue."},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"Finally, this patch also does some non-trivial changes in test_l3.py"},{"line_number":46,"context_line":"as some tests where mocking context.to_dict ignoring the is_admin flag."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Partial-Bug: #1446021"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dac4157f_954e01c0","line":46,"in_reply_to":"dac4157f_d513595b","updated":"2015-04-20 14:12:11.000000000","message":"Done","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"}],"neutron/context.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a91e9fad593ed98353c2d1d151d4c531ddba4800","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def __init__(self, user_id, tenant_id, is_admin\u003dNone, read_deleted\u003d\"no\","},{"line_number":39,"context_line":"                 roles\u003dNone, timestamp\u003dNone, request_id\u003dNone,"},{"line_number":40,"context_line":"                 tenant_name\u003dNone, user_name\u003dNone, overwrite\u003dTrue,"},{"line_number":41,"context_line":"                 auth_token\u003dNone, **kwargs):"},{"line_number":42,"context_line":"        \"\"\"Object initialization."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param read_deleted: \u0027no\u0027 indicates deleted records are hidden, \u0027yes\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_b5c10583","line":41,"updated":"2015-04-20 14:06:33.000000000","message":"We should log deprecation warning in case load_admin_roles is passed. You can use versionutils.report_deprecated_feature.","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2f5bde9999cc82f8079b51522fce4e993e71e205","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    def __init__(self, user_id, tenant_id, is_admin\u003dNone, read_deleted\u003d\"no\","},{"line_number":39,"context_line":"                 roles\u003dNone, timestamp\u003dNone, request_id\u003dNone,"},{"line_number":40,"context_line":"                 tenant_name\u003dNone, user_name\u003dNone, overwrite\u003dTrue,"},{"line_number":41,"context_line":"                 auth_token\u003dNone, **kwargs):"},{"line_number":42,"context_line":"        \"\"\"Object initialization."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        :param read_deleted: \u0027no\u0027 indicates deleted records are hidden, \u0027yes\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_35ccd534","line":41,"in_reply_to":"dac4157f_b5c10583","updated":"2015-04-20 14:12:11.000000000","message":"Done","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a91e9fad593ed98353c2d1d151d4c531ddba4800","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # NOTE(salv-orlando) The load_admin_roles parameter is now ignored but"},{"line_number":150,"context_line":"    # preserved for avoiding failures in projects consuming neutron such as"},{"line_number":151,"context_line":"    # neutron-lbaas. It will be removed with the closing patch for"},{"line_number":152,"context_line":"    # bug #1446021"},{"line_number":153,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":154,"context_line":"                   tenant_id\u003dNone,"},{"line_number":155,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_75e48d3a","line":152,"updated":"2015-04-20 14:06:33.000000000","message":"The function is part of neutron public API, so we definitely need a cycle to deprecate it. We should log a warning in case load_admin_roles is passed (meaning, there should be a **kwargs argument that would capture it so that we can later check whether it was passed).","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"2f5bde9999cc82f8079b51522fce4e993e71e205","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # NOTE(salv-orlando) The load_admin_roles parameter is now ignored but"},{"line_number":150,"context_line":"    # preserved for avoiding failures in projects consuming neutron such as"},{"line_number":151,"context_line":"    # neutron-lbaas. It will be removed with the closing patch for"},{"line_number":152,"context_line":"    # bug #1446021"},{"line_number":153,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":154,"context_line":"                   tenant_id\u003dNone,"},{"line_number":155,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_f5d53db9","line":152,"in_reply_to":"dac4157f_75e48d3a","updated":"2015-04-20 14:12:11.000000000","message":"The thing is that I\u0027m not sure how public is this public API.\nBy splitting service repos we kind of made everything public. I think we should evaluate on a case by case basis where deprecation is required. Also, since the only way we have to catch those are failures in adv services it not unlikely that some changes to the public API will go unnoticed.\n\nIn this case I can do that, it\u0027s fairly easy.","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"49517cb6235251fabe1cc898a2d1836d1816b787","unresolved":false,"context_lines":[{"line_number":149,"context_line":"    # NOTE(salv-orlando) The load_admin_roles parameter is now ignored but"},{"line_number":150,"context_line":"    # preserved for avoiding failures in projects consuming neutron such as"},{"line_number":151,"context_line":"    # neutron-lbaas. It will be removed with the closing patch for"},{"line_number":152,"context_line":"    # bug #1446021"},{"line_number":153,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":154,"context_line":"                   tenant_id\u003dNone,"},{"line_number":155,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_78092195","line":152,"in_reply_to":"dac4157f_f5d53db9","updated":"2015-04-20 14:44:16.000000000","message":"The fact that we don\u0027t have clear distinction between public and private parts of our API is neutron\u0027s fault, not of those who consume the code. So being at least more cautious in cases when we clearly see we\u0027re breaking other projects is a good thing.\n\nThe way out of this is not allowing breaking changes to sneak in but working on API stabilization.","commit_id":"e1b9cbb4efbe9d2b7851e90c1b8397822db59a4e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fc951b2d4a5cbf8653498e6f04c5c92840723a7e","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def _deprecate_load_admin_roles(load_admin_roles):"},{"line_number":34,"context_line":"    # Compare the load_admin_roles with None to raise a deprecation"},{"line_number":35,"context_line":"    # warning if False or True is explicitly passed"},{"line_number":36,"context_line":"    if load_admin_roles is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab921fb_2f910f9a","line":33,"updated":"2015-04-23 17:16:05.000000000","message":"And what if it\u0027s passed with None value? The safest option would be to catch it with kwargs and check whether it was really passed.","commit_id":"921f459af5a085ead19a734bb54c82c7078aea37"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"b5ac18ece9ac5f0ff1bca22810560edb62bf4fb2","unresolved":false,"context_lines":[{"line_number":30,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"def _deprecate_load_admin_roles(load_admin_roles):"},{"line_number":34,"context_line":"    # Compare the load_admin_roles with None to raise a deprecation"},{"line_number":35,"context_line":"    # warning if False or True is explicitly passed"},{"line_number":36,"context_line":"    if load_admin_roles is not None:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab921fb_e17c2aed","line":33,"in_reply_to":"bab921fb_2f910f9a","updated":"2015-04-24 07:47:19.000000000","message":"I was assuming that one would not pass the none value because it\u0027s supposed to be a boolean, but I guess you\u0027re right.","commit_id":"921f459af5a085ead19a734bb54c82c7078aea37"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fc951b2d4a5cbf8653498e6f04c5c92840723a7e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def __init__(self, user_id, tenant_id, is_admin\u003dNone, read_deleted\u003d\"no\","},{"line_number":51,"context_line":"                 roles\u003dNone, timestamp\u003dNone, load_admin_roles\u003dNone,"},{"line_number":52,"context_line":"                 request_id\u003dNone, tenant_name\u003dNone, user_name\u003dNone,"},{"line_number":53,"context_line":"                 overwrite\u003dTrue, auth_token\u003dNone, **kwargs):"},{"line_number":54,"context_line":"        \"\"\"Object initialization."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :param read_deleted: \u0027no\u0027 indicates deleted records are hidden, \u0027yes\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab921fb_0f6acb80","line":53,"updated":"2015-04-23 17:16:05.000000000","message":"I\u0027m sorry for flip flopping... I now think that since we already capture all unused arguments into kwargs, there is no big reason to warn about this particular argument while silently ignoring others.\n\nFor get_admin_context, it\u0027s a bit different and hence justifies a deprecation warning.","commit_id":"921f459af5a085ead19a734bb54c82c7078aea37"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"b5ac18ece9ac5f0ff1bca22810560edb62bf4fb2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def __init__(self, user_id, tenant_id, is_admin\u003dNone, read_deleted\u003d\"no\","},{"line_number":51,"context_line":"                 roles\u003dNone, timestamp\u003dNone, load_admin_roles\u003dNone,"},{"line_number":52,"context_line":"                 request_id\u003dNone, tenant_name\u003dNone, user_name\u003dNone,"},{"line_number":53,"context_line":"                 overwrite\u003dTrue, auth_token\u003dNone, **kwargs):"},{"line_number":54,"context_line":"        \"\"\"Object initialization."},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        :param read_deleted: \u0027no\u0027 indicates deleted records are hidden, \u0027yes\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab921fb_816e8e2d","line":53,"in_reply_to":"bab921fb_0f6acb80","updated":"2015-04-24 07:47:19.000000000","message":"cool","commit_id":"921f459af5a085ead19a734bb54c82c7078aea37"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"b5ac18ece9ac5f0ff1bca22810560edb62bf4fb2","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        return self._session"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"def get_admin_context(read_deleted\u003d\"no\", load_admin_roles\u003dNone):"},{"line_number":165,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":166,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":167,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab921fb_c15a4683","line":164,"updated":"2015-04-24 07:47:19.000000000","message":"I will add a kwargs here then to catch whether the param is passed or not","commit_id":"921f459af5a085ead19a734bb54c82c7078aea37"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f6b438815252b13c6292edefe50d59bf289630a5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        :param kwargs: Extra arguments that might be present, but we ignore"},{"line_number":53,"context_line":"            because they possibly came in from older rpc messages."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        super(ContextBase, self).__init__(auth_token\u003dauth_token,"},{"line_number":57,"context_line":"                                          user\u003duser_id, tenant\u003dtenant_id,"},{"line_number":58,"context_line":"                                          is_admin\u003dis_admin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_f0ac1437","line":55,"updated":"2015-05-26 16:44:35.000000000","message":"Unrelated whitespace change.","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"908e8e94b508abe55a5bf6787b6ee31b59b8a9eb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        :param kwargs: Extra arguments that might be present, but we ignore"},{"line_number":53,"context_line":"            because they possibly came in from older rpc messages."},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        super(ContextBase, self).__init__(auth_token\u003dauth_token,"},{"line_number":57,"context_line":"                                          user\u003duser_id, tenant\u003dtenant_id,"},{"line_number":58,"context_line":"                                          is_admin\u003dis_admin,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5afe65bd_e32d01a9","line":55,"in_reply_to":"7a016987_f0ac1437","updated":"2015-06-04 14:07:57.000000000","message":"Done","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a1e9f137c8a531dedfd3c0068682ea6928d1b756","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad32947_ae2c0b4b","line":150,"updated":"2015-04-28 10:32:53.000000000","message":"The drawback of this change is that in theory now you can pass anything to get_admin_context while it previously would have failed.","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"908e8e94b508abe55a5bf6787b6ee31b59b8a9eb","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"5afe65bd_0325bdbf","line":150,"in_reply_to":"7a016987_30718ce1","updated":"2015-06-04 14:07:57.000000000","message":"Done","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ef7976693d67e13f221354264bcb0f2c329c4b2f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_6aa168a9","line":150,"in_reply_to":"7ad32947_ae2c0b4b","updated":"2015-05-11 12:40:02.000000000","message":"We could assert that kwargs is not used for any other arguments.","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f6b438815252b13c6292edefe50d59bf289630a5","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_30718ce1","line":150,"in_reply_to":"7ad8896b_0ee20ba0","updated":"2015-05-26 16:44:35.000000000","message":"\"if load_admin_roles is not deprecated_:\" reads a bit funny.  So, I like the idea but I\u0027m going to nit-pick it a bit.  Maybe consider some other names for this:  ignored_, unused_, ....\n\nActually, I think this would read better with a decorator.  The decorator could get around the need for kwargs by accepting the parameter and it could also encapsulate the check and call to \"report_deprecated_feature\".  Later, removing the deprecation is a simple matter of removing the decorator.  Something like this:\n\n@deprecated_parameter(\"load_admin_roles\")","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4114c9ce23eb23ddc5fc8ce0d9dca39824050385","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"9af37de9_8eb6d7da","line":150,"in_reply_to":"9af37de9_6aa168a9","updated":"2015-05-11 16:06:27.000000000","message":"Maybe use a canary object?\n\ndeprecated_ \u003d object()\ndef get_admin_context(read_deleted\u003d\"no\", load_admin_roles\u003ddeprecated_):\n    if load_admin_roles is not deprecated_:\n        versionutils.report_deprecated_feature(...)","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"3ae142d1a12204abf2c4ce214daab7be085f1b46","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return self._session"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":151,"context_line":"    # The load_admin_roles parameter is now ignored but preserved"},{"line_number":152,"context_line":"    # for backward compatibility. Its usage is being deprecated in"},{"line_number":153,"context_line":"    # Liberty"}],"source_content_type":"text/x-python","patch_set":5,"id":"7ad8896b_0ee20ba0","line":150,"in_reply_to":"9af37de9_8eb6d7da","updated":"2015-05-11 16:32:35.000000000","message":"Great idea with the canary one.","commit_id":"99562339eb8390a266de5c87f2a4817efca17da9"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ca5bb10acb5ac9c4b1616658240d223932bb0a38","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"@removals.removed_kwarg(\u0027load_admin_roles\u0027)"},{"line_number":149,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":150,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":151,"context_line":"                   tenant_id\u003dNone,"},{"line_number":152,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_eb78c291","line":149,"updated":"2015-06-04 22:58:25.000000000","message":"This is almost what I had in mind.  I thought we\u0027d leave the explicit load_admin_roles argument in instead of adding **kwargs until the end of the deprecation period.\n\nAlso, just playing around with debtcollection.removals trying to wrap my head around it, I was unable to get it to log anything in my simple test [1].  I started in to the debtcollector source code to figure it out but I had to stop due to time constraints.\n\n [1] http://paste.openstack.org/show/264130/","commit_id":"959af8da8748e9b6defa07030d21e221fc1c8dd1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fa6c87a01af92a95952639192ee53bb6a088765b","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"@removals.removed_kwarg(\u0027load_admin_roles\u0027)"},{"line_number":149,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":150,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":151,"context_line":"                   tenant_id\u003dNone,"},{"line_number":152,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_fc6aad19","line":149,"in_reply_to":"3afb71cf_16a56f03","updated":"2015-06-05 15:35:15.000000000","message":"OK, the comment above is non-sense. We still can have load_admin_roles\u003d left in function definition to catch passed load_admin_roles, it just won\u0027t be used. See latest upload.","commit_id":"959af8da8748e9b6defa07030d21e221fc1c8dd1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bea9ae1f2fbc1353a0fdef03c7a490541cdbdb7b","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"@removals.removed_kwarg(\u0027load_admin_roles\u0027)"},{"line_number":149,"context_line":"def get_admin_context(read_deleted\u003d\"no\", **kwargs):"},{"line_number":150,"context_line":"    return Context(user_id\u003dNone,"},{"line_number":151,"context_line":"                   tenant_id\u003dNone,"},{"line_number":152,"context_line":"                   is_admin\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3afb71cf_16a56f03","line":149,"in_reply_to":"3afb71cf_eb78c291","updated":"2015-06-05 11:51:32.000000000","message":"The problem is that if you leave explicit load_admin_roles\u003d keyword argument, then it will be unconditionally passed into **kwargs, no matter whether users pass it or not, and hence we would get deprecation warnings on every call to the function.\n\nThere seems to be no way out of it other than by using a canary to detect bad args. Let\u0027s see whether we can dynamically declare additional named arguments for a decorator wrapper...","commit_id":"959af8da8748e9b6defa07030d21e221fc1c8dd1"}],"neutron/tests/base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"42ae62786d0b040e26ff61cbc1da53c91c80035f","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def setUp(self):"},{"line_number":122,"context_line":"        super(DietTestCase, self).setUp()"},{"line_number":123,"context_line":"        # Ensure deprecation warnings emitted using debtcollector are printed"},{"line_number":124,"context_line":"        # to stderr, otherwise developers won\u0027t be aware of the deprecation"},{"line_number":125,"context_line":"        warnings.filterwarnings(\"default\", category\u003dDeprecationWarning)"},{"line_number":126,"context_line":"        # Configure this first to ensure pm debugging support for setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_44f2dcd3","line":123,"updated":"2015-06-08 09:55:09.000000000","message":"That change doesn\u0027t really belong to this patch... We have other reasons to enable those warnings. We already have DeprecationWarnings emitted (btw they are shown in captured stderr, so not sure why debtcollector does not emit them for you; I\u0027ll check later).","commit_id":"1b9e3699d05e211ed323ae57af63c4543b87ac53"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"65c53952d046aadbc2d6ceee72c914a73695422d","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def setUp(self):"},{"line_number":122,"context_line":"        super(DietTestCase, self).setUp()"},{"line_number":123,"context_line":"        # Ensure deprecation warnings emitted using debtcollector are printed"},{"line_number":124,"context_line":"        # to stderr, otherwise developers won\u0027t be aware of the deprecation"},{"line_number":125,"context_line":"        warnings.filterwarnings(\"default\", category\u003dDeprecationWarning)"},{"line_number":126,"context_line":"        # Configure this first to ensure pm debugging support for setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3afb71cf_fe926c4a","line":123,"in_reply_to":"3afb71cf_44f2dcd3","updated":"2015-06-08 13:41:16.000000000","message":"I am ok to remove it and then we\u0027ll assess if not seeing the warnings is just my issue.\nWarnings guide says DeprecationWarning is ignored by default, and I do not see any other way in which the DeprecationWarning is made visibile.","commit_id":"1b9e3699d05e211ed323ae57af63c4543b87ac53"}],"neutron/tests/unit/extensions/test_l3.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"4e90ccf8b0af0a84f315cb0b405e46a29dc9528f","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"        tenant_id \u003d _uuid()"},{"line_number":1243,"context_line":"        with self.router(tenant_id\u003dtenant_id, set_context\u003dTrue) as r:"},{"line_number":1244,"context_line":"            with self.network(tenant_id\u003dtenant_id, set_context\u003dTrue) as n:"},{"line_number":1245,"context_line":"                with self.subnet(tenant_id\u003dtenant_id, network\u003dn,"},{"line_number":1246,"context_line":"                                 set_context\u003dTrue) as s:"},{"line_number":1247,"context_line":"                    with self.port(tenant_id\u003dtenant_id, subnet\u003ds,"},{"line_number":1248,"context_line":"                                   set_context\u003dTrue) as p:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_9b3ac6cc","line":1245,"updated":"2015-04-20 01:59:32.000000000","message":"why need to specify tenant_id for subnet explicitly?","commit_id":"1871e45f12913d24e5ff4c42e41754972a5c3007"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"40b638b726b6032b40ed0f3fc1d69815a34a3188","unresolved":false,"context_lines":[{"line_number":1242,"context_line":"        tenant_id \u003d _uuid()"},{"line_number":1243,"context_line":"        with self.router(tenant_id\u003dtenant_id, set_context\u003dTrue) as r:"},{"line_number":1244,"context_line":"            with self.network(tenant_id\u003dtenant_id, set_context\u003dTrue) as n:"},{"line_number":1245,"context_line":"                with self.subnet(tenant_id\u003dtenant_id, network\u003dn,"},{"line_number":1246,"context_line":"                                 set_context\u003dTrue) as s:"},{"line_number":1247,"context_line":"                    with self.port(tenant_id\u003dtenant_id, subnet\u003ds,"},{"line_number":1248,"context_line":"                                   set_context\u003dTrue) as p:"}],"source_content_type":"text/x-python","patch_set":1,"id":"dac4157f_761dc065","line":1245,"in_reply_to":"dac4157f_9b3ac6cc","updated":"2015-04-20 09:45:41.000000000","message":"I could have not I guess, but I just wanted to make the subnet method consistent with the others","commit_id":"1871e45f12913d24e5ff4c42e41754972a5c3007"}],"neutron/tests/unit/test_context.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"289f9b0519a76d8f7ea51f6db92a3d99bc95022c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertEqual(req_id_before, oslo_context.get_current().request_id)"},{"line_number":142,"context_line":"        self.assertNotEqual(req_id_before, ctx_admin.request_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_get_admin_context_load_admin_roles_emits_deprecation_warn(self):"},{"line_number":145,"context_line":"        with warnings.catch_warnings(record\u003dTrue) as w:"},{"line_number":146,"context_line":"            # Trigger a warning."},{"line_number":147,"context_line":"            context.get_admin_context(load_admin_roles\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_d6bd5069","line":144,"updated":"2015-06-08 15:56:18.000000000","message":"Meh, seems like we test debtcollector here. I think we should avoid checking oslo blessed projects on our own. Since you will update the review due to pep8 issues, let\u0027s just drop the test too.\n\nWhat do you think?","commit_id":"71c2865c86522421bc488f07a4ffff680e65537c"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"fc39e27c228620ec9ec53620035c7fc294dd7574","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertEqual(req_id_before, oslo_context.get_current().request_id)"},{"line_number":142,"context_line":"        self.assertNotEqual(req_id_before, ctx_admin.request_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_get_admin_context_load_admin_roles_emits_deprecation_warn(self):"},{"line_number":145,"context_line":"        with warnings.catch_warnings(record\u003dTrue) as w:"},{"line_number":146,"context_line":"            # Trigger a warning."},{"line_number":147,"context_line":"            context.get_admin_context(load_admin_roles\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_ddaf8f28","line":144,"in_reply_to":"3afb71cf_175aa62a","updated":"2015-06-09 08:42:49.000000000","message":"The failure is because warnings module is not initialized to catch DeprecationWarnings. You need to do the following under catch_warnings() to make sure it\u0027s invoked:\n\nwarnings.simplefilter(\"always\")\n\nOnce I add it there, the test passes.","commit_id":"71c2865c86522421bc488f07a4ffff680e65537c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"9ea2aa157b2c947faca89729824681367213f164","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertEqual(req_id_before, oslo_context.get_current().request_id)"},{"line_number":142,"context_line":"        self.assertNotEqual(req_id_before, ctx_admin.request_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_get_admin_context_load_admin_roles_emits_deprecation_warn(self):"},{"line_number":145,"context_line":"        with warnings.catch_warnings(record\u003dTrue) as w:"},{"line_number":146,"context_line":"            # Trigger a warning."},{"line_number":147,"context_line":"            context.get_admin_context(load_admin_roles\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_175aa62a","line":144,"in_reply_to":"3afb71cf_39f5b782","updated":"2015-06-09 07:23:49.000000000","message":"yeah but what have not noticed is that it\u0027s not pep8 failing, it\u0027s py27.\n\nand the failing test is this one. The reason for which I let it fail was to show that the DeprecationWarning is being ignored, and therefore won\u0027t appear in stderr.\n\nAlso, I am ok with removing the unit test, but you should consider that this test is actually a \"guard\" that will trigger a failure is someone removes the deprecation warning.","commit_id":"71c2865c86522421bc488f07a4ffff680e65537c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"cb96bd97a9c7fd68dace7dd1343d6edb1e05e0b2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertEqual(req_id_before, oslo_context.get_current().request_id)"},{"line_number":142,"context_line":"        self.assertNotEqual(req_id_before, ctx_admin.request_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_get_admin_context_load_admin_roles_emits_deprecation_warn(self):"},{"line_number":145,"context_line":"        with warnings.catch_warnings(record\u003dTrue) as w:"},{"line_number":146,"context_line":"            # Trigger a warning."},{"line_number":147,"context_line":"            context.get_admin_context(load_admin_roles\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_39f5b782","line":144,"in_reply_to":"3afb71cf_d6bd5069","updated":"2015-06-08 16:09:20.000000000","message":"I agree with Ihar, this test is a duplicate of tests that target debtcollector.removals.","commit_id":"71c2865c86522421bc488f07a4ffff680e65537c"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"58ffdc232ebd787f69e66a247407929ceb85504c","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertEqual(req_id_before, oslo_context.get_current().request_id)"},{"line_number":142,"context_line":"        self.assertNotEqual(req_id_before, ctx_admin.request_id)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def test_get_admin_context_load_admin_roles_emits_deprecation_warn(self):"},{"line_number":145,"context_line":"        with warnings.catch_warnings(record\u003dTrue) as w:"},{"line_number":146,"context_line":"            # Trigger a warning."},{"line_number":147,"context_line":"            context.get_admin_context(load_admin_roles\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_a3a83478","line":144,"in_reply_to":"3afb71cf_ddaf8f28","updated":"2015-06-09 09:23:58.000000000","message":"Ihar - you make me sound dumber than what I actually am ;)\n\nI am referring to the other discussion about warnings not being emitted on stderr unless you enable DeprecationWarning in filters - what you advised to do.\n\nAll that I am saying is that we should verify whether this warning are being printed because they do not on my environments, and I\u0027ve tried with several doing tox -epy27. And from what I gather neither tests on the gate do - otherwise this test would not fail.","commit_id":"71c2865c86522421bc488f07a4ffff680e65537c"}]}
