)]}'
{"oslo_utils/fileutils.py":[{"author":{"_account_id":14758,"name":"Rajath Agasthya","email":"rajagast@cisco.com","username":"rajathagasthya"},"change_message_id":"36e0ccc9d8aa226dbfcbad4fca43e62d0abbfb3b","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    return path"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def last_bytes(file_like_object, num):"},{"line_number":109,"context_line":"    \"\"\"Return num bytes from the end of the file, and remaining byte count."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    :param file_like_object: The file to read"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_587b087a","line":108,"range":{"start_line":108,"start_character":15,"end_line":108,"end_character":31},"updated":"2017-08-14 17:56:02.000000000","message":"How about just having a path here and you can get the file like object inside this method? Makes it easier for the user to just pass the path.","commit_id":"e12061f2f1c0e1fb22bbacd6a137b010924a1bd4"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"c249ee82960069ec0f5ee05fec91942348d6c113","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            else:"},{"line_number":148,"context_line":"                raise"},{"line_number":149,"context_line":"        remaining \u003d fp.tell()"},{"line_number":150,"context_line":"        return (fp.read(), remaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_2e8e3d2e","line":150,"updated":"2017-10-30 20:17:45.000000000","message":"The value for remaining is confusing. It is computed before the read call, so it isn\u0027t telling us how much remains to be read but how much we are about to read and return. We should call that something else.","commit_id":"388adfcddc00136dfa96e6f215cb2f5affe6583d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"e56907efad00a206a2ca23776363d671bbd15ff2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            else:"},{"line_number":148,"context_line":"                raise"},{"line_number":149,"context_line":"        remaining \u003d fp.tell()"},{"line_number":150,"context_line":"        return (fp.read(), remaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"df87a7cf_90107d50","line":150,"in_reply_to":"3f4b6375_2e8e3d2e","updated":"2017-12-18 14:19:03.000000000","message":"Not sure get your point,\n\nremaining means how much we still have after we read last num bytes. For example a file test.txt with content as follow:\n\n\"12345678\"\nlast_bytes(\u0027test.txt\u0027, 2) returns (\"78\", 6)\n6 is the remaining number of bytes after we read last 2 bytes of this file.","commit_id":"388adfcddc00136dfa96e6f215cb2f5affe6583d"},{"author":{"_account_id":9796,"name":"ChangBo Guo","email":"glongwave@gmail.com","username":"gcb"},"change_message_id":"3acf988b99fc822a6db4c573c01406f5e9feabcd","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            else:"},{"line_number":148,"context_line":"                raise"},{"line_number":149,"context_line":"        remaining \u003d fp.tell()"},{"line_number":150,"context_line":"        return (fp.read(), remaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_6a873611","line":150,"in_reply_to":"bf8cb3f7_74871b11","updated":"2017-12-27 02:44:16.000000000","message":"agree, will update soon, thanks","commit_id":"388adfcddc00136dfa96e6f215cb2f5affe6583d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"6a244da099424c191968fc9ee8cb78372ba2bde8","unresolved":false,"context_lines":[{"line_number":147,"context_line":"            else:"},{"line_number":148,"context_line":"                raise"},{"line_number":149,"context_line":"        remaining \u003d fp.tell()"},{"line_number":150,"context_line":"        return (fp.read(), remaining)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf8cb3f7_74871b11","line":150,"in_reply_to":"df87a7cf_90107d50","updated":"2017-12-26 22:11:16.000000000","message":"I think I\u0027m just stumbling over the word \"remaining\" itself. Because after moving to -num and then reading num bytes, there are no more bytes to read (we are at the end of the file). The value is telling us how many bytes appear in the file *before* the point at which we were told to start reading. A term like \"unread_bytes\" or \"preceding_bytes\" would be clearer.","commit_id":"388adfcddc00136dfa96e6f215cb2f5affe6583d"}],"oslo_utils/tests/test_fileutils.py":[{"author":{"_account_id":14758,"name":"Rajath Agasthya","email":"rajagast@cisco.com","username":"rajathagasthya"},"change_message_id":"36e0ccc9d8aa226dbfcbad4fca43e62d0abbfb3b","unresolved":false,"context_lines":[{"line_number":211,"context_line":"        self.assertFalse(remaining \u003e 0)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def test_seek_too_far_real_file(self):"},{"line_number":214,"context_line":"        # StringIO doesn\u0027t raise IOError if you see past the start of the file."},{"line_number":215,"context_line":"        with tempfile.TemporaryFile() as flo:"},{"line_number":216,"context_line":"            content \u003d b\u00271234567890\u0027"},{"line_number":217,"context_line":"            flo.write(content)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f436f4f_58f0a8fd","line":214,"range":{"start_line":214,"start_character":27,"end_line":214,"end_character":40},"updated":"2017-08-14 17:56:02.000000000","message":"Maybe another simple test that checks raising of IOError using assertRaises(IOError, ...)?","commit_id":"e12061f2f1c0e1fb22bbacd6a137b010924a1bd4"}]}
