)]}'
{"swift/obj/diskfile.py":[{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"bf1f19f7502309b3ac33c62c5275288dcfa715ea","unresolved":false,"context_lines":[{"line_number":679,"context_line":"        :param metadata: dictionary of metadata to be associated with the"},{"line_number":680,"context_line":"                         object"},{"line_number":681,"context_line":"        \"\"\""},{"line_number":682,"context_line":"        if not self._tmppath:"},{"line_number":683,"context_line":"            raise ValueError(\"tmppath is unusable.\")"},{"line_number":684,"context_line":"        timestamp \u003d normalize_timestamp(metadata[\u0027X-Timestamp\u0027])"},{"line_number":685,"context_line":"        metadata[\u0027name\u0027] \u003d self._name"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9gVg%3D","side":"PARENT","line":682,"updated":"2013-12-10 20:51:05.000000000","message":"Yanked this out because trying to get it covered showed that it is one of many fields that are not checked, so it wasn\u0027t worth keeping this one.","commit_id":"ba5fe5f39e18fe8e1483a3b5851f044fe3358d0b"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"bf1f19f7502309b3ac33c62c5275288dcfa715ea","unresolved":false,"context_lines":[{"line_number":813,"context_line":"                self._suppress_file_closing \u003d False"},{"line_number":814,"context_line":"                try:"},{"line_number":815,"context_line":"                    self.close()"},{"line_number":816,"context_line":"                except DiskFileQuarantined:"},{"line_number":817,"context_line":"                    pass"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    def _drop_cache(self, fd, offset, length):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAATn%2F9gU4%3D","side":"PARENT","line":816,"updated":"2013-12-10 20:51:05.000000000","message":"We don\u0027t need to catch an exception here because the only time they are raised is when used by the auditor.","commit_id":"ba5fe5f39e18fe8e1483a3b5851f044fe3358d0b"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"16070493c69b24ed39733f26fc2f4b8eccdcb1b5","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        :func:`swift.obj.diskfile.DiskFileWriter.write`."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        :param metadata: dictionary of metadata to be associated with the"},{"line_number":680,"context_line":"                         object"},{"line_number":681,"context_line":"        \"\"\""},{"line_number":682,"context_line":"        timestamp \u003d normalize_timestamp(metadata[\u0027X-Timestamp\u0027])"},{"line_number":683,"context_line":"        metadata[\u0027name\u0027] \u003d self._name"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9GA8%3D","line":680,"updated":"2013-12-16 21:52:50.000000000","message":"was this just dead code?","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"483e6a5c9b6efad2e505e2a18bbab3a5608bdd0f","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        :func:`swift.obj.diskfile.DiskFileWriter.write`."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        :param metadata: dictionary of metadata to be associated with the"},{"line_number":680,"context_line":"                         object"},{"line_number":681,"context_line":"        \"\"\""},{"line_number":682,"context_line":"        timestamp \u003d normalize_timestamp(metadata[\u0027X-Timestamp\u0027])"},{"line_number":683,"context_line":"        metadata[\u0027name\u0027] \u003d self._name"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F86qw%3D","line":680,"in_reply_to":"AAAATn%2F9Fsg%3D","updated":"2013-12-18 20:49:29.000000000","message":"Done","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"dc9b3967a43aa044faec9de2926b7bfd5c9f6667","unresolved":false,"context_lines":[{"line_number":677,"context_line":"        :func:`swift.obj.diskfile.DiskFileWriter.write`."},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"        :param metadata: dictionary of metadata to be associated with the"},{"line_number":680,"context_line":"                         object"},{"line_number":681,"context_line":"        \"\"\""},{"line_number":682,"context_line":"        timestamp \u003d normalize_timestamp(metadata[\u0027X-Timestamp\u0027])"},{"line_number":683,"context_line":"        metadata[\u0027name\u0027] \u003d self._name"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9Fsg%3D","line":680,"in_reply_to":"AAAATn%2F9GA8%3D","updated":"2013-12-16 22:06:06.000000000","message":"Do you mean for the removal of the self._tmpath check?  If so, I tried to answer that in the commit message.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"16070493c69b24ed39733f26fc2f4b8eccdcb1b5","unresolved":false,"context_lines":[{"line_number":809,"context_line":"                    yield chunk"},{"line_number":810,"context_line":"            finally:"},{"line_number":811,"context_line":"                self._suppress_file_closing \u003d False"},{"line_number":812,"context_line":"                self.close()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    def _drop_cache(self, fd, offset, length):"},{"line_number":815,"context_line":"        \"\"\"Method for no-oping buffer cache drop method.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9GAo%3D","line":812,"updated":"2013-12-16 21:52:50.000000000","message":"why is the try/except no longer needed?","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"483e6a5c9b6efad2e505e2a18bbab3a5608bdd0f","unresolved":false,"context_lines":[{"line_number":809,"context_line":"                    yield chunk"},{"line_number":810,"context_line":"            finally:"},{"line_number":811,"context_line":"                self._suppress_file_closing \u003d False"},{"line_number":812,"context_line":"                self.close()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    def _drop_cache(self, fd, offset, length):"},{"line_number":815,"context_line":"        \"\"\"Method for no-oping buffer cache drop method.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F86qs%3D","line":812,"in_reply_to":"AAAATn%2F9Frs%3D","updated":"2013-12-18 20:49:29.000000000","message":"Done","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"dc9b3967a43aa044faec9de2926b7bfd5c9f6667","unresolved":false,"context_lines":[{"line_number":809,"context_line":"                    yield chunk"},{"line_number":810,"context_line":"            finally:"},{"line_number":811,"context_line":"                self._suppress_file_closing \u003d False"},{"line_number":812,"context_line":"                self.close()"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"    def _drop_cache(self, fd, offset, length):"},{"line_number":815,"context_line":"        \"\"\"Method for no-oping buffer cache drop method.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9Frs%3D","line":812,"in_reply_to":"AAAATn%2F9GAo%3D","updated":"2013-12-16 22:06:06.000000000","message":"Hopefully answered in the commit message, but basically, there is no way for the close method to raise a quarantine exception here because by nature the kind of quarantine checks raise by the code require entire file reads, and only the auditor asks for quarantine checks as exceptions and never reads ranges.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"}],"test/unit/obj/test_diskfile.py":[{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"16070493c69b24ed39733f26fc2f4b8eccdcb1b5","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            # one directly from hash_suffix() itself, but then we want to fail"},{"line_number":183,"context_line":"            # the next call to os.listdir() which is from"},{"line_number":184,"context_line":"            # hash_cleanup_listdir()"},{"line_number":185,"context_line":"            if state[0] \u003d\u003d 1:"},{"line_number":186,"context_line":"                raise OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":187,"context_line":"            state[0] \u003d 1"},{"line_number":188,"context_line":"            return orig_os_listdir(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9F%2FI%3D","line":185,"updated":"2013-12-16 21:52:50.000000000","message":"python question:  why the brackets and not just the var name?  its just a flag right?","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"56d9c14f29bf7186759f7798efd4095a793d1bee","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            # one directly from hash_suffix() itself, but then we want to fail"},{"line_number":183,"context_line":"            # the next call to os.listdir() which is from"},{"line_number":184,"context_line":"            # hash_cleanup_listdir()"},{"line_number":185,"context_line":"            if state[0] \u003d\u003d 1:"},{"line_number":186,"context_line":"                raise OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":187,"context_line":"            state[0] \u003d 1"},{"line_number":188,"context_line":"            return orig_os_listdir(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F86cQ%3D","line":185,"in_reply_to":"AAAATn%2F86lk%3D","updated":"2013-12-18 21:34:15.000000000","message":"Try changing state to \"state \u003d 0\" and the check to be \"if state \u003d\u003d 1\" and see how it behaves (and change the assignment below to be state \u003d 1).  Once state becomes an integer under Python 2 to you\u0027ll get an UnboundLocalError.\n\nSee http://stackoverflow.com/questions/13857/can-you-explain-closures-as-they-relate-to-python, the second and third notes listed.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"dc9b3967a43aa044faec9de2926b7bfd5c9f6667","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            # one directly from hash_suffix() itself, but then we want to fail"},{"line_number":183,"context_line":"            # the next call to os.listdir() which is from"},{"line_number":184,"context_line":"            # hash_cleanup_listdir()"},{"line_number":185,"context_line":"            if state[0] \u003d\u003d 1:"},{"line_number":186,"context_line":"                raise OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":187,"context_line":"            state[0] \u003d 1"},{"line_number":188,"context_line":"            return orig_os_listdir(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9Fq4%3D","line":185,"in_reply_to":"AAAATn%2F9F%2FI%3D","updated":"2013-12-16 22:06:06.000000000","message":"Because the closure is over the state of the value when the function is defined. So state \u003d 0 will always mean that on entrance to this function state is 0. By using a list, state is always the same list object, which its elements can be modified, and the closure does not cover the entire state of all objects referenced, allowing us to effectively change state between calls.\n\nAt least, that is how I understand this to work. Those more schooled in python might have a better answer.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"483e6a5c9b6efad2e505e2a18bbab3a5608bdd0f","unresolved":false,"context_lines":[{"line_number":182,"context_line":"            # one directly from hash_suffix() itself, but then we want to fail"},{"line_number":183,"context_line":"            # the next call to os.listdir() which is from"},{"line_number":184,"context_line":"            # hash_cleanup_listdir()"},{"line_number":185,"context_line":"            if state[0] \u003d\u003d 1:"},{"line_number":186,"context_line":"                raise OSError(errno.EACCES, os.strerror(errno.EACCES))"},{"line_number":187,"context_line":"            state[0] \u003d 1"},{"line_number":188,"context_line":"            return orig_os_listdir(*args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F86lk%3D","line":185,"in_reply_to":"AAAATn%2F9Fq4%3D","updated":"2013-12-18 20:49:29.000000000","message":"OK, no big deal for this patch of course but I still don\u0027t get it :)  I would have thought you could use a simple number variable and declare it as global - I don\u0027t see how list vs number type has any impact on what you\u0027re using it for","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"16070493c69b24ed39733f26fc2f4b8eccdcb1b5","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        self._orig_tpool_exc \u003d tpool.execute"},{"line_number":762,"context_line":"        tpool.execute \u003d lambda f, *args, **kwargs: f(*args, **kwargs)"},{"line_number":763,"context_line":"        self.conf \u003d dict(devices\u003dself.testdir, mount_check\u003d\u0027false\u0027,"},{"line_number":764,"context_line":"                         keep_cache_size\u003d2 * 1024, mb_per_sync\u003d1)"},{"line_number":765,"context_line":"        self.df_mgr \u003d diskfile.DiskFileManager(self.conf, FakeLogger())"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9F8k%3D","line":764,"updated":"2013-12-16 21:52:50.000000000","message":"don\u0027t immediately see how this increases test coverage?","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"dc9b3967a43aa044faec9de2926b7bfd5c9f6667","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        self._orig_tpool_exc \u003d tpool.execute"},{"line_number":762,"context_line":"        tpool.execute \u003d lambda f, *args, **kwargs: f(*args, **kwargs)"},{"line_number":763,"context_line":"        self.conf \u003d dict(devices\u003dself.testdir, mount_check\u003d\u0027false\u0027,"},{"line_number":764,"context_line":"                         keep_cache_size\u003d2 * 1024, mb_per_sync\u003d1)"},{"line_number":765,"context_line":"        self.df_mgr \u003d diskfile.DiskFileManager(self.conf, FakeLogger())"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9FqU%3D","line":764,"in_reply_to":"AAAATn%2F9F8k%3D","updated":"2013-12-16 22:06:06.000000000","message":"This should get us the fdatasync() calls in DiskWriter.write() method, line 643, since the default is 256MB which most if not all of these tests won\u0027t write.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"483e6a5c9b6efad2e505e2a18bbab3a5608bdd0f","unresolved":false,"context_lines":[{"line_number":761,"context_line":"        self._orig_tpool_exc \u003d tpool.execute"},{"line_number":762,"context_line":"        tpool.execute \u003d lambda f, *args, **kwargs: f(*args, **kwargs)"},{"line_number":763,"context_line":"        self.conf \u003d dict(devices\u003dself.testdir, mount_check\u003d\u0027false\u0027,"},{"line_number":764,"context_line":"                         keep_cache_size\u003d2 * 1024, mb_per_sync\u003d1)"},{"line_number":765,"context_line":"        self.df_mgr \u003d diskfile.DiskFileManager(self.conf, FakeLogger())"},{"line_number":766,"context_line":""},{"line_number":767,"context_line":"    def tearDown(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F86lg%3D","line":764,"in_reply_to":"AAAATn%2F9FqU%3D","updated":"2013-12-18 20:49:29.000000000","message":"Done","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"ee54cb7ab8d00340c77d73b4aad0ec48d0d1a574","unresolved":false,"context_lines":[{"line_number":885,"context_line":"        except DiskFileQuarantined:"},{"line_number":886,"context_line":"            pass"},{"line_number":887,"context_line":"        else:"},{"line_number":888,"context_line":"            self.fail(\"Expected a quarantined exception\")"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_disk_file_app_iter_corners(self):"},{"line_number":891,"context_line":"        df \u003d self._create_test_file(\u00271234567890\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9Fb4%3D","line":888,"updated":"2013-12-17 00:27:54.000000000","message":"FWIW:\n\n    self.assertRaises(DiskFileQuarantined, \u0027\u0027.join, reader)\n\nshould do the same thing as this.\n\n(I say this as someone who\u0027s written something like this quite a few times and only figured out the short form very recently)","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":6198,"name":"Peter Portante","email":"peter.a.portante@gmail.com","username":"peter-a-portante"},"change_message_id":"86685363c8346e16526ce8778ff38a4c97d04f10","unresolved":false,"context_lines":[{"line_number":885,"context_line":"        except DiskFileQuarantined:"},{"line_number":886,"context_line":"            pass"},{"line_number":887,"context_line":"        else:"},{"line_number":888,"context_line":"            self.fail(\"Expected a quarantined exception\")"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_disk_file_app_iter_corners(self):"},{"line_number":891,"context_line":"        df \u003d self._create_test_file(\u00271234567890\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9EgA%3D","line":888,"in_reply_to":"AAAATn%2F9Fb4%3D","updated":"2013-12-17 03:40:15.000000000","message":"Done!\n\nAnd thanks for pointing that out. I decided to modify the others that I could find as well.","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"16070493c69b24ed39733f26fc2f4b8eccdcb1b5","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"            except DiskFileQuarantined as err:"},{"line_number":1203,"context_line":"                if not open_exc:"},{"line_number":1204,"context_line":"                    self.fail("},{"line_number":1205,"context_line":"                        \"Unexpected DiskFileQuarantine raised: %r\" % err)"},{"line_number":1206,"context_line":"                return"},{"line_number":1207,"context_line":"            except DiskFileCollision as err:"},{"line_number":1208,"context_line":"                if not open_collision:"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAATn%2F9FuE%3D","line":1205,"updated":"2013-12-16 21:52:50.000000000","message":"wow, good eye!","commit_id":"1ce466ac74eaae1ecff8092f0c4e4c3e65e651bc"}]}
