From dd3b00d700ce7813f582609b3267afbb6589e1d6 Mon Sep 17 00:00:00 2001 From: Karthikeyan Singaravelan Date: Sun, 26 Apr 2020 06:25:09 +0000 Subject: [PATCH] Use is_alive in favour of isAlive for Python 3.9 compatibility. --- pulsar/managers/queued.py | 2 +- pulsar/managers/stateful.py | 2 +- pulsar/messaging/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pulsar/managers/queued.py b/pulsar/managers/queued.py index 688392fd..8ce5e38f 100644 --- a/pulsar/managers/queued.py +++ b/pulsar/managers/queued.py @@ -71,7 +71,7 @@ def shutdown(self, timeout=None): self.work_queue.put((STOP_SIGNAL, None)) for worker in self.work_threads: worker.join(timeout) - if worker.isAlive(): + if worker.is_alive(): log.warn("Failed to stop worker thread [%s]" % worker) def run_next(self): diff --git a/pulsar/managers/stateful.py b/pulsar/managers/stateful.py index beaf781e..1ed73cfe 100644 --- a/pulsar/managers/stateful.py +++ b/pulsar/managers/stateful.py @@ -342,7 +342,7 @@ def __init__(self, stateful_manager): def shutdown(self, timeout=None): self.active = False self.thread.join(timeout) - if self.thread.isAlive(): + if self.thread.is_alive(): log.warn("Failed to join monitor thread [%s]" % self.thread) def _run(self): diff --git a/pulsar/messaging/__init__.py b/pulsar/messaging/__init__.py index 67d1a6d3..3ac36fcd 100644 --- a/pulsar/messaging/__init__.py +++ b/pulsar/messaging/__init__.py @@ -39,7 +39,7 @@ def __nonzero__(self): def join(self, timeout=None): for t in self.threads: t.join(timeout) - if t.isAlive(): + if t.is_alive(): log.warn("Failed to join thread [%s]." % t)