)]}'
{"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4eda143410e7bbde1a95a0cd19fff246aeff6d22","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                stamp[\u0027search_offset\u0027] \u003d i.value"},{"line_number":207,"context_line":"            elif i.field.startswith(\u0027metadata.\u0027):"},{"line_number":208,"context_line":"                try:"},{"line_number":209,"context_line":"                    converted_value \u003d {"},{"line_number":210,"context_line":"                        \"integer\": lambda: int(i.value),"},{"line_number":211,"context_line":"                        \"float\": lambda: float(i.value),"},{"line_number":212,"context_line":"                        \"boolean\": lambda: i.value.lower() \u003d\u003d \u0027true\u0027,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FVyw%3D","line":209,"updated":"2013-08-01 18:51:40.000000000","message":"This constructs a new dictionary of converter functions each time through the loop. It would be more efficient to build the dictionary once, outside of the loop, and pass i.value to the converter.","commit_id":"82466b20f9d6ba596482cea5702282dd850e6a22"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4eda143410e7bbde1a95a0cd19fff246aeff6d22","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                        \"boolean\": lambda: i.value.lower() \u003d\u003d \u0027true\u0027,"},{"line_number":213,"context_line":"                        \"string\": lambda: i.value,"},{"line_number":214,"context_line":"                    }[i.type]()"},{"line_number":215,"context_line":"                except Exception:"},{"line_number":216,"context_line":"                    msg \u003d (\u0027Failed to convert the metadata value %s to the\u0027"},{"line_number":217,"context_line":"                           \u0027 expected data type %s\u0027 % (i.value, i.type))"},{"line_number":218,"context_line":"                    LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FVyU%3D","line":215,"updated":"2013-08-01 18:51:40.000000000","message":"I thought you were going to try to do some \"smart\" conversion as well so that callers did not always have to provide the type argument.","commit_id":"82466b20f9d6ba596482cea5702282dd850e6a22"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4eda143410e7bbde1a95a0cd19fff246aeff6d22","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                    msg \u003d (\u0027Failed to convert the metadata value %s to the\u0027"},{"line_number":217,"context_line":"                           \u0027 expected data type %s\u0027 % (i.value, i.type))"},{"line_number":218,"context_line":"                    LOG.error(msg)"},{"line_number":219,"context_line":"                    raise wsme.exc.UnknownArgument(\u0027q.type\u0027,"},{"line_number":220,"context_line":"                                                   \"It\u0027s not valid for \""},{"line_number":221,"context_line":"                                                   \"metadata query.\")"},{"line_number":222,"context_line":"                    converted_value \u003d i.value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FVxc%3D","line":219,"updated":"2013-08-01 18:51:40.000000000","message":"The argument isn\u0027t necessarily unknown, is it? If the caller provides q.type\u003d\u0027int\u0027 and i.value\u003d\u0027notanint\u0027 then there\u0027s a TypeError, not an UnknownArgument error.","commit_id":"82466b20f9d6ba596482cea5702282dd850e6a22"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"4eda143410e7bbde1a95a0cd19fff246aeff6d22","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                    raise wsme.exc.UnknownArgument(\u0027q.type\u0027,"},{"line_number":220,"context_line":"                                                   \"It\u0027s not valid for \""},{"line_number":221,"context_line":"                                                   \"metadata query.\")"},{"line_number":222,"context_line":"                    converted_value \u003d i.value"},{"line_number":223,"context_line":"                metaquery[i.field] \u003d converted_value"},{"line_number":224,"context_line":"            else:"},{"line_number":225,"context_line":"                trans[translation.get(i.field, i.field)] \u003d i.value"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAQn%2F%2FVyQ%3D","line":222,"updated":"2013-08-01 18:51:40.000000000","message":"This line will never be run.","commit_id":"82466b20f9d6ba596482cea5702282dd850e6a22"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"503274a6278c780ef0d6aa86b0b9243cef9660eb","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def set_op(self, value):"},{"line_number":109,"context_line":"        self._op \u003d value"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    _metadata_type \u003d \u0027string\u0027  # provide a default data type"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_metadata_type(self):"},{"line_number":114,"context_line":"        return self._metadata_type"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F9io%3D","line":111,"updated":"2013-08-12 13:04:51.000000000","message":"Are the property methods just needed to allow us to specify a default?","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def set_op(self, value):"},{"line_number":109,"context_line":"        self._op \u003d value"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    _metadata_type \u003d \u0027string\u0027  # provide a default data type"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def get_metadata_type(self):"},{"line_number":114,"context_line":"        return self._metadata_type"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8L4%3D","line":111,"in_reply_to":"AAAAQ3%2F%2F9io%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"503274a6278c780ef0d6aa86b0b9243cef9660eb","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            elif i.field \u003d\u003d \u0027search_offset\u0027:"},{"line_number":206,"context_line":"                stamp[\u0027search_offset\u0027] \u003d i.value"},{"line_number":207,"context_line":"            elif i.field.startswith(\u0027metadata.\u0027):"},{"line_number":208,"context_line":"                try:"},{"line_number":209,"context_line":"                    converted_value \u003d i.value"},{"line_number":210,"context_line":"                    if i.type is None:"},{"line_number":211,"context_line":"                        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F9hw%3D","line":208,"updated":"2013-08-12 13:04:51.000000000","message":"The logic for handling type conversion should go into a separate function. That will make it possible to write explicit tests for it, especially the failure cases.","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            elif i.field \u003d\u003d \u0027search_offset\u0027:"},{"line_number":206,"context_line":"                stamp[\u0027search_offset\u0027] \u003d i.value"},{"line_number":207,"context_line":"            elif i.field.startswith(\u0027metadata.\u0027):"},{"line_number":208,"context_line":"                try:"},{"line_number":209,"context_line":"                    converted_value \u003d i.value"},{"line_number":210,"context_line":"                    if i.type is None:"},{"line_number":211,"context_line":"                        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8L0%3D","line":208,"in_reply_to":"AAAAQ3%2F%2F9hw%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"bd87fe60535888b3a9b950dee05e1ea23cb5302f","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                        try:"},{"line_number":212,"context_line":"                            converted_value \u003d ast.literal_eval(i.value)"},{"line_number":213,"context_line":"                        except ValueError:"},{"line_number":214,"context_line":"                            msg \u003d _(\u0027Failed to automatically convert the\u0027"},{"line_number":215,"context_line":"                                    \u0027 metadata value %s, since there is no\u0027"},{"line_number":216,"context_line":"                                    \u0027 data type given. Will try to query it\u0027"},{"line_number":217,"context_line":"                                    \u0027 as a string.\u0027) % (i.value)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2B7qg%3D","line":214,"updated":"2013-08-09 18:39:01.000000000","message":"i think you need to add \u0027from ceilometer.openstack.common.gettextutils import _\u0027 to properly do translations","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                        try:"},{"line_number":212,"context_line":"                            converted_value \u003d ast.literal_eval(i.value)"},{"line_number":213,"context_line":"                        except ValueError:"},{"line_number":214,"context_line":"                            msg \u003d _(\u0027Failed to automatically convert the\u0027"},{"line_number":215,"context_line":"                                    \u0027 metadata value %s, since there is no\u0027"},{"line_number":216,"context_line":"                                    \u0027 data type given. Will try to query it\u0027"},{"line_number":217,"context_line":"                                    \u0027 as a string.\u0027) % (i.value)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8Lw%3D","line":214,"in_reply_to":"AAAAQn%2F%2B7qg%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"bd87fe60535888b3a9b950dee05e1ea23cb5302f","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                            converted_value \u003d ast.literal_eval(i.value)"},{"line_number":213,"context_line":"                        except ValueError:"},{"line_number":214,"context_line":"                            msg \u003d _(\u0027Failed to automatically convert the\u0027"},{"line_number":215,"context_line":"                                    \u0027 metadata value %s, since there is no\u0027"},{"line_number":216,"context_line":"                                    \u0027 data type given. Will try to query it\u0027"},{"line_number":217,"context_line":"                                    \u0027 as a string.\u0027) % (i.value)"},{"line_number":218,"context_line":"                            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2B7pY%3D","line":215,"updated":"2013-08-09 18:39:01.000000000","message":"s/there is no/there was no/","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":212,"context_line":"                            converted_value \u003d ast.literal_eval(i.value)"},{"line_number":213,"context_line":"                        except ValueError:"},{"line_number":214,"context_line":"                            msg \u003d _(\u0027Failed to automatically convert the\u0027"},{"line_number":215,"context_line":"                                    \u0027 metadata value %s, since there is no\u0027"},{"line_number":216,"context_line":"                                    \u0027 data type given. Will try to query it\u0027"},{"line_number":217,"context_line":"                                    \u0027 as a string.\u0027) % (i.value)"},{"line_number":218,"context_line":"                            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8Ls%3D","line":215,"in_reply_to":"AAAAQn%2F%2B7pY%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"503274a6278c780ef0d6aa86b0b9243cef9660eb","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                          \u0027float\u0027,"},{"line_number":222,"context_line":"                                          \u0027boolean\u0027,"},{"line_number":223,"context_line":"                                          \u0027string\u0027):"},{"line_number":224,"context_line":"                            raise TypeError()"},{"line_number":225,"context_line":"                        elif i.type \u003d\u003d \u0027integer\u0027:"},{"line_number":226,"context_line":"                            converted_value \u003d int(i.value)"},{"line_number":227,"context_line":"                        elif i.type \u003d\u003d \u0027float\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F9ho%3D","line":224,"updated":"2013-08-12 13:04:51.000000000","message":"This exception should move to the final else clause, so there is no need to do an explicit check.","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                                          \u0027float\u0027,"},{"line_number":222,"context_line":"                                          \u0027boolean\u0027,"},{"line_number":223,"context_line":"                                          \u0027string\u0027):"},{"line_number":224,"context_line":"                            raise TypeError()"},{"line_number":225,"context_line":"                        elif i.type \u003d\u003d \u0027integer\u0027:"},{"line_number":226,"context_line":"                            converted_value \u003d int(i.value)"},{"line_number":227,"context_line":"                        elif i.type \u003d\u003d \u0027float\u0027:"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8Lk%3D","line":224,"in_reply_to":"AAAAQ3%2F%2F9ho%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"bd87fe60535888b3a9b950dee05e1ea23cb5302f","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                    LOG.error(msg)"},{"line_number":244,"context_line":"                    raise wsme.exc.UnknownArgument(\u0027q.type\u0027, msg)"},{"line_number":245,"context_line":"                except Exception:"},{"line_number":246,"context_line":"                    msg \u003d _(\u0027Unexpected exception to convert %(value)s to\u0027"},{"line_number":247,"context_line":"                            \u0027 the expected data type %(type)s.\u0027) % \\"},{"line_number":248,"context_line":"                        {\u0027value\u0027: i.value, \u0027type\u0027: i.type}"},{"line_number":249,"context_line":"                    LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQn%2F%2B7z0%3D","line":246,"updated":"2013-08-09 18:39:01.000000000","message":"s/exception to convert/exception converting/","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"35df1eae1446adafc86440ed8e45a67fe46ba0fe","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                    LOG.error(msg)"},{"line_number":244,"context_line":"                    raise wsme.exc.UnknownArgument(\u0027q.type\u0027, msg)"},{"line_number":245,"context_line":"                except Exception:"},{"line_number":246,"context_line":"                    msg \u003d _(\u0027Unexpected exception to convert %(value)s to\u0027"},{"line_number":247,"context_line":"                            \u0027 the expected data type %(type)s.\u0027) % \\"},{"line_number":248,"context_line":"                        {\u0027value\u0027: i.value, \u0027type\u0027: i.type}"},{"line_number":249,"context_line":"                    LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAQ3%2F%2F8Lg%3D","line":246,"in_reply_to":"AAAAQn%2F%2B7z0%3D","updated":"2013-08-12 18:25:40.000000000","message":"Done","commit_id":"cdb2135f0eff957c42c6ea939c29d64b7db94e58"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                   type\u003d\u0027string\u0027"},{"line_number":138,"context_line":"                   )"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_value_as_type(self):"},{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            converted_value \u003d self.value"},{"line_number":143,"context_line":"            if self.type is None:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9tk%3D","line":140,"updated":"2013-08-14 14:51:37.000000000","message":"Please add a docstring","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                   type\u003d\u0027string\u0027"},{"line_number":138,"context_line":"                   )"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_value_as_type(self):"},{"line_number":141,"context_line":"        try:"},{"line_number":142,"context_line":"            converted_value \u003d self.value"},{"line_number":143,"context_line":"            if self.type is None:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5nU%3D","line":140,"in_reply_to":"AAAARH%2F%2F9tk%3D","updated":"2013-08-15 14:54:34.000000000","message":"Done.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                            \u0027 metadata value %s, since there was no\u0027"},{"line_number":149,"context_line":"                            \u0027 data type given. Will try to query it\u0027"},{"line_number":150,"context_line":"                            \u0027 as a string.\u0027) % (self.value)"},{"line_number":151,"context_line":"                    LOG.error(msg)"},{"line_number":152,"context_line":"            else:"},{"line_number":153,"context_line":"                if self.type \u003d\u003d \u0027integer\u0027:"},{"line_number":154,"context_line":"                    converted_value \u003d int(self.value)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9tM%3D","line":151,"updated":"2013-08-14 14:51:37.000000000","message":"This is going to be the most common case -- strings that cannot be interpreted as numbers and where the type is not set. It isn\u0027t an error that the deployer needs to see in their logs, so there\u0027s no reason to log a message. If you definitely want to log something, use debug level, since that way deployers can \"silence\" the message by adjusting the verbosity.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":148,"context_line":"                            \u0027 metadata value %s, since there was no\u0027"},{"line_number":149,"context_line":"                            \u0027 data type given. Will try to query it\u0027"},{"line_number":150,"context_line":"                            \u0027 as a string.\u0027) % (self.value)"},{"line_number":151,"context_line":"                    LOG.error(msg)"},{"line_number":152,"context_line":"            else:"},{"line_number":153,"context_line":"                if self.type \u003d\u003d \u0027integer\u0027:"},{"line_number":154,"context_line":"                    converted_value \u003d int(self.value)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5nA%3D","line":151,"in_reply_to":"AAAARH%2F%2F9tM%3D","updated":"2013-08-15 14:54:34.000000000","message":"I prefer keep it with debug level.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                elif self.type \u003d\u003d \u0027string\u0027:"},{"line_number":160,"context_line":"                    converted_value \u003d self.value"},{"line_number":161,"context_line":"                else:"},{"line_number":162,"context_line":"                    raise TypeError()"},{"line_number":163,"context_line":"        except ValueError:"},{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9sE%3D","line":162,"updated":"2013-08-14 14:51:37.000000000","message":"I keep wanting you to add a message here, and then realizing you are catching TypeError below. Could you add a comment explaining why this exception has no message?","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5adc88c9a6e88778c54dd123f965be3770be7519","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                elif self.type \u003d\u003d \u0027string\u0027:"},{"line_number":160,"context_line":"                    converted_value \u003d self.value"},{"line_number":161,"context_line":"                else:"},{"line_number":162,"context_line":"                    raise TypeError()"},{"line_number":163,"context_line":"        except ValueError:"},{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5lY%3D","line":162,"in_reply_to":"AAAARH%2F%2F5m8%3D","updated":"2013-08-15 15:02:03.000000000","message":"Could you add a comment to the source code to make that clear for other readers.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                elif self.type \u003d\u003d \u0027string\u0027:"},{"line_number":160,"context_line":"                    converted_value \u003d self.value"},{"line_number":161,"context_line":"                else:"},{"line_number":162,"context_line":"                    raise TypeError()"},{"line_number":163,"context_line":"        except ValueError:"},{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5m8%3D","line":162,"in_reply_to":"AAAARH%2F%2F9sE%3D","updated":"2013-08-15 14:54:34.000000000","message":"Because I was thinking it can be handled in below catch.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0a79bbbb881db299ab71abe193ed9d3ea05ab784","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"},{"line_number":166,"context_line":"                {\u0027value\u0027: self.value, \u0027type\u0027: self.type}"},{"line_number":167,"context_line":"            LOG.error(msg)"},{"line_number":168,"context_line":"            raise wsme.exc.ClientSideError(msg)"},{"line_number":169,"context_line":"        except TypeError:"},{"line_number":170,"context_line":"            msg \u003d _(\u0027The data type %s is not supported. The supported\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAQ3%2F%2F4L8%3D","line":167,"updated":"2013-08-13 16:14:15.000000000","message":"maybe make these LOG.exception so we get stack trace as well since we\u0027re raising exception here","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"},{"line_number":166,"context_line":"                {\u0027value\u0027: self.value, \u0027type\u0027: self.type}"},{"line_number":167,"context_line":"            LOG.error(msg)"},{"line_number":168,"context_line":"            raise wsme.exc.ClientSideError(msg)"},{"line_number":169,"context_line":"        except TypeError:"},{"line_number":170,"context_line":"            msg \u003d _(\u0027The data type %s is not supported. The supported\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9uE%3D","line":167,"in_reply_to":"AAAAQ3%2F%2F4L8%3D","updated":"2013-08-14 14:51:37.000000000","message":"I\u0027m not sure we even need to log these errors (here, or below in this function). We cannot recover from them, the web framework should log an error response, and the only person who needs the message is the client (the deployer doesn\u0027t care).","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5adc88c9a6e88778c54dd123f965be3770be7519","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"},{"line_number":166,"context_line":"                {\u0027value\u0027: self.value, \u0027type\u0027: self.type}"},{"line_number":167,"context_line":"            LOG.error(msg)"},{"line_number":168,"context_line":"            raise wsme.exc.ClientSideError(msg)"},{"line_number":169,"context_line":"        except TypeError:"},{"line_number":170,"context_line":"            msg \u003d _(\u0027The data type %s is not supported. The supported\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5kc%3D","line":167,"in_reply_to":"AAAARH%2F%2F5mo%3D","updated":"2013-08-15 15:02:03.000000000","message":"It\u0027s probably not necessary, but that would be OK.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            msg \u003d _(\u0027Failed to convert the metadata value %(value)s\u0027"},{"line_number":165,"context_line":"                    \u0027 to the expected data type %(type)s.\u0027) % \\"},{"line_number":166,"context_line":"                {\u0027value\u0027: self.value, \u0027type\u0027: self.type}"},{"line_number":167,"context_line":"            LOG.error(msg)"},{"line_number":168,"context_line":"            raise wsme.exc.ClientSideError(msg)"},{"line_number":169,"context_line":"        except TypeError:"},{"line_number":170,"context_line":"            msg \u003d _(\u0027The data type %s is not supported. The supported\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5mo%3D","line":167,"in_reply_to":"AAAARH%2F%2F9uE%3D","updated":"2013-08-15 14:54:34.000000000","message":"How about keep it as debug level?","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                    \u0027 data type list is: integer, float, boolean and\u0027"},{"line_number":172,"context_line":"                    \u0027 string.\u0027) % (self.type)"},{"line_number":173,"context_line":"            LOG.error(msg)"},{"line_number":174,"context_line":"            raise wsme.exc.UnknownArgument(\u0027q.type\u0027, msg)"},{"line_number":175,"context_line":"        except Exception:"},{"line_number":176,"context_line":"            msg \u003d _(\u0027Unexpected exception converting %(value)s to\u0027"},{"line_number":177,"context_line":"                    \u0027 the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9r0%3D","line":174,"updated":"2013-08-14 14:51:37.000000000","message":"I don\u0027t think this is the right type of exception. We know what \u0027q.type\u0027 is, we just don\u0027t like it\u0027s value.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5adc88c9a6e88778c54dd123f965be3770be7519","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                    \u0027 data type list is: integer, float, boolean and\u0027"},{"line_number":172,"context_line":"                    \u0027 string.\u0027) % (self.type)"},{"line_number":173,"context_line":"            LOG.error(msg)"},{"line_number":174,"context_line":"            raise wsme.exc.UnknownArgument(\u0027q.type\u0027, msg)"},{"line_number":175,"context_line":"        except Exception:"},{"line_number":176,"context_line":"            msg \u003d _(\u0027Unexpected exception converting %(value)s to\u0027"},{"line_number":177,"context_line":"                    \u0027 the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5kM%3D","line":174,"in_reply_to":"AAAARH%2F%2F5mk%3D","updated":"2013-08-15 15:02:03.000000000","message":"Should be fine.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":171,"context_line":"                    \u0027 data type list is: integer, float, boolean and\u0027"},{"line_number":172,"context_line":"                    \u0027 string.\u0027) % (self.type)"},{"line_number":173,"context_line":"            LOG.error(msg)"},{"line_number":174,"context_line":"            raise wsme.exc.UnknownArgument(\u0027q.type\u0027, msg)"},{"line_number":175,"context_line":"        except Exception:"},{"line_number":176,"context_line":"            msg \u003d _(\u0027Unexpected exception converting %(value)s to\u0027"},{"line_number":177,"context_line":"                    \u0027 the expected data type %(type)s.\u0027) % \\"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5mk%3D","line":174,"in_reply_to":"AAAARH%2F%2F9r0%3D","updated":"2013-08-15 14:54:34.000000000","message":"Seems I have to use ClientSideError as well, any concern?","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"1d80c6a1538f40296e013df920f7a6ac02f5f8b4","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        data type given, the metadata will be parsed by ast.literal_eval to"},{"line_number":147,"context_line":"        try to do a smart converting."},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        NOTE (flwnag) Using \"_\" as prefix to avoid an InvocationError raised"},{"line_number":150,"context_line":"        from wsmeext/sphinxext.py. It\u0027s OK to call it outside the Query class."},{"line_number":151,"context_line":"        Because the \"public\" side of that class is actually the outside of the"},{"line_number":152,"context_line":"        API, and the \"private\" side is the API implementation. The method is"}],"source_content_type":"text/x-python","patch_set":19,"id":"AAAARn%2F%2F64E%3D","line":149,"updated":"2013-08-20 08:37:56.000000000","message":"Typo on your name! :)","commit_id":"f30bca4df0f1be7c3f99938457961428487de96b"}],"tests/api/v2/test_query.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0a79bbbb881db299ab71abe193ed9d3ea05ab784","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                      op\u003d\u0027eq\u0027,"},{"line_number":68,"context_line":"                      value\u003d\u0027fake\u0027,"},{"line_number":69,"context_line":"                      type\u003d\u0027integer\u0027)"},{"line_number":70,"context_line":"        self.assertRaises(wsme.exc.ClientSideError, query.get_value_as_type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAQ3%2F%2F4KU%3D","line":70,"updated":"2013-08-13 16:14:15.000000000","message":"add test for Query with no type (assuming this is possible)","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"936c49fa95738b8659783b11f4b29e956663e37b","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                      op\u003d\u0027eq\u0027,"},{"line_number":68,"context_line":"                      value\u003d\u0027fake\u0027,"},{"line_number":69,"context_line":"                      type\u003d\u0027integer\u0027)"},{"line_number":70,"context_line":"        self.assertRaises(wsme.exc.ClientSideError, query.get_value_as_type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F9p0%3D","line":70,"in_reply_to":"AAAAQ3%2F%2F4KU%3D","updated":"2013-08-14 14:51:37.000000000","message":"Yes, we need tests for all of the cases where type is not specified (valid int, valid float, and string that can\u0027t be converted to either).","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"},{"author":{"_account_id":6484,"name":"Feilong Wang","email":"hustemb@gmail.com","username":"flwang"},"change_message_id":"07a53848df73306c389291431fdd4ace5547b5d4","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                      op\u003d\u0027eq\u0027,"},{"line_number":68,"context_line":"                      value\u003d\u0027fake\u0027,"},{"line_number":69,"context_line":"                      type\u003d\u0027integer\u0027)"},{"line_number":70,"context_line":"        self.assertRaises(wsme.exc.ClientSideError, query.get_value_as_type)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAARH%2F%2F5mU%3D","line":70,"in_reply_to":"AAAARH%2F%2F9p0%3D","updated":"2013-08-15 14:54:34.000000000","message":"Will post a patch soon.","commit_id":"785f2013d200c51286c72c80dd3f8cc83286fea7"}]}
