8000 bitbake: fix deprecated threading.Thread.setDaemon · openembedded/bitbake@ea88be5 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea88be5

Browse files
moto-timorpurdie
authored andcommitted
bitbake: fix deprecated threading.Thread.setDaemon
Deprecated in Python 3.10: https://docs.python.org/3/whatsnew/3.10.html#deprecated python/cpython#25174 Fixes warnings like: ...bitbake/lib/bb/ui/uievent.py:68: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead self.t.setDaemon(True) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 parent 60e4c27 commit ea88be5

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

lib/bb/ui/taskexp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ class gtkthread(threading.Thread):
177177
quit = threading.Event()
178178
def __init__(self, shutdown):
179179
threading.Thread.__init__(self)
180-
self.setDaemon(True)
180+
self.daemon = True
181181
self.shutdown = shutdown
182182
if not Gtk.init_check()[0]:
183183
sys.stderr.write("Gtk+ init failed. Make sure DISPLAY variable is set.\n")

lib/bb/ui/uievent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def __init__(self, BBServer, clientinfo=("localhost, 0")):
6565
self.server = server
6666

6767
self.t = threading.Thread()
68-
self.t.setDaemon(True)
68+
self.t.daemon = True
6969
self.t.run = self.startCallbackHandler
7070
self.t.start()
7171

lib/toaster/orm/management/commands/lsupdates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Spinner(threading.Thread):
4040
""" A simple progress spinner to indicate download/parsing is happening"""
4141
def __init__(self, *args, **kwargs):
4242
super(Spinner, self).__init__(*args, **kwargs)
43-
self.setDaemon(True)
43+
self.daemon = True
4444
self.signal = True
4545

4646
def run(self):

lib/toaster/tests/commands/test_runbuilds.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class KillRunbuilds(threading.Thread):
2424
""" Kill the runbuilds process after an amount of time """
2525
def __init__(self, *args, **kwargs):
2626
super(KillRunbuilds, self).__init__(*args, **kwargs)
27-
self.setDaemon(True)
27+
self.daemon = True
2828

2929
def run(self):
3030
time.sleep(5)

0 commit comments

Comments
 (0)
0