)]}'
{"zaqar/queues/storage/pooling.py":[{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        # as its first arg. The only exception to this"},{"line_number":142,"context_line":"        # is QueueController.list"},{"line_number":143,"context_line":"        def forward(queue, *args, **kwargs):"},{"line_number":144,"context_line":"            # project is optional, but it may be passed in as either a"},{"line_number":145,"context_line":"            # positional or keyword argument.  Check for both."},{"line_number":146,"context_line":"            project \u003d kwargs.get(\u0027project\u0027)"},{"line_number":147,"context_line":"            if project is None and len(args) \u003e project_position:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_b09df65b","line":144,"updated":"2014-10-21 16:06:06.000000000","message":"STYLE: Prefix longer comments with \"NOTE(riveter): \"","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4f81ce91c8abac62517b59192ef65a4968ea61c5","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            # project is optional, but it may be passed in as either a"},{"line_number":145,"context_line":"            # positional or keyword argument.  Check for both."},{"line_number":146,"context_line":"            project \u003d kwargs.get(\u0027project\u0027)"},{"line_number":147,"context_line":"            if project is None and len(args) \u003e project_position:"},{"line_number":148,"context_line":"                project \u003d args[project_position]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"            # happy case - lookup succeeds and we forward to the driver"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_f9813e4b","line":147,"updated":"2014-10-20 23:21:54.000000000","message":"Q. If project is None but the second clause is False, does that mean the desired project is indeed the \"global\" or None project? The way this code is written, that is what will happen when L151 is executed, so I just want to be sure this is correct.","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":13398,"name":"Rose Ames","email":"rose@happyspork.com","username":"superluser"},"change_message_id":"f8d7f8c23fcc406951c3cfbb1fd3a0673441e125","unresolved":false,"context_lines":[{"line_number":144,"context_line":"            # project is optional, but it may be passed in as either a"},{"line_number":145,"context_line":"            # positional or keyword argument.  Check for both."},{"line_number":146,"context_line":"            project \u003d kwargs.get(\u0027project\u0027)"},{"line_number":147,"context_line":"            if project is None and len(args) \u003e project_position:"},{"line_number":148,"context_line":"                project \u003d args[project_position]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"            # happy case - lookup succeeds and we forward to the driver"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_f9a4de58","line":147,"in_reply_to":"9aa7fdbe_f9813e4b","updated":"2014-10-21 00:05:20.000000000","message":"Yes, that\u0027s my understanding of how the code worked before.  \n\nIf project was not passed in as a keyword argument, there are two possibilities:  \n\n* it was passed as a positional argument, as were all the arguments before it, so len(args) is \u003e project_position.\n* it was not passed at all, which means the correct project value is None","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                target_ctrl \u003d getattr(storage, self._ctrl_property_name)"},{"line_number":154,"context_line":"                return getattr(target_ctrl, name)(queue, *args, **kwargs)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # if lookup fails, there are 3 classes of default behaviour to"},{"line_number":157,"context_line":"            # handle:  Raising an exception, returning a mutable value"},{"line_number":158,"context_line":"            # (which must be reconstructed on every call), or returning"},{"line_number":159,"context_line":"            # an immutable value.  In the first two cases, default will"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_50b76ad8","line":156,"updated":"2014-10-21 16:06:06.000000000","message":"STYLE: Prefix longer comments with \"NOTE(riveter): \"","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":10634,"name":"Peng Fei Wang","email":"wpf710@gmail.com","username":"wpf"},"change_message_id":"fb9b7c6af4ec27d735fee36e8e7791be49deb9ce","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                target_ctrl \u003d getattr(storage, self._ctrl_property_name)"},{"line_number":154,"context_line":"                return getattr(target_ctrl, name)(queue, *args, **kwargs)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"            # if lookup fails, there are 3 classes of default behaviour to"},{"line_number":157,"context_line":"            # handle:  Raising an exception, returning a mutable value"},{"line_number":158,"context_line":"            # (which must be reconstructed on every call), or returning"},{"line_number":159,"context_line":"            # an immutable value.  In the first two cases, default will"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_87571102","line":156,"updated":"2014-10-20 02:17:03.000000000","message":"[TYPO] \u0027classes\u0027 to \u0027cases\u0027","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4f81ce91c8abac62517b59192ef65a4968ea61c5","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            # (which must be reconstructed on every call), or returning"},{"line_number":159,"context_line":"            # an immutable value.  In the first two cases, default will"},{"line_number":160,"context_line":"            # be a function."},{"line_number":161,"context_line":"            if hasattr(default, \u0027__call__\u0027):"},{"line_number":162,"context_line":"                ret \u003d default(queue, project, args, kwargs)"},{"line_number":163,"context_line":"                if isinstance(ret, Exception):"},{"line_number":164,"context_line":"                    raise ret"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_beccfc36","line":161,"updated":"2014-10-20 23:21:54.000000000","message":"NIT: You could use \"callable\" instead:\n\n    if callable(default):","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4f81ce91c8abac62517b59192ef65a4968ea61c5","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                if isinstance(ret, Exception):"},{"line_number":164,"context_line":"                    raise ret"},{"line_number":165,"context_line":"                return ret"},{"line_number":166,"context_line":"            return default"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"        return forward"},{"line_number":169,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_9e601837","line":166,"updated":"2014-10-20 23:21:54.000000000","message":"NIT/STYLE: L166 could use a blank line above it to make it more visually (and mentally) distinct from the preceding code block","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":172,"context_line":"    \"\"\"Controller to facilitate special processing for queue operations.\"\"\""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    _resource_name \u003d \u0027queue\u0027"},{"line_number":175,"context_line":"    error \u003d lambda name, project, *_: errors.QueueDoesNotExist(name, project)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    method_forwarding_info \u003d {"},{"line_number":178,"context_line":"        \u0027exists\u0027: (0, False),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_104a42c5","line":175,"updated":"2014-10-21 16:06:06.000000000","message":"DOC: The expected form/signature of this should be documented in the RoutingController docstring","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"4f81ce91c8abac62517b59192ef65a4968ea61c5","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    _resource_name \u003d \u0027queue\u0027"},{"line_number":175,"context_line":"    error \u003d lambda name, project, *_: errors.QueueDoesNotExist(name, project)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    method_forwarding_info \u003d {"},{"line_number":178,"context_line":"        \u0027exists\u0027: (0, False),"},{"line_number":179,"context_line":"        \u0027get_metadata\u0027: (0, error),"},{"line_number":180,"context_line":"        \u0027set_metadata\u0027: (1, error),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_f95cde27","line":177,"updated":"2014-10-20 23:21:54.000000000","message":"DOC: It would be great to have some information about this, it\u0027s format, and why the \"position\" starts at 0 rather than 1 (answer: the \"forward\" function has a single named \"queue\" arg, followed by *args and **kwargs).","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    _resource_name \u003d \u0027queue\u0027"},{"line_number":175,"context_line":"    error \u003d lambda name, project, *_: errors.QueueDoesNotExist(name, project)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    method_forwarding_info \u003d {"},{"line_number":178,"context_line":"        \u0027exists\u0027: (0, False),"},{"line_number":179,"context_line":"        \u0027get_metadata\u0027: (0, error),"},{"line_number":180,"context_line":"        \u0027set_metadata\u0027: (1, error),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_b0eb36af","line":177,"in_reply_to":"9aa7fdbe_f95cde27","updated":"2014-10-21 16:06:06.000000000","message":"P.S. - This could go in the docstring for RoutingController","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":268,"context_line":"    method_forwarding_info \u003d {"},{"line_number":269,"context_line":"        \u0027delete\u0027: (1, None),"},{"line_number":270,"context_line":"        \u0027bulk_delete\u0027: (1, None),"},{"line_number":271,"context_line":"        \u0027bulk_get\u0027: (1, lambda *_: []),"},{"line_number":272,"context_line":"        \u0027list\u0027: (0, lambda *_: iter([[]])),"},{"line_number":273,"context_line":"        \u0027get\u0027: (1, error),"},{"line_number":274,"context_line":"        \u0027first\u0027: (0, error),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_9642aa0e","line":271,"updated":"2014-10-21 16:06:06.000000000","message":"PERF/LESS: You could simply pass the empty list directly as the default, rather than using a lambda.","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \u0027delete\u0027: (1, None),"},{"line_number":270,"context_line":"        \u0027bulk_delete\u0027: (1, None),"},{"line_number":271,"context_line":"        \u0027bulk_get\u0027: (1, lambda *_: []),"},{"line_number":272,"context_line":"        \u0027list\u0027: (0, lambda *_: iter([[]])),"},{"line_number":273,"context_line":"        \u0027get\u0027: (1, error),"},{"line_number":274,"context_line":"        \u0027first\u0027: (0, error),"},{"line_number":275,"context_line":"        \u0027post\u0027: (2, error),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_9610ea02","line":272,"updated":"2014-10-21 16:06:06.000000000","message":"Same comment as above. Should work, since:\n\n    callable(iter([[]])) \u003d\u003d False","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def error(queue, project, args, kwargs):"},{"line_number":284,"context_line":"        claim_id \u003d kwargs.get(\u0027claim_id\u0027)"},{"line_number":285,"context_line":"        if claim_id is None and len(args) \u003e 0:"},{"line_number":286,"context_line":"            claim_id \u003d args[0]"},{"line_number":287,"context_line":"        return errors.ClaimDoesNotExist(claim_id, queue, project)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_b686ce11","line":285,"updated":"2014-10-21 16:06:06.000000000","message":"PERF/LESS: You can simply test \u0027args\u0027 by itself to find out whether the list is empty:\n\n    if claim_id is None and args:","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        claim_id \u003d kwargs.get(\u0027claim_id\u0027)"},{"line_number":285,"context_line":"        if claim_id is None and len(args) \u003e 0:"},{"line_number":286,"context_line":"            claim_id \u003d args[0]"},{"line_number":287,"context_line":"        return errors.ClaimDoesNotExist(claim_id, queue, project)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    method_forwarding_info \u003d {"},{"line_number":290,"context_line":"        \u0027create\u0027: (1, lambda *_: [None, []]),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_96ac6aa2","line":287,"updated":"2014-10-21 16:06:06.000000000","message":"NIT: Could use a blank line above L287 to aid readability","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"},{"author":{"_account_id":6427,"name":"Kurt Griffiths","email":"kurt.griffiths@rackspace.com","username":"kgriffs"},"change_message_id":"5d73424c09148ff33d286f727529891720d5a49e","unresolved":false,"context_lines":[{"line_number":287,"context_line":"        return errors.ClaimDoesNotExist(claim_id, queue, project)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    method_forwarding_info \u003d {"},{"line_number":290,"context_line":"        \u0027create\u0027: (1, lambda *_: [None, []]),"},{"line_number":291,"context_line":"        \u0027get\u0027: (1, error),"},{"line_number":292,"context_line":"        \u0027update\u0027: (2, error),"},{"line_number":293,"context_line":"        \u0027delete\u0027: (1, None),"}],"source_content_type":"text/x-python","patch_set":1,"id":"9aa7fdbe_f61bf619","line":290,"updated":"2014-10-21 16:06:06.000000000","message":"Same comment as earlier; just pass the value directly","commit_id":"96732209c39d2c91727fe05ed4848c972a3e033f"}]}
