)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"fdefe44deab25f59fb71ee7332641e471cf9e0bc","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Replace datetime of time_constraints by aware object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Error occurs in alarm evaluation when timezone in time_constraints is specified,"},{"line_number":10,"context_line":"because astimezone() cannot be applied to a native datetime."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Making datetime to non-native (aware object) will solve the problem."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"baada198_83f26199","line":9,"updated":"2014-07-17 17:20:01.000000000","message":"\u003e80 symbols...","commit_id":"667e4643122761b899a0824662a644ba7253cef8"}],"ceilometer/alarm/evaluator/__init__.py":[{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"e6dbfa55091b3510157da00411921be8d498acc2","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        if not alarm.time_constraints:"},{"line_number":94,"context_line":"            return True"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        now_utc \u003d timeutils.utcnow()"},{"line_number":97,"context_line":"        for tc in alarm.time_constraints:"},{"line_number":98,"context_line":"            tz \u003d pytz.timezone(tc[\u0027timezone\u0027]) if tc[\u0027timezone\u0027] else None"},{"line_number":99,"context_line":"            utc \u003d pytz.timezone(\u0027UTC\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_d640b109","line":96,"updated":"2014-07-17 07:30:34.000000000","message":"Just put this up here, makes it clearer\n \u003e\u003e\u003e now_utc \u003d timeutils.utcnow().replace(tzinfo\u003dpytz.utc)","commit_id":"807b305163ca6b65e33c550cb32b8f1babdd8161"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"7a81099f8d298644939a0e9dbe10ca2dbd3a20d3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        if not alarm.time_constraints:"},{"line_number":94,"context_line":"            return True"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"        now_utc \u003d timeutils.utcnow()"},{"line_number":97,"context_line":"        for tc in alarm.time_constraints:"},{"line_number":98,"context_line":"            tz \u003d pytz.timezone(tc[\u0027timezone\u0027]) if tc[\u0027timezone\u0027] else None"},{"line_number":99,"context_line":"            utc \u003d pytz.timezone(\u0027UTC\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_8c438512","line":96,"in_reply_to":"baada198_d640b109","updated":"2014-07-17 11:01:54.000000000","message":"Done.","commit_id":"807b305163ca6b65e33c550cb32b8f1babdd8161"}],"ceilometer/tests/alarm/evaluator/test_base.py":[{"author":{"_account_id":8052,"name":"Nejc Saje","email":"nejc@saje.info","username":"nsaje"},"change_message_id":"e6dbfa55091b3510157da00411921be8d498acc2","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.assertFalse(cls.within_time_constraint(alarm))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @mock.patch.object(timeutils, \u0027utcnow\u0027)"},{"line_number":122,"context_line":"    def test_base_time_constraints_timezone(self, mock_utcnow):"},{"line_number":123,"context_line":"        alarm \u003d mock.MagicMock()"},{"line_number":124,"context_line":"        alarm.time_constraints \u003d ["},{"line_number":125,"context_line":"            {\u0027name\u0027: \u0027test\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_b62edd40","line":122,"updated":"2014-07-17 07:30:34.000000000","message":"The purpose of this test is to test the timezone handling AND make it obvious to developers as well.\n\n* No need to test it without the timezone parameter, it\u0027s tested in plenty of tests above.\n* Please make it more obvious that the timezones are in effect. Previously, the clarity came from the same \"time\" defined in different timezones (dt_eu, dt_us). Since you\u0027re correct that the time objects need to be native here, make it clear in the constraint definition instead. Can you put \u0027US/Eastern\u0027 in the constraint definition? So when you have a contraint at 11:00 US/Eastern and check it at 11:00 UTC, it shouldn\u0027t work.","commit_id":"807b305163ca6b65e33c550cb32b8f1babdd8161"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"7a81099f8d298644939a0e9dbe10ca2dbd3a20d3","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        self.assertFalse(cls.within_time_constraint(alarm))"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    @mock.patch.object(timeutils, \u0027utcnow\u0027)"},{"line_number":122,"context_line":"    def test_base_time_constraints_timezone(self, mock_utcnow):"},{"line_number":123,"context_line":"        alarm \u003d mock.MagicMock()"},{"line_number":124,"context_line":"        alarm.time_constraints \u003d ["},{"line_number":125,"context_line":"            {\u0027name\u0027: \u0027test\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"baada198_ec5321e0","line":122,"in_reply_to":"baada198_b62edd40","updated":"2014-07-17 11:01:54.000000000","message":"As you say, the purpose of the test is unclear. \n\nI\u0027ve fixed.","commit_id":"807b305163ca6b65e33c550cb32b8f1babdd8161"}]}
