)]}'
{"nova/api/openstack/wsgi.py":[{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    \u0027application/vnd.openstack.compute+xml\u0027: \u0027xml\u0027,"},{"line_number":56,"context_line":"    \u0027application/xml\u0027: \u0027xml\u0027,"},{"line_number":57,"context_line":"    \u0027application/atom+xml\u0027: \u0027atom\u0027,"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class Request(webob.Request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fyg%3D","line":58,"updated":"2012-01-09 18:13:42.000000000","message":"Just a thought:  Should SUPPORTED_CONTENT_TYPES be replaced with _MEDIA_TYPE_MAP.keys()?","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":55,"context_line":"    \u0027application/vnd.openstack.compute+xml\u0027: \u0027xml\u0027,"},{"line_number":56,"context_line":"    \u0027application/xml\u0027: \u0027xml\u0027,"},{"line_number":57,"context_line":"    \u0027application/atom+xml\u0027: \u0027atom\u0027,"},{"line_number":58,"context_line":"}"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class Request(webob.Request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FxM%3D","line":58,"in_reply_to":"AAAAD3%2F%2F%2Fyg%3D","updated":"2012-01-09 18:47:08.000000000","message":"Well, application/atom+xml has been added to _MEDIA_TYPE_MAP, but isn\u0027t in SUPPORTED_CONTENT_TYPES.  I\u0027ll have to double-check, but I believe that SUPPORTED_CONTENT_TYPES is used in deserialization only...","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        self.obj \u003d obj"},{"line_number":597,"context_line":"        self.serializers \u003d serializers"},{"line_number":598,"context_line":"        self._defcode \u003d 200"},{"line_number":599,"context_line":"        self._code \u003d code"},{"line_number":600,"context_line":"        self._headers \u003d {}"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fx0%3D","line":598,"updated":"2012-01-09 18:13:42.000000000","message":"My preference here would be for this to be `_default_code` or `_default_http_status_code`; it would make this completely unambiguous.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":595,"context_line":""},{"line_number":596,"context_line":"        self.obj \u003d obj"},{"line_number":597,"context_line":"        self.serializers \u003d serializers"},{"line_number":598,"context_line":"        self._defcode \u003d 200"},{"line_number":599,"context_line":"        self._code \u003d code"},{"line_number":600,"context_line":"        self._headers \u003d {}"},{"line_number":601,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FxI%3D","line":598,"in_reply_to":"AAAAD3%2F%2F%2Fx0%3D","updated":"2012-01-09 18:47:08.000000000","message":"*shrug* not a problem.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        del self._headers[key.lower()]"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def _bind_meth_serializers(self, meth_serializers):"},{"line_number":618,"context_line":"        \"\"\"Binds method serializers with the response object."},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        Binds the method serializers with the response object."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FyY%3D","line":617,"updated":"2012-01-09 18:13:42.000000000","message":"Would prefer `_bind_method_serializers` here.\n\nThe two extra letters will make this much easier to read and understand 6 mos later.\n\nPseudo-quantitatibvely: 8% reduction in string-length for \u003e\u003e 8% diminished readability.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":614,"context_line":""},{"line_number":615,"context_line":"        del self._headers[key.lower()]"},{"line_number":616,"context_line":""},{"line_number":617,"context_line":"    def _bind_meth_serializers(self, meth_serializers):"},{"line_number":618,"context_line":"        \"\"\"Binds method serializers with the response object."},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        Binds the method serializers with the response object."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FxE%3D","line":617,"in_reply_to":"AAAAD3%2F%2F%2FyY%3D","updated":"2012-01-09 18:47:08.000000000","message":"Makes sense to me...","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        except (KeyError, TypeError):"},{"line_number":651,"context_line":"            raise exception.InvalidContentType(content_type\u003dcontent_type)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    def serialize(self, request, content_type, default_serializers\u003d{}):"},{"line_number":654,"context_line":"        \"\"\"Serializes the wrapped object."},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        Utility method for serializing the wrapped object.  Returns a"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FyU%3D","line":653,"updated":"2012-01-09 18:13:42.000000000","message":"default_serializers should be None here, and we should do something like\n\ndefault_serializers \u003d default_serializers or {}\n\nOR\n\nif not default_serializers:\n   default_serialzers \u003d {}\n\nin the function body.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        except (KeyError, TypeError):"},{"line_number":651,"context_line":"            raise exception.InvalidContentType(content_type\u003dcontent_type)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    def serialize(self, request, content_type, default_serializers\u003d{}):"},{"line_number":654,"context_line":"        \"\"\"Serializes the wrapped object."},{"line_number":655,"context_line":""},{"line_number":656,"context_line":"        Utility method for serializing the wrapped object.  Returns a"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FxA%3D","line":653,"in_reply_to":"AAAAD3%2F%2F%2FyU%3D","updated":"2012-01-09 18:47:08.000000000","message":"That makes sense to me, actually.  But I\u0027ll do the check in get_serializer(); no sense in repeating the logic :)","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":662,"context_line":"        response \u003d webob.Response()"},{"line_number":663,"context_line":"        response.status_int \u003d self.code"},{"line_number":664,"context_line":"        for hdr, value in self._headers.items():"},{"line_number":665,"context_line":"            response.headers[hdr] \u003d value"},{"line_number":666,"context_line":"        response.headers[\u0027Content-Type\u0027] \u003d content_type"},{"line_number":667,"context_line":"        if self.obj is not None:"},{"line_number":668,"context_line":"            # TODO(Vek): When lazy serialization is retired, so can"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2FyM%3D","line":665,"updated":"2012-01-09 18:13:42.000000000","message":"Could this be?\n\nresponse.headers.update(self._headers)\n\nNot sure, depends on what `headers` parts of the dict protocol it supports, but just thought I\u0027d throw that out there.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":662,"context_line":"        response \u003d webob.Response()"},{"line_number":663,"context_line":"        response.status_int \u003d self.code"},{"line_number":664,"context_line":"        for hdr, value in self._headers.items():"},{"line_number":665,"context_line":"            response.headers[hdr] \u003d value"},{"line_number":666,"context_line":"        response.headers[\u0027Content-Type\u0027] \u003d content_type"},{"line_number":667,"context_line":"        if self.obj is not None:"},{"line_number":668,"context_line":"            # TODO(Vek): When lazy serialization is retired, so can"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fw8%3D","line":665,"in_reply_to":"AAAAD3%2F%2F%2FyM%3D","updated":"2012-01-09 18:47:08.000000000","message":"Yeah, I didn\u0027t want to trust the dict proxy to have an update method.  Part of it is that I was looking at code for two different versions of webob, which names this class different things; another part of it is the fact that headers is technically a multidict, i.e., multiple values for any given key.  This loop seemed to me to be the safest approach.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        if self._code is None:"},{"line_number":690,"context_line":"            return self._defcode"},{"line_number":691,"context_line":"        return self._code"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    @property"},{"line_number":694,"context_line":"    def headers(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fx4%3D","line":691,"updated":"2012-01-09 18:13:42.000000000","message":"Doesn\u0027t have to be changed, but just a point of discussion, could be:\n\nreturn self._code or self._defcode","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        if self._code is None:"},{"line_number":690,"context_line":"            return self._defcode"},{"line_number":691,"context_line":"        return self._code"},{"line_number":692,"context_line":""},{"line_number":693,"context_line":"    @property"},{"line_number":694,"context_line":"    def headers(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fw4%3D","line":691,"in_reply_to":"AAAAD3%2F%2F%2Fx4%3D","updated":"2012-01-09 18:47:08.000000000","message":"Makes perfect sense; I sometimes forget about that idiom.  (Does my C programming heritage show?  ;)","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        try:"},{"line_number":747,"context_line":"            args \u003d request_environment[\u0027wsgiorg.routing_args\u0027][1].copy()"},{"line_number":748,"context_line":"        except Exception:"},{"line_number":749,"context_line":"            return {}"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fxw%3D","line":748,"updated":"2012-01-09 18:13:42.000000000","message":"This exception handler seems overly-broad; what specifically are we trying to avoid here.\n\nwould (KeyError, IndexError) be sufficient?","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":745,"context_line":""},{"line_number":746,"context_line":"        try:"},{"line_number":747,"context_line":"            args \u003d request_environment[\u0027wsgiorg.routing_args\u0027][1].copy()"},{"line_number":748,"context_line":"        except Exception:"},{"line_number":749,"context_line":"            return {}"},{"line_number":750,"context_line":""},{"line_number":751,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fw0%3D","line":748,"in_reply_to":"AAAAD3%2F%2F%2Fxw%3D","updated":"2012-01-09 18:47:08.000000000","message":"This is an exact copy of get_action_args() from RequestDeserializer(), as I recall.  I don\u0027t see any problem with narrowing the exception handler, but *shrug*","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":767,"context_line":"            LOG.debug(_(\"Unrecognized Content-Type provided in request\"))"},{"line_number":768,"context_line":"            return None, \u0027\u0027"},{"line_number":769,"context_line":""},{"line_number":770,"context_line":"        if content_type is None:"},{"line_number":771,"context_line":"            LOG.debug(_(\"No Content-Type provided in request\"))"},{"line_number":772,"context_line":"            return None, \u0027\u0027"},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fxs%3D","line":770,"updated":"2012-01-09 18:13:42.000000000","message":"Mentioned above, generally, \n\n`if not content_type` is preferred where possible.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":767,"context_line":"            LOG.debug(_(\"Unrecognized Content-Type provided in request\"))"},{"line_number":768,"context_line":"            return None, \u0027\u0027"},{"line_number":769,"context_line":""},{"line_number":770,"context_line":"        if content_type is None:"},{"line_number":771,"context_line":"            LOG.debug(_(\"No Content-Type provided in request\"))"},{"line_number":772,"context_line":"            return None, \u0027\u0027"},{"line_number":773,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fws%3D","line":770,"in_reply_to":"AAAAD3%2F%2F%2Fxs%3D","updated":"2012-01-09 18:47:08.000000000","message":"Again, I\u0027m copying logic from elsewhere, with more substantial changes due to the different return convention...","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        except (KeyError, TypeError):"},{"line_number":789,"context_line":"            raise exception.InvalidContentType(content_type\u003dcontent_type)"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"        return deserializer().deserialize(body)"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":"    @webob.dec.wsgify(RequestClass\u003dRequest)"},{"line_number":794,"context_line":"    def __call__(self, request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fxo%3D","line":791,"updated":"2012-01-09 18:13:42.000000000","message":"This is a bit of a code smell; empty objects, usually point to a refactoring towards classmethods, or functions.","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":788,"context_line":"        except (KeyError, TypeError):"},{"line_number":789,"context_line":"            raise exception.InvalidContentType(content_type\u003dcontent_type)"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"        return deserializer().deserialize(body)"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":"    @webob.dec.wsgify(RequestClass\u003dRequest)"},{"line_number":794,"context_line":"    def __call__(self, request):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fwk%3D","line":791,"in_reply_to":"AAAAD3%2F%2F%2Fxo%3D","updated":"2012-01-09 18:47:08.000000000","message":"Yeah, it is, but I wanted to retain compatibility with existing deserializers—which meant using the deserialize() method on an object—and I wanted to pass classes, not instances, to the @wsgi.deserializers() decorator (and similarly for the @wsgi.serializers() decorator).  This is something I anticipate eventually refactoring out…","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":475,"name":"Rick Harris","email":"rick.harris@rackspace.com","username":"rconradharris"},"change_message_id":"96f48d38b82bc874317b8bd6b81058d95601deb8","unresolved":false,"context_lines":[{"line_number":845,"context_line":"            LOG.info(_(\"HTTP exception thrown: %s\"), unicode(ex))"},{"line_number":846,"context_line":"            response \u003d Fault(ex)"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"        if response is None:"},{"line_number":849,"context_line":"            # No exceptions; convert action_result into a"},{"line_number":850,"context_line":"            # ResponseObject"},{"line_number":851,"context_line":"            resp_obj \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fxk%3D","line":848,"updated":"2012-01-09 18:13:42.000000000","message":"`if not response`, instead?","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"279492521f5b5adbceec9bea10299af60a845993","unresolved":false,"context_lines":[{"line_number":845,"context_line":"            LOG.info(_(\"HTTP exception thrown: %s\"), unicode(ex))"},{"line_number":846,"context_line":"            response \u003d Fault(ex)"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"        if response is None:"},{"line_number":849,"context_line":"            # No exceptions; convert action_result into a"},{"line_number":850,"context_line":"            # ResponseObject"},{"line_number":851,"context_line":"            resp_obj \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAD3%2F%2F%2Fwc%3D","line":848,"in_reply_to":"AAAAD3%2F%2F%2Fxk%3D","updated":"2012-01-09 18:47:08.000000000","message":"That\u0027s probably doable.  The one danger with \"if not response\" is if the response object can test as False, though, which is why I tend toward testing with None…","commit_id":"f143e8b4561a35cd94aa0aeb40834e08be5be22f"}]}
