)]}'
{"neutron_lib/api/plurals.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"080d49f9d518c4e749c0729efee48e03974c2fa8","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from neutron_lib import exceptions"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"_PLURALS \u003d {}"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_813ea727","line":15,"updated":"2016-11-14 13:37:21.000000000","message":"one to many new lines","commit_id":"4dd73204776d245c5516e46d117114e5e5bbcba3"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5581acf55c4c463eb244e14ddc5b1b1dcfeb1ab1","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from neutron_lib import exceptions"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"_PLURALS \u003d {}"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_b61f6a08","line":15,"in_reply_to":"9a629dbe_813ea727","updated":"2016-11-14 14:42:51.000000000","message":"I like the two lines here. ;)","commit_id":"4dd73204776d245c5516e46d117114e5e5bbcba3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"080d49f9d518c4e749c0729efee48e03974c2fa8","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":74,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":75,"context_line":"            return my_singular"},{"line_number":76,"context_line":"    raise KeyError(plural)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_2116bba7","line":76,"updated":"2016-11-14 13:37:21.000000000","message":"can we use a neutron-lib exception","commit_id":"4dd73204776d245c5516e46d117114e5e5bbcba3"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5581acf55c4c463eb244e14ddc5b1b1dcfeb1ab1","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":74,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":75,"context_line":"            return my_singular"},{"line_number":76,"context_line":"    raise KeyError(plural)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a629dbe_f6c3a236","line":76,"in_reply_to":"9a629dbe_2116bba7","updated":"2016-11-14 14:42:51.000000000","message":"KeyError was chosen for compatibility with the old direct use of the PLURALS dictionary. Also I think it makes sense as is.","commit_id":"4dd73204776d245c5516e46d117114e5e5bbcba3"}],"neutron_lib/api/utils.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"cd669b219332d04a2c9750d3ba8312f5503685db","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":63,"context_line":"    singular as the key."},{"line_number":64,"context_line":"    \"\"\""},{"line_number":65,"context_line":"    return _PLURALS.update(plural_dict)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def get_plural(singular):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_c868cd8a","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":10},"updated":"2016-10-17 19:32:26.000000000","message":"I don\u0027t think this should return the dict.","commit_id":"b258323a338f4b807d6225e56b8c84fa5207e8d4"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_821053aa","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":8},"updated":"2016-10-18 13:18:51.000000000","message":"What about reversed plurals [1]; do we have a need to maintain that here?\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L376","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_ea1005ab","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":8},"in_reply_to":"fa6399be_821053aa","updated":"2016-10-18 14:43:38.000000000","message":"What is a \"reversed plural\"?  Is it just a lookup in the opposite direction of the regular plural lookup?  If so then I think that could be subsumed into this.  Does it really need to be a separate list?","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"96d396af66cb16d69a222f5d215a50001c184593","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_1f81f28f","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":8},"in_reply_to":"fa6399be_ea1005ab","updated":"2016-10-18 18:01:14.000000000","message":"Frankly I\u0027m not sure; I didn\u0027t dig too deep. Based on what I see it\u0027s populated via get_resource_info [1]. As shown in [1], PLURALS.items() is used in it\u0027s population. How will [1] work now that PLURALS is private and does it make sense to bring over the reversed plurals here?\n\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L392","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                                                        singular\u003dnew_singular,"},{"line_number":58,"context_line":"                                                        conflict\u003d\"plural\")"},{"line_number":59,"context_line":"            if my_singular \u003d\u003d new_singular:"},{"line_number":60,"context_line":"                raise exceptions.PluralAlreadyAllocated(plural\u003dnew_plural,"},{"line_number":61,"context_line":"                                                        singular\u003dnew_singular,"},{"line_number":62,"context_line":"                                                        conflict\u003d\"singular\")"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_e254afcb","line":60,"updated":"2016-10-18 13:18:51.000000000","message":"This appears to be missed in UT coverage: http://logs.openstack.org/12/387612/2/check/neutron-lib-coverage-ubuntu-xenial/84a70c1/cover/neutron_lib_api_utils_py.html","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                                                        singular\u003dnew_singular,"},{"line_number":58,"context_line":"                                                        conflict\u003d\"plural\")"},{"line_number":59,"context_line":"            if my_singular \u003d\u003d new_singular:"},{"line_number":60,"context_line":"                raise exceptions.PluralAlreadyAllocated(plural\u003dnew_plural,"},{"line_number":61,"context_line":"                                                        singular\u003dnew_singular,"},{"line_number":62,"context_line":"                                                        conflict\u003d\"singular\")"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_0a5e1945","line":60,"in_reply_to":"fa6399be_e254afcb","updated":"2016-10-18 14:43:38.000000000","message":"Good call.  Fixed.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                                        conflict\u003d\"singular\")"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def add_plural(singular, plural):"},{"line_number":66,"context_line":"    \"\"\"Add a plural to the plural lookup dict"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    :param singular: Singular form of the noun"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_222b0735","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":14},"updated":"2016-10-18 13:18:51.000000000","message":"I assume its never necessary to remove or update a plural?","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                                        conflict\u003d\"singular\")"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"def add_plural(singular, plural):"},{"line_number":66,"context_line":"    \"\"\"Add a plural to the plural lookup dict"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    :param singular: Singular form of the noun"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_8d816350","line":65,"range":{"start_line":65,"start_character":4,"end_line":65,"end_character":14},"in_reply_to":"fa6399be_222b0735","updated":"2016-10-18 14:43:38.000000000","message":"I thought about implementing full CRUD but I not able to find a scenario in the code where deleting or updating occurred.  Changes to plurals  is something that seems to occur in initialization phases only.  Please do tell me if I missed something though.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    :param plural: Plural form of the noun"},{"line_number":70,"context_line":"    \"\"\""},{"line_number":71,"context_line":"    plural_dict \u003d {singular: plural}"},{"line_number":72,"context_line":"    _check_for_plural_conflicts(plural_dict)"},{"line_number":73,"context_line":"    _PLURALS.update(plural_dict)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def add_plurals(plural_dict):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_82ce93b2","line":73,"range":{"start_line":72,"start_character":4,"end_line":73,"end_character":32},"updated":"2016-10-18 13:18:51.000000000","message":"why not just call add_plurals({singular: plural})?","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    :param plural: Plural form of the noun"},{"line_number":70,"context_line":"    \"\"\""},{"line_number":71,"context_line":"    plural_dict \u003d {singular: plural}"},{"line_number":72,"context_line":"    _check_for_plural_conflicts(plural_dict)"},{"line_number":73,"context_line":"    _PLURALS.update(plural_dict)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def add_plurals(plural_dict):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_edf73ff3","line":73,"range":{"start_line":72,"start_character":4,"end_line":73,"end_character":32},"in_reply_to":"fa6399be_82ce93b2","updated":"2016-10-18 14:43:38.000000000","message":"I am galled at myself that I did not see that.  Fixed.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    :param singular: Singular form of the noun."},{"line_number":90,"context_line":"    :returns: String containing the plural form of the noun."},{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    return _PLURALS[singular]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def get_singular(plural):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_62f25f08","line":92,"range":{"start_line":92,"start_character":11,"end_line":92,"end_character":29},"updated":"2016-10-18 13:18:51.000000000","message":"So this raises a KeyError if the singular doesn\u0027t exist whereas get_singular() just returns None? Is that really be behavior we want? it seems we\u0027d want these 2 functions to behave similarly.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    :param singular: Singular form of the noun."},{"line_number":90,"context_line":"    :returns: String containing the plural form of the noun."},{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    return _PLURALS[singular]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def get_singular(plural):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_0d7c731f","line":92,"range":{"start_line":92,"start_character":11,"end_line":92,"end_character":29},"in_reply_to":"fa6399be_62f25f08","updated":"2016-10-18 14:43:38.000000000","message":"Good idea.  Fixed.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"94cb9f14afbadb2459b293fd37f88dcf85990b18","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _check_for_plural_conflicts(plural_dict):"},{"line_number":52,"context_line":"    \"\"\"Raise an exception if a plural is added \u0026 either part already exists\"\"\""},{"line_number":53,"context_line":"    for new_singular, new_plural in plural_dict.items():"},{"line_number":54,"context_line":"        for my_singular, my_plural in _PLURALS.items():"},{"line_number":55,"context_line":"            if my_plural \u003d\u003d new_plural:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_53736c4d","line":52,"updated":"2016-10-18 15:22:50.000000000","message":"I think adding an existing plural should be allowed. We have plugins and things that load independently making it hard to know if a plural has already been added. As long as the plural is the same it should be OK to be \"added\" multiple times.","commit_id":"e85f32aae3a3618b436c58c7ce64746557cabed8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"8aa4120ec513697cf7d46c00b50be45f57678acb","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _check_for_plural_conflicts(plural_dict):"},{"line_number":52,"context_line":"    \"\"\"Raise an exception if a plural is added \u0026 either part already exists\"\"\""},{"line_number":53,"context_line":"    for new_singular, new_plural in plural_dict.items():"},{"line_number":54,"context_line":"        for my_singular, my_plural in _PLURALS.items():"},{"line_number":55,"context_line":"            if my_plural \u003d\u003d new_plural:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_b9402909","line":52,"in_reply_to":"fa6399be_1e749bcd","updated":"2016-10-18 15:50:22.000000000","message":"Done","commit_id":"e85f32aae3a3618b436c58c7ce64746557cabed8"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"4d96b013c3edfaee2a046cf9d1358025995f3194","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _check_for_plural_conflicts(plural_dict):"},{"line_number":52,"context_line":"    \"\"\"Raise an exception if a plural is added \u0026 either part already exists\"\"\""},{"line_number":53,"context_line":"    for new_singular, new_plural in plural_dict.items():"},{"line_number":54,"context_line":"        for my_singular, my_plural in _PLURALS.items():"},{"line_number":55,"context_line":"            if my_plural \u003d\u003d new_plural:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_dea943e1","line":52,"in_reply_to":"fa6399be_53736c4d","updated":"2016-10-18 15:31:22.000000000","message":"Would it be correct to say that if the singular:plural mapping is the same then it is fine, but if either differs then we should return an error?  That way we make sure get_singular and get_plural will always only have one result to return.","commit_id":"e85f32aae3a3618b436c58c7ce64746557cabed8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"043fe7c0eaaeeb1fad670f3de108e8f0bc6bafc3","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"def _check_for_plural_conflicts(plural_dict):"},{"line_number":52,"context_line":"    \"\"\"Raise an exception if a plural is added \u0026 either part already exists\"\"\""},{"line_number":53,"context_line":"    for new_singular, new_plural in plural_dict.items():"},{"line_number":54,"context_line":"        for my_singular, my_plural in _PLURALS.items():"},{"line_number":55,"context_line":"            if my_plural \u003d\u003d new_plural:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_1e749bcd","line":52,"in_reply_to":"fa6399be_dea943e1","updated":"2016-10-18 15:43:14.000000000","message":"That is what I meant, yes.","commit_id":"e85f32aae3a3618b436c58c7ce64746557cabed8"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"4c069b3bb1884863a5115c934e1402f933923cee","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_5afe1806","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"updated":"2016-10-18 18:02:58.000000000","message":"Please see my response to your previous question: https://review.openstack.org/#/c/387612/2/neutron_lib/api/utils.py@19","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d11f93cb7be053e2552872d42d11d2a5b3487f3","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9ac990af","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"in_reply_to":"fa6399be_5afe1806","updated":"2016-10-18 18:16:54.000000000","message":"AFAICT the \"REVERSED_PLURALS\" is never used in any subproject, or indeed anywhere else in the neutron codebase outside of attributes.py and it\u0027s associated test file[1].  I think that the changes to attributes.py to use this plurals code will remove any trace of REVERSED_PLURALS.  \n\n[1] http://codesearch.openstack.org/?q\u003dREVERSED_PLURALS\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"42558ab3be75116369a5eccde09ffec824587bdd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_619e96b9","line":19,"updated":"2016-10-19 21:00:35.000000000","message":"I don\u0027t feel this belongs here at all.","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b5c508be33908cd07241aaab60b9c995abc41de8","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_81b00adf","line":19,"in_reply_to":"fa6399be_619e96b9","updated":"2016-10-19 21:14:32.000000000","message":"Tell us where you want it.\n\nNote that it\u0027s private. What do you think of the proposed interface (the add/get functions) below? Do they look OK apart from their location?","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"0395aaad8b04788f7f3956c669f84118d5b9d617","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\"Raise exception if a plural is added \u0026 differs from an existing one\"\"\""},{"line_number":53,"context_line":"    for new_sing, new_plur in plural_dict.items():"},{"line_number":54,"context_line":"        for old_sing, old_plur in _PLURALS.items():"},{"line_number":55,"context_line":"            if old_plur \u003d\u003d new_plur and old_sing !\u003d new_sing:"},{"line_number":56,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":57,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":58,"context_line":"                                                        old_plural\u003dold_plur,"},{"line_number":59,"context_line":"                                                        old_singular\u003dold_sing)"},{"line_number":60,"context_line":"            if old_sing \u003d\u003d new_sing and old_plur !\u003d new_plur:"},{"line_number":61,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":62,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":63,"context_line":"                                                        old_plural\u003dold_plur,"},{"line_number":64,"context_line":"                                                        old_singular\u003dold_sing)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def add_plural(singular, plural):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_1fe2999f","line":64,"range":{"start_line":55,"start_character":0,"end_line":64,"end_character":78},"updated":"2016-10-26 01:49:17.000000000","message":"Both blocks of code can be combined into one:\n\n if ((old_plur \u003d\u003d new_plur and old_sing !\u003d new_sing) or \n      old_sing \u003d\u003d news_sing and old_plur !\u003d new_plur)):\n     raise (..)","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"5bd1d6f56ed937a13cc27d4d95c2867accf43621","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    \"\"\"Raise exception if a plural is added \u0026 differs from an existing one\"\"\""},{"line_number":53,"context_line":"    for new_sing, new_plur in plural_dict.items():"},{"line_number":54,"context_line":"        for old_sing, old_plur in _PLURALS.items():"},{"line_number":55,"context_line":"            if old_plur \u003d\u003d new_plur and old_sing !\u003d new_sing:"},{"line_number":56,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":57,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":58,"context_line":"                                                        old_plural\u003dold_plur,"},{"line_number":59,"context_line":"                                                        old_singular\u003dold_sing)"},{"line_number":60,"context_line":"            if old_sing \u003d\u003d new_sing and old_plur !\u003d new_plur:"},{"line_number":61,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":62,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":63,"context_line":"                                                        old_plural\u003dold_plur,"},{"line_number":64,"context_line":"                                                        old_singular\u003dold_sing)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def add_plural(singular, plural):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_58fc9d3e","line":64,"range":{"start_line":55,"start_character":0,"end_line":64,"end_character":78},"in_reply_to":"da6895a0_1fe2999f","updated":"2016-10-26 06:52:56.000000000","message":"Done","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"0395aaad8b04788f7f3956c669f84118d5b9d617","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    :param singular: Singular form of the noun"},{"line_number":71,"context_line":"    :param plural: Plural form of the noun"},{"line_number":72,"context_line":"    \"\"\""},{"line_number":73,"context_line":"    add_plurals({singular: plural})"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_9fece990","line":72,"updated":"2016-10-26 01:49:17.000000000","message":"We can add info about raises [1]. If I understand it correctly, PluralAlreadyAllocated exception can be raised.\n\n[1] http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"5bd1d6f56ed937a13cc27d4d95c2867accf43621","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    :param singular: Singular form of the noun"},{"line_number":71,"context_line":"    :param plural: Plural form of the noun"},{"line_number":72,"context_line":"    \"\"\""},{"line_number":73,"context_line":"    add_plurals({singular: plural})"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_d8e7cdaa","line":72,"in_reply_to":"da6895a0_9fece990","updated":"2016-10-26 06:52:56.000000000","message":"Done","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"0395aaad8b04788f7f3956c669f84118d5b9d617","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":80,"context_line":"    singular as the key."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    _check_for_plural_conflicts(plural_dict)"},{"line_number":83,"context_line":"    _PLURALS.update(plural_dict)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_bf036d41","line":81,"updated":"2016-10-26 01:49:17.000000000","message":"ditto","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"5bd1d6f56ed937a13cc27d4d95c2867accf43621","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":80,"context_line":"    singular as the key."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":"    _check_for_plural_conflicts(plural_dict)"},{"line_number":83,"context_line":"    _PLURALS.update(plural_dict)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_f8ec9191","line":81,"in_reply_to":"da6895a0_bf036d41","updated":"2016-10-26 06:52:56.000000000","message":"Done","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"0395aaad8b04788f7f3956c669f84118d5b9d617","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    :param singular: Singular form of the noun."},{"line_number":90,"context_line":"    :returns: String containing the plural form of the noun."},{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    return _PLURALS[singular]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_dffe6137","line":91,"updated":"2016-10-26 01:49:17.000000000","message":"We can add info about KeyError exception","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"5bd1d6f56ed937a13cc27d4d95c2867accf43621","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    :param singular: Singular form of the noun."},{"line_number":90,"context_line":"    :returns: String containing the plural form of the noun."},{"line_number":91,"context_line":"    \"\"\""},{"line_number":92,"context_line":"    return _PLURALS[singular]"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_1802253f","line":91,"in_reply_to":"da6895a0_dffe6137","updated":"2016-10-26 06:52:56.000000000","message":"Done","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"0395aaad8b04788f7f3956c669f84118d5b9d617","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    :param plural: Plural form of the noun."},{"line_number":99,"context_line":"    :returns: String containing the singular form of the noun."},{"line_number":100,"context_line":"    \"\"\""},{"line_number":101,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":102,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":103,"context_line":"            return my_singular"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_fffde53a","line":100,"updated":"2016-10-26 01:49:17.000000000","message":"ditto","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"5bd1d6f56ed937a13cc27d4d95c2867accf43621","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    :param plural: Plural form of the noun."},{"line_number":99,"context_line":"    :returns: String containing the singular form of the noun."},{"line_number":100,"context_line":"    \"\"\""},{"line_number":101,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":102,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":103,"context_line":"            return my_singular"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba5da102_38ffe935","line":100,"in_reply_to":"da6895a0_fffde53a","updated":"2016-10-26 06:52:56.000000000","message":"Done","commit_id":"0b3cd36e636cd9db107c407aa3d2665e84593709"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"44ec61aaeedb7916add295258662268008cf9f09","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_4fa3e89e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"updated":"2016-11-07 13:30:26.000000000","message":"Isn\u0027t there overlap here with the work in: https://review.openstack.org/#/c/394244","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"aef5f75221cc2c5ab25571d9180062f5241bfc04","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_e2e4bc0e","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"in_reply_to":"9a629dbe_422648bb","updated":"2016-11-07 22:20:07.000000000","message":"No, I am depending on yours. I am just providing a shim so projects don\u0027t break during the switch.","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"2ff902e9eacb399b08569383c5a94733605ae41b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_422648bb","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"in_reply_to":"9a629dbe_4fa3e89e","updated":"2016-11-07 22:07:57.000000000","message":"Valid question.\n\n@HenryG: Do I need to abandon this in favor of yours?","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f769c4d38ff568c7ed34ada335253ff104b91461","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from neutron_lib import exceptions"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"_PLURALS \u003d {}"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"def populate_project_info(attributes):"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_412d0694","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":13},"in_reply_to":"9a629dbe_e2e4bc0e","updated":"2016-11-09 17:23:50.000000000","message":"Thanks!","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d9f2bcd4d61966fd0d735d4e0974558147ebea7","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    for new_sing, new_plur in plural_dict.items():"},{"line_number":54,"context_line":"        for old_sing, old_plur in _PLURALS.items():"},{"line_number":55,"context_line":"            if ((old_plur \u003d\u003d new_plur and old_sing !\u003d new_sing) or"},{"line_number":56,"context_line":"               (old_sing \u003d\u003d new_sing and old_plur !\u003d new_plur)):"},{"line_number":57,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":58,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":59,"context_line":"                                                        old_plural\u003dold_plur,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_58dd3e13","line":56,"updated":"2016-11-08 12:11:15.000000000","message":"nit - please fix alignment","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f769c4d38ff568c7ed34ada335253ff104b91461","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    for new_sing, new_plur in plural_dict.items():"},{"line_number":54,"context_line":"        for old_sing, old_plur in _PLURALS.items():"},{"line_number":55,"context_line":"            if ((old_plur \u003d\u003d new_plur and old_sing !\u003d new_sing) or"},{"line_number":56,"context_line":"               (old_sing \u003d\u003d new_sing and old_plur !\u003d new_plur)):"},{"line_number":57,"context_line":"                raise exceptions.PluralAlreadyAllocated(new_plural\u003dnew_plur,"},{"line_number":58,"context_line":"                                                        new_singular\u003dnew_sing,"},{"line_number":59,"context_line":"                                                        old_plural\u003dold_plur,"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_16bef264","line":56,"in_reply_to":"9a629dbe_58dd3e13","updated":"2016-11-09 17:23:50.000000000","message":"If I do that pep8 complains:\n\n  ./neutron_lib/api/utils.py:56:5: E129 visually indented line with same indent as next logical line\n                  (old_sing \u003d\u003d new_sing and old_plur !\u003d new_plur)):","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"99cd7668416eb4561b79a044320d3bc78ec92b40","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    \"\"\"Add dict of plurals to plural lookup dict"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":79,"context_line":"    singular as the key."},{"line_number":80,"context_line":"    :raises PluralAlreadyAllocated: if either the singular or the plural form"},{"line_number":81,"context_line":"    is already registered but the plural to be added does not match the already"},{"line_number":82,"context_line":"    registered form"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_3dba206f","line":79,"range":{"start_line":79,"start_character":20,"end_line":79,"end_character":24},"updated":"2016-11-08 20:55:28.000000000","message":"Consistency nit: use periods or don\u0027t :)","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f769c4d38ff568c7ed34ada335253ff104b91461","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    \"\"\"Add dict of plurals to plural lookup dict"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":79,"context_line":"    singular as the key."},{"line_number":80,"context_line":"    :raises PluralAlreadyAllocated: if either the singular or the plural form"},{"line_number":81,"context_line":"    is already registered but the plural to be added does not match the already"},{"line_number":82,"context_line":"    registered form"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_b67626d5","line":79,"range":{"start_line":79,"start_character":20,"end_line":79,"end_character":24},"in_reply_to":"9a629dbe_3dba206f","updated":"2016-11-09 17:23:50.000000000","message":"Done, will be included in next PS.","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"99cd7668416eb4561b79a044320d3bc78ec92b40","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":79,"context_line":"    singular as the key."},{"line_number":80,"context_line":"    :raises PluralAlreadyAllocated: if either the singular or the plural form"},{"line_number":81,"context_line":"    is already registered but the plural to be added does not match the already"},{"line_number":82,"context_line":"    registered form"},{"line_number":83,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_5d78b4c4","line":80,"range":{"start_line":80,"start_character":36,"end_line":80,"end_character":37},"updated":"2016-11-08 20:55:28.000000000","message":"Nit: \u0027If\u0027","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f769c4d38ff568c7ed34ada335253ff104b91461","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    :param plural_dict: A dict containing mappings of singular to plural, with"},{"line_number":79,"context_line":"    singular as the key."},{"line_number":80,"context_line":"    :raises PluralAlreadyAllocated: if either the singular or the plural form"},{"line_number":81,"context_line":"    is already registered but the plural to be added does not match the already"},{"line_number":82,"context_line":"    registered form"},{"line_number":83,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_d67f1aa9","line":80,"range":{"start_line":80,"start_character":36,"end_line":80,"end_character":37},"in_reply_to":"9a629dbe_5d78b4c4","updated":"2016-11-09 17:23:50.000000000","message":"Done, will be included in next PS.","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"8d9f2bcd4d61966fd0d735d4e0974558147ebea7","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":106,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":107,"context_line":"            return my_singular"},{"line_number":108,"context_line":"    raise KeyError(plural)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_f8ce1259","line":108,"updated":"2016-11-08 12:11:15.000000000","message":"can we raise  a neutron exception here?","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"f769c4d38ff568c7ed34ada335253ff104b91461","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    for my_singular, my_plural in _PLURALS.items():"},{"line_number":106,"context_line":"        if my_plural \u003d\u003d plural:"},{"line_number":107,"context_line":"            return my_singular"},{"line_number":108,"context_line":"    raise KeyError(plural)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9a629dbe_960e8239","line":108,"in_reply_to":"9a629dbe_f8ce1259","updated":"2016-11-09 17:23:50.000000000","message":"The intention was to mimic the behavior one would see if one was retrieving something that did not exist from the PLURALS array.  This would also match the exception you will get from get_plural if a nonexistent singular is specified.  I can change it to a new exception type, if you like - please let me know.","commit_id":"19db477247e4afae502cbe01b54622c6c76f7586"}],"neutron_lib/exceptions.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a80aba1130d98f2687edac164a33e2dea0e6f90e","unresolved":false,"context_lines":[{"line_number":435,"context_line":"    :param plural: Plural side of the conflicting plural mapping."},{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping address %(singular):%(plural) already \""},{"line_number":439,"context_line":"                \"allocated: %(conflict) already existed\")"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_2204e7c4","line":438,"range":{"start_line":438,"start_character":32,"end_line":438,"end_character":39},"updated":"2016-10-18 13:18:51.000000000","message":"Mapping \u0027address\u0027? Sorry I must be missing something, why do we call this an address?","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"84268dbbcad7371e47fcab92eda4b54fb2934232","unresolved":false,"context_lines":[{"line_number":435,"context_line":"    :param plural: Plural side of the conflicting plural mapping."},{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping address %(singular):%(plural) already \""},{"line_number":439,"context_line":"                \"allocated: %(conflict) already existed\")"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa6399be_2dc77746","line":438,"range":{"start_line":438,"start_character":32,"end_line":438,"end_character":39},"in_reply_to":"fa6399be_2204e7c4","updated":"2016-10-18 14:43:38.000000000","message":"I\u0027m not sure what I was thinking there.  Fixed.","commit_id":"17b877e7bbae87967ce7d572594882b343073ef3"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"62cab5e70e7d1c0254325ce7578a828347b537dc","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping %(singular):%(plural) already allocated: \""},{"line_number":439,"context_line":"                \"%(conflict) already existed\")"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"class InvalidContentType(NeutronException):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_3976d93e","line":439,"updated":"2016-10-18 15:58:03.000000000","message":"I think you should change this to explicitly show the conflict. Something like \"Plural mapping new_singular:new_plural conflicts with existing mapping old_singular:old_plural\".","commit_id":"378563010336749e071b6284153aa5f8233ddbe4"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"80ffb7107e13bcdc621ebcc34d86e0991bc7b82c","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping %(singular):%(plural) already allocated: \""},{"line_number":439,"context_line":"                \"%(conflict) already existed\")"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"class InvalidContentType(NeutronException):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa6399be_991c4579","line":439,"in_reply_to":"fa6399be_3976d93e","updated":"2016-10-18 16:08:34.000000000","message":"Done","commit_id":"378563010336749e071b6284153aa5f8233ddbe4"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4c34a6021bede630b7633f3712bb141970cb394f","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    This will report the plural mapping that caused the problem as well as"},{"line_number":432,"context_line":"    indicating which term (the singular or the plural) caused the conflict."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    :param singular: Singular side of the conflicting plural mapping."},{"line_number":435,"context_line":"    :param plural: Plural side of the conflicting plural mapping."},{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":439,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9fe6e2e6","line":436,"range":{"start_line":434,"start_character":0,"end_line":436,"end_character":65},"updated":"2016-10-18 17:54:57.000000000","message":"\u003ccough\u003e \u003ccough\u003e ;)","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d11f93cb7be053e2552872d42d11d2a5b3487f3","unresolved":false,"context_lines":[{"line_number":431,"context_line":"    This will report the plural mapping that caused the problem as well as"},{"line_number":432,"context_line":"    indicating which term (the singular or the plural) caused the conflict."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    :param singular: Singular side of the conflicting plural mapping."},{"line_number":435,"context_line":"    :param plural: Plural side of the conflicting plural mapping."},{"line_number":436,"context_line":"    :param conflict: String indicating which term is in conflict."},{"line_number":437,"context_line":"    \"\"\""},{"line_number":438,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":439,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_fa47ec1a","line":436,"range":{"start_line":434,"start_character":0,"end_line":436,"end_character":65},"in_reply_to":"fa6399be_9fe6e2e6","updated":"2016-10-18 18:16:54.000000000","message":"Done","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"19f1fd698b53281ae7fef7298eb575baf54c1cc4","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param old_singular: Singular side of the original plural mapping."},{"line_number":437,"context_line":"    :param old_plural: Plural side of the original plural mapping."},{"line_number":438,"context_line":"    \"\"\""},{"line_number":439,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":440,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_7979fcfb","line":439,"updated":"2016-10-19 16:01:21.000000000","message":"shouldn\u0027t this be %(new_singular)s:%(new_plural)s and %(old_singular)s:%(old_plural)s?","commit_id":"dd2f83c96a1edbb81b307f905e4267b05f82dacc"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"1bd101426c20744b1b0bdd57a20da285475e45cb","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param old_singular: Singular side of the original plural mapping."},{"line_number":437,"context_line":"    :param old_plural: Plural side of the original plural mapping."},{"line_number":438,"context_line":"    \"\"\""},{"line_number":439,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":440,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_86fe6069","line":439,"in_reply_to":"fa6399be_0f77cb3a","updated":"2016-10-19 20:44:20.000000000","message":"I am going to fix this in case we do use this code as-is... if not, then we can refactor or abandon as appropriate.","commit_id":"dd2f83c96a1edbb81b307f905e4267b05f82dacc"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"0b640e68626b490e5e63ac3d7f6ed65a19f82aa1","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param old_singular: Singular side of the original plural mapping."},{"line_number":437,"context_line":"    :param old_plural: Plural side of the original plural mapping."},{"line_number":438,"context_line":"    \"\"\""},{"line_number":439,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":440,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_b50c703c","line":439,"in_reply_to":"fa6399be_2abf20fc","updated":"2016-10-19 18:37:58.000000000","message":"For exception format errors: https://review.openstack.org/388861","commit_id":"dd2f83c96a1edbb81b307f905e4267b05f82dacc"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"473a5611bb6239ae84d7aa20422129b9007169f7","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param old_singular: Singular side of the original plural mapping."},{"line_number":437,"context_line":"    :param old_plural: Plural side of the original plural mapping."},{"line_number":438,"context_line":"    \"\"\""},{"line_number":439,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":440,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_0f77cb3a","line":439,"in_reply_to":"fa6399be_2abf20fc","updated":"2016-10-19 18:05:01.000000000","message":"that aside, I am not quite sure I understand where this patch fits in. The global PLURALS variable is sitting idle in a random utils module, when in reality I am locating it in [1], which to me makes more sense? Let\u0027s talk!\n\n[1] https://review.openstack.org/#/c/387747/8/neutron_lib/api/definitions/core.py","commit_id":"dd2f83c96a1edbb81b307f905e4267b05f82dacc"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"d58c72127748a201a193ea2afd97cde60774d978","unresolved":false,"context_lines":[{"line_number":436,"context_line":"    :param old_singular: Singular side of the original plural mapping."},{"line_number":437,"context_line":"    :param old_plural: Plural side of the original plural mapping."},{"line_number":438,"context_line":"    \"\"\""},{"line_number":439,"context_line":"    message \u003d _(\"Plural mapping %(new_singular):%(new_plural) conflicts with \""},{"line_number":440,"context_line":"                \"existing mapping %(old_singular):%(old_plural)\")"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa6399be_2abf20fc","line":439,"in_reply_to":"fa6399be_7979fcfb","updated":"2016-10-19 17:01:49.000000000","message":"Yes, which reminds me that we need to set up a test pattern or framework for catching these errors.","commit_id":"dd2f83c96a1edbb81b307f905e4267b05f82dacc"}],"neutron_lib/tests/unit/api/test_utils.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"9f6a99e7fcf44b49818cab7f46fabd4ded6f296f","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def test_get_plural_nonexistent(self):"},{"line_number":73,"context_line":"        self.assertRaises(KeyError, utils.get_plural, \u0027nonexistent\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_add_duplicates_identical(self):"},{"line_number":76,"context_line":"        utils.add_plural(\u0027identical\u0027, \u0027identical\u0027)"},{"line_number":77,"context_line":"        utils.add_plural(\u0027identical\u0027, \u0027identical\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_add_duplicates_exception_plural(self):"},{"line_number":80,"context_line":"        utils.add_plural(\u0027axis\u0027, \u0027axes\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9a6d10cf","line":77,"range":{"start_line":75,"start_character":4,"end_line":77,"end_character":50},"updated":"2016-10-18 18:07:58.000000000","message":"What is the idea of this test? Ensuring that can do it without raising any exception? Expecting to update the singular or plural value?","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"0d11f93cb7be053e2552872d42d11d2a5b3487f3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def test_get_plural_nonexistent(self):"},{"line_number":73,"context_line":"        self.assertRaises(KeyError, utils.get_plural, \u0027nonexistent\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_add_duplicates_identical(self):"},{"line_number":76,"context_line":"        utils.add_plural(\u0027identical\u0027, \u0027identical\u0027)"},{"line_number":77,"context_line":"        utils.add_plural(\u0027identical\u0027, \u0027identical\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def test_add_duplicates_exception_plural(self):"},{"line_number":80,"context_line":"        utils.add_plural(\u0027axis\u0027, \u0027axes\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9a8190fe","line":77,"range":{"start_line":75,"start_character":4,"end_line":77,"end_character":50},"in_reply_to":"fa6399be_9a6d10cf","updated":"2016-10-18 18:16:54.000000000","message":"The idea is to ensure that if a given singular:plural association is supplied multiple times identically that an exception will not be thrown.  This is to ensure that if subprojects need to define singular:plural mappings that they will be able to do that independently of each other as long as the mappings are identical.  The subsequent two unit tests test that exceptions are thrown if a mapping is added that is identical in one side but differs in the other side.  \n\nThis tests behavior that was added in response to feedback here: https://review.openstack.org/#/c/387612/3/neutron_lib/api/utils.py@52","commit_id":"7052228bd4c885c396a084780bbb176dde25bd05"}]}
