)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"61efc04a6e93dc7afca3ca554061c3dabc4e1b09","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  1.1 million time when"},{"line_number":17,"context_line":"  nova.api.validation.parameters_types is imported."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- This change add a memorize decorator and uses"},{"line_number":20,"context_line":"  it to cache _build_regex_range"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"- This change does not cache valid_char,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_df836cca","line":19,"range":{"start_line":19,"start_character":20,"end_line":19,"end_character":28},"updated":"2018-09-04 17:29:22.000000000","message":"should this be \"memoize\"?","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"df8b34bab75a4071200ce421b3cc173207f1f0fe","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  1.1 million time when"},{"line_number":17,"context_line":"  nova.api.validation.parameters_types is imported."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- This change add a memorize decorator and uses"},{"line_number":20,"context_line":"  it to cache _build_regex_range"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"- This change does not cache valid_char,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3f79a3b5_c2293a9c","line":19,"range":{"start_line":19,"start_character":20,"end_line":19,"end_character":28},"in_reply_to":"3f79a3b5_df836cca","updated":"2018-09-05 11:16:44.000000000","message":"yes and no.\nmemoize is the name of the decorator i added.\nhowever memoize is not a word and memorize is.\n\nso i probably should have spelled the decorator correctly in the first place :)","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"add caching to _build_regex_range"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"- _build_regex_range is called 17 time on"},{"line_number":10,"context_line":"  import of nova.api.validation.parameters_types."},{"line_number":11,"context_line":"  _build_regex_range internally calls re.escape"},{"line_number":12,"context_line":"  and valid_char  on every char returned"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_f8d95e55","line":9,"range":{"start_line":9,"start_character":34,"end_line":9,"end_character":38},"updated":"2018-09-06 21:02:13.000000000","message":"times","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"  import of nova.api.validation.parameters_types."},{"line_number":11,"context_line":"  _build_regex_range internally calls re.escape"},{"line_number":12,"context_line":"  and valid_char  on every char returned"},{"line_number":13,"context_line":"  form _get_all_chars."},{"line_number":14,"context_line":"  _get_all_chars yields all chars up to 0xffff."},{"line_number":15,"context_line":"  As a result re.escape and valid_char are called"},{"line_number":16,"context_line":"  1.1 million time when"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_18dd3a40","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":6},"updated":"2018-09-06 21:02:13.000000000","message":"from","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"  form _get_all_chars."},{"line_number":14,"context_line":"  _get_all_chars yields all chars up to 0xffff."},{"line_number":15,"context_line":"  As a result re.escape and valid_char are called"},{"line_number":16,"context_line":"  1.1 million time when"},{"line_number":17,"context_line":"  nova.api.validation.parameters_types is imported."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- This change add a memorize decorator and uses"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_d8e26201","line":16,"range":{"start_line":16,"start_character":14,"end_line":16,"end_character":18},"updated":"2018-09-06 21:02:13.000000000","message":"times","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"  1.1 million time when"},{"line_number":17,"context_line":"  nova.api.validation.parameters_types is imported."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"- This change add a memorize decorator and uses"},{"line_number":20,"context_line":"  it to cache _build_regex_range"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"- This change does not cache valid_char,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_78c6ae6a","line":19,"range":{"start_line":19,"start_character":20,"end_line":19,"end_character":28},"updated":"2018-09-06 21:02:13.000000000","message":"oh, see, \u0027memoize\u0027 is a thing, and I thought you were using that word on purpose. I don\u0027t really have a problem with \u0027memorize\u0027 per se, but since this code is basically copied from [1] I figure it would probably be best if the name was left the same.\n\n[1] https://github.com/openstack/nova/blob/bb14337c30df0c17bc1dadc00d5a5500ae2dc4b7/nova/api/ec2/ec2utils.py#L36-L57","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"  _is_printable or re.escape as hashing and"},{"line_number":24,"context_line":"  caching them for each invocation would"},{"line_number":25,"context_line":"  be far more costly both in time and memory"},{"line_number":26,"context_line":"  then computing the result."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Change-Id: Ic1f2c560a6da815b26fdf770450bbe439d18d4f9"},{"line_number":29,"context_line":"Closes-Bug: #1790195"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3f79a3b5_38a276af","line":26,"range":{"start_line":26,"start_character":2,"end_line":26,"end_character":6},"updated":"2018-09-06 21:02:13.000000000","message":"than","commit_id":"2068ada02604675b9786fabce24851138a148955"}],"nova/api/validation/parameter_types.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7b8f5a68baab99ffc4610c1ac7572697a40bbad5","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from nova.i18n import _"},{"line_number":27,"context_line":"from nova.objects import tag"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"_CACHE \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def memoize(func):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6edcf073","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":6},"updated":"2018-09-04 11:46:19.000000000","message":"Maybe \u0027_REGEX_RANGE_CACHE\u0027? just think this name is too generic","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"df8b34bab75a4071200ce421b3cc173207f1f0fe","unresolved":false,"context_lines":[{"line_number":26,"context_line":"from nova.i18n import _"},{"line_number":27,"context_line":"from nova.objects import tag"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"_CACHE \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def memoize(func):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_02d092f6","line":29,"range":{"start_line":29,"start_character":0,"end_line":29,"end_character":6},"in_reply_to":"3f79a3b5_6edcf073","updated":"2018-09-05 11:16:44.000000000","message":"i can change that. this is not what actully store the cached values by the way. its just what stores a handel to the cache client.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7b8f5a68baab99ffc4610c1ac7572697a40bbad5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_CACHE \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def memoize(func):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @functools.wraps(func)"},{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6ee63019","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":11},"updated":"2018-09-04 11:46:19.000000000","message":"maybe private method?","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"df8b34bab75a4071200ce421b3cc173207f1f0fe","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_CACHE \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def memoize(func):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @functools.wraps(func)"},{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_c2d5bae7","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":11},"in_reply_to":"3f79a3b5_6e305708","updated":"2018-09-05 11:16:44.000000000","message":"there is nothing local about this fucntion\nis you have memcache configured as your default cache for nova this will use it.\n\ni had consider putting this in cache_utils also given have a varient of this already.\nhttps://github.com/openstack/nova/blob/bb14337c30df0c17bc1dadc00d5a5500ae2dc4b7/nova/api/ec2/ec2utils.py#L36-L57\n\nthat said i had not work out how to correctly hanle different cache durations via the decorator so i decided not to.\ni might do that as a followup but dont want to do it now.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3c1e5b89cea2f1879381a3d6a8caf4d0f9d57180","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_CACHE \u003d None"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def memoize(func):"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @functools.wraps(func)"},{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_6e305708","line":32,"range":{"start_line":32,"start_character":4,"end_line":32,"end_character":11},"in_reply_to":"3f79a3b5_6ee63019","updated":"2018-09-05 07:28:28.000000000","message":"This looks to be something that would be called memoize_local() and be in cache_utils lib or something like that.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"7b8f5a68baab99ffc4610c1ac7572697a40bbad5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"},{"line_number":36,"context_line":"        global _CACHE"},{"line_number":37,"context_line":"        if not _CACHE:"},{"line_number":38,"context_line":"            _CACHE \u003d cache_utils.get_client()"},{"line_number":39,"context_line":"        key \u003d \"%s:%s:%s\" % (func.__name__, hash(str(args)), hash(str(kwargs)))"},{"line_number":40,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":41,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_aed8c851","line":38,"range":{"start_line":38,"start_character":12,"end_line":38,"end_character":45},"updated":"2018-09-04 11:46:19.000000000","message":"so may get a cache from memcached or mongoDB based on the operator configure, is it on purpose? or we just want a simple dict cache here?","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"df8b34bab75a4071200ce421b3cc173207f1f0fe","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"},{"line_number":36,"context_line":"        global _CACHE"},{"line_number":37,"context_line":"        if not _CACHE:"},{"line_number":38,"context_line":"            _CACHE \u003d cache_utils.get_client()"},{"line_number":39,"context_line":"        key \u003d \"%s:%s:%s\" % (func.__name__, hash(str(args)), hash(str(kwargs)))"},{"line_number":40,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":41,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a2f43e5c","line":38,"range":{"start_line":38,"start_character":12,"end_line":38,"end_character":45},"in_reply_to":"3f79a3b5_4e46bb7d","updated":"2018-09-05 11:16:44.000000000","message":"yes i have used the main cache on pourpos as i wanted\n2 one follow the caching behavior set by the operator and 2 i wanted this to be cached globally accross the cloud not locally per node. i could override the backend with the oslo dict cache.\n\ni first considered usering the functools lru_cache with a small size like 16 but i discounted it for 2 reasons. i want\nto improve starup time so i want the cache to outlive the process lifetime and second lru_cache is not available on python2 so i could use the oslo.dict cache or create my own but it does not really help with startup time.\n\n\nill try it and see if there is a meaningful improvement.\n\ngoing form 17 invocation to 5 is still nontrivial but\nits still more the 5 total invoaction across the entire cloud.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"3c1e5b89cea2f1879381a3d6a8caf4d0f9d57180","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def memoizer(*args, **kwargs):"},{"line_number":36,"context_line":"        global _CACHE"},{"line_number":37,"context_line":"        if not _CACHE:"},{"line_number":38,"context_line":"            _CACHE \u003d cache_utils.get_client()"},{"line_number":39,"context_line":"        key \u003d \"%s:%s:%s\" % (func.__name__, hash(str(args)), hash(str(kwargs)))"},{"line_number":40,"context_line":"        value \u003d _CACHE.get(key)"},{"line_number":41,"context_line":"        if value is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_4e46bb7d","line":38,"range":{"start_line":38,"start_character":12,"end_line":38,"end_character":45},"in_reply_to":"3f79a3b5_aed8c851","updated":"2018-09-05 07:28:28.000000000","message":"Excellent comment, we don\u0027t want cache such data in something that is not local. We are going to consume more CPU just initialize the client or execute the call.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"31e0974363fb8ce192356f39315f64820dab4af0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    return memoizer"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _reset_cache():"},{"line_number":49,"context_line":"    global _CACHE"},{"line_number":50,"context_line":"    _CACHE \u003d None"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5e2dfe43","line":48,"updated":"2018-09-05 15:42:35.000000000","message":"not sure of the purpose of this","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ff421fa106f718f26941c66423ac286a6a94285","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    return memoizer"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"def _reset_cache():"},{"line_number":49,"context_line":"    global _CACHE"},{"line_number":50,"context_line":"    _CACHE \u003d None"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5ba97779","line":48,"in_reply_to":"3f79a3b5_5e2dfe43","updated":"2018-09-06 15:34:07.000000000","message":"if  you look in the test cases you can see that we dont test the entire range and only thest the ascii set as such the cached needs to be flushed as the behavior changes due to how we monkey patch.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"}],"nova/tests/unit/test_api_validation.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"922c5545b0568571d540057d7f87051df8cb941c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":96,"context_line":"            \u0027nova.api.validation.parameter_types._get_all_chars\u0027,"},{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        parameter_types._reset_cache()"},{"line_number":99,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":100,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a9dea9d7","line":98,"updated":"2018-08-31 21:12:13.000000000","message":"Why is this necessary?","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"018232aab200b38faf75f9aa211e4453ce016a1c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":96,"context_line":"            \u0027nova.api.validation.parameter_types._get_all_chars\u0027,"},{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        parameter_types._reset_cache()"},{"line_number":99,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":100,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_5478c8f6","line":98,"in_reply_to":"3f79a3b5_9476603e","updated":"2018-08-31 21:34:21.000000000","message":"Got it. Thanks for the explanation.","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":8768,"name":"Chris Friesen","email":"chris.friesen@windriver.com","username":"cbf123"},"change_message_id":"61efc04a6e93dc7afca3ca554061c3dabc4e1b09","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":96,"context_line":"            \u0027nova.api.validation.parameter_types._get_all_chars\u0027,"},{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        parameter_types._reset_cache()"},{"line_number":99,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":100,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_3f65b9b5","line":98,"in_reply_to":"3f79a3b5_9476603e","updated":"2018-09-04 17:29:22.000000000","message":"maybe add a comment to this effect so others don\u0027t get confused?","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c9d5b2afee6f412e4aed5c9c01748d7110a6f2de","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":96,"context_line":"            \u0027nova.api.validation.parameter_types._get_all_chars\u0027,"},{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        parameter_types._reset_cache()"},{"line_number":99,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":100,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9476603e","line":98,"in_reply_to":"3f79a3b5_a9dea9d7","updated":"2018-08-31 21:31:09.000000000","message":"we only test the ascii range.\nso when we invoke the test below we get back the cached value where we calculated all 2^16 values and we don\u0027t match the expected set.\n\nso i reset the cache so we recalculate it with the monkey patched _get_all_chars","commit_id":"47dba50cd2fa170ff1388244ba5ddee4aeddb8f9"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        self.useFixture(fixtures.MonkeyPatch("},{"line_number":96,"context_line":"            \u0027nova.api.validation.parameter_types._get_all_chars\u0027,"},{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        # note that since we use only the ascii range in the tests"},{"line_number":99,"context_line":"        # we have to clear the cache to recompute them."},{"line_number":100,"context_line":"        parameter_types._reset_cache()"},{"line_number":101,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":102,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b8952642","line":99,"range":{"start_line":98,"start_character":0,"end_line":99,"end_character":55},"updated":"2018-09-06 21:02:13.000000000","message":"Thanks for this comment","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"d11d8c2bd2c345984aa66f443d77896023c55cee","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        # note that since we use only the ascii range in the tests"},{"line_number":99,"context_line":"        # we have to clear the cache to recompute them."},{"line_number":100,"context_line":"        parameter_types._reset_cache()"},{"line_number":101,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":102,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_530abb89","line":100,"updated":"2018-09-06 15:03:32.000000000","message":"Well I would have not created such function just for the tests and it would have make more sense to have this in a setUp() function.\n\n  parameter_types._REGEX_RANGE_CACHE \u003d {}","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"20e9447a1668dde1dbc9e8e93b2d867a616934dd","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        # note that since we use only the ascii range in the tests"},{"line_number":99,"context_line":"        # we have to clear the cache to recompute them."},{"line_number":100,"context_line":"        parameter_types._reset_cache()"},{"line_number":101,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":102,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_98962a49","line":100,"in_reply_to":"3f79a3b5_36a28daf","updated":"2018-09-06 21:02:13.000000000","message":"I like leaving it as a method, for the reasons sean stated.","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"2ff421fa106f718f26941c66423ac286a6a94285","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        # note that since we use only the ascii range in the tests"},{"line_number":99,"context_line":"        # we have to clear the cache to recompute them."},{"line_number":100,"context_line":"        parameter_types._reset_cache()"},{"line_number":101,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":102,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_36a28daf","line":100,"in_reply_to":"3f79a3b5_530abb89","updated":"2018-09-06 15:34:07.000000000","message":"i could but if we cahnge how we cache in the future i do not want to have to chage the test so im going to leave it as is unless people really want this to be removed.","commit_id":"2068ada02604675b9786fabce24851138a148955"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"1f1d83c7a1bd48b1af31ec3f13d9d3bc450c8b56","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            _get_all_chars))"},{"line_number":98,"context_line":"        # note that since we use only the ascii range in the tests"},{"line_number":99,"context_line":"        # we have to clear the cache to recompute them."},{"line_number":100,"context_line":"        parameter_types._reset_cache()"},{"line_number":101,"context_line":"        r \u003d parameter_types._build_regex_range(ws\u003dFalse)"},{"line_number":102,"context_line":"        self.assertEqual(r, re.escape(\u0027!\u0027) + \u0027-\u0027 + re.escape(\u0027~\u0027))"},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_feb85cc8","line":100,"in_reply_to":"3f79a3b5_98962a49","updated":"2018-09-07 11:08:50.000000000","message":"Yes, makes sense I still think that should have been put in a setUp function but I guess it OK like that.","commit_id":"2068ada02604675b9786fabce24851138a148955"}]}
