)]}'
{"oslo_concurrency/lockutils.py":[{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"35948123f6a32071b2ef63c1cd43c59c9ca64fb8","unresolved":true,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"@contextlib.contextmanager"},{"line_number":224,"context_line":"def lock(name, lock_file_prefix\u003dNone, external\u003dFalse, lock_path\u003dNone,"},{"line_number":225,"context_line":"         do_log\u003dTrue, semaphores\u003dNone, delay\u003d0.01, fair\u003dFalse, blocking\u003dTrue):"},{"line_number":226,"context_line":"    \"\"\"Context based lock"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    This function yields a `threading.Semaphore` instance (if we don\u0027t use"}],"source_content_type":"text/x-python","patch_set":1,"id":"4a89ea3b_1d352be3","line":225,"range":{"start_line":225,"start_character":72,"end_line":225,"end_character":76},"updated":"2021-06-16 12:00:02.000000000","message":"I think that it\u0027s better to set this to `False`. We will avoid unexpected behaviour after lib upgrade. Explicit is better than implicit.\n\nMaybe we could switch to `True` within future openstack series before a \"deprecation\" period of the default value, to let\u0027s users acknowledging these changes and so allowing them to adapt their codes.\n\nThoughts?","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":32845,"name":"Romain Poupin","email":"romain.poupin@gmail.com","username":"rompzep"},"change_message_id":"0da1eba6c4499077cb9acbac8de926378e41bf1c","unresolved":true,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"@contextlib.contextmanager"},{"line_number":224,"context_line":"def lock(name, lock_file_prefix\u003dNone, external\u003dFalse, lock_path\u003dNone,"},{"line_number":225,"context_line":"         do_log\u003dTrue, semaphores\u003dNone, delay\u003d0.01, fair\u003dFalse, blocking\u003dTrue):"},{"line_number":226,"context_line":"    \"\"\"Context based lock"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    This function yields a `threading.Semaphore` instance (if we don\u0027t use"}],"source_content_type":"text/x-python","patch_set":1,"id":"416dc5da_ed52711b","line":225,"range":{"start_line":225,"start_character":72,"end_line":225,"end_character":76},"in_reply_to":"24965fe0_e009a3c5","updated":"2021-06-24 08:28:32.000000000","message":"Indeed, it is precisely to keep the default behavior.","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9f9e31e2eb592e94fdb7ab45b7bde62c0d990355","unresolved":true,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"@contextlib.contextmanager"},{"line_number":224,"context_line":"def lock(name, lock_file_prefix\u003dNone, external\u003dFalse, lock_path\u003dNone,"},{"line_number":225,"context_line":"         do_log\u003dTrue, semaphores\u003dNone, delay\u003d0.01, fair\u003dFalse, blocking\u003dTrue):"},{"line_number":226,"context_line":"    \"\"\"Context based lock"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    This function yields a `threading.Semaphore` instance (if we don\u0027t use"}],"source_content_type":"text/x-python","patch_set":1,"id":"24965fe0_e009a3c5","line":225,"range":{"start_line":225,"start_character":72,"end_line":225,"end_character":76},"in_reply_to":"4a89ea3b_1d352be3","updated":"2021-06-18 14:58:00.000000000","message":"It already defaults to True: https://github.com/harlowja/fasteners/blob/e1764c7c2827a8aef0b0a547fb88a9f576adbe81/fasteners/process_lock.py#L109\n\nThis is just exposing an option provided by fasteners.","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":28522,"name":"Hervé Beraud","email":"herveberaud.pro@gmail.com","username":"hberaud"},"change_message_id":"35948123f6a32071b2ef63c1cd43c59c9ca64fb8","unresolved":true,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"def synchronized(name, lock_file_prefix\u003dNone, external\u003dFalse, lock_path\u003dNone,"},{"line_number":330,"context_line":"                 semaphores\u003dNone, delay\u003d0.01, fair\u003dFalse, blocking\u003dTrue):"},{"line_number":331,"context_line":"    \"\"\"Synchronization decorator."},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    Decorating a method like so::"}],"source_content_type":"text/x-python","patch_set":1,"id":"3ac2f5c5_ff4c73a6","line":330,"range":{"start_line":330,"start_character":67,"end_line":330,"end_character":71},"updated":"2021-06-16 12:00:02.000000000","message":"Same thing","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9f9e31e2eb592e94fdb7ab45b7bde62c0d990355","unresolved":true,"context_lines":[{"line_number":376,"context_line":"                          \u0027\"%(function)%s\"\u0027,"},{"line_number":377,"context_line":"                          {\u0027name\u0027: name,"},{"line_number":378,"context_line":"                           \u0027function\u0027: reflection.get_callable_name(f)})"},{"line_number":379,"context_line":"                pass"},{"line_number":380,"context_line":"            finally:"},{"line_number":381,"context_line":"                t3 \u003d timeutils.now()"},{"line_number":382,"context_line":"                if t2 is None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1067890d_9753e04b","line":379,"updated":"2021-06-18 14:58:00.000000000","message":"pass is not necessary here.","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"9f9e31e2eb592e94fdb7ab45b7bde62c0d990355","unresolved":true,"context_lines":[{"line_number":383,"context_line":"                    held_secs \u003d \"N/A\""},{"line_number":384,"context_line":"                else:"},{"line_number":385,"context_line":"                    held_secs \u003d \"%0.3fs\" % (t3 - t2)"},{"line_number":386,"context_line":"                LOG.debug(\u0027Lock \"%(name)s\" released by \"%(function)s\" :: held \u0027"},{"line_number":387,"context_line":"                          \u0027%(held_secs)s\u0027,"},{"line_number":388,"context_line":"                          {\u0027name\u0027: name,"},{"line_number":389,"context_line":"                           \u0027function\u0027: reflection.get_callable_name(f),"}],"source_content_type":"text/x-python","patch_set":1,"id":"fd461fae_0fc75a4c","line":386,"updated":"2021-06-18 14:58:00.000000000","message":"I don\u0027t love that there\u0027s going to be a \"released\" message even if we never acquired the lock. Maybe we change the behavior here so that if t2 is None we don\u0027t log the release? I\u0027m not sure why it was implemented this way in the first place, but if we never got the lock then the log message doesn\u0027t make sense.","commit_id":"1ea7ddcaaf63f1e1e7383a1586e36432f9311f18"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5c6d0479726e6056d6e470235535f0655b292132","unresolved":true,"context_lines":[{"line_number":275,"context_line":"       Added *do_log* optional parameter."},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    .. versionchanged:: 0.3"},{"line_number":278,"context_line":"       Added *delay* and *semaphores* optional parameters."},{"line_number":279,"context_line":"    \"\"\""},{"line_number":280,"context_line":"    if fair:"},{"line_number":281,"context_line":"        if semaphores is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"29c9de8f_205c7391","line":278,"updated":"2021-10-04 17:05:24.000000000","message":"Could we get a versionchanged line here indicating the new parameter? We probably want one for \u0027fair\u0027 also since that was missed initially","commit_id":"a9ccf0a64deb63e7ea07d232437da797462d8f4b"},{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d4e369e1e79aad641bf45909962f7bb02118978f","unresolved":true,"context_lines":[{"line_number":400,"context_line":"                LOG.debug(\u0027Lock \"%(name)s\" \"%(gotten)s\" by \"%(function)s\" ::\u0027"},{"line_number":401,"context_line":"                          \u0027 held %(held_secs)s\u0027,"},{"line_number":402,"context_line":"                          {\u0027name\u0027: name,"},{"line_number":403,"context_line":"                           \u0027gotten\u0027: \u0027released\u0027 if gotten else \u0027unacquired\u0027,"},{"line_number":404,"context_line":"                           \u0027function\u0027: reflection.get_callable_name(f),"},{"line_number":405,"context_line":"                           \u0027held_secs\u0027: held_secs})"},{"line_number":406,"context_line":"        return inner"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf48a8b1_bc201300","line":403,"updated":"2021-06-24 18:57:22.000000000","message":"Nice, thanks!","commit_id":"a9ccf0a64deb63e7ea07d232437da797462d8f4b"}],"oslo_concurrency/tests/unit/test_lockutils.py":[{"author":{"_account_id":6928,"name":"Ben Nemec","email":"openstack@nemebean.com","username":"bnemec"},"change_message_id":"d4e369e1e79aad641bf45909962f7bb02118978f","unresolved":true,"context_lines":[{"line_number":555,"context_line":"        thread1.start()"},{"line_number":556,"context_line":"        thread1.join()"},{"line_number":557,"context_line":"        thread.join()"},{"line_number":558,"context_line":"        self.assertEqual([\u0027other\u0027, \u0027other\u0027], call_list)"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def test_non_destructive(self):"},{"line_number":561,"context_line":"        lock_file \u003d os.path.join(self.lock_dir, \u0027not-destroyed\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f102482b_88cdbd78","line":558,"updated":"2021-06-24 18:57:22.000000000","message":"It would be good to have a test where the lock times out too.\n\nThat raises another question: Does the blocking parameter have any effect if we don\u0027t also expose the timeout paramater? timeout defaults to None, so I\u0027m thinking that even if we set blocking to False it may wait forever because there\u0027s no timeout.","commit_id":"a9ccf0a64deb63e7ea07d232437da797462d8f4b"},{"author":{"_account_id":32845,"name":"Romain Poupin","email":"romain.poupin@gmail.com","username":"rompzep"},"change_message_id":"d3028ad1bdad9bc291607f881e43156971f1a8d6","unresolved":true,"context_lines":[{"line_number":555,"context_line":"        thread1.start()"},{"line_number":556,"context_line":"        thread1.join()"},{"line_number":557,"context_line":"        thread.join()"},{"line_number":558,"context_line":"        self.assertEqual([\u0027other\u0027, \u0027other\u0027], call_list)"},{"line_number":559,"context_line":""},{"line_number":560,"context_line":"    def test_non_destructive(self):"},{"line_number":561,"context_line":"        lock_file \u003d os.path.join(self.lock_dir, \u0027not-destroyed\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"352afc7f_afe0a371","line":558,"in_reply_to":"f102482b_88cdbd78","updated":"2021-07-08 11:48:11.000000000","message":"Hello,\n\nAccording to the documentation of the lock modules, the timeout parameter has not effect when using non-blocking Locks:\n\nProcess locks (fasteners.InterProcessLock) just ignore this parameter and give up on the first acquisition failure without waiting. Thread locks (Python threading.Lock) forbid it outright (https://docs.python.org/3/library/threading.html#lock-objects).\n\nI checked: it works. Do I always add these tests to make sure?\n\nKind regards","commit_id":"a9ccf0a64deb63e7ea07d232437da797462d8f4b"}]}
