)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":13,"context_line":"in driver.py, tmost of the logic of mapping to AMQP 1.0 is in controller.py and"},{"line_number":14,"context_line":"the eventloop.py is also fairly generic."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Implements: blueprint Provide a AMQP 1.0 implementation for oslo.messaging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I871703e4cdc04cee3e6c214e911c9df464ede2ed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAU3%2F%2F4RE%3D","line":16,"updated":"2014-02-24 10:56:40.000000000","message":"Implements: blueprint amqp10-driver-implementation","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":13,"context_line":"in driver.py, tmost of the logic of mapping to AMQP 1.0 is in controller.py and"},{"line_number":14,"context_line":"the eventloop.py is also fairly generic."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Implements: blueprint Provide a AMQP 1.0 implementation for oslo.messaging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I871703e4cdc04cee3e6c214e911c9df464ede2ed"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAU3%2F%2F1k8%3D","line":16,"in_reply_to":"AAAAU3%2F%2F4RE%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"amqp1-requirements.txt":[{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# amqp1 driver tox tests this way:"},{"line_number":6,"context_line":"#    tox -e amqp1"},{"line_number":7,"context_line":"pyngus\u003e\u003d1.0.0,\u003c2.0.0  # Apache-2.0"},{"line_number":8,"context_line":"python-qpid-proton\u003e\u003d0.7  # Apache-2.0"},{"line_number":9,"context_line":""}],"source_content_type":"text/plain","patch_set":15,"id":"1abeadc6_4f5f6341","line":8,"updated":"2014-08-28 08:41:19.000000000","message":"I haven\u0027t found any reference of this dep in the driver, so it shouldn\u0027t be here.\n\nIf this is a dep of pyngus, it should be installed automatically by pip without the reference here.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# amqp1 driver tox tests this way:"},{"line_number":6,"context_line":"#    tox -e amqp1"},{"line_number":7,"context_line":"pyngus\u003e\u003d1.0.0,\u003c2.0.0  # Apache-2.0"},{"line_number":8,"context_line":"python-qpid-proton\u003e\u003d0.7  # Apache-2.0"},{"line_number":9,"context_line":""}],"source_content_type":"text/plain","patch_set":15,"id":"1abeadc6_5a0c68ec","line":8,"in_reply_to":"1abeadc6_4f5f6341","updated":"2014-08-28 20:43:38.000000000","message":"Actually, proton is used by the driver:\noslo/messaging/_drivers/protocols/amqp/driver.py:19\n\nThe driver uses proton.Message - the driver works with the proton-native message class.\n\nHmmm - this reminds me, I\u0027m going to pin the python-qpid-proton dependency to 0.7.  I\u0027d want some time to verify the 0.8 release with pyngus before we pull it in.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"6f1b8f6ca854329696c68d0db99da77bd8bb9d8f","unresolved":false,"context_lines":[{"line_number":5,"context_line":"# amqp1 driver tox tests this way:"},{"line_number":6,"context_line":"#    tox -e amqp1"},{"line_number":7,"context_line":"pyngus\u003e\u003d1.0.0,\u003c2.0.0  # Apache-2.0"},{"line_number":8,"context_line":"python-qpid-proton\u003e\u003d0.7  # Apache-2.0"},{"line_number":9,"context_line":""}],"source_content_type":"text/plain","patch_set":15,"id":"1abeadc6_94795d31","line":8,"in_reply_to":"1abeadc6_5a0c68ec","updated":"2014-08-29 07:05:00.000000000","message":"Ok cool, I have missed that one.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"}],"oslo/messaging/_drivers/protocols/__init__.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2011 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2011 - 2012, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Q0%3D","line":1,"updated":"2014-02-24 10:56:40.000000000","message":"empty files should not contain any headers","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2011 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2011 - 2012, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1zs%3D","line":1,"in_reply_to":"AAAAU3%2F%2F4Q0%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"oslo/messaging/_drivers/protocols/amqp/__init__.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2011 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2011 - 2012, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e4b65ef8","line":2,"updated":"2014-06-18 10:10:26.000000000","message":"2014*","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2011 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2011 - 2012, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":5,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_357fc9e0","line":2,"in_reply_to":"1ae5cdf2_e4b65ef8","updated":"2014-06-26 20:00:36.000000000","message":"Done (patchset 9)","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"}],"oslo/messaging/_drivers/protocols/amqp/controller.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# FIXME(markmc): remove this"},{"line_number":25,"context_line":"_ \u003d lambda s: s"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4QE%3D","line":25,"updated":"2014-02-24 10:56:40.000000000","message":"i would no suggest to do such things, _ is used in oslo-incubator as lazytext, and used for logging messages","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# FIXME(markmc): remove this"},{"line_number":25,"context_line":"_ \u003d lambda s: s"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1zI%3D","line":25,"in_reply_to":"AAAAU3%2F%2F4QE%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return self._ready"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":44,"context_line":"        assert(self._ready)"},{"line_number":45,"context_line":"        if reply_queue:"},{"line_number":46,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":47,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Gk%3D","line":44,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return self._ready"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":44,"context_line":"        assert(self._ready)"},{"line_number":45,"context_line":"        if reply_queue:"},{"line_number":46,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":47,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1y8%3D","line":44,"in_reply_to":"AAAAU3%2F%2F4Gk%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self._send(address, response)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def subscribe(self, target, requests):"},{"line_number":280,"context_line":"        assert(target.topic)"},{"line_number":281,"context_line":"        assert(target.server)"},{"line_number":282,"context_line":"        addresses \u003d ["},{"line_number":283,"context_line":"            self._server_address(target),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Gg%3D","line":280,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        self._send(address, response)"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def subscribe(self, target, requests):"},{"line_number":280,"context_line":"        assert(target.topic)"},{"line_number":281,"context_line":"        assert(target.server)"},{"line_number":282,"context_line":"        addresses \u003d ["},{"line_number":283,"context_line":"            self._server_address(target),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1ys%3D","line":280,"in_reply_to":"AAAAU3%2F%2F4Gg%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def subscribe(self, target, requests):"},{"line_number":280,"context_line":"        assert(target.topic)"},{"line_number":281,"context_line":"        assert(target.server)"},{"line_number":282,"context_line":"        addresses \u003d ["},{"line_number":283,"context_line":"            self._server_address(target),"},{"line_number":284,"context_line":"            self._broadcast_address(target),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Gc%3D","line":281,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":278,"context_line":""},{"line_number":279,"context_line":"    def subscribe(self, target, requests):"},{"line_number":280,"context_line":"        assert(target.topic)"},{"line_number":281,"context_line":"        assert(target.server)"},{"line_number":282,"context_line":"        addresses \u003d ["},{"line_number":283,"context_line":"            self._server_address(target),"},{"line_number":284,"context_line":"            self._broadcast_address(target),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1yk%3D","line":281,"in_reply_to":"AAAAU3%2F%2F4Gc%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self._servers[target] \u003d Server(self._connection, addresses, requests)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _resolve(self, target):"},{"line_number":299,"context_line":"        assert(target.topic)"},{"line_number":300,"context_line":"        if target.server:"},{"line_number":301,"context_line":"            return self._server_address(target)"},{"line_number":302,"context_line":"        elif target.fanout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4GY%3D","line":299,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":296,"context_line":"        self._servers[target] \u003d Server(self._connection, addresses, requests)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _resolve(self, target):"},{"line_number":299,"context_line":"        assert(target.topic)"},{"line_number":300,"context_line":"        if target.server:"},{"line_number":301,"context_line":"            return self._server_address(target)"},{"line_number":302,"context_line":"        elif target.fanout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1yc%3D","line":299,"in_reply_to":"AAAAU3%2F%2F4GY%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":20,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":21,"context_line":"from six import moves"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_363af734","line":19,"updated":"2014-06-18 10:10:26.000000000","message":"You could use a relative import here:\n\n    from . import eventloop","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":"import uuid"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":20,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":21,"context_line":"from six import moves"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e32046b2","line":19,"in_reply_to":"1ae5cdf2_363af734","updated":"2014-06-26 20:00:36.000000000","message":"pep8 doesn\u0027t like that:\n\n./oslo/messaging/_drivers/protocols/amqp/controller.py:21:6: H304  No relative imports. \u0027from . import eventloop\u0027 is a relative import","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":21,"context_line":"from six import moves"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"pyngus \u003d importutils.try_import(\"pyngus\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"if not pyngus:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c48162fc","line":23,"updated":"2014-06-18 10:10:26.000000000","message":"You could also write this like:\n\n  try:\n      import pyngus\n  except ImportError:\n      LOG.error(....)\n      raise\n\nBut to be honest, I\u0027d just let it fail. stevedore will take care of logging the exception.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":21,"context_line":"from six import moves"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"pyngus \u003d importutils.try_import(\"pyngus\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":"if not pyngus:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_23278ec8","line":23,"in_reply_to":"1ae5cdf2_c48162fc","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    raise ImportError(\"Failed to import pyngus module\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Replies(pyngus.ReceiverEventHandler):"},{"line_number":32,"context_line":"    def __init__(self, connection, on_ready):"},{"line_number":33,"context_line":"        self._correlation \u003d {}  # map of correlation-id to response queue"},{"line_number":34,"context_line":"        self._ready \u003d False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_9603cbbd","line":31,"updated":"2014-06-18 10:10:26.000000000","message":"Could you please add a docstring explaining what this class should do?","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    raise ImportError(\"Failed to import pyngus module\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class Replies(pyngus.ReceiverEventHandler):"},{"line_number":32,"context_line":"    def __init__(self, connection, on_ready):"},{"line_number":33,"context_line":"        self._correlation \u003d {}  # map of correlation-id to response queue"},{"line_number":34,"context_line":"        self._ready \u003d False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_be6651ec","line":31,"in_reply_to":"1ae5cdf2_9603cbbd","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def ready(self):"},{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_a62af5e4","line":45,"updated":"2014-06-18 10:10:26.000000000","message":"Since `reply_queue` can be `None` it\u0027s probably worth using `None` as the default value here.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def ready(self):"},{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_5e62adad","line":45,"in_reply_to":"1ae5cdf2_215def48","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def ready(self):"},{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_3e5de1ec","line":45,"in_reply_to":"1ae5cdf2_a62af5e4","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    def ready(self):"},{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_215def48","line":45,"in_reply_to":"1ae5cdf2_a62af5e4","updated":"2014-06-18 10:54:03.000000000","message":"Even better would be to take the reply_queue param and the test on it out of this method entirely and do it before calling. If there is no reply_queue there is no need to call this method at all.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"},{"line_number":49,"context_line":"            request.reply_to \u003d self._receiver.source_address"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_0601e969","line":46,"updated":"2014-06-18 10:10:26.000000000","message":"An empty reply_queue will evaluate to `False`, it\u0027s better to check for `nullness`\n\n    if reply_queue is None:\n        return\n    ....","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"},{"line_number":49,"context_line":"            request.reply_to \u003d self._receiver.source_address"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_9e58b5fa","line":46,"in_reply_to":"1ae5cdf2_0601e969","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"},{"line_number":49,"context_line":"            request.reply_to \u003d self._receiver.source_address"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e16ce70a","line":46,"in_reply_to":"1ae5cdf2_0601e969","updated":"2014-06-18 10:54:03.000000000","message":"I don\u0027t think that is the case:\n\n\u003e\u003e\u003e from Queue import Queue\n\u003e\u003e\u003e queue \u003d Queue()\n\u003e\u003e\u003e if queue: print \"Empty queue evaluates to True\"\n... else: print \"Empty queue evaluates to False\"\n... \nEmpty queue evaluates to True\n\nThat said there is no harm in making the test explicit.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        return self._ready"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def prepare_for_response(self, request, reply_queue):"},{"line_number":46,"context_line":"        if reply_queue:"},{"line_number":47,"context_line":"            request.id \u003d uuid.uuid4().hex"},{"line_number":48,"context_line":"            self._correlation[request.id] \u003d reply_queue"},{"line_number":49,"context_line":"            request.reply_to \u003d self._receiver.source_address"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_be701174","line":46,"in_reply_to":"1ae5cdf2_e16ce70a","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                self._mgr \u003d mgr"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"            def put(self, task):"},{"line_number":274,"context_line":"                self._mgr._put_task(task)"},{"line_number":275,"context_line":"        return Tasks(self)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def destroy(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_461f7170","line":274,"updated":"2014-06-18 10:10:26.000000000","message":"Is there a reason why you preferred this approach as opposed to making `_put_task` a public method?","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                self._mgr \u003d mgr"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"            def put(self, task):"},{"line_number":274,"context_line":"                self._mgr._put_task(task)"},{"line_number":275,"context_line":"        return Tasks(self)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def destroy(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_def4fdd0","line":274,"in_reply_to":"1ae5cdf2_461f7170","updated":"2014-06-26 20:00:36.000000000","message":"Created an \"add_task()\" public method instead.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2014, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_d81b7b1a","line":1,"updated":"2014-07-02 11:17:58.000000000","message":"you need just one, I think...","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"#    Copyright 2014, Red Hat, Inc."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_a3804f47","line":1,"in_reply_to":"baada198_d81b7b1a","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def __init__(self, connection, addresses, incoming):"},{"line_number":109,"context_line":"        self._incoming \u003d incoming"},{"line_number":110,"context_line":"        self._addresses \u003d addresses"},{"line_number":111,"context_line":"        self._receivers \u003d []  # list of pyngus ReceiverLinks"},{"line_number":112,"context_line":"        self.attach(connection)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def attach(self, connection):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_76d7e5ed","line":111,"updated":"2014-07-02 11:17:58.000000000","message":"since this is being set in `attach` and just used there, can we remove it from the constructor?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def __init__(self, connection, addresses, incoming):"},{"line_number":109,"context_line":"        self._incoming \u003d incoming"},{"line_number":110,"context_line":"        self._addresses \u003d addresses"},{"line_number":111,"context_line":"        self._receivers \u003d []  # list of pyngus ReceiverLinks"},{"line_number":112,"context_line":"        self.attach(connection)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def attach(self, connection):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_e391679b","line":111,"in_reply_to":"baada198_76d7e5ed","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        self._incoming \u003d incoming"},{"line_number":110,"context_line":"        self._addresses \u003d addresses"},{"line_number":111,"context_line":"        self._receivers \u003d []  # list of pyngus ReceiverLinks"},{"line_number":112,"context_line":"        self.attach(connection)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def attach(self, connection):"},{"line_number":115,"context_line":"        self._receivers \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_36780d2b","line":112,"updated":"2014-07-02 11:17:58.000000000","message":"Can we make this an explicit call outside the constructor?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        self._incoming \u003d incoming"},{"line_number":110,"context_line":"        self._addresses \u003d addresses"},{"line_number":111,"context_line":"        self._receivers \u003d []  # list of pyngus ReceiverLinks"},{"line_number":112,"context_line":"        self.attach(connection)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def attach(self, connection):"},{"line_number":115,"context_line":"        self._receivers \u003d []"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_0391fb98","line":112,"in_reply_to":"baada198_36780d2b","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            r.open()"},{"line_number":124,"context_line":"            self._receivers.append(r)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    # Pyngus ReceiverLink callbacks - be aware these methods will be called for"},{"line_number":127,"context_line":"    # all of the links is _receivers[]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def receiver_remote_closed(self, receiver, pn_condition):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_b6089d92","line":126,"updated":"2014-07-02 11:17:58.000000000","message":"Could you please move this comment into the method itself as part of a docstring?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            r.open()"},{"line_number":124,"context_line":"            self._receivers.append(r)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    # Pyngus ReceiverLink callbacks - be aware these methods will be called for"},{"line_number":127,"context_line":"    # all of the links is _receivers[]"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def receiver_remote_closed(self, receiver, pn_condition):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_63d71724","line":126,"in_reply_to":"baada198_b6089d92","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    \"\"\"An order list of peer addresses.  Connection failover progresses from"},{"line_number":146,"context_line":"    one host to the next."},{"line_number":147,"context_line":"    \"\"\""},{"line_number":148,"context_line":"    def __init__(self, entries\u003d[]):"},{"line_number":149,"context_line":"        self._entries \u003d entries"},{"line_number":150,"context_line":"        self._current \u003d 0"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_96ef1987","line":148,"updated":"2014-07-02 11:17:58.000000000","message":"Just a heads up. This is a common python pitfall[0]. It shouldn\u0027t be harmful in this case but it\u0027s better to avoid it. One way to do that is by doing:\n\n  class Host(object):\n     def __init__(self, entries\u003dNone):\n       # if entries is `[]` it\u0027ll still be evaluated to False\n       # but entries shouldn\u0027t be empty anyway, I think.\n       self._entries \u003d entries or []\n\n[0] http://stackoverflow.com/a/530768/750012","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    \"\"\"An order list of peer addresses.  Connection failover progresses from"},{"line_number":146,"context_line":"    one host to the next."},{"line_number":147,"context_line":"    \"\"\""},{"line_number":148,"context_line":"    def __init__(self, entries\u003d[]):"},{"line_number":149,"context_line":"        self._entries \u003d entries"},{"line_number":150,"context_line":"        self._current \u003d 0"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_1eedd0ef","line":148,"in_reply_to":"baada198_96ef1987","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            self._current \u003d (self._current + 1) % len(self._entries)"},{"line_number":164,"context_line":"        return self.current()"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def hostname(self):"},{"line_number":167,"context_line":"        return self.current()[0]"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def port(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_919c83c2","line":166,"updated":"2014-07-02 11:17:58.000000000","message":"If we make `entries` a list of namedtuples, we could get rid of both, hostname and port, methods and access that info by doing:\n\n   self.current.hostname\n   self.current.port\n\n(you\u0027d need to make current a property)\n\nI don\u0027t like `hostname` and `port` to implicitly return the host/port of the current host assuming the consumer of the instance knows that. Does this make sense?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            self._current \u003d (self._current + 1) % len(self._entries)"},{"line_number":164,"context_line":"        return self.current()"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def hostname(self):"},{"line_number":167,"context_line":"        return self.current()[0]"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def port(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_1c1dd973","line":166,"in_reply_to":"baada198_919c83c2","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            # support is developed, we\u0027ll need an explict flag (server or"},{"line_number":344,"context_line":"            # client)"},{"line_number":345,"context_line":"            conn_props[\"x-ssl-server\"] \u003d True"},{"line_number":346,"context_line":"            conn_props[\"x-ssl-identity\"] \u003d (self.ssl_cert_file,"},{"line_number":347,"context_line":"                                            self.ssl_key_file,"},{"line_number":348,"context_line":"                                            self.ssl_key_password)"},{"line_number":349,"context_line":"            conn_props[\"x-ssl-allow-cleartext\"] \u003d self.ssl_allow_insecure"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_31cd775e","line":346,"updated":"2014-07-02 11:17:58.000000000","message":"Does pyngus or proton verify whether these files exist and are readable? (just thinking about UX here).","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":343,"context_line":"            # support is developed, we\u0027ll need an explict flag (server or"},{"line_number":344,"context_line":"            # client)"},{"line_number":345,"context_line":"            conn_props[\"x-ssl-server\"] \u003d True"},{"line_number":346,"context_line":"            conn_props[\"x-ssl-identity\"] \u003d (self.ssl_cert_file,"},{"line_number":347,"context_line":"                                            self.ssl_key_file,"},{"line_number":348,"context_line":"                                            self.ssl_key_password)"},{"line_number":349,"context_line":"            conn_props[\"x-ssl-allow-cleartext\"] \u003d self.ssl_allow_insecure"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7f7de71b","line":346,"in_reply_to":"baada198_31cd775e","updated":"2014-07-02 20:57:20.000000000","message":"Proton does, and raises an exception (proton.SSLException) - I\u0027ll add a unit test that attempts to use a non-existent SSL file so we can check the behavior.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def _start_shutdown(self):"},{"line_number":366,"context_line":"        \"\"\"Initiate connection shutdown.\"\"\""},{"line_number":367,"context_line":"        LOG.info(\"Shutting down AMQP connection\")"},{"line_number":368,"context_line":"        self._closing \u003d True"},{"line_number":369,"context_line":"        if self._socket_connection.connection.active:"},{"line_number":370,"context_line":"            # try a clean shutdown"},{"line_number":371,"context_line":"            self._socket_connection.connection.close()"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_72ffee67","line":368,"updated":"2014-07-02 11:17:58.000000000","message":"I noticed the driver uses flags to keep statuses, very similar to state machines. While I don\u0027t have a problem with this, I think it might not be the best thing to do here. For instance, if there\u0027s a race during the shutdown, some calls may fail. My concern raises because I haven\u0027t seen any exception handling throughout the driver.\n\nEven if pyngus take care of the exception handling, I think something needs to be propagated up from pyngus to this driver. Does this happen through callbacks?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":365,"context_line":"    def _start_shutdown(self):"},{"line_number":366,"context_line":"        \"\"\"Initiate connection shutdown.\"\"\""},{"line_number":367,"context_line":"        LOG.info(\"Shutting down AMQP connection\")"},{"line_number":368,"context_line":"        self._closing \u003d True"},{"line_number":369,"context_line":"        if self._socket_connection.connection.active:"},{"line_number":370,"context_line":"            # try a clean shutdown"},{"line_number":371,"context_line":"            self._socket_connection.connection.close()"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_02d2d25b","line":368,"in_reply_to":"baada198_72ffee67","updated":"2014-07-02 20:57:20.000000000","message":"Pyngus tries to avoid explicitly raising exceptions where possible in favor of using callbacks instead - specifically the connection_failed callback.  Having said that, there are points in the pyngus code where exceptions can propagate back - socket errors and failures that occur during connection construction.  I\u0027ll believe the socket errors are correctly handled by the driver, as the unit tests will exercise socket failure.  I\u0027ll add tests that force config failures to test for exceptions during connection construction.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                self.processor.schedule(lambda: self._do_reconnect(), d)"},{"line_number":407,"context_line":"                self._delay \u003d min(d * 2, 60)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def connection_active(self, connection):"},{"line_number":410,"context_line":"        \"\"\"Connection up - activate all server links and the reply link.\"\"\""},{"line_number":411,"context_line":"        h \u003d self.hosts.current()"},{"line_number":412,"context_line":"        LOG.debug(\"Connection active (%s:%i), subscribing...\" % h)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_32bd7669","line":409,"updated":"2014-07-02 11:17:58.000000000","message":"Is this a method required by pyngus? If so, could you please document that?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                self.processor.schedule(lambda: self._do_reconnect(), d)"},{"line_number":407,"context_line":"                self._delay \u003d min(d * 2, 60)"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"    def connection_active(self, connection):"},{"line_number":410,"context_line":"        \"\"\"Connection up - activate all server links and the reply link.\"\"\""},{"line_number":411,"context_line":"        h \u003d self.hosts.current()"},{"line_number":412,"context_line":"        LOG.debug(\"Connection active (%s:%i), subscribing...\" % h)"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_e59b2870","line":409,"in_reply_to":"baada198_32bd7669","updated":"2014-07-02 20:57:20.000000000","message":"Sure, I\u0027ve documented all the callbacks the driver uses to receive events from pyngus.\n\nStill, I think it would be helpful if I added some documentation that explains how this driver works with pyngus.  Should that be part of the design spec?","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"732f7cc1580555188802ef80f4404896c285295c","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        self.processor \u003d eventloop.Thread(self._container_name)"},{"line_number":286,"context_line":"        self.processor.wakeup(lambda: self._do_connect())"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"    def add_task(self, task):"},{"line_number":289,"context_line":"        \"\"\"Add a Task for execution on processor thread.\"\"\""},{"line_number":290,"context_line":"        self._tasks.put(task)"},{"line_number":291,"context_line":"        if self.processor:"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_0ee9ffe5","line":288,"updated":"2014-07-03 11:26:29.000000000","message":"I preferred having the tasks() method that returned an object to which you could add or put the task. The reason for this is that this is the only thing you can do to the controller concurrently from multiple threads.\n\nThe change I would have preferred is in driver to intialise an object to the value of _ctrl.tasks() in the constructor, and then that object would be safe for concurrent calls, but _ctrl itself would not.\n\nI think this makes a key aspect of the interface more explicit.","commit_id":"1a9c63c8181a7968d957b039c1c69ce7f2ee3a1a"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"783238715314ba5132ad28b09b4765e03e275997","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"proton_opts \u003d ["},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027server_request_prefix\u0027,"},{"line_number":31,"context_line":"               default\u003d\u0027exclusive\u0027,"},{"line_number":32,"context_line":"               help\u003d\"address prefix used when sending to a specific server\"),"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_1265ef44","line":29,"updated":"2014-08-26 09:16:06.000000000","message":"Pls, add this to https://github.com/openstack/oslo.messaging/blob/master/oslo/messaging/opts.py#L35","commit_id":"3885f6d44878c5568de60dc524e9fec998753da5"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"75d29afcc5061abeff2dfd5b948913abaf31802c","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"proton_opts \u003d ["},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027server_request_prefix\u0027,"},{"line_number":31,"context_line":"               default\u003d\u0027exclusive\u0027,"},{"line_number":32,"context_line":"               help\u003d\"address prefix used when sending to a specific server\"),"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_d390c298","line":29,"in_reply_to":"1abeadc6_1265ef44","updated":"2014-08-27 12:52:56.000000000","message":"Done","commit_id":"3885f6d44878c5568de60dc524e9fec998753da5"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"783238715314ba5132ad28b09b4765e03e275997","unresolved":false,"context_lines":[{"line_number":564,"context_line":"        else:"},{"line_number":565,"context_line":"            # for some reason, we\u0027ve lost the connection to the messaging"},{"line_number":566,"context_line":"            # service.  Try to re-establish the connection:"},{"line_number":567,"context_line":"            if not self._reconnecting:"},{"line_number":568,"context_line":"                self._reconnecting \u003d True"},{"line_number":569,"context_line":"                self._replies \u003d None"},{"line_number":570,"context_line":"                if self._delay \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_b56185d5","line":567,"updated":"2014-08-26 09:16:06.000000000","message":"Does this need a lock?","commit_id":"3885f6d44878c5568de60dc524e9fec998753da5"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"75d29afcc5061abeff2dfd5b948913abaf31802c","unresolved":false,"context_lines":[{"line_number":564,"context_line":"        else:"},{"line_number":565,"context_line":"            # for some reason, we\u0027ve lost the connection to the messaging"},{"line_number":566,"context_line":"            # service.  Try to re-establish the connection:"},{"line_number":567,"context_line":"            if not self._reconnecting:"},{"line_number":568,"context_line":"                self._reconnecting \u003d True"},{"line_number":569,"context_line":"                self._replies \u003d None"},{"line_number":570,"context_line":"                if self._delay \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_fc458b43","line":567,"in_reply_to":"1abeadc6_b56185d5","updated":"2014-08-27 12:52:56.000000000","message":"Mmmm.... I don\u0027t believe so.  The _handle_connection_loss is only called from the eventloop thread, and merely ensures that _do_reconnect is scheduled at most once.  _do_reconnect() is also only run from the eventloop thread, so the _reconnecting state changes should be single threaded.\n\nOr did I miss something?","commit_id":"3885f6d44878c5568de60dc524e9fec998753da5"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import pyngus"},{"line_number":22,"context_line":"from six import moves"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_2feb0779","line":24,"updated":"2014-08-28 08:41:19.000000000","message":"This import should moved be with pyngus and six","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import pyngus"},{"line_number":22,"context_line":"from six import moves"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_35189fd2","line":24,"in_reply_to":"1abeadc6_2feb0779","updated":"2014-08-28 20:43:38.000000000","message":"This is not a 3rd party module - it\u0027s a project module.  Moving it up causes the pep8 test to fail: \n\nH305  imports not grouped correctly\n\nI think it needs to be in the last group:\nhttp://docs.openstack.org/developer/hacking/#import-order-template","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"6f1b8f6ca854329696c68d0db99da77bd8bb9d8f","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import pyngus"},{"line_number":22,"context_line":"from six import moves"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"from oslo.config import cfg"},{"line_number":25,"context_line":"from oslo.messaging._drivers.protocols.amqp import eventloop"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_74b20195","line":24,"in_reply_to":"1abeadc6_35189fd2","updated":"2014-08-29 07:05:00.000000000","message":"Arf, yes H305 only check the first part of the module, oslo here. So this grouping is correct, sorry.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":"import collections"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_04477b20","line":13,"updated":"2014-09-01 15:36:47.000000000","message":"I\u0027ll be grateful for a module docs here, and in other modules of the patch. It will bring global view at the review process.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":11,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import abc"},{"line_number":16,"context_line":"import collections"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_d7196789","line":13,"in_reply_to":"fa98f980_04477b20","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"This is a Pyngus callback, invoked by Pyngus when the peer of this"},{"line_number":130,"context_line":"        receiver link has initiated closing the connection."},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        # TODO(grs)"},{"line_number":133,"context_line":"        LOG.error(\"Reply subscription closed by peer: %s\","},{"line_number":134,"context_line":"                  (pn_condition or \"no error given\"))"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_6981028f","line":132,"updated":"2014-09-01 15:36:47.000000000","message":"No TODO content here.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        \"\"\"This is a Pyngus callback, invoked by Pyngus when the peer of this"},{"line_number":130,"context_line":"        receiver link has initiated closing the connection."},{"line_number":131,"context_line":"        \"\"\""},{"line_number":132,"context_line":"        # TODO(grs)"},{"line_number":133,"context_line":"        LOG.error(\"Reply subscription closed by peer: %s\","},{"line_number":134,"context_line":"                  (pn_condition or \"no error given\"))"},{"line_number":135,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_5221054c","line":132,"in_reply_to":"fa98f980_6981028f","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                           event_handler\u003dself,"},{"line_number":180,"context_line":"                                           name\u003drname,"},{"line_number":181,"context_line":"                                           properties\u003dprops)"},{"line_number":182,"context_line":"            r.add_capacity(500)  # TODO(grs)"},{"line_number":183,"context_line":"            r.open()"},{"line_number":184,"context_line":"            self._receivers.append(r)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_045e9be6","line":182,"updated":"2014-09-01 15:36:47.000000000","message":"ditto","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                                           event_handler\u003dself,"},{"line_number":180,"context_line":"                                           name\u003drname,"},{"line_number":181,"context_line":"                                           properties\u003dprops)"},{"line_number":182,"context_line":"            r.add_capacity(500)  # TODO(grs)"},{"line_number":183,"context_line":"            r.open()"},{"line_number":184,"context_line":"            self._receivers.append(r)"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_921b6d1a","line":182,"in_reply_to":"fa98f980_045e9be6","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3a6257f42825148234dbe8a8978d788b6ec9a3da","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self._on_ready \u003d on_ready"},{"line_number":104,"context_line":"        self._receiver \u003d connection.create_receiver(\"replies\","},{"line_number":105,"context_line":"                                                    event_handler\u003dself)"},{"line_number":106,"context_line":"        self.capacity \u003d 100  # somewhat arbitrary"},{"line_number":107,"context_line":"        self._credit \u003d 0"},{"line_number":108,"context_line":"        self._receiver.open()"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_0ab9c414","line":106,"updated":"2014-09-03 23:26:34.000000000","message":"Can u expand on the comment and what this affects, any reasoning on why 100 would be useful also to document.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self._on_ready \u003d on_ready"},{"line_number":104,"context_line":"        self._receiver \u003d connection.create_receiver(\"replies\","},{"line_number":105,"context_line":"                                                    event_handler\u003dself)"},{"line_number":106,"context_line":"        self.capacity \u003d 100  # somewhat arbitrary"},{"line_number":107,"context_line":"        self._credit \u003d 0"},{"line_number":108,"context_line":"        self._receiver.open()"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_5acd42b6","line":106,"in_reply_to":"fa98f980_0ab9c414","updated":"2014-09-04 18:39:12.000000000","message":"Sure - added a bit more documentation.  Probably want to make this configurable - I\u0027m going to need to follow up with credit tuning/improvements as I do more scale testing.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1e5cc3f7bc25472cdf9f0d5cc293b1e388b4b6e2","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        self._servers \u003d {}"},{"line_number":283,"context_line":"        self.hosts \u003d Hosts(hosts)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        config.register_opts(proton_opts)"},{"line_number":286,"context_line":"        self.server_request_prefix \u003d config.get(\u0027server_request_prefix\u0027)"},{"line_number":287,"context_line":"        self.broadcast_prefix \u003d config.get(\u0027broadcast_prefix\u0027)"},{"line_number":288,"context_line":"        self.group_request_prefix \u003d config.get(\u0027group_request_prefix\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7367b64d","line":285,"updated":"2014-09-03 20:42:02.000000000","message":"These options should really be registered in a driver-specific group. That would let you avoid having \"amqp_\" and \"proton_\" in the option names and still namespace them away from other options. Maybe the group should be \"amqp10\"? I\u0027m open to other names that might be more descriptive.\n\nUnfortunately, I wouldn\u0027t want to release a version of the driver with the options in the DEFAULT group, and then immediately move them to their own group, so I think we need to sort that out before merging the driver and releasing the library. We could still do it as 2 patches, as long as we land them both together.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"022e7eadbd493b1dfaba6e8b71404d3b24ee53ae","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        self._servers \u003d {}"},{"line_number":283,"context_line":"        self.hosts \u003d Hosts(hosts)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        config.register_opts(proton_opts)"},{"line_number":286,"context_line":"        self.server_request_prefix \u003d config.get(\u0027server_request_prefix\u0027)"},{"line_number":287,"context_line":"        self.broadcast_prefix \u003d config.get(\u0027broadcast_prefix\u0027)"},{"line_number":288,"context_line":"        self.group_request_prefix \u003d config.get(\u0027group_request_prefix\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_80f742d2","line":285,"in_reply_to":"fa98f980_7367b64d","updated":"2014-09-04 13:14:57.000000000","message":"Good point, endorse it.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        self._servers \u003d {}"},{"line_number":283,"context_line":"        self.hosts \u003d Hosts(hosts)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"        config.register_opts(proton_opts)"},{"line_number":286,"context_line":"        self.server_request_prefix \u003d config.get(\u0027server_request_prefix\u0027)"},{"line_number":287,"context_line":"        self.broadcast_prefix \u003d config.get(\u0027broadcast_prefix\u0027)"},{"line_number":288,"context_line":"        self.group_request_prefix \u003d config.get(\u0027group_request_prefix\u0027)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1a657ab4","line":285,"in_reply_to":"fa98f980_7367b64d","updated":"2014-09-04 18:39:12.000000000","message":"I\u0027ve moved them under \u0027amqp1\u0027 group (\u0027amqp10\u0027 reads as \u0027ten\u0027 to me, fwiw). Trivial enough for me to change that to something more appropriate if needed.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1e5cc3f7bc25472cdf9f0d5cc293b1e388b4b6e2","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        response to be put on the optional reply_queue if specified"},{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        address \u003d self._resolve(target)"},{"line_number":344,"context_line":"        LOG.debug(\"Sending request for %s to %s\" % (target, address))"},{"line_number":345,"context_line":"        if reply_queue is not None:"},{"line_number":346,"context_line":"            self._replies.prepare_for_response(request, reply_queue)"},{"line_number":347,"context_line":"        self._send(address, request)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_85ae8d96","line":344,"updated":"2014-09-03 20:42:02.000000000","message":"Log messages shouldn\u0027t use % inline, since that takes time to build a message that may never be logged. All of those cases can be fixed in a follow-up patch later.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        response to be put on the optional reply_queue if specified"},{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        address \u003d self._resolve(target)"},{"line_number":344,"context_line":"        LOG.debug(\"Sending request for %s to %s\" % (target, address))"},{"line_number":345,"context_line":"        if reply_queue is not None:"},{"line_number":346,"context_line":"            self._replies.prepare_for_response(request, reply_queue)"},{"line_number":347,"context_line":"        self._send(address, request)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_fa8b561c","line":344,"in_reply_to":"fa98f980_85ae8d96","updated":"2014-09-04 18:39:12.000000000","message":"Done","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"022e7eadbd493b1dfaba6e8b71404d3b24ee53ae","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        response to be put on the optional reply_queue if specified"},{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        address \u003d self._resolve(target)"},{"line_number":344,"context_line":"        LOG.debug(\"Sending request for %s to %s\" % (target, address))"},{"line_number":345,"context_line":"        if reply_queue is not None:"},{"line_number":346,"context_line":"            self._replies.prepare_for_response(request, reply_queue)"},{"line_number":347,"context_line":"        self._send(address, request)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_801e620a","line":344,"in_reply_to":"fa98f980_85ae8d96","updated":"2014-09-04 13:14:57.000000000","message":"What the other ways?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"}],"oslo/messaging/_drivers/protocols/amqp/driver.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from oslo.messaging.openstack.common import jsonutils"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# FIXME(markmc): remove this"},{"line_number":30,"context_line":"_ \u003d lambda s: s"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"proton \u003d importutils.try_import(\"proton\")"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4P8%3D","line":30,"updated":"2014-02-24 10:56:40.000000000","message":"same thing","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from oslo.messaging.openstack.common import jsonutils"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# FIXME(markmc): remove this"},{"line_number":30,"context_line":"_ \u003d lambda s: s"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"proton \u003d importutils.try_import(\"proton\")"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1yU%3D","line":30,"in_reply_to":"AAAAU3%2F%2F4P8%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                default\u003dFalse,"},{"line_number":77,"context_line":"                help\u003d\u0027Accept clients using either SSL or plain TCP\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # @todo: other options?"},{"line_number":80,"context_line":"]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4GA%3D","line":79,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                default\u003dFalse,"},{"line_number":77,"context_line":"                help\u003d\u0027Accept clients using either SSL or plain TCP\u0027)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    # @todo: other options?"},{"line_number":80,"context_line":"]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1yM%3D","line":79,"in_reply_to":"AAAAU3%2F%2F4GA%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                                 allowed_remote_exmods)"},{"line_number":220,"context_line":"        conf.register_opts(proton_opts)"},{"line_number":221,"context_line":"        # TODO(grs): handle authentication etc"},{"line_number":222,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"},{"line_number":223,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":224,"context_line":"        self._mgr \u003d controller.Controller(hosts, cname)"},{"line_number":225,"context_line":"        if conf.server_request_prefix:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4FY%3D","line":222,"updated":"2014-02-24 10:56:40.000000000","message":"port could be defined as one of possible options in cfg","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":219,"context_line":"                                 allowed_remote_exmods)"},{"line_number":220,"context_line":"        conf.register_opts(proton_opts)"},{"line_number":221,"context_line":"        # TODO(grs): handle authentication etc"},{"line_number":222,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"},{"line_number":223,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":224,"context_line":"        self._mgr \u003d controller.Controller(hosts, cname)"},{"line_number":225,"context_line":"        if conf.server_request_prefix:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1xQ%3D","line":222,"in_reply_to":"AAAAU3%2F%2F4FY%3D","updated":"2014-02-24 15:17:49.000000000","message":"In the context of AMQP, if you give a url without a port, then the expectation would be that the default port as specified by the standard would be used. For that reason I would be concerned that adding an option to configure the default port might merely confuse. The port can always be set in the transport url. That said I am of course open to other points of view on this...","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    def send(self, target, ctxt, message,"},{"line_number":246,"context_line":"             wait_for_reply\u003dNone, timeout\u003dNone, envelope\u003dFalse):"},{"line_number":247,"context_line":"        \"\"\"Send a message to the given target.\"\"\""},{"line_number":248,"context_line":"        LOG.debug(\"Send to %s, (%s, %s)\" % (target, wait_for_reply, timeout))"},{"line_number":249,"context_line":"        self._ensure_connected()"},{"line_number":250,"context_line":"        request \u003d marshal_request(message, ctxt, envelope)"},{"line_number":251,"context_line":"        if timeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4FI%3D","line":248,"updated":"2014-02-24 10:56:40.000000000","message":"formatting, please use .format() or keyword formatting","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":245,"context_line":"    def send(self, target, ctxt, message,"},{"line_number":246,"context_line":"             wait_for_reply\u003dNone, timeout\u003dNone, envelope\u003dFalse):"},{"line_number":247,"context_line":"        \"\"\"Send a message to the given target.\"\"\""},{"line_number":248,"context_line":"        LOG.debug(\"Send to %s, (%s, %s)\" % (target, wait_for_reply, timeout))"},{"line_number":249,"context_line":"        self._ensure_connected()"},{"line_number":250,"context_line":"        request \u003d marshal_request(message, ctxt, envelope)"},{"line_number":251,"context_line":"        if timeout:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1xE%3D","line":248,"in_reply_to":"AAAAU3%2F%2F4FI%3D","updated":"2014-02-24 15:17:49.000000000","message":"I\u0027ve simplified the logging to avoid multiple args to the statement.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        if wait_for_reply:"},{"line_number":256,"context_line":"            reply \u003d task.get_reply(timeout)"},{"line_number":257,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":258,"context_line":"            LOG.debug(\"Send to %s returning %s\" % (target, result))"},{"line_number":259,"context_line":"            return result"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4E8%3D","line":258,"updated":"2014-02-24 10:56:40.000000000","message":"same here","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        if wait_for_reply:"},{"line_number":256,"context_line":"            reply \u003d task.get_reply(timeout)"},{"line_number":257,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":258,"context_line":"            LOG.debug(\"Send to %s returning %s\" % (target, result))"},{"line_number":259,"context_line":"            return result"},{"line_number":260,"context_line":"        else:"},{"line_number":261,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1ww%3D","line":258,"in_reply_to":"AAAAU3%2F%2F4E8%3D","updated":"2014-02-24 15:17:49.000000000","message":"As above., should no longer be an issue","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    @abc.abstractmethod"},{"line_number":82,"context_line":"    def execute(self, manager):"},{"line_number":83,"context_line":"        \"\"\"Perform operation on the protocol manager (will be called"},{"line_number":84,"context_line":"        on a thread of its choosing)."},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_06eac9ab","line":84,"updated":"2014-06-18 10:10:26.000000000","message":"Could you please document the manager? I assume it\u0027s the `Controller`","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    @abc.abstractmethod"},{"line_number":82,"context_line":"    def execute(self, manager):"},{"line_number":83,"context_line":"        \"\"\"Perform operation on the protocol manager (will be called"},{"line_number":84,"context_line":"        on a thread of its choosing)."},{"line_number":85,"context_line":"        \"\"\""},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e9d82581","line":84,"in_reply_to":"1ae5cdf2_06eac9ab","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    data \u003d jsonutils.loads(message.body)"},{"line_number":146,"context_line":"    if \"response\" in data:"},{"line_number":147,"context_line":"        return data[\"response\"]"},{"line_number":148,"context_line":"    elif \"failure\" in data:"},{"line_number":149,"context_line":"        #TODO(grs)"},{"line_number":150,"context_line":"        failure \u003d data[\"failure\"]"},{"line_number":151,"context_line":"        raise common.deserialize_remote_exception(failure, allowed)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_66ac6d8d","line":148,"updated":"2014-06-18 10:10:26.000000000","message":"This should probably just check if `failure` is present. Otherwise, assume `response` is there.\n\n    failure \u003d data.get(\u0027failure\u0027)\n    if failure is not None:\n       ....\n    return data[\"response\"]","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":145,"context_line":"    data \u003d jsonutils.loads(message.body)"},{"line_number":146,"context_line":"    if \"response\" in data:"},{"line_number":147,"context_line":"        return data[\"response\"]"},{"line_number":148,"context_line":"    elif \"failure\" in data:"},{"line_number":149,"context_line":"        #TODO(grs)"},{"line_number":150,"context_line":"        failure \u003d data[\"failure\"]"},{"line_number":151,"context_line":"        raise common.deserialize_remote_exception(failure, allowed)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e91bc519","line":148,"in_reply_to":"1ae5cdf2_66ac6d8d","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def marshal_request(request, context, envelope):"},{"line_number":159,"context_line":"    msg \u003d proton.Message()"},{"line_number":160,"context_line":"    if envelope:"},{"line_number":161,"context_line":"        request \u003d common.serialize_msg(request)"},{"line_number":162,"context_line":"    data \u003d {"},{"line_number":163,"context_line":"        \"request\": request,"},{"line_number":164,"context_line":"        \"context\": context"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_66546dca","line":161,"updated":"2014-06-18 10:10:26.000000000","message":"Not related to this driver but, it\u0027s kind of weird that each impl needs to do this.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":158,"context_line":"def marshal_request(request, context, envelope):"},{"line_number":159,"context_line":"    msg \u003d proton.Message()"},{"line_number":160,"context_line":"    if envelope:"},{"line_number":161,"context_line":"        request \u003d common.serialize_msg(request)"},{"line_number":162,"context_line":"    data \u003d {"},{"line_number":163,"context_line":"        \"request\": request,"},{"line_number":164,"context_line":"        \"context\": context"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_69bed5d5","line":161,"in_reply_to":"1ae5cdf2_66546dca","updated":"2014-06-26 20:00:36.000000000","message":"agreed!","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def __init__(self, conf, url,"},{"line_number":223,"context_line":"                 default_exchange\u003dNone, allowed_remote_exmods\u003d[]):"},{"line_number":224,"context_line":"        if not proton:"},{"line_number":225,"context_line":"            LOG.error(\"Required module \u0027proton\u0027 not found.\")"},{"line_number":226,"context_line":"            raise ImportError(\"Failed to import proton module\")"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_b6f1a76c","line":224,"updated":"2014-06-18 10:10:26.000000000","message":"Just import proton above without using importutils. Let it fail.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def __init__(self, conf, url,"},{"line_number":223,"context_line":"                 default_exchange\u003dNone, allowed_remote_exmods\u003d[]):"},{"line_number":224,"context_line":"        if not proton:"},{"line_number":225,"context_line":"            LOG.error(\"Required module \u0027proton\u0027 not found.\")"},{"line_number":226,"context_line":"            raise ImportError(\"Failed to import proton module\")"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_099ab16e","line":224,"in_reply_to":"1ae5cdf2_b6f1a76c","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            raise ImportError(\"Failed to import proton module\")"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        base.BaseDriver.__init__(self, conf, url, default_exchange,"},{"line_number":229,"context_line":"                                 allowed_remote_exmods)"},{"line_number":230,"context_line":"        conf.register_opts(proton_opts)"},{"line_number":231,"context_line":"        # TODO(grs): handle authentication etc"},{"line_number":232,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_96c58b0c","line":229,"updated":"2014-06-18 10:10:26.000000000","message":"Pls, use `super` here","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            raise ImportError(\"Failed to import proton module\")"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        base.BaseDriver.__init__(self, conf, url, default_exchange,"},{"line_number":229,"context_line":"                                 allowed_remote_exmods)"},{"line_number":230,"context_line":"        conf.register_opts(proton_opts)"},{"line_number":231,"context_line":"        # TODO(grs): handle authentication etc"},{"line_number":232,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_e9774539","line":229,"in_reply_to":"1ae5cdf2_96c58b0c","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":234,"context_line":"        self._mgr \u003d controller.Controller(hosts, cname)"},{"line_number":235,"context_line":"        if conf.server_request_prefix:"},{"line_number":236,"context_line":"            self._mgr.server_request_prefix \u003d conf.server_request_prefix"},{"line_number":237,"context_line":"        if conf.broadcast_prefix:"},{"line_number":238,"context_line":"            self._mgr.broadcast_prefix \u003d conf.broadcast_prefix"},{"line_number":239,"context_line":"        if conf.group_request_prefix:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_39466822","line":236,"updated":"2014-06-18 10:10:26.000000000","message":"I think you could simply pass the `conf` object to the `Controller` constructor and let it handle all these settings instead of setting attributes here.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":234,"context_line":"        self._mgr \u003d controller.Controller(hosts, cname)"},{"line_number":235,"context_line":"        if conf.server_request_prefix:"},{"line_number":236,"context_line":"            self._mgr.server_request_prefix \u003d conf.server_request_prefix"},{"line_number":237,"context_line":"        if conf.broadcast_prefix:"},{"line_number":238,"context_line":"            self._mgr.broadcast_prefix \u003d conf.broadcast_prefix"},{"line_number":239,"context_line":"        if conf.group_request_prefix:"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_fc848a0c","line":236,"in_reply_to":"1ae5cdf2_39466822","updated":"2014-06-18 10:54:03.000000000","message":"I wanted to limit the \u0027reach\u0027 of the conf object. The driver module is supposed to be the interface with oslo.messaging and ideally only it would know about the actual configuration option names etc (though obviosly it is the controller that provides the underlying service).\n\n(This would be even clearer after making your suggested changes to the imports in controller.py; it would then not need import anything from olso.messaging).","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        if timeout:"},{"line_number":261,"context_line":"            request.ttl \u003d timeout*1000  # ttl is in milliseconds"},{"line_number":262,"context_line":"        task \u003d SendTask(target, request, wait_for_reply)"},{"line_number":263,"context_line":"        self._mgr.tasks().put(task)"},{"line_number":264,"context_line":"        if wait_for_reply:"},{"line_number":265,"context_line":"            LOG.debug(\"Send to %s, response expected\" % target)"},{"line_number":266,"context_line":"            reply \u003d task.get_reply(timeout)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_21124f58","line":263,"updated":"2014-06-18 10:10:26.000000000","message":"I think it\u0027d be cleaner/better to have a `self._mgr.add_task(task)` method in the manager.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        if timeout:"},{"line_number":261,"context_line":"            request.ttl \u003d timeout*1000  # ttl is in milliseconds"},{"line_number":262,"context_line":"        task \u003d SendTask(target, request, wait_for_reply)"},{"line_number":263,"context_line":"        self._mgr.tasks().put(task)"},{"line_number":264,"context_line":"        if wait_for_reply:"},{"line_number":265,"context_line":"            LOG.debug(\"Send to %s, response expected\" % target)"},{"line_number":266,"context_line":"            reply \u003d task.get_reply(timeout)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_7c431aaf","line":263,"in_reply_to":"1ae5cdf2_21124f58","updated":"2014-06-18 10:54:03.000000000","message":"The key point I was trying to express is that there are some threading restrictions on calls to manager. By having a distinct Tasks object, I can say that that object has no threading constraints, and then that the Controller itself should not be called by any thread.\n\nIf instead of using _self.mgr.tasks() here and in the methods below, the a Tasks object was initialised on construction of the driver, that would be clearer. Then you would only have the connect() and destroy() calls on _mgr outside of the constructor.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":260,"context_line":"        if timeout:"},{"line_number":261,"context_line":"            request.ttl \u003d timeout*1000  # ttl is in milliseconds"},{"line_number":262,"context_line":"        task \u003d SendTask(target, request, wait_for_reply)"},{"line_number":263,"context_line":"        self._mgr.tasks().put(task)"},{"line_number":264,"context_line":"        if wait_for_reply:"},{"line_number":265,"context_line":"            LOG.debug(\"Send to %s, response expected\" % target)"},{"line_number":266,"context_line":"            reply \u003d task.get_reply(timeout)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_983d282f","line":263,"in_reply_to":"1ae5cdf2_7c431aaf","updated":"2014-06-26 20:00:36.000000000","message":"I have to agree with Flavio here - it wasn\u0027t immediately apparent (to me) that this was the design goal.\n\nI\u0027ve added additional commenting in the Controller to explicitly point out which methods are thread-safe.  Please let me know if this is acceptable.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":268,"context_line":"            LOG.debug(\"Send to %s returning\" % target)"},{"line_number":269,"context_line":"            return result"},{"line_number":270,"context_line":"        else:"},{"line_number":271,"context_line":"            LOG.debug(\"Send to %s, no response expected\" % target)"},{"line_number":272,"context_line":"            return None"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_c128cb87","line":270,"updated":"2014-06-18 10:10:26.000000000","message":"This else clause is probably not needed.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":267,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":268,"context_line":"            LOG.debug(\"Send to %s returning\" % target)"},{"line_number":269,"context_line":"            return result"},{"line_number":270,"context_line":"        else:"},{"line_number":271,"context_line":"            LOG.debug(\"Send to %s, no response expected\" % target)"},{"line_number":272,"context_line":"            return None"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_491119ae","line":270,"in_reply_to":"1ae5cdf2_c128cb87","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    def _need_connect(self):"},{"line_number":298,"context_line":"        with self._lock:"},{"line_number":299,"context_line":"            if not self._connected:"},{"line_number":300,"context_line":"                self._connected \u003d True"},{"line_number":301,"context_line":"                return True"},{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_59d97421","line":300,"updated":"2014-06-18 10:10:26.000000000","message":"Based on `_ensure_connected`, it looks like this method is always called *before* `connect`. This means that `self._conencted` is set to True *before* the actual connection is attempted. If the connection fails, it\u0027ll leave this flag in an erroneous state.\n\nSince this is being used to prevent multiple `self._mgr.connect` calls, wouldn\u0027t it be better to let the `Controller` manage this flag too?\n\nThe `_ensure_connected` method would look something like:\n\n    if not self._mgr.connected:\n        self._mgr.connect()\n\nwhere `self._mgr.connected` is a property and `connect` remains what it is now.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    def _need_connect(self):"},{"line_number":298,"context_line":"        with self._lock:"},{"line_number":299,"context_line":"            if not self._connected:"},{"line_number":300,"context_line":"                self._connected \u003d True"},{"line_number":301,"context_line":"                return True"},{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_18cf58b4","line":300,"in_reply_to":"1ae5cdf2_59d97421","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    def _need_connect(self):"},{"line_number":298,"context_line":"        with self._lock:"},{"line_number":299,"context_line":"            if not self._connected:"},{"line_number":300,"context_line":"                self._connected \u003d True"},{"line_number":301,"context_line":"                return True"},{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_9c5d46ef","line":300,"in_reply_to":"1ae5cdf2_59d97421","updated":"2014-06-18 10:54:03.000000000","message":"The connect() call is just an asynchronous trigger. It returns before the controller is actually in the connected state. The controllers thread will manage connection failures, disconnects etc.\n\nThe purpose of this flag is simply to ensure that we always call the trigger once, and that this is done only when first needed (to prevent issues when forking as some services do).","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":297,"context_line":"    def _need_connect(self):"},{"line_number":298,"context_line":"        with self._lock:"},{"line_number":299,"context_line":"            if not self._connected:"},{"line_number":300,"context_line":"                self._connected \u003d True"},{"line_number":301,"context_line":"                return True"},{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_d8e1702c","line":300,"in_reply_to":"1ae5cdf2_9c5d46ef","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def _ensure_connected(self):"},{"line_number":306,"context_line":"        # Cause manager to connect when first used. It is safe to push"},{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_59efb4e9","line":305,"updated":"2014-06-18 10:10:26.000000000","message":"you could convert this `_ensure_connected` in a decorator and then decorate methods that require a connection.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            else:"},{"line_number":303,"context_line":"                return False"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    def _ensure_connected(self):"},{"line_number":306,"context_line":"        # Cause manager to connect when first used. It is safe to push"},{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_58ee4022","line":305,"in_reply_to":"1ae5cdf2_59efb4e9","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"e35b566fcdc7e02a9b9bab8c9b30b102d9f7659b","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."},{"line_number":309,"context_line":"        if self._need_connect():"},{"line_number":310,"context_line":"            self._mgr.connect()"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def cleanup(self):"},{"line_number":313,"context_line":"        \"\"\"Release all resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_6661cdd2","line":310,"updated":"2014-06-18 10:10:26.000000000","message":"Is there a chance the flag may be set although it\u0027s not connected? Will the `connect` method try to connect until it succeeds? \n\nI just want to make sure this method doesn\u0027t silently return after a failed connection attempt","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"9e572a8bdfb8ff2a6635e2b665f77bef0a9e1bc8","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."},{"line_number":309,"context_line":"        if self._need_connect():"},{"line_number":310,"context_line":"            self._mgr.connect()"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def cleanup(self):"},{"line_number":313,"context_line":"        \"\"\"Release all resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_bc2e8240","line":310,"in_reply_to":"1ae5cdf2_6661cdd2","updated":"2014-06-18 10:54:03.000000000","message":"As above, the flag doesn\u0027t really indicate a connected state, it merely indicates that the connect() trigger was called already. Perhaps changing the flag name to _connect_called would make that clearer.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."},{"line_number":309,"context_line":"        if self._need_connect():"},{"line_number":310,"context_line":"            self._mgr.connect()"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def cleanup(self):"},{"line_number":313,"context_line":"        \"\"\"Release all resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_38edf425","line":310,"in_reply_to":"1ae5cdf2_6661cdd2","updated":"2014-06-26 20:00:36.000000000","message":"Done","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"86ae1edddb4180384f8ba8cc4aa61f30fb0d4802","unresolved":false,"context_lines":[{"line_number":307,"context_line":"        # tasks to it whether connected or not, but those tasks won\u0027t"},{"line_number":308,"context_line":"        # be processed until connection completes."},{"line_number":309,"context_line":"        if self._need_connect():"},{"line_number":310,"context_line":"            self._mgr.connect()"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def cleanup(self):"},{"line_number":313,"context_line":"        \"\"\"Release all resources.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ae5cdf2_f8870c59","line":310,"in_reply_to":"1ae5cdf2_bc2e8240","updated":"2014-06-26 20:00:36.000000000","message":"I\u0027ve re-named the flag to \"connect_called\" and recoded _ensure_connect_called as a decorator.","commit_id":"a9ac3a759b9818d138ca68ba14b830aa9f16ccb0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        LOG.debug(\"Returning incoming message\")"},{"line_number":216,"context_line":"        return ProtonIncomingMessage(self, ctxt, request, message)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def incoming(self):"},{"line_number":219,"context_line":"        return self._incoming"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_36648de4","line":218,"updated":"2014-07-02 11:17:58.000000000","message":"You could make `_incoming` a public attribute.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        LOG.debug(\"Returning incoming message\")"},{"line_number":216,"context_line":"        return ProtonIncomingMessage(self, ctxt, request, message)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def incoming(self):"},{"line_number":219,"context_line":"        return self._incoming"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_a635b3db","line":218,"in_reply_to":"baada198_36648de4","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        return self._incoming"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"def _ensure_connect_called(func):"},{"line_number":223,"context_line":"    \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":224,"context_line":"    first used. It is safe to push tasks to it whether connected or not, but"},{"line_number":225,"context_line":"    those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7beef0b5","line":222,"updated":"2014-07-02 11:17:58.000000000","message":"You could also make this function a `ProtonDriver` method and use it as a decorator, this will help with the `self \u003d args[0]` thing.\n\n  class ProtonDriver(...):\n    def _ensure_connect_called(self):\n      ...\n\n    @_ensure_connect_called\n    def send(...):\n      ..","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        return self._incoming"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"def _ensure_connect_called(func):"},{"line_number":223,"context_line":"    \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":224,"context_line":"    first used. It is safe to push tasks to it whether connected or not, but"},{"line_number":225,"context_line":"    those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_c630e7ea","line":222,"in_reply_to":"baada198_7beef0b5","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"},{"line_number":247,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":248,"context_line":"        # Create a Controller that connects to the messaging service:"},{"line_number":249,"context_line":"        self._ctrl \u003d controller.Controller(hosts, cname)"},{"line_number":250,"context_line":"        if conf.server_request_prefix:"},{"line_number":251,"context_line":"            self._ctrl.server_request_prefix \u003d conf.server_request_prefix"},{"line_number":252,"context_line":"        if conf.broadcast_prefix:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_fbebe0ad","line":249,"updated":"2014-07-02 11:17:58.000000000","message":"TBH, I\u0027m still not convinced the below controller attribute setting makes much sense. I understand Gordon\u0027s point in PS7 but I think the Controller should be capable of configuring itself from a config object or even just a dict.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        hosts \u003d [(h.hostname, h.port or 5672) for h in url.hosts]"},{"line_number":247,"context_line":"        cname \u003d conf.amqp_container_name if conf.amqp_container_name else None"},{"line_number":248,"context_line":"        # Create a Controller that connects to the messaging service:"},{"line_number":249,"context_line":"        self._ctrl \u003d controller.Controller(hosts, cname)"},{"line_number":250,"context_line":"        if conf.server_request_prefix:"},{"line_number":251,"context_line":"            self._ctrl.server_request_prefix \u003d conf.server_request_prefix"},{"line_number":252,"context_line":"        if conf.broadcast_prefix:"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_7947bc1d","line":249,"in_reply_to":"baada198_fbebe0ad","updated":"2014-07-02 20:57:20.000000000","message":"Ok, I\u0027ve pulled all the config-related stuff into the controller module.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        for target, priority in targets_and_priorities:"},{"line_number":312,"context_line":"            topic \u003d \u0027%s.%s\u0027 % (target.topic, priority)"},{"line_number":313,"context_line":"            t \u003d messaging_target.Target(topic\u003dtopic)"},{"line_number":314,"context_line":"            self._ctrl.add_task(ListenTask(t, listener._incoming, True))"},{"line_number":315,"context_line":"        return listener"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_f6f775f3","line":314,"updated":"2014-07-02 11:17:58.000000000","message":"If you make `_incoming` a public attribute then you can access it as `listener.incoming` otherwise you should be using `listener.incoming()` (based on the current API).\n\nTBH, I\u0027d prefer passing a `ProtonListener` to the `ListenTask` instead of just a `Queue` instance.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        for target, priority in targets_and_priorities:"},{"line_number":312,"context_line":"            topic \u003d \u0027%s.%s\u0027 % (target.topic, priority)"},{"line_number":313,"context_line":"            t \u003d messaging_target.Target(topic\u003dtopic)"},{"line_number":314,"context_line":"            self._ctrl.add_task(ListenTask(t, listener._incoming, True))"},{"line_number":315,"context_line":"        return listener"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def cleanup(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_99c9f07a","line":314,"in_reply_to":"baada198_f6f775f3","updated":"2014-07-02 20:57:20.000000000","message":"Done, however changing the code to pass the Listener down into the controller\u0027s subscribe method (as opposed to the queue) would require additional refactoring.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"f07fcf0cd92c9a7a1d771aed4f55e20a754069af","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._request \u003d request"},{"line_number":41,"context_line":"        self._deadline \u003d deadline"},{"line_number":42,"context_line":"        if reply_expected:"},{"line_number":43,"context_line":"            self._reply_queue \u003d moves.queue.Queue()"},{"line_number":44,"context_line":"        else:"},{"line_number":45,"context_line":"            self._reply_queue \u003d None"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_4511345c","line":43,"updated":"2014-07-23 21:24:25.000000000","message":"I don\u0027t think it\u0027s good to use a separate reply queue for each message (since we only wait for 1 reply). Why not using futures.Future for receiving replies?","commit_id":"1a9c63c8181a7968d957b039c1c69ce7f2ee3a1a"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"5d26d8cac6b3932726ba18e1a6eca07c116286df","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._request \u003d request"},{"line_number":41,"context_line":"        self._deadline \u003d deadline"},{"line_number":42,"context_line":"        if reply_expected:"},{"line_number":43,"context_line":"            self._reply_queue \u003d moves.queue.Queue()"},{"line_number":44,"context_line":"        else:"},{"line_number":45,"context_line":"            self._reply_queue \u003d None"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_95d96ff6","line":43,"in_reply_to":"baada198_4511345c","updated":"2014-07-25 14:58:01.000000000","message":"Hi Alexei,  you\u0027re correct a Queue is not exactly the pattern that should be used here.  What is needed is a simple \u0027waitable mailbox\u0027 for the reply message.  But the queue is a simple way to achieve basically the same thing without having to invent something new.\n\nI\u0027m not sure how a future would be an improvement - but I\u0027m not that familiar with that mechanism.\n\nAlternatively, we could replace the queue with a threading.Event and a reference to the reply message - if that is considered a better approach.","commit_id":"1a9c63c8181a7968d957b039c1c69ce7f2ee3a1a"},{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"f07fcf0cd92c9a7a1d771aed4f55e20a754069af","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        request \u003d data[\"request\"]"},{"line_number":135,"context_line":"    if \"context\" in data:"},{"line_number":136,"context_line":"        context \u003d data[\"context\"]"},{"line_number":137,"context_line":"    return (request, context)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class ProtonIncomingMessage(base.IncomingMessage):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_a5577026","line":137,"updated":"2014-07-23 21:24:25.000000000","message":"I guess it\u0027s much safer to write:\n\nreturn (data.get(\u0027request\u0027), data.get(\u0027context\u0027))","commit_id":"1a9c63c8181a7968d957b039c1c69ce7f2ee3a1a"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"5d26d8cac6b3932726ba18e1a6eca07c116286df","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        request \u003d data[\"request\"]"},{"line_number":135,"context_line":"    if \"context\" in data:"},{"line_number":136,"context_line":"        context \u003d data[\"context\"]"},{"line_number":137,"context_line":"    return (request, context)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"class ProtonIncomingMessage(base.IncomingMessage):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_75e85b7b","line":137,"in_reply_to":"baada198_a5577026","updated":"2014-07-25 14:58:01.000000000","message":"Yikes!  Yes, absolutely - good catch, I\u0027ll fix it.","commit_id":"1a9c63c8181a7968d957b039c1c69ce7f2ee3a1a"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    @_ensure_connect_called"},{"line_number":204,"context_line":"    def send(self, target, ctxt, message,"},{"line_number":205,"context_line":"             wait_for_reply\u003dNone, timeout\u003dNone, envelope\u003dFalse,"},{"line_number":206,"context_line":"             retry\u003dNone):"},{"line_number":207,"context_line":"        \"\"\"Send a message to the given target.\"\"\""},{"line_number":208,"context_line":"        request \u003d marshal_request(message, ctxt, envelope)"},{"line_number":209,"context_line":"        expire \u003d 0"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_8f741bff","line":206,"updated":"2014-08-28 08:41:19.000000000","message":"Why the retry parameter is ignored ? Perhaps at least add a TODO, or a NOTE if it doesn\u0027t make sense for this driver.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    @_ensure_connect_called"},{"line_number":204,"context_line":"    def send(self, target, ctxt, message,"},{"line_number":205,"context_line":"             wait_for_reply\u003dNone, timeout\u003dNone, envelope\u003dFalse,"},{"line_number":206,"context_line":"             retry\u003dNone):"},{"line_number":207,"context_line":"        \"\"\"Send a message to the given target.\"\"\""},{"line_number":208,"context_line":"        request \u003d marshal_request(message, ctxt, envelope)"},{"line_number":209,"context_line":"        expire \u003d 0"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_c2096e85","line":206,"in_reply_to":"1abeadc6_8f741bff","updated":"2014-08-28 20:43:38.000000000","message":"Sorry, I\u0027ll add a TODO for now and open a bug against it.   I\u0027m going to think about the best way to solve this in light of AMQP 1.0, which allows proxies between the client and the broker.  In other words, the connection can be up, but the broker may not be.  Without a timeout the call can still hang indefinitely.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @_ensure_connect_called"},{"line_number":227,"context_line":"    def send_notification(self, target, ctxt, message, version,"},{"line_number":228,"context_line":"                          retry\u003dNone):"},{"line_number":229,"context_line":"        \"\"\"Send a notification message to the given target.\"\"\""},{"line_number":230,"context_line":"        return self.send(target, ctxt, message, envelope\u003d(version \u003d\u003d 2.0))"},{"line_number":231,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_cf61b33a","line":228,"updated":"2014-08-28 08:41:19.000000000","message":"Same here","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    @_ensure_connect_called"},{"line_number":227,"context_line":"    def send_notification(self, target, ctxt, message, version,"},{"line_number":228,"context_line":"                          retry\u003dNone):"},{"line_number":229,"context_line":"        \"\"\"Send a notification message to the given target.\"\"\""},{"line_number":230,"context_line":"        return self.send(target, ctxt, message, envelope\u003d(version \u003d\u003d 2.0))"},{"line_number":231,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_2224e20b","line":228,"in_reply_to":"1abeadc6_cf61b33a","updated":"2014-08-28 20:43:38.000000000","message":"Will do.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"proton \u003d importutils.try_import(\"proton\")"},{"line_number":34,"context_line":"try:"},{"line_number":35,"context_line":"    from oslo.messaging._drivers.protocols.amqp import controller"},{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_ff0e8433","line":36,"updated":"2014-09-01 15:36:47.000000000","message":"It doesn\u0027t affect a logic, but it is much better for readability — declare the _fake_controller class outside of the except block.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":33,"context_line":"proton \u003d importutils.try_import(\"proton\")"},{"line_number":34,"context_line":"try:"},{"line_number":35,"context_line":"    from oslo.messaging._drivers.protocols.amqp import controller"},{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_7269a924","line":36,"in_reply_to":"fa98f980_ff0e8433","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":34,"context_line":"try:"},{"line_number":35,"context_line":"    from oslo.messaging._drivers.protocols.amqp import controller"},{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_a44a2f81","line":37,"updated":"2014-09-01 15:36:47.000000000","message":"Incorrect class name. \n\n\u003e Class names should normally use the CapWords convention.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":34,"context_line":"try:"},{"line_number":35,"context_line":"    from oslo.messaging._drivers.protocols.amqp import controller"},{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_b2731114","line":37,"in_reply_to":"fa98f980_a44a2f81","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"},{"line_number":41,"context_line":"    controller \u003d _fake_controller()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_84a7eb4e","line":39,"updated":"2014-09-01 15:36:47.000000000","message":"You shouldn\u0027t use `object` directly, better use `type` function to get empty class in one line.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"47f28a30c7c49ddfa5f777fdc8b6e8c16da2f871","unresolved":false,"context_lines":[{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"},{"line_number":41,"context_line":"    controller \u003d _fake_controller()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_ea2d79ff","line":39,"in_reply_to":"fa98f980_33c9c4ac","updated":"2014-09-03 12:41:26.000000000","message":"Ah, thank you for the detail explanation - my Python-Fu is weaker than it should be :)   What you explain makes perfect sense - I\u0027ll update the patch accordingly.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"d7fa275e395c9adca6981ac47cad2785c384355c","unresolved":false,"context_lines":[{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"},{"line_number":41,"context_line":"    controller \u003d _fake_controller()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_33c9c4ac","line":39,"in_reply_to":"fa98f980_3442ae3e","updated":"2014-09-03 10:06:53.000000000","message":"Ok, I\u0027m not totally involved in your idea with the dummy Task class, I\u0027ll pay more attention to it, but in fact it does not matter. My comment is about implementation. Why you shouldn\u0027t do `Task \u003d object`? Object is the base Python object of all Python essences. You can\u0027t set new attributes to it:\n\n    In [23]: Task \u003d object\n\n    In [35]: Task.a \u003d True\n    TypeError: can\u0027t set attributes of built-in/extension type \u0027object\u0027\n\nThis is the base type, so it is absolutely unrecognized object:\n\n    In [40]: type(Task())\n    Out[40]: object\n\nNo real name here, same problem as above.\n\n    In [9]: object.__name__\n    Out[9]: \u0027object\u0027\n\nWhat am I recommending to you? If you need an empty class, declare a real class. You can do it with the producing function `type`, if you need to do it in one line — https://docs.python.org/2/library/functions.html#type:\n\n    Task \u003d type(\u0027Task\u0027, (object,), {})\n\nWhere is the profit?\n\n    In [37]:  Task \u003d type(\u0027Task\u0027, (object,), {})\n\n    In [14]: ttt.a \u003d True\n\n    In [15]: ttt.a\n    Out[15]: True\n\n    In [20]: Task.__name__\n    Out[20]: \u0027Task\u0027\n\n    In [22]: type(Task())\n    Out[22]: __main__.Task\n\nIn other words, we have normal class. It is safe, common and comfortable solution.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":36,"context_line":"except ImportError:"},{"line_number":37,"context_line":"    class _fake_controller(object):"},{"line_number":38,"context_line":"        fake_controller \u003d True"},{"line_number":39,"context_line":"        Task \u003d object"},{"line_number":40,"context_line":"        proton_opts \u003d list()"},{"line_number":41,"context_line":"    controller \u003d _fake_controller()"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_3442ae3e","line":39,"in_reply_to":"fa98f980_84a7eb4e","updated":"2014-09-02 16:21:28.000000000","message":"Not sure exactly what you mean - can you give me an example?\n\nI\u0027ve added more detail comments.  What I\u0027m trying to do is provide a \u0027dummy\u0027 definition of the Task class, as the import of the controller module which defines the Task class failed, and the Task class is inherited from by subclasses in this module.\n\nThese Task subclasses won\u0027t be used since the driver cannot be used due to the missing dependencies. I just don\u0027t want the inheritance to throw a \u0027no such member\u0027 error when the driver is imported.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"cfb7943a40ecb36937b789d0d0358cb0b2faabbe","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    fail on import."},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    fake_controller \u003d True"},{"line_number":50,"context_line":"    Task \u003d object  # dummy class to allow inheritance from Controller.Task"},{"line_number":51,"context_line":"    proton_opts \u003d list()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_f6148aa1","line":50,"updated":"2014-09-03 10:07:39.000000000","message":"Please see a new comment at our discussion in the #17 patch set. This is bad practice and even it is working well now in this case, it can cause very wicked bugs.","commit_id":"fd29df5193ecd74cb6223c4699d6003cfaf2347c"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"0cb2355f66e76ed7eb93c8384d2fa3a3b9c99a65","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    fail on import."},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":"    fake_controller \u003d True"},{"line_number":50,"context_line":"    Task \u003d object  # dummy class to allow inheritance from Controller.Task"},{"line_number":51,"context_line":"    proton_opts \u003d list()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_25341249","line":50,"in_reply_to":"fa98f980_f6148aa1","updated":"2014-09-03 12:42:00.000000000","message":"Done","commit_id":"fd29df5193ecd74cb6223c4699d6003cfaf2347c"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3a6257f42825148234dbe8a8978d788b6ec9a3da","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_eae4803d","line":243,"updated":"2014-09-03 23:26:34.000000000","message":"Why not just have a start() method on the driver instead of this? That way the places where connect happens is predictable and errors that are caused by connecting failing are also predicatable instead of just being a failure that will happen by the first victim function to be called.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"d7a8bdaacfaf35372ac9cc1b33fe9fbe41743f62","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_31709c0a","line":243,"in_reply_to":"fa98f980_30cedd2e","updated":"2014-09-04 22:13:12.000000000","message":"The problem with that is this doesn\u0027t work well with inheritance. Someone inherits from this class, adds a new send() method (and forgets to use the same decorator) then they never get anything connected. I guess people should just know better, but seems like unnecassary pain that we can just avoid.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"346093f9029267d05169133c3f9090618bd1ab90","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_fc0edd39","line":243,"in_reply_to":"fa98f980_30cedd2e","updated":"2014-09-05 09:29:24.000000000","message":"The reason for the lazy connection semantics is to handle the case where the process is forked after the driver is created, but before its actually used.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"90f55aec9625008eafbabf8f857b79b678162542","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_2ce4a8aa","line":243,"in_reply_to":"fa98f980_31709c0a","updated":"2014-09-05 15:34:05.000000000","message":"Just for some background, we originally had the interfaces manually check the connection status rather than using the decorator.\n\nFlavio recommended using the decorator way back (see comment towards bottom):\n\nhttps://review.openstack.org/#/c/75815/7/oslo/messaging/_drivers/protocols/amqp/driver.py","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_30cedd2e","line":243,"in_reply_to":"fa98f980_eae4803d","updated":"2014-09-04 18:39:12.000000000","message":"I believe Gordon was trying to lay the groundwork for point-to-point services when he initially implemented the lazy connection semantics.  The thought was that creating connections on demand from clients allows the driver to better support a dynamic peer-to-peer model.  But that was a -long- time ago, and the peer-2-peer stuff didn\u0027t gain any more traction.   The code was left in place if we decide to revisit that.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"346093f9029267d05169133c3f9090618bd1ab90","unresolved":false,"context_lines":[{"line_number":240,"context_line":"        self._connect_called \u003d False"},{"line_number":241,"context_line":"        self._lock \u003d threading.Lock()"},{"line_number":242,"context_line":""},{"line_number":243,"context_line":"    def _ensure_connect_called(func):"},{"line_number":244,"context_line":"        \"\"\"Causes the controller to connect to the messaging service when it is"},{"line_number":245,"context_line":"        first used. It is safe to push tasks to it whether connected or not,"},{"line_number":246,"context_line":"        but those tasks won\u0027t be processed until connection completes."}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_df22eba1","line":243,"in_reply_to":"fa98f980_eae4803d","updated":"2014-09-05 09:29:24.000000000","message":"If I understand the suggestion, it would involve changing the driver interface and probably even exposing that up to the actual user interface, right? I.e. have an explicit application controlled start?\n\nWhile I think that would be good, I think it should probably be tackled separately from the adding of a new driver given that its an interface change that might impact other drivers or even the public API.\n\nIf I\u0027m barking up the wrong tree, could you explain again what you are suggesting?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1e5cc3f7bc25472cdf9f0d5cc293b1e388b4b6e2","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        if wait_for_reply:"},{"line_number":279,"context_line":"            # the following can raise MessagingTimeout if no reply received:"},{"line_number":280,"context_line":"            reply \u003d task.get_reply(timeout)"},{"line_number":281,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":282,"context_line":"        LOG.debug(\"Send to %s returning\" % target)"},{"line_number":283,"context_line":"        return result"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_c87a6c23","line":281,"updated":"2014-09-03 20:42:02.000000000","message":"Something to think about as you harden the driver: If the reply doesn\u0027t unpack properly, this could raise an unexpected exception and break the application using the driver. What should we do in that case? Log an error but ignore the reply as though it didn\u0027t happen? Raise whatever random error jsonutils is going to throw (as the current implementation does)? Something else?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        if wait_for_reply:"},{"line_number":279,"context_line":"            # the following can raise MessagingTimeout if no reply received:"},{"line_number":280,"context_line":"            reply \u003d task.get_reply(timeout)"},{"line_number":281,"context_line":"            result \u003d unmarshal_response(reply, self._allowed_remote_exmods)"},{"line_number":282,"context_line":"        LOG.debug(\"Send to %s returning\" % target)"},{"line_number":283,"context_line":"        return result"},{"line_number":284,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_9a240a0e","line":281,"in_reply_to":"fa98f980_c87a6c23","updated":"2014-09-04 18:39:12.000000000","message":"Thanks, added \"TODO\" for now","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"}],"oslo/messaging/_drivers/protocols/amqp/engine/__init__.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Licensed to the Apache Software Foundation (ASF) under one"},{"line_number":3,"context_line":"# or more contributor license agreements.  See the NOTICE file"},{"line_number":4,"context_line":"# distributed with this work for additional information"},{"line_number":5,"context_line":"# regarding copyright ownership.  The ASF licenses this file"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4K4%3D","line":2,"updated":"2014-02-24 10:56:40.000000000","message":"use standard header (look at your another __init__py)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# specific language governing permissions and limitations"},{"line_number":17,"context_line":"# under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":"from container import *"},{"line_number":20,"context_line":"from connection import *"},{"line_number":21,"context_line":"from link import *"},{"line_number":22,"context_line":"from sockets import *"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4LY%3D","line":19,"updated":"2014-02-24 10:56:40.000000000","message":"wildcards on imports are not allowed by Flake8, please import only required objects","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":16,"context_line":"# specific language governing permissions and limitations"},{"line_number":17,"context_line":"# under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":"from container import *"},{"line_number":20,"context_line":"from connection import *"},{"line_number":21,"context_line":"from link import *"},{"line_number":22,"context_line":"from sockets import *"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wo%3D","line":19,"in_reply_to":"AAAAU3%2F%2F4LY%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"oslo/messaging/_drivers/protocols/amqp/engine/connection.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                pn_link.context._active \u003d True"},{"line_number":326,"context_line":"                if pn_link.is_sender:"},{"line_number":327,"context_line":"                    sender_link \u003d pn_link.context"},{"line_number":328,"context_line":"                    assert isinstance(sender_link, SenderLink)"},{"line_number":329,"context_line":"                    if sender_link._handler:"},{"line_number":330,"context_line":"                        sender_link._handler.sender_active(sender_link)"},{"line_number":331,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Ew%3D","line":328,"updated":"2014-02-24 10:56:40.000000000","message":"no asserts out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":325,"context_line":"                pn_link.context._active \u003d True"},{"line_number":326,"context_line":"                if pn_link.is_sender:"},{"line_number":327,"context_line":"                    sender_link \u003d pn_link.context"},{"line_number":328,"context_line":"                    assert isinstance(sender_link, SenderLink)"},{"line_number":329,"context_line":"                    if sender_link._handler:"},{"line_number":330,"context_line":"                        sender_link._handler.sender_active(sender_link)"},{"line_number":331,"context_line":"                else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wU%3D","line":328,"in_reply_to":"AAAAU3%2F%2F4Ew%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                        sender_link._handler.sender_active(sender_link)"},{"line_number":331,"context_line":"                else:"},{"line_number":332,"context_line":"                    receiver_link \u003d pn_link.context"},{"line_number":333,"context_line":"                    assert isinstance(receiver_link, ReceiverLink)"},{"line_number":334,"context_line":"                    if receiver_link._handler:"},{"line_number":335,"context_line":"                        receiver_link._handler.receiver_active(receiver_link)"},{"line_number":336,"context_line":"            pn_link \u003d next_link"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Eo%3D","line":333,"updated":"2014-02-24 10:56:40.000000000","message":"no asserts out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":330,"context_line":"                        sender_link._handler.sender_active(sender_link)"},{"line_number":331,"context_line":"                else:"},{"line_number":332,"context_line":"                    receiver_link \u003d pn_link.context"},{"line_number":333,"context_line":"                    assert isinstance(receiver_link, ReceiverLink)"},{"line_number":334,"context_line":"                    if receiver_link._handler:"},{"line_number":335,"context_line":"                        receiver_link._handler.receiver_active(receiver_link)"},{"line_number":336,"context_line":"            pn_link \u003d next_link"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wQ%3D","line":333,"in_reply_to":"AAAAU3%2F%2F4Eo%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        if not pn_link or not isinstance(pn_link, proton.Receiver):"},{"line_number":564,"context_line":"            raise Exception(\"Invalid link_handle: %s\" % link_handle)"},{"line_number":565,"context_line":"        del self._receiver_links[link_handle]"},{"line_number":566,"context_line":"        # @todo support reason for close"},{"line_number":567,"context_line":"        pn_link.close()"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"    def _remove_sender(self, name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4C0%3D","line":566,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        if not pn_link or not isinstance(pn_link, proton.Receiver):"},{"line_number":564,"context_line":"            raise Exception(\"Invalid link_handle: %s\" % link_handle)"},{"line_number":565,"context_line":"        del self._receiver_links[link_handle]"},{"line_number":566,"context_line":"        # @todo support reason for close"},{"line_number":567,"context_line":"        pn_link.close()"},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"    def _remove_sender(self, name):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wI%3D","line":566,"in_reply_to":"AAAAU3%2F%2F4C0%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"oslo/messaging/_drivers/protocols/amqp/engine/container.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class ContainerEventHandler(object):"},{"line_number":31,"context_line":"    # @todo - ContainerEventHandler"},{"line_number":32,"context_line":"    pass"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Ck%3D","line":31,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class ContainerEventHandler(object):"},{"line_number":31,"context_line":"    # @todo - ContainerEventHandler"},{"line_number":32,"context_line":"    pass"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wE%3D","line":31,"in_reply_to":"AAAAU3%2F%2F4Ck%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# An implementation of an AMQP 1.0 container"},{"line_number":36,"context_line":"class Container(object):"},{"line_number":37,"context_line":"    def __init__(self, name, eventHandler\u003dNone, properties\u003d{}):"},{"line_number":38,"context_line":"        self._name \u003d name"},{"line_number":39,"context_line":"        self._connections \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4CY%3D","line":36,"updated":"2014-02-24 10:56:40.000000000","message":"should be a doc string\n\"\"\"An implementation of an AMQP 1.0 container\"\"\"","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"# An implementation of an AMQP 1.0 container"},{"line_number":36,"context_line":"class Container(object):"},{"line_number":37,"context_line":"    def __init__(self, name, eventHandler\u003dNone, properties\u003d{}):"},{"line_number":38,"context_line":"        self._name \u003d name"},{"line_number":39,"context_line":"        self._connections \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1wA%3D","line":36,"in_reply_to":"AAAAU3%2F%2F4CY%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"oslo/messaging/_drivers/protocols/amqp/engine/link.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#    Licensed to the Apache Software Foundation (ASF) under one"},{"line_number":2,"context_line":"#    or more contributor license agreements.  See the NOTICE file"},{"line_number":3,"context_line":"#    distributed with this work for additional information"},{"line_number":4,"context_line":"#    regarding copyright ownership."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4BA%3D","line":1,"updated":"2014-02-24 10:56:40.000000000","message":"please increase doc string amount","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class _Link(object):"},{"line_number":33,"context_line":"    \"\"\"A generic Link base class.\"\"\""},{"line_number":34,"context_line":"    def __init__(self, connection, pn_link,"},{"line_number":35,"context_line":"                 target_address, source_address,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4KM%3D","line":32,"updated":"2014-02-24 10:56:40.000000000","message":"even if it\u0027s a generic base class, it should not start with underscore.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class _Link(object):"},{"line_number":33,"context_line":"    \"\"\"A generic Link base class.\"\"\""},{"line_number":34,"context_line":"    def __init__(self, connection, pn_link,"},{"line_number":35,"context_line":"                 target_address, source_address,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1vo%3D","line":32,"in_reply_to":"AAAAU3%2F%2F4KM%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._properties \u003d properties"},{"line_number":41,"context_line":"        self._user_context \u003d None"},{"line_number":42,"context_line":"        self._active \u003d False"},{"line_number":43,"context_line":"        # @todo: raise jira to add \u0027context\u0027 attr to api"},{"line_number":44,"context_line":"        self._pn_link \u003d pn_link"},{"line_number":45,"context_line":"        pn_link.context \u003d self"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4KE%3D","line":43,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self._properties \u003d properties"},{"line_number":41,"context_line":"        self._user_context \u003d None"},{"line_number":42,"context_line":"        self._active \u003d False"},{"line_number":43,"context_line":"        # @todo: raise jira to add \u0027context\u0027 attr to api"},{"line_number":44,"context_line":"        self._pn_link \u003d pn_link"},{"line_number":45,"context_line":"        pn_link.context \u003d self"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1vk%3D","line":43,"in_reply_to":"AAAAU3%2F%2F4KE%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        desired_mode \u003d properties.get(\"distribution-mode\")"},{"line_number":60,"context_line":"        if desired_mode:"},{"line_number":61,"context_line":"            if desired_mode \u003d\u003d \"copy\":"},{"line_number":62,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":63,"context_line":"                    proton.Terminus.DIST_MODE_COPY"},{"line_number":64,"context_line":"            elif desired_mode \u003d\u003d \"move\":"},{"line_number":65,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4KA%3D","line":62,"updated":"2014-02-24 10:56:40.000000000","message":"use () instead of \\","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        desired_mode \u003d properties.get(\"distribution-mode\")"},{"line_number":60,"context_line":"        if desired_mode:"},{"line_number":61,"context_line":"            if desired_mode \u003d\u003d \"copy\":"},{"line_number":62,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":63,"context_line":"                    proton.Terminus.DIST_MODE_COPY"},{"line_number":64,"context_line":"            elif desired_mode \u003d\u003d \"move\":"},{"line_number":65,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1vc%3D","line":62,"in_reply_to":"AAAAU3%2F%2F4KA%3D","updated":"2014-02-24 15:17:49.000000000","message":"I changed the code slightly to avoid the need for long lines in the first place.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":63,"context_line":"                    proton.Terminus.DIST_MODE_COPY"},{"line_number":64,"context_line":"            elif desired_mode \u003d\u003d \"move\":"},{"line_number":65,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":66,"context_line":"                    proton.Terminus.DIST_MODE_MOVE"},{"line_number":67,"context_line":"            else:"},{"line_number":68,"context_line":"                raise Exception(\"Unknown distribution mode: %s\" %"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4J8%3D","line":65,"updated":"2014-02-24 10:56:40.000000000","message":"use () instead of \\","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":63,"context_line":"                    proton.Terminus.DIST_MODE_COPY"},{"line_number":64,"context_line":"            elif desired_mode \u003d\u003d \"move\":"},{"line_number":65,"context_line":"                self._pn_link.source.distribution_mode \u003d \\"},{"line_number":66,"context_line":"                    proton.Terminus.DIST_MODE_MOVE"},{"line_number":67,"context_line":"            else:"},{"line_number":68,"context_line":"                raise Exception(\"Unknown distribution mode: %s\" %"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1vQ%3D","line":65,"in_reply_to":"AAAAU3%2F%2F4J8%3D","updated":"2014-02-24 15:17:49.000000000","message":"As above.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        self._user_context \u003d ctxt"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    user_context \u003d property(_get_user_context, _set_user_context,"},{"line_number":85,"context_line":"                            doc\u003d\"\"\""},{"line_number":86,"context_line":"Associate an arbitrary application object with this link."},{"line_number":87,"context_line":"\"\"\")"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4CQ%3D","line":85,"updated":"2014-02-24 10:56:40.000000000","message":"please do better lines formatting","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        self._user_context \u003d ctxt"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    user_context \u003d property(_get_user_context, _set_user_context,"},{"line_number":85,"context_line":"                            doc\u003d\"\"\""},{"line_number":86,"context_line":"Associate an arbitrary application object with this link."},{"line_number":87,"context_line":"\"\"\")"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1vA%3D","line":85,"in_reply_to":"AAAAU3%2F%2F4CQ%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @property"},{"line_number":90,"context_line":"    def source_address(self):"},{"line_number":91,"context_line":"        \"\"\"If link is a sender, source is determined by the local value, else"},{"line_number":92,"context_line":"        use the remote."},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        if self._pn_link.is_sender:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4CE%3D","line":91,"updated":"2014-02-24 10:56:40.000000000","message":"please do shorter doc string, probably, use shorter lines","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":88,"context_line":""},{"line_number":89,"context_line":"    @property"},{"line_number":90,"context_line":"    def source_address(self):"},{"line_number":91,"context_line":"        \"\"\"If link is a sender, source is determined by the local value, else"},{"line_number":92,"context_line":"        use the remote."},{"line_number":93,"context_line":"        \"\"\""},{"line_number":94,"context_line":"        if self._pn_link.is_sender:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1u4%3D","line":91,"in_reply_to":"AAAAU3%2F%2F4CE%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @property"},{"line_number":100,"context_line":"    def target_address(self):"},{"line_number":101,"context_line":"        \"\"\"If link is a receiver, target is determined by the local value, else"},{"line_number":102,"context_line":"        use the remote."},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        if self._pn_link.is_receiver:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4CA%3D","line":101,"updated":"2014-02-24 10:56:40.000000000","message":"please do shorter doc string, probably, use shorter lines","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    @property"},{"line_number":100,"context_line":"    def target_address(self):"},{"line_number":101,"context_line":"        \"\"\"If link is a receiver, target is determined by the local value, else"},{"line_number":102,"context_line":"        use the remote."},{"line_number":103,"context_line":"        \"\"\""},{"line_number":104,"context_line":"        if self._pn_link.is_receiver:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1uw%3D","line":101,"in_reply_to":"AAAAU3%2F%2F4CA%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self._next_deadline \u003d 0"},{"line_number":156,"context_line":"        self._next_tag \u003d 0"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # @todo - think about send-settle-mode configuration"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def send(self, message, delivery_callback\u003dNone,"},{"line_number":161,"context_line":"             handle\u003dNone, deadline\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Jc%3D","line":158,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        self._next_deadline \u003d 0"},{"line_number":156,"context_line":"        self._next_tag \u003d 0"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"        # @todo - think about send-settle-mode configuration"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def send(self, message, delivery_callback\u003dNone,"},{"line_number":161,"context_line":"             handle\u003dNone, deadline\u003dNone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1us%3D","line":158,"in_reply_to":"AAAAU3%2F%2F4Jc%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":161,"context_line":"             handle\u003dNone, deadline\u003dNone):"},{"line_number":162,"context_line":"        self._pending_sends.append((message, delivery_callback, handle,"},{"line_number":163,"context_line":"                                   deadline))"},{"line_number":164,"context_line":"        # @todo deadline not supported yet"},{"line_number":165,"context_line":"        assert not deadline, \"send timeout not supported yet!\""},{"line_number":166,"context_line":"        if deadline and (self._next_deadline \u003d\u003d 0 or"},{"line_number":167,"context_line":"                         self._next_deadline \u003e deadline):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4JY%3D","line":164,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":161,"context_line":"             handle\u003dNone, deadline\u003dNone):"},{"line_number":162,"context_line":"        self._pending_sends.append((message, delivery_callback, handle,"},{"line_number":163,"context_line":"                                   deadline))"},{"line_number":164,"context_line":"        # @todo deadline not supported yet"},{"line_number":165,"context_line":"        assert not deadline, \"send timeout not supported yet!\""},{"line_number":166,"context_line":"        if deadline and (self._next_deadline \u003d\u003d 0 or"},{"line_number":167,"context_line":"                         self._next_deadline \u003e deadline):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1uo%3D","line":164,"in_reply_to":"AAAAU3%2F%2F4JY%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _delivery_updated(self, delivery):"},{"line_number":302,"context_line":"        # a receive delivery changed state"},{"line_number":303,"context_line":"        # @todo: multi-frame message transfer"},{"line_number":304,"context_line":"        LOG.debug(\"Receive delivery updated\")"},{"line_number":305,"context_line":"        if delivery.readable:"},{"line_number":306,"context_line":"            data \u003d self._pn_link.recv(delivery.pending)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Bk%3D","line":303,"updated":"2014-02-24 10:56:40.000000000","message":"#TODO(name)","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":300,"context_line":""},{"line_number":301,"context_line":"    def _delivery_updated(self, delivery):"},{"line_number":302,"context_line":"        # a receive delivery changed state"},{"line_number":303,"context_line":"        # @todo: multi-frame message transfer"},{"line_number":304,"context_line":"        LOG.debug(\"Receive delivery updated\")"},{"line_number":305,"context_line":"        if delivery.readable:"},{"line_number":306,"context_line":"            data \u003d self._pn_link.recv(delivery.pending)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1uY%3D","line":303,"in_reply_to":"AAAAU3%2F%2F4Bk%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"}],"oslo/messaging/_drivers/protocols/amqp/eventloop.py":[{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from oslo.messaging._drivers.protocols.amqp import engine"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# FIXME(markmc): remove this"},{"line_number":31,"context_line":"_ \u003d lambda s: s"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4I0%3D","line":31,"updated":"2014-02-24 10:56:40.000000000","message":"again, take a look at previos comments","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":28,"context_line":"from oslo.messaging._drivers.protocols.amqp import engine"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# FIXME(markmc): remove this"},{"line_number":31,"context_line":"_ \u003d lambda s: s"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1tw%3D","line":31,"in_reply_to":"AAAAU3%2F%2F4I0%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            rc \u003d engine.sockets.read_socket_input(self.connection,"},{"line_number":59,"context_line":"                                                  self.socket)"},{"line_number":60,"context_line":"        except Exception as e:"},{"line_number":61,"context_line":"            rc \u003d engine.Connection.EOS"},{"line_number":62,"context_line":"            self._handler.connection_failed(self.connection, str(e))"},{"line_number":63,"context_line":"        if rc \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Ig%3D","line":60,"updated":"2014-02-24 10:56:40.000000000","message":"too broad execption, please define more meaningfull exception for socket usage methods","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"da5e6055d08c80298b94a367397d933ef08f7ead","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            rc \u003d engine.sockets.read_socket_input(self.connection,"},{"line_number":59,"context_line":"                                                  self.socket)"},{"line_number":60,"context_line":"        except Exception as e:"},{"line_number":61,"context_line":"            rc \u003d engine.Connection.EOS"},{"line_number":62,"context_line":"            self._handler.connection_failed(self.connection, str(e))"},{"line_number":63,"context_line":"        if rc \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2ForE%3D","line":60,"in_reply_to":"AAAAU3%2F%2F4Ig%3D","updated":"2014-02-25 14:50:16.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        try:"},{"line_number":58,"context_line":"            rc \u003d engine.sockets.read_socket_input(self.connection,"},{"line_number":59,"context_line":"                                                  self.socket)"},{"line_number":60,"context_line":"        except Exception as e:"},{"line_number":61,"context_line":"            rc \u003d engine.Connection.EOS"},{"line_number":62,"context_line":"            self._handler.connection_failed(self.connection, str(e))"},{"line_number":63,"context_line":"        if rc \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1lQ%3D","line":60,"in_reply_to":"AAAAU3%2F%2F4Ig%3D","updated":"2014-02-24 15:17:49.000000000","message":"Ok, I\u0027ll have a look at narrowing this down.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            rc \u003d engine.sockets.write_socket_output(self.connection,"},{"line_number":71,"context_line":"                                                    self.socket)"},{"line_number":72,"context_line":"        except Exception as e:"},{"line_number":73,"context_line":"            rc \u003d engine.Connection.EOS"},{"line_number":74,"context_line":"            self._handler.connection_failed(self.connection, str(e))"},{"line_number":75,"context_line":"        if rc \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4IY%3D","line":72,"updated":"2014-02-24 10:56:40.000000000","message":"(Draft)\t\tDraft saved at 12:42 PM\n\ntoo broad execption, please define more meaningfull exception for socket usage methods","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"da5e6055d08c80298b94a367397d933ef08f7ead","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        try:"},{"line_number":70,"context_line":"            rc \u003d engine.sockets.write_socket_output(self.connection,"},{"line_number":71,"context_line":"                                                    self.socket)"},{"line_number":72,"context_line":"        except Exception as e:"},{"line_number":73,"context_line":"            rc \u003d engine.Connection.EOS"},{"line_number":74,"context_line":"            self._handler.connection_failed(self.connection, str(e))"},{"line_number":75,"context_line":"        if rc \u003e 0:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2ForA%3D","line":72,"in_reply_to":"AAAAU3%2F%2F4IY%3D","updated":"2014-02-25 14:50:16.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        self._entries \u003d []"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def schedule(self, request, delay):"},{"line_number":120,"context_line":"        assert request"},{"line_number":121,"context_line":"        assert delay"},{"line_number":122,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":123,"context_line":"        heapq.heappush(self._entries, entry)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4HM%3D","line":120,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        self._entries \u003d []"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def schedule(self, request, delay):"},{"line_number":120,"context_line":"        assert request"},{"line_number":121,"context_line":"        assert delay"},{"line_number":122,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":123,"context_line":"        heapq.heappush(self._entries, entry)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1tk%3D","line":120,"in_reply_to":"AAAAU3%2F%2F4HM%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def schedule(self, request, delay):"},{"line_number":120,"context_line":"        assert request"},{"line_number":121,"context_line":"        assert delay"},{"line_number":122,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":123,"context_line":"        heapq.heappush(self._entries, entry)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4HI%3D","line":121,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def schedule(self, request, delay):"},{"line_number":120,"context_line":"        assert request"},{"line_number":121,"context_line":"        assert delay"},{"line_number":122,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":123,"context_line":"        heapq.heappush(self._entries, entry)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1tg%3D","line":121,"in_reply_to":"AAAAU3%2F%2F4HI%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        # return pre-existing"},{"line_number":207,"context_line":"        conn \u003d self._container.get_connection(key)"},{"line_number":208,"context_line":"        if conn:"},{"line_number":209,"context_line":"            assert isinstance(conn.user_context, _SocketConnection)"},{"line_number":210,"context_line":"            return conn.user_context"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # create a new connection - this will be stored in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4HY%3D","line":209,"updated":"2014-02-24 10:56:40.000000000","message":"no assert out of test cases !","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        # return pre-existing"},{"line_number":207,"context_line":"        conn \u003d self._container.get_connection(key)"},{"line_number":208,"context_line":"        if conn:"},{"line_number":209,"context_line":"            assert isinstance(conn.user_context, _SocketConnection)"},{"line_number":210,"context_line":"            return conn.user_context"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"        # create a new connection - this will be stored in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1tc%3D","line":209,"in_reply_to":"AAAAU3%2F%2F4HY%3D","updated":"2014-02-24 15:17:49.000000000","message":"Done","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8415,"name":"Denis M.","email":"lildee1991@gmail.com","username":"dmakogon"},"change_message_id":"3b0923683b4c31ee342097a737b8304bb28a31d2","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            readable, writable, ignore \u003d select.select(readfds,"},{"line_number":243,"context_line":"                                                       writefds,"},{"line_number":244,"context_line":"                                                       [],"},{"line_number":245,"context_line":"                                                       timeout)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"            for r in readable:"},{"line_number":248,"context_line":"                r.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F4Gs%3D","line":245,"updated":"2014-02-24 10:56:40.000000000","message":"could be shorter","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"da5e6055d08c80298b94a367397d933ef08f7ead","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            readable, writable, ignore \u003d select.select(readfds,"},{"line_number":243,"context_line":"                                                       writefds,"},{"line_number":244,"context_line":"                                                       [],"},{"line_number":245,"context_line":"                                                       timeout)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"            for r in readable:"},{"line_number":248,"context_line":"                r.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2Foqc%3D","line":245,"in_reply_to":"AAAAU3%2F%2F1lg%3D","updated":"2014-02-25 14:50:16.000000000","message":"I\u0027ve split this into two lines to keep the length of each down.","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"8a5069d53f2fc60f61daf62e83b3ee658f5c6ec5","unresolved":false,"context_lines":[{"line_number":242,"context_line":"            readable, writable, ignore \u003d select.select(readfds,"},{"line_number":243,"context_line":"                                                       writefds,"},{"line_number":244,"context_line":"                                                       [],"},{"line_number":245,"context_line":"                                                       timeout)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"            for r in readable:"},{"line_number":248,"context_line":"                r.read()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAU3%2F%2F1lg%3D","line":245,"in_reply_to":"AAAAU3%2F%2F4Gs%3D","updated":"2014-02-24 15:17:49.000000000","message":"I could certainly split this in to two lines (select and then the assignment to the different \u0027out\u0027 params). Would that address the concern? or is there something else you would suggest as nicer?","commit_id":"8021997e0e1df12e9b708d0093efde27cc27a2c7"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"pyngus \u003d importutils.try_import(\"pyngus\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_8f1dfbc0","line":30,"updated":"2014-08-28 08:41:19.000000000","message":"Just import pyngus without try_import, if it fails, stevedore will already report an error when it try to load the driver","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"from oslo.messaging.openstack.common import importutils"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"pyngus \u003d importutils.try_import(\"pyngus\")"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_da02380b","line":30,"in_reply_to":"1abeadc6_8f1dfbc0","updated":"2014-08-28 20:43:38.000000000","message":"Done","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self._handler \u003d handler"},{"line_number":49,"context_line":"        self._container \u003d container"},{"line_number":50,"context_line":"        c \u003d container.create_connection(name, handler, self._properties)"},{"line_number":51,"context_line":"        c.user_context \u003d self"},{"line_number":52,"context_line":"        self.connection \u003d c"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _get_name_and_pid(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_cf7a93f0","line":51,"updated":"2014-08-28 08:41:19.000000000","message":"This looks hackish, I guess user_context is not part of the pyngus public API,\n\nDoes a way to track the mapping between \u0027ContainerConnection and this fake socket\u0027 ?","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"6f1b8f6ca854329696c68d0db99da77bd8bb9d8f","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self._handler \u003d handler"},{"line_number":49,"context_line":"        self._container \u003d container"},{"line_number":50,"context_line":"        c \u003d container.create_connection(name, handler, self._properties)"},{"line_number":51,"context_line":"        c.user_context \u003d self"},{"line_number":52,"context_line":"        self.connection \u003d c"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _get_name_and_pid(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_2d111c5d","line":51,"in_reply_to":"1abeadc6_550c3bec","updated":"2014-08-29 07:05:00.000000000","message":"Ok cool, it doesn\u0027t looks anymore hackish for me :)","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        self._handler \u003d handler"},{"line_number":49,"context_line":"        self._container \u003d container"},{"line_number":50,"context_line":"        c \u003d container.create_connection(name, handler, self._properties)"},{"line_number":51,"context_line":"        c.user_context \u003d self"},{"line_number":52,"context_line":"        self.connection \u003d c"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def _get_name_and_pid(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_550c3bec","line":51,"in_reply_to":"1abeadc6_cf7a93f0","updated":"2014-08-28 20:43:38.000000000","message":"Actually, user_context is part of the pyngus.Connection class API.\n\nAll pyngus classes that support callbacks have a \u0027user_context\u0027 member that can be used by the application.   When the class\u0027s callback handler is invoked, the \u0027user_context\u0027 member provides context for the application to access any custom data it associated with the object.\n\nSo yes - this user_context is used in this case to map from the Connection object back to the _SocketConnection object when a Connection callback is invoked.","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"8b41d94858367b1dcec30be5ffbe497682f18fd5","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        # Configure a container"},{"line_number":229,"context_line":"        if not pyngus:"},{"line_number":230,"context_line":"            LOG.error(\"Required module \u0027pyngus\u0027 not found.\")"},{"line_number":231,"context_line":"            raise ImportError(\"Failed to import pyngus module\")"},{"line_number":232,"context_line":"        if container_name:"},{"line_number":233,"context_line":"            self._container \u003d pyngus.Container(container_name)"},{"line_number":234,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_4f6e8330","line":231,"updated":"2014-08-28 08:41:19.000000000","message":"We should not handle importerror here, stevedore already do it for us","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"3bb45a950586972b83b9a01764aa2f48fb9dd457","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        # Configure a container"},{"line_number":229,"context_line":"        if not pyngus:"},{"line_number":230,"context_line":"            LOG.error(\"Required module \u0027pyngus\u0027 not found.\")"},{"line_number":231,"context_line":"            raise ImportError(\"Failed to import pyngus module\")"},{"line_number":232,"context_line":"        if container_name:"},{"line_number":233,"context_line":"            self._container \u003d pyngus.Container(container_name)"},{"line_number":234,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"1abeadc6_f5162748","line":231,"in_reply_to":"1abeadc6_4f6e8330","updated":"2014-08-28 20:43:38.000000000","message":"Done","commit_id":"c9d3f3f5676615f548d3a025abf70fa0812f5546"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":153,"context_line":"        heapq.heappush(self._entries, entry)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def timeout(self, t):"},{"line_number":156,"context_line":"        \"\"\"Get the delay to the next callable needs to be run, or \u0027t\u0027,"},{"line_number":157,"context_line":"        whichever is shorter."},{"line_number":158,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_ff3a0435","line":155,"updated":"2014-09-01 15:36:47.000000000","message":"One-char variable names it is not good, furthermore you didn\u0027t describe it in the docstring. Arguments names should have descriptive names.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        entry \u003d (time.time() + delay, request)"},{"line_number":153,"context_line":"        heapq.heappush(self._entries, entry)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"    def timeout(self, t):"},{"line_number":156,"context_line":"        \"\"\"Get the delay to the next callable needs to be run, or \u0027t\u0027,"},{"line_number":157,"context_line":"        whichever is shorter."},{"line_number":158,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_94c43a60","line":155,"in_reply_to":"fa98f980_ff3a0435","updated":"2014-09-02 16:21:28.000000000","message":"Done","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\"Get the delay to the next callable needs to be run, or \u0027t\u0027,"},{"line_number":157,"context_line":"        whichever is shorter."},{"line_number":158,"context_line":"        \"\"\""},{"line_number":159,"context_line":"        due \u003d self.next()"},{"line_number":160,"context_line":"        if not due:"},{"line_number":161,"context_line":"            return t"},{"line_number":162,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_5ffcf03e","line":159,"updated":"2014-09-01 15:36:47.000000000","message":"Usage of  `next` is py3 incompatible. Please use next(self).\nIn fact, default next of Python generator raises StopIteration error when a next item doesn\u0027t exist. So `try` `except` block should be provided.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"d7fa275e395c9adca6981ac47cad2785c384355c","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\"Get the delay to the next callable needs to be run, or \u0027t\u0027,"},{"line_number":157,"context_line":"        whichever is shorter."},{"line_number":158,"context_line":"        \"\"\""},{"line_number":159,"context_line":"        due \u003d self.next()"},{"line_number":160,"context_line":"        if not due:"},{"line_number":161,"context_line":"            return t"},{"line_number":162,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_569d5658","line":159,"in_reply_to":"fa98f980_34270e14","updated":"2014-09-03 10:06:53.000000000","message":"Great! I see your point now.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":156,"context_line":"        \"\"\"Get the delay to the next callable needs to be run, or \u0027t\u0027,"},{"line_number":157,"context_line":"        whichever is shorter."},{"line_number":158,"context_line":"        \"\"\""},{"line_number":159,"context_line":"        due \u003d self.next()"},{"line_number":160,"context_line":"        if not due:"},{"line_number":161,"context_line":"            return t"},{"line_number":162,"context_line":"        now \u003d time.time()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_34270e14","line":159,"in_reply_to":"fa98f980_5ffcf03e","updated":"2014-09-02 16:21:28.000000000","message":"Ah, yes - actually, this class isn\u0027t meant to be iterable.  It\u0027s a list sorted by time deadline, with the item having the shortest timeout first.\n\nI think the naming for \u0027next()\u0027 is misleading - it always returns the head of the list (next deadline), not meant for iterating.\n\nI\u0027ll rename the methods so it\u0027s clearer.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            return min(due - now, t) if t else due - now"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def next(self):"},{"line_number":169,"context_line":"        \"\"\"Get the next callable that will expire.\"\"\""},{"line_number":170,"context_line":"        return self._entries[0][0] if len(self._entries) else None"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_fab5b2cd","line":168,"updated":"2014-09-01 15:36:47.000000000","message":"If you plan to use your code under py3, please declare `__next__` method:\n\n    def __next__(self):\n        return self.next","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        else:"},{"line_number":166,"context_line":"            return min(due - now, t) if t else due - now"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def next(self):"},{"line_number":169,"context_line":"        \"\"\"Get the next callable that will expire.\"\"\""},{"line_number":170,"context_line":"        return self._entries[0][0] if len(self._entries) else None"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_d47de2e8","line":168,"in_reply_to":"fa98f980_fab5b2cd","updated":"2014-09-02 16:21:28.000000000","message":"see above.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"fecc1a1f4ba4fa4e196b18010e703018d2b908a4","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def next(self):"},{"line_number":169,"context_line":"        \"\"\"Get the next callable that will expire.\"\"\""},{"line_number":170,"context_line":"        return self._entries[0][0] if len(self._entries) else None"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def process(self):"},{"line_number":173,"context_line":"        \"\"\"Process all expired callables.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_7a1d42bd","line":170,"updated":"2014-09-01 15:36:47.000000000","message":"Better raise a StopIteration error instead of return None. It will be much more expected.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"755d3da65f8a117d64b990cae34a8337c4033bfa","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def next(self):"},{"line_number":169,"context_line":"        \"\"\"Get the next callable that will expire.\"\"\""},{"line_number":170,"context_line":"        return self._entries[0][0] if len(self._entries) else None"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def process(self):"},{"line_number":173,"context_line":"        \"\"\"Process all expired callables.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_5469f223","line":170,"in_reply_to":"fa98f980_7a1d42bd","updated":"2014-09-02 16:21:28.000000000","message":"ditto.","commit_id":"e3b7bb52a0847505fe75b25f71c982ab43af44fe"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3a6257f42825148234dbe8a8978d788b6ec9a3da","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                if rc \u003e 0:"},{"line_number":76,"context_line":"                    self.connection.process(time.time())"},{"line_number":77,"context_line":"                return rc"},{"line_number":78,"context_line":"            except socket.error as e:"},{"line_number":79,"context_line":"                err \u003d e.args[0]"},{"line_number":80,"context_line":"                if err \u003d\u003d errno.EAGAIN or err \u003d\u003d errno.EINTR:"},{"line_number":81,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_eab6403d","line":78,"updated":"2014-09-03 23:26:34.000000000","message":"I\u0027m pretty sure socket.error\u0027s have an `errno` property that is more useful to know what this is then using e.args[0], might as well use that?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                if rc \u003e 0:"},{"line_number":76,"context_line":"                    self.connection.process(time.time())"},{"line_number":77,"context_line":"                return rc"},{"line_number":78,"context_line":"            except socket.error as e:"},{"line_number":79,"context_line":"                err \u003d e.args[0]"},{"line_number":80,"context_line":"                if err \u003d\u003d errno.EAGAIN or err \u003d\u003d errno.EINTR:"},{"line_number":81,"context_line":"                    continue"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_95993bc6","line":78,"in_reply_to":"fa98f980_eab6403d","updated":"2014-09-04 18:39:12.000000000","message":"Yes, you\u0027re correct - good to know.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1e5cc3f7bc25472cdf9f0d5cc293b1e388b4b6e2","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    threads."},{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    def __init__(self, container_name\u003dNone):"},{"line_number":226,"context_line":"        threading.Thread.__init__(self)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        # callables from other threads:"},{"line_number":229,"context_line":"        self._requests \u003d Requests()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_c8cfcc54","line":226,"updated":"2014-09-03 20:42:02.000000000","message":"Should this use super()?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"022e7eadbd493b1dfaba6e8b71404d3b24ee53ae","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    threads."},{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    def __init__(self, container_name\u003dNone):"},{"line_number":226,"context_line":"        threading.Thread.__init__(self)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        # callables from other threads:"},{"line_number":229,"context_line":"        self._requests \u003d Requests()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_c01a2ac5","line":226,"in_reply_to":"fa98f980_c8cfcc54","updated":"2014-09-04 13:14:57.000000000","message":"Definitely yes. Endorse.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":223,"context_line":"    threads."},{"line_number":224,"context_line":"    \"\"\""},{"line_number":225,"context_line":"    def __init__(self, container_name\u003dNone):"},{"line_number":226,"context_line":"        threading.Thread.__init__(self)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"        # callables from other threads:"},{"line_number":229,"context_line":"        self._requests \u003d Requests()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_35bdefb7","line":226,"in_reply_to":"fa98f980_c8cfcc54","updated":"2014-09-04 18:39:12.000000000","message":"Done","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3a6257f42825148234dbe8a8978d788b6ec9a3da","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        LOG.info(\"eventloop thread exiting, container\u003d%s\","},{"line_number":320,"context_line":"                 self._container.name)"},{"line_number":321,"context_line":"        self._container.destroy()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_4aa2ecfd","line":321,"updated":"2014-09-03 23:26:34.000000000","message":"So thread dies an unnatural death, possible say via some IOError/OSError thrown from the select.select method, what happens when the container is not destroyed due to that exception? Is that desireable/ok?\n\nShould this be in a try: finally block (or contextmanager?) to prevent that?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":7536,"name":"Ilya Pekelny","email":"ipekelny@mirantis.com","username":"I159"},"change_message_id":"022e7eadbd493b1dfaba6e8b71404d3b24ee53ae","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        LOG.info(\"eventloop thread exiting, container\u003d%s\","},{"line_number":320,"context_line":"                 self._container.name)"},{"line_number":321,"context_line":"        self._container.destroy()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_80ae622c","line":321,"in_reply_to":"fa98f980_4aa2ecfd","updated":"2014-09-04 13:14:57.000000000","message":"Or maybe we should implement some context manager which could destroy container on exit, in independence of occurred an exception or not.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"7d2b6ea997b9705a86d219291e88a772d5eec254","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        LOG.info(\"eventloop thread exiting, container\u003d%s\","},{"line_number":320,"context_line":"                 self._container.name)"},{"line_number":321,"context_line":"        self._container.destroy()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_31989c77","line":321,"in_reply_to":"fa98f980_50e7e1e3","updated":"2014-09-04 22:04:34.000000000","message":"From my understanding u\u0027ll already get a sys.stderr message that happens if this blows up unnaturally. If u want more you\u0027ll probably have to wrap it, or call put this code in _run() and then wrap the call to it.\n\nhttp://hg.python.org/releasing/2.7.6/file/ba31940588b6/Lib/threading.py#l809","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        LOG.info(\"eventloop thread exiting, container\u003d%s\","},{"line_number":320,"context_line":"                 self._container.name)"},{"line_number":321,"context_line":"        self._container.destroy()"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_50e7e1e3","line":321,"in_reply_to":"fa98f980_80ae622c","updated":"2014-09-04 18:39:12.000000000","message":"At this point, loss of the eventloop thread is a catastrophic failure.  It should capture and handle any recoverable error (like failures at the socket level, for which it will re-try that connection), and EINTR from select (oops!).  But until we have a way to safely respawn the thread (and not get trapped in an infinite spawn-fail-spawn loop), I think we should leave the container present and not deallocate it from under the controller.\n\nAny suggestions as to how best to report the failure of this thread?  I could wrap the loop in a try: block and log.error() whatever unanticipated exception shows up.","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"876b68d5cf5bd0fb75046e77b1dfb6e82aa59569","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    def __init__(self):"},{"line_number":191,"context_line":"        self._requests \u003d moves.queue.Queue(maxsize\u003d10)"},{"line_number":192,"context_line":"        self._wakeup_pipe \u003d os.pipe()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def wakeup(self, request\u003dNone):"},{"line_number":195,"context_line":"        \"\"\"Enqueue a callable to be executed by the eventloop, and force the"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_94be8bac","line":192,"updated":"2014-09-05 07:14:35.000000000","message":"Why use this vs just using a condition variable out of curosity?","commit_id":"fbee94170f918c165ac4e7eb3bacd0dc193acc50"},{"author":{"_account_id":8784,"name":"Gordon Sim","email":"gsim@redhat.com","username":"gordonsim"},"change_message_id":"ea972e7d47108157347f57ec8b13a1c4c5278963","unresolved":false,"context_lines":[{"line_number":189,"context_line":"    \"\"\""},{"line_number":190,"context_line":"    def __init__(self):"},{"line_number":191,"context_line":"        self._requests \u003d moves.queue.Queue(maxsize\u003d10)"},{"line_number":192,"context_line":"        self._wakeup_pipe \u003d os.pipe()"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def wakeup(self, request\u003dNone):"},{"line_number":195,"context_line":"        \"\"\"Enqueue a callable to be executed by the eventloop, and force the"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_5c528935","line":192,"in_reply_to":"fa98f980_94be8bac","updated":"2014-09-05 09:23:49.000000000","message":"We need to get the select() call made on the io thread to return. That requires that one of the file descriptors in its interest set is readable. So by adding in a pipe, we can make that readable whenever we want to wakeup the select loop.","commit_id":"fbee94170f918c165ac4e7eb3bacd0dc193acc50"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"611ed12f4724800b388ad743cb7a4559ba9b3504","unresolved":false,"context_lines":[{"line_number":304,"context_line":"            except select.error as serror:"},{"line_number":305,"context_line":"                if serror[0] \u003d\u003d errno.EINTR:"},{"line_number":306,"context_line":"                    LOG.warning(\"ignoring interrupt from select(): %s\","},{"line_number":307,"context_line":"                                str(serror))"},{"line_number":308,"context_line":"                    continue"},{"line_number":309,"context_line":"                raise  # assuming fatal..."},{"line_number":310,"context_line":"            readable, writable, ignore \u003d results"}],"source_content_type":"text/x-python","patch_set":20,"id":"fa98f980_cd3cf3ca","line":307,"updated":"2014-09-05 18:20:23.000000000","message":"In a later cleanup u can just remove str() since the \"%s\" there will already do this for u (in a way that\u0027s more compliant with py2/py3).","commit_id":"fbee94170f918c165ac4e7eb3bacd0dc193acc50"}],"oslo/messaging/opts.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1e5cc3f7bc25472cdf9f0d5cc293b1e388b4b6e2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from oslo.messaging._drivers import matchmaker"},{"line_number":28,"context_line":"from oslo.messaging._drivers import matchmaker_redis"},{"line_number":29,"context_line":"from oslo.messaging._drivers import matchmaker_ring"},{"line_number":30,"context_line":"from oslo.messaging._drivers.protocols.amqp import driver"},{"line_number":31,"context_line":"from oslo.messaging._executors import impl_eventlet"},{"line_number":32,"context_line":"from oslo.messaging.notify import notifier"},{"line_number":33,"context_line":"from oslo.messaging.rpc import client"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_7365f6b3","line":30,"updated":"2014-09-03 20:42:02.000000000","message":"\"driver\" is a bit vague, since this isn\u0027t the only actual driver mentioned in this file (the impl_foo files above are, too). Can you submit a follow-up patch to change the name to something more generic? Maybe just amqp_driver?","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"b57212b854966f10ef158fac74a2eaad03900513","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from oslo.messaging._drivers import matchmaker"},{"line_number":28,"context_line":"from oslo.messaging._drivers import matchmaker_redis"},{"line_number":29,"context_line":"from oslo.messaging._drivers import matchmaker_ring"},{"line_number":30,"context_line":"from oslo.messaging._drivers.protocols.amqp import driver"},{"line_number":31,"context_line":"from oslo.messaging._executors import impl_eventlet"},{"line_number":32,"context_line":"from oslo.messaging.notify import notifier"},{"line_number":33,"context_line":"from oslo.messaging.rpc import client"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_1a9c9a0e","line":30,"in_reply_to":"fa98f980_7365f6b3","updated":"2014-09-04 18:39:12.000000000","message":"For now I\u0027ve changed it to import driver as \u0027amqp1_driver\u0027.  I\u0027d like to follow up with a patch to have amqp just export the options directly, eg:\n\nfrom olso.messaging._drivers.protocols.amqp import amqp1_opts","commit_id":"55b22631d90859f84e38288c472452a50d35b0d2"}],"test-requirements.txt":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"595455f3c7b2720a92aeb674d1ad8ef7a7911287","unresolved":false,"context_lines":[{"line_number":15,"context_line":"qpid-python"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# AMQP 1.0 support"},{"line_number":18,"context_line":"pyngus"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# when we can require tox\u003e\u003d 1.4, this can go into tox.ini:"},{"line_number":21,"context_line":"#  [testenv:cover]"}],"source_content_type":"text/plain","patch_set":10,"id":"baada198_2c92809f","line":18,"updated":"2014-07-02 11:52:57.000000000","message":"Until proton is available on PyPI, let\u0027s add:\n\n [testenv:proton]\n # Install \u003e\u003d0.7 proton python package (python-qpid-proton on Fedora)\n sitepackages \u003d True\n\nto tox.init so people can do:\n\n  $\u003e tox -e proton\n\nto run the tests so long as they have python-qpid-proton installed","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":15,"context_line":"qpid-python"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"# AMQP 1.0 support"},{"line_number":18,"context_line":"pyngus"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"# when we can require tox\u003e\u003d 1.4, this can go into tox.ini:"},{"line_number":21,"context_line":"#  [testenv:cover]"}],"source_content_type":"text/plain","patch_set":10,"id":"baada198_d9de0811","line":18,"in_reply_to":"baada198_2c92809f","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"}],"tests/test_amqp_driver.py":[{"author":{"_account_id":6159,"name":"Flavio Percoco Premoli","display_name":"flaper87","email":"flavio.percoco@flyrlabs.com","username":"flaper87"},"change_message_id":"4c3653beb05c5b3b8741cee5f351675d437cc54a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":10,"id":"dab895d6_67bcd06d","line":1,"updated":"2014-07-02 11:17:58.000000000","message":"Copyright (C) 2014 Red Hat, Inc.","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"},{"author":{"_account_id":8770,"name":"Ken Giusti","email":"kgiusti@gmail.com","username":"kgiusti"},"change_message_id":"293579aadc7d3d902ac3d93d49536e1f814fd4f2","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_39ec64c7","line":1,"in_reply_to":"dab895d6_67bcd06d","updated":"2014-07-02 20:57:20.000000000","message":"Done","commit_id":"e5b959de6a5743ce12c84489ccb97bcd9d0679c0"}]}
