Skip to content

Commit

Permalink
Merge pull request #2570 from tirkarthi/fix-threading
Browse files Browse the repository at this point in the history
Set daemon attribute instead of using setDaemon method that was deprecated in Python 3.10
  • Loading branch information
benoitc committed Oct 14, 2022
2 parents 56c18bc + 927c604 commit c9e754e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gunicorn/reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class Reloader(threading.Thread):
def __init__(self, extra_files=None, interval=1, callback=None):
super().__init__()
self.setDaemon(True)
self.daemon = True
self._extra_files = set(extra_files or ())
self._interval = interval
self._callback = callback
Expand Down Expand Up @@ -74,7 +74,7 @@ class InotifyReloader(threading.Thread):

def __init__(self, extra_files=None, callback=None):
super().__init__()
self.setDaemon(True)
self.daemon = True
self._callback = callback
self._dirs = set()
self._watcher = Inotify()
Expand Down

0 comments on commit c9e754e

Please sign in to comment.