)]}'
{"swift/common/utils.py":[{"author":{"_account_id":9878,"name":"Zack M. Davis","email":"zdavis@swiftstack.com","username":"zackmdavis"},"change_message_id":"a60da7fcc9d2b84da0614fdd1c28ea69f3533f6f","unresolved":false,"context_lines":[{"line_number":856,"context_line":"            return cmp(self.internal, other.internal)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"if six.PY3:"},{"line_number":859,"context_line":"    Timestamp \u003d functools.total_ordering(Timestamp)"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"def normalize_timestamp(timestamp):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_7f99cd6d","line":859,"updated":"2015-10-19 16:28:00.000000000","message":"Python 2.7 has functools.total_ordering and we don\u0027t need to support 2.6 (https://github.com/openstack/swift/blob/master/CHANGELOG#L36), so we should just be able to use the @total_ordering/__eq__/__lt__ approach without checking the version.","commit_id":"b5039ce139467642b984312750e243cb58c122b7"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"e4b5ce02f24eb0821cb123e16d09025a1d8814c8","unresolved":false,"context_lines":[{"line_number":856,"context_line":"            return cmp(self.internal, other.internal)"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"if six.PY3:"},{"line_number":859,"context_line":"    Timestamp \u003d functools.total_ordering(Timestamp)"},{"line_number":860,"context_line":""},{"line_number":861,"context_line":""},{"line_number":862,"context_line":"def normalize_timestamp(timestamp):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a29b11f_94d60bc4","line":859,"in_reply_to":"3a29b11f_7f99cd6d","updated":"2015-10-19 17:06:17.000000000","message":"\"we don\u0027t need to support 2.6\" oh cool.\n\nI didn\u0027t notice that @functools.total_ordering also exists on Python 2.7. I updated my patch.","commit_id":"b5039ce139467642b984312750e243cb58c122b7"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a1c0659bfb9e7c6181e39eba66fbfdea06acf3f3","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            if us \u003e\u003d 1000000:"},{"line_number":822,"context_line":"                t +\u003d 1"},{"line_number":823,"context_line":"                us -\u003d 1000000"},{"line_number":824,"context_line":"            elif us \u003c 0:"},{"line_number":825,"context_line":"                t -\u003d 1"},{"line_number":826,"context_line":"                us +\u003d 1000000"},{"line_number":827,"context_line":"            dt \u003d datetime.datetime.utcfromtimestamp(t)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_d34b1086","line":824,"updated":"2015-10-30 02:42:37.000000000","message":"How is a fraction multiplied by a million becoming negative? Is this defensive programming or I\u0027m missing an obvious corner case here?","commit_id":"78ab41584097a98959b0e776a44eafd79eba42ce"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"f3baadc7f2c8f56264572060b19f18fe424f8da4","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            if us \u003e\u003d 1000000:"},{"line_number":822,"context_line":"                t +\u003d 1"},{"line_number":823,"context_line":"                us -\u003d 1000000"},{"line_number":824,"context_line":"            elif us \u003c 0:"},{"line_number":825,"context_line":"                t -\u003d 1"},{"line_number":826,"context_line":"                us +\u003d 1000000"},{"line_number":827,"context_line":"            dt \u003d datetime.datetime.utcfromtimestamp(t)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_d9056f7a","line":824,"in_reply_to":"1a26ad4f_d34b1086","updated":"2015-10-30 03:56:32.000000000","message":"frac (and so us) can be negative. Example:\n\n \u003e\u003e\u003e frac, t\u003d math.modf(-0.2)\n \u003e\u003e\u003e us\u003dround(frac*1e6)\n \u003e\u003e\u003e us\n -200000","commit_id":"78ab41584097a98959b0e776a44eafd79eba42ce"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"bdcf3a673a913f06127abb2bb8628945965043f6","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            if us \u003e\u003d 1000000:"},{"line_number":822,"context_line":"                t +\u003d 1"},{"line_number":823,"context_line":"                us -\u003d 1000000"},{"line_number":824,"context_line":"            elif us \u003c 0:"},{"line_number":825,"context_line":"                t -\u003d 1"},{"line_number":826,"context_line":"                us +\u003d 1000000"},{"line_number":827,"context_line":"            dt \u003d datetime.datetime.utcfromtimestamp(t)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_d9648f23","line":824,"in_reply_to":"1a26ad4f_d9056f7a","updated":"2015-10-30 04:13:43.000000000","message":"But you\u0027re dealing with dates, not even differences between timestamps. Why are they negative? We support timestamps before 1970?","commit_id":"78ab41584097a98959b0e776a44eafd79eba42ce"},{"author":{"_account_id":9107,"name":"Victor Stinner","email":"vstinner@redhat.com","username":"haypo"},"change_message_id":"aa9064ed8e9dcffca1bb81ea6bb0aaa844286c04","unresolved":false,"context_lines":[{"line_number":821,"context_line":"            if us \u003e\u003d 1000000:"},{"line_number":822,"context_line":"                t +\u003d 1"},{"line_number":823,"context_line":"                us -\u003d 1000000"},{"line_number":824,"context_line":"            elif us \u003c 0:"},{"line_number":825,"context_line":"                t -\u003d 1"},{"line_number":826,"context_line":"                us +\u003d 1000000"},{"line_number":827,"context_line":"            dt \u003d datetime.datetime.utcfromtimestamp(t)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a26ad4f_51acce9f","line":824,"in_reply_to":"1a26ad4f_d9648f23","updated":"2015-10-30 10:05:55.000000000","message":"I didn\u0027t check if Timestamp is used with dates older than 1970. I prefer to keep these 3 lines of code than checking :-)","commit_id":"78ab41584097a98959b0e776a44eafd79eba42ce"}]}
