)]}'
{"lockfile/byterangelockfile.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    so lock files must be accessed only using this abstraction."},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, path):"},{"line_number":56,"context_line":"        super(_SharedBase, self).__init__(path)"},{"line_number":57,"context_line":"        self.lockfile \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_7f604da5","line":55,"updated":"2014-09-26 21:30:21.000000000","message":"We need to save path as a member, right?","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a6743831bacb361a650d4b601805bfdfaa838512","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    so lock files must be accessed only using this abstraction."},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def __init__(self, path):"},{"line_number":56,"context_line":"        super(_SharedBase, self).__init__(path)"},{"line_number":57,"context_line":"        self.lockfile \u003d None"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_1f258108","line":55,"in_reply_to":"da9df570_7f604da5","updated":"2014-09-26 21:56:05.000000000","message":"Nope, the base class does that for us.\n\nhttps://review.openstack.org/#/c/122253/","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        super(_SharedBase, self).__init__(path)"},{"line_number":57,"context_line":"        self.lockfile \u003d None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def is_locked(self):"},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        Tell whether or not the file is locked."},{"line_number":62,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_5fb9c913","line":59,"updated":"2014-09-26 21:30:21.000000000","message":"We should be able to provide implementations of these two methods.  I\u0027m fine with that as a follow-up, but I wanted to make a note of it.","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a6743831bacb361a650d4b601805bfdfaa838512","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        super(_SharedBase, self).__init__(path)"},{"line_number":57,"context_line":"        self.lockfile \u003d None"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def is_locked(self):"},{"line_number":60,"context_line":"        \"\"\""},{"line_number":61,"context_line":"        Tell whether or not the file is locked."},{"line_number":62,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_9f8091c1","line":59,"in_reply_to":"da9df570_5fb9c913","updated":"2014-09-26 21:56:05.000000000","message":"How is this one done out of curiosity without actually taking a lock on the file itself? If we have to try to acquire the lock on the file just to see if it is locked that seems to defeat the purpose of checking \u0027is_locked\u0027...","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        raise NotImplementedError()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def break_lock(self):"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        Remove a lock.  Useful if a locking thread failed to unlock."},{"line_number":74,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_df44d91c","line":71,"updated":"2014-09-26 21:30:21.000000000","message":"I\u0027m not clear on whether we could do this or not.  We can certainly break locks held by other threads in our process, but I don\u0027t know that we could break another process\u0027s lock.  In any case, another future discussion and not something we need to resolve right now.","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a6743831bacb361a650d4b601805bfdfaa838512","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        raise NotImplementedError()"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def break_lock(self):"},{"line_number":72,"context_line":"        \"\"\""},{"line_number":73,"context_line":"        Remove a lock.  Useful if a locking thread failed to unlock."},{"line_number":74,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_ff6efd2d","line":71,"in_reply_to":"da9df570_df44d91c","updated":"2014-09-26 21:56:05.000000000","message":"Yup, its in the pylockfile base class, so not sure what else to do but leave it alone and raise NotImplementedError.\n\nSee other methods @ https://github.com/openstack/pylockfile/blob/master/lockfile/__init__.py#L157","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"479ef70b12db6bdb8fc4ed69f8750134246afd02","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def __exit__(self, exc_type, exc_val, exc_tb):"},{"line_number":134,"context_line":"        self.release()"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def exists(self):"},{"line_number":137,"context_line":"        return os.path.exists(self.path)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def trylock(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_7b02a53f","line":136,"updated":"2014-09-23 00:13:34.000000000","message":"Do we need this to be public?","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def __exit__(self, exc_type, exc_val, exc_tb):"},{"line_number":134,"context_line":"        self.release()"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    def exists(self):"},{"line_number":137,"context_line":"        return os.path.exists(self.path)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def trylock(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_3f18851d","line":136,"in_reply_to":"da9df570_7b02a53f","updated":"2014-09-26 21:30:21.000000000","message":"If we\u0027re going to provide this at all it probably needs to be public.  I have no idea if anyone actually uses it, so I would lean toward keeping it just in case.  It\u0027s not like it\u0027s a complicated method. :-)","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"479ef70b12db6bdb8fc4ed69f8750134246afd02","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return os.path.exists(self.path)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def trylock(self):"},{"line_number":140,"context_line":"        raise NotImplementedError()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def unlock(self):"},{"line_number":143,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_bb816d91","line":140,"updated":"2014-09-23 00:13:34.000000000","message":"Can this be a private method?","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        return os.path.exists(self.path)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def trylock(self):"},{"line_number":140,"context_line":"        raise NotImplementedError()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def unlock(self):"},{"line_number":143,"context_line":"        raise NotImplementedError()"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_9fda514a","line":140,"in_reply_to":"da9df570_bb816d91","updated":"2014-09-26 21:30:21.000000000","message":"It probably should be.  My only concern would be that it would be a change from the existing lockutils behavior, but honestly this should never have been part of the public api anyway.  This is an implementation detail of acquire().","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"479ef70b12db6bdb8fc4ed69f8750134246afd02","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def trylock(self):"},{"line_number":140,"context_line":"        raise NotImplementedError()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def unlock(self):"},{"line_number":143,"context_line":"        raise NotImplementedError()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_9b74a9d0","line":142,"updated":"2014-09-23 00:13:34.000000000","message":"Can this be a private method?","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def trylock(self):"},{"line_number":140,"context_line":"        raise NotImplementedError()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def unlock(self):"},{"line_number":143,"context_line":"        raise NotImplementedError()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_dfe059fc","line":142,"in_reply_to":"da9df570_2b912c47","updated":"2014-09-26 21:30:21.000000000","message":"I still think it should be private, for the same reasons I gave above on trylock.  Nobody should ever call this directly and if they are they need to stop. :-)","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"85655f8ce9ec5612ff111fa3e9f54a6b19e86cf1","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def trylock(self):"},{"line_number":140,"context_line":"        raise NotImplementedError()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def unlock(self):"},{"line_number":143,"context_line":"        raise NotImplementedError()"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_2b912c47","line":142,"in_reply_to":"da9df570_9b74a9d0","updated":"2014-09-26 16:59:51.000000000","message":"I think it can be an abstract one. Let me do that, the subclasses implement it.","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d09a69ab7cb7d6361e18d794a3cf449e3587f3af","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"if os.name \u003d\u003d \u0027nt\u0027:"},{"line_number":163,"context_line":"    import msvcrt"},{"line_number":164,"context_line":"    ByteRangeLockFile \u003d _WindowsLock"},{"line_number":165,"context_line":"else:"},{"line_number":166,"context_line":"    import fcntl"},{"line_number":167,"context_line":"    ByteRangeLockFile \u003d _FcntlLock"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_5f8b8967","line":164,"updated":"2014-09-26 21:30:21.000000000","message":"I don\u0027t think these are byte range locks.  We\u0027re locking entire files with these.\n\nWe could certainly implement a byte range lock, but this isn\u0027t it. :-)","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"a6743831bacb361a650d4b601805bfdfaa838512","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"if os.name \u003d\u003d \u0027nt\u0027:"},{"line_number":163,"context_line":"    import msvcrt"},{"line_number":164,"context_line":"    ByteRangeLockFile \u003d _WindowsLock"},{"line_number":165,"context_line":"else:"},{"line_number":166,"context_line":"    import fcntl"},{"line_number":167,"context_line":"    ByteRangeLockFile \u003d _FcntlLock"}],"source_content_type":"text/x-python","patch_set":5,"id":"da9df570_3f75e5f9","line":164,"in_reply_to":"da9df570_5f8b8967","updated":"2014-09-26 21:56:05.000000000","message":"Got a preferred name? I\u0027m up for other names ;)\n\nExisting names @ https://github.com/openstack/pylockfile/tree/master/lockfile\n\nSuggestions welcome :)","commit_id":"fa33dde3f0d5d6843b1337a2ae75bddc05930374"}]}
