)]}'
{"tooz/drivers/file.py":[{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"23dc10f42c329b09a3cc32cb140153211e7ff103","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                    return False"},{"line_number":55,"context_line":"            else:"},{"line_number":56,"context_line":"                self.__class__.acquired \u003d True"},{"line_number":57,"context_line":"                return True"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        return _lock()"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_ee93fffd","line":57,"updated":"2015-01-13 19:03:55.000000000","message":"How does this class variable work if multiple paths are locked?\n\nShouldn\u0027t it be a class variable dictionary of paths -\u003e acquired instead of a single bool?","commit_id":"a413b89a751fbba3dc5d86cec42391fdfb6debfd"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"3bffe00466b73007250dcd3e18b1e7c3dadf3625","unresolved":false,"context_lines":[{"line_number":54,"context_line":"                    return False"},{"line_number":55,"context_line":"            else:"},{"line_number":56,"context_line":"                self.__class__.acquired \u003d True"},{"line_number":57,"context_line":"                return True"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        return _lock()"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_facba0a1","line":57,"in_reply_to":"3a961159_ee93fffd","updated":"2015-01-14 11:10:33.000000000","message":"LOL FACEPALM","commit_id":"a413b89a751fbba3dc5d86cec42391fdfb6debfd"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"e248382bc001aab19fcdf21b0f84acb7e61276fb","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self._lockdir \u003d parsed_url.path"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def get_lock(self, name):"},{"line_number":106,"context_line":"        path \u003d os.path.join(self._lockdir, name.decode())"},{"line_number":107,"context_line":"        if path not in self.LOCKS:"},{"line_number":108,"context_line":"            # NOTE(jd) Use a temp variable because if we don\u0027t, since it\u0027s a"},{"line_number":109,"context_line":"            # weakvaluedict, it\u0027s going to be collected right away :)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_83369ee5","line":106,"updated":"2015-01-15 00:15:36.000000000","message":"Another idea, should u run this through abspath() so that if people give odd names that are really the same that it gets the same lock; also what about the following issue...\n\n  \u003e\u003e\u003e import os\n  \u003e\u003e\u003e x \u003d \"/tmp\"\n  \u003e\u003e\u003e os.path.join(x, \"../\")\n  \u0027/tmp/../\u0027\n  \u003e\u003e\u003e os.path.abspath(os.path.join(x, \"../\"))\n  \u0027/\u0027\n\nBasically allowing anyone to blow away your `lock_dir` and go anywhere they want; maybe not a concern but might as well mention it...","commit_id":"869cdb06a97f66b7bff1c066c8057df673eedab3"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"244836c7195dca07d6557a4c7f06225171197cfd","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self._lockdir \u003d parsed_url.path"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def get_lock(self, name):"},{"line_number":106,"context_line":"        path \u003d os.path.join(self._lockdir, name.decode())"},{"line_number":107,"context_line":"        if path not in self.LOCKS:"},{"line_number":108,"context_line":"            # NOTE(jd) Use a temp variable because if we don\u0027t, since it\u0027s a"},{"line_number":109,"context_line":"            # weakvaluedict, it\u0027s going to be collected right away :)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_a801b908","line":106,"updated":"2015-01-15 00:13:08.000000000","message":"I\u0027d almost think the following would be better.\n\n path \u003d os.path.join(self._lockdir, name.decode())\n lock \u003d LockClass(path)\n return self.LOCKS.setdefault(path, lock)\n\nThat\u0027s probably more safe against threads and getting removed while this function is ran right?","commit_id":"869cdb06a97f66b7bff1c066c8057df673eedab3"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"d7aa4ce785a4f1da059b118cbf0ca79d34a46962","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        self._lockdir \u003d parsed_url.path"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def get_lock(self, name):"},{"line_number":106,"context_line":"        path \u003d os.path.join(self._lockdir, name.decode())"},{"line_number":107,"context_line":"        if path not in self.LOCKS:"},{"line_number":108,"context_line":"            # NOTE(jd) Use a temp variable because if we don\u0027t, since it\u0027s a"},{"line_number":109,"context_line":"            # weakvaluedict, it\u0027s going to be collected right away :)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_ef59f95b","line":106,"in_reply_to":"3a961159_83369ee5","updated":"2015-01-15 10:01:54.000000000","message":"Good ideas!","commit_id":"869cdb06a97f66b7bff1c066c8057df673eedab3"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"66ca9a6ba5c76e58234543beb24841ee0afba3b4","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        return _lock()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def release(self):"},{"line_number":59,"context_line":"        os.unlink(self.name)"},{"line_number":60,"context_line":"        self.unlock()"},{"line_number":61,"context_line":"        self.lockfile.close()"},{"line_number":62,"context_line":"        self.acquired \u003d False"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a961159_ef94848d","line":59,"updated":"2015-01-15 18:23:22.000000000","message":"Unlink before unlocking? Seems sorta weird no?\n\nPerhaps worth a doc/comment since it seems odd to me to unlink a file (that may/may not have been acquired) before unlocking it (and closing the associated file handle)...","commit_id":"036f1839cb1f9cade04fc03f7074f0807ce80b15"}]}
