This is an automated email from the git hooks/post-receive script.
atagar pushed a commit to branch master in repository stem.
The following commit(s) were added to refs/heads/master by this push: new 5e481997 Use daemon attribute instead of deprecated setDaemon 5e481997 is described below
commit 5e481997e4761445f2459b83eb2fad803d8d1cc7 Author: Knock Knock Who 101834529+KnockKnockWho@users.noreply.github.com AuthorDate: Tue Mar 29 23:57:37 2022 +0200
Use daemon attribute instead of deprecated setDaemon --- docs/_static/example/fibonacci_threaded.py | 2 +- stem/connection.py | 2 +- stem/control.py | 2 +- stem/util/test_tools.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/_static/example/fibonacci_threaded.py b/docs/_static/example/fibonacci_threaded.py index 9570f855..1bc776ee 100644 --- a/docs/_static/example/fibonacci_threaded.py +++ b/docs/_static/example/fibonacci_threaded.py @@ -16,7 +16,7 @@ def main():
for i in range(4): t = threading.Thread(target = fibonacci, args = (35,)) - t.setDaemon(True) + t.daemon = True t.start()
threads.append(t) diff --git a/stem/connection.py b/stem/connection.py index 005949ef..01c38eab 100644 --- a/stem/connection.py +++ b/stem/connection.py @@ -278,7 +278,7 @@ def connect(control_port: Tuple[str, Union[str, int]] = ('127.0.0.1', 'default')
loop = asyncio.new_event_loop() loop_thread = threading.Thread(target = loop.run_forever, name = 'asyncio') - loop_thread.setDaemon(True) + loop_thread.daemon = True loop_thread.start()
try: diff --git a/stem/control.py b/stem/control.py index 159b2046..b9e0db24 100644 --- a/stem/control.py +++ b/stem/control.py @@ -964,7 +964,7 @@ class BaseController(Synchronous): args = (self, state, change_timestamp)
notice_thread = threading.Thread(target = listener, args = args, name = '%s notification' % state) - notice_thread.setDaemon(True) + notice_thread.daemon = True notice_thread.start() self._state_change_threads.append(notice_thread) else: diff --git a/stem/util/test_tools.py b/stem/util/test_tools.py index 7343e674..29a8dc44 100644 --- a/stem/util/test_tools.py +++ b/stem/util/test_tools.py @@ -173,7 +173,7 @@ class AsyncTest(object): name = 'Background test of %s' % self.name, )
- self._process.setDaemon(True) + self._process.daemon = True else: self._process = multiprocessing.Process(target = _wrapper, args = (child_pipe, self._runner, self._runner_args))