)]}'
{"monasca_common/kafka/consumer.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"3ca1d4d864163499e74ba2e2a9c7bd9bdf16ce93","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import kafka.common"},{"line_number":23,"context_line":"import kafka.consumer"},{"line_number":24,"context_line":"from kazoo import client"},{"line_number":25,"context_line":"from kazoo.recipe import partitioner"},{"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":4,"id":"9abb7d3a_4d01c769","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":36},"updated":"2016-05-31 23:19:37.000000000","message":"I\u0027m not real fond of this sort of import.  I know you\u0027re following a rule that\u0027s somewhere in the pep8, flake8, or hacking stack.  Could you point me to the particular rule we were ignoring before?  I\u0027d like to see the argument in favor of doing it this way.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"e82168aa64c2c3567f5e358068b216f8dd51224f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import kafka.common"},{"line_number":23,"context_line":"import kafka.consumer"},{"line_number":24,"context_line":"from kazoo import client"},{"line_number":25,"context_line":"from kazoo.recipe import partitioner"},{"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":4,"id":"9abb7d3a_79d0c4f6","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":36},"in_reply_to":"9abb7d3a_4d01c769","updated":"2016-06-01 06:54:10.000000000","message":"The previous import style broke rule H302 - import only modules. I tried to find an explanation of this rule, but without success.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"064987d8f957afce425f7911bb054c7ee206cbee","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import kafka.common"},{"line_number":23,"context_line":"import kafka.consumer"},{"line_number":24,"context_line":"from kazoo import client"},{"line_number":25,"context_line":"from kazoo.recipe import partitioner"},{"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":4,"id":"7aa08908_a83567f8","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":36},"in_reply_to":"9abb7d3a_5eebb0b0","updated":"2016-06-04 09:27:43.000000000","message":"You are right. There was a restriction on the version of hacking in test-requirements.txt.\n\nI have removed it (made it compatible with global requirements) and most of the original code passed almost all the pep8 checks. So the change turned out to be quite mininal after all.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"7a917e78a3280f35c3afa604755a1de8c25d8526","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import kafka.common"},{"line_number":23,"context_line":"import kafka.consumer"},{"line_number":24,"context_line":"from kazoo import client"},{"line_number":25,"context_line":"from kazoo.recipe import partitioner"},{"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":4,"id":"9abb7d3a_5eebb0b0","line":25,"range":{"start_line":25,"start_character":0,"end_line":25,"end_character":36},"in_reply_to":"9abb7d3a_79d0c4f6","updated":"2016-06-02 20:38:02.000000000","message":"That rule appears to have been removed in the newer versions of the Hacking library.  Unlocking the constraints on hacking and flake8 will allow us to keep the original imports and still pass the pep8 tox job.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"}],"monasca_common/tests/test_kafka.py":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"aa60d1cfded4ab8d3964a77022641e3aa02d74f1","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.producer.send_messages.assert_called_once_with("},{"line_number":55,"context_line":"            topic, key, *messages)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @mock.patch(\u0027time.time\u0027)"},{"line_number":58,"context_line":"    def test_kafka_producer_publish_one_message_without_key(self, mock_time):"},{"line_number":59,"context_line":"        topic \u003d FAKE_KAFKA_TOPIC"},{"line_number":60,"context_line":"        message \u003d \u0027not_a_list\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_ceef7285","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":28},"updated":"2016-05-31 22:24:03.000000000","message":"These new mocks seem to be overly broad.  My understanding of this is that any object using time.time, not just the monasca_common.kafka.producer will be effected by this mock.  Is that your understanding?  If it is then this may work in the current case but seems dangerous for future development.  I\u0027d prefer to mock as specifically as possible to avoid unintentionally disabling functionality in objects.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"e82168aa64c2c3567f5e358068b216f8dd51224f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.producer.send_messages.assert_called_once_with("},{"line_number":55,"context_line":"            topic, key, *messages)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    @mock.patch(\u0027time.time\u0027)"},{"line_number":58,"context_line":"    def test_kafka_producer_publish_one_message_without_key(self, mock_time):"},{"line_number":59,"context_line":"        topic \u003d FAKE_KAFKA_TOPIC"},{"line_number":60,"context_line":"        message \u003d \u0027not_a_list\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_b9722c0f","line":57,"range":{"start_line":57,"start_character":0,"end_line":57,"end_character":28},"in_reply_to":"9abb7d3a_ceef7285","updated":"2016-06-01 06:54:10.000000000","message":"You are right, this mocks time outside of monasca_common.kafka.producer. In unit tests I usually try to mock everything that is outside of the module being tested. That way I can be sure that no \"real\" functions (outside of the module) are called so I think this mock would not mess up other modules.\n\nBut I get your point. In a less controlled environment this could cause trouble.\n\nI can change it back, but I prefer not to change (mock) any part of the module that is being tested, unless there is no other way, like in the case of monasca_common.kafka.producer.log.","commit_id":"c4e0a844da2affaf84d964531013a73637d9cafd"}],"test-requirements.txt":[{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"0b50bcd0319e835d0aee06c65495855f44561749","unresolved":false,"context_lines":[{"line_number":3,"context_line":"Babel\u003e\u003d1.3"},{"line_number":4,"context_line":"coverage\u003e\u003d3.6"},{"line_number":5,"context_line":"discover"},{"line_number":6,"context_line":"fixtures\u003e\u003d0.3.14"},{"line_number":7,"context_line":"httplib2\u003e\u003d0.7.5"},{"line_number":8,"context_line":"mock\u003e\u003d1.0"},{"line_number":9,"context_line":"mox\u003e\u003d0.5.3"}],"source_content_type":"text/plain","patch_set":8,"id":"7aa08908_0fb9fecb","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":8},"updated":"2016-06-15 20:22:59.000000000","message":"Don\u0027t we still need a minimum version of flake8 and pep8 here?","commit_id":"c98478df188876fe8d2607d4b2156b2a46ca2f84"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"09e8e37f0a6657c5b95a9c23efdb4e7022dd9e5e","unresolved":false,"context_lines":[{"line_number":3,"context_line":"Babel\u003e\u003d1.3"},{"line_number":4,"context_line":"coverage\u003e\u003d3.6"},{"line_number":5,"context_line":"discover"},{"line_number":6,"context_line":"fixtures\u003e\u003d0.3.14"},{"line_number":7,"context_line":"httplib2\u003e\u003d0.7.5"},{"line_number":8,"context_line":"mock\u003e\u003d1.0"},{"line_number":9,"context_line":"mox\u003e\u003d0.5.3"}],"source_content_type":"text/plain","patch_set":8,"id":"7aa08908_dd1b221b","line":6,"range":{"start_line":6,"start_character":0,"end_line":6,"end_character":8},"in_reply_to":"7aa08908_0fb9fecb","updated":"2016-06-16 06:36:59.000000000","message":"hacking contains them","commit_id":"c98478df188876fe8d2607d4b2156b2a46ca2f84"}]}
