From 4e830d60e7440bc3bb36d6b6bda5d3e20bccb017 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Mon, 31 Jan 2022 00:04:40 -0500 Subject: [PATCH] wxGUI: Thread.setDaemon deprecated --- gui/wxpython/core/gcmd.py | 2 +- gui/wxpython/core/gconsole.py | 2 +- gui/wxpython/core/gthread.py | 2 +- gui/wxpython/gui_core/forms.py | 4 ++-- gui/wxpython/nviz/mapwindow.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gui/wxpython/core/gcmd.py b/gui/wxpython/core/gcmd.py index fd9ed4f8e12..9bea1ee151d 100644 --- a/gui/wxpython/core/gcmd.py +++ b/gui/wxpython/core/gcmd.py @@ -541,7 +541,7 @@ def __init__(self, cmd, env=None, stdin=None, stdout=sys.stdout, stderr=sys.stde self._want_abort = False self.aborted = False - self.setDaemon(True) + self.daemon = True # set message formatting self.message_format = os.getenv("GRASS_MESSAGE_FORMAT") diff --git a/gui/wxpython/core/gconsole.py b/gui/wxpython/core/gconsole.py index 56790203102..96343907313 100644 --- a/gui/wxpython/core/gconsole.py +++ b/gui/wxpython/core/gconsole.py @@ -87,7 +87,7 @@ def __init__(self, receiver, requestQ=None, resultQ=None, **kwds): else: self.resultQ = resultQ - self.setDaemon(True) + self.daemon = True self.requestCmd = None diff --git a/gui/wxpython/core/gthread.py b/gui/wxpython/core/gthread.py index e5f43171c08..bd6bd1a0f3e 100644 --- a/gui/wxpython/core/gthread.py +++ b/gui/wxpython/core/gthread.py @@ -58,7 +58,7 @@ def __init__(self, requestQ=None, resultQ=None, **kwds): else: self.resultQ = resultQ - self.setDaemon(True) + self.daemon = True self.Bind(EVT_CMD_DONE, self.OnDone) self.Bind(EVT_THD_TERMINATE, self.OnTerminate) diff --git a/gui/wxpython/gui_core/forms.py b/gui/wxpython/gui_core/forms.py index df1650e61cc..0bc4831c3db 100644 --- a/gui/wxpython/gui_core/forms.py +++ b/gui/wxpython/gui_core/forms.py @@ -168,7 +168,7 @@ def __init__(self, parent, event, eventId, task): self.event = event self.eventId = eventId self.task = task - self.setDaemon(True) + self.daemon = True # list of functions which updates the dialog self.data = {} @@ -434,7 +434,7 @@ def __init__(self, parent, requestQ, resultQ, **kwds): Thread.__init__(self, **kwds) self.parent = parent # cmdPanel - self.setDaemon(True) + self.daemon = True self.requestQ = requestQ self.resultQ = resultQ diff --git a/gui/wxpython/nviz/mapwindow.py b/gui/wxpython/nviz/mapwindow.py index 1ab0e4ff189..1d2fa895a43 100644 --- a/gui/wxpython/nviz/mapwindow.py +++ b/gui/wxpython/nviz/mapwindow.py @@ -62,7 +62,7 @@ def __init__(self, log, progressbar, window): self._display = None - self.setDaemon(True) + self.daemon = True def run(self): self._display = wxnviz.Nviz(self.log, self.progressbar)