Update eden/scm/edenscm/ext/hgsql.py to resolve 3.10 DeprecationWarning

Summary:
Context
==

When the code being changed is called from a test or program using Python 3.10, deprecation warnings appear.

`DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead`

Python 3.10 is rolling out in fbcode, so it will be nice to have one less DeprecationWarning.

Implementation
==

* sed -i -E 's/(\s+)(.*)\.setDaemon\(True\)/\1\2.daemon = True/'

Reviewed By: muirdm

Differential Revision: D44620221

fbshipit-source-id: b243b5e8947c918f865efa3c46ffdc8c0e530243
This commit is contained in:
Duncan Hill 2023-04-04 09:37:33 -07:00 committed by Facebook GitHub Bot
parent 1dcb7966fc
commit 3081646bb0

View File

@ -1143,7 +1143,7 @@ def wraprepo(repo) -> None:
t = threading.Thread(
target=self.fetchthread, args=(q, abort, fetchstart, fetchend)
)
t.setDaemon(True)
t.daemon = True
try:
t.start()
addentries(self, q, transaction)
@ -2591,7 +2591,7 @@ def _sqlreplay(repo, startrev, endrev) -> None:
t = threading.Thread(
target=repo.fetchthread, args=(q, abort, startrev, endrev)
)
t.setDaemon(True)
t.daemon = True
try:
t.start()
addentries(repo, q, transaction, ignoreexisting=True)
@ -2686,7 +2686,7 @@ def _sqlverify(repo, minrev, maxrev, revlogcache):
q = queue.Queue()
abort = threading.Event()
t = threading.Thread(target=repo.fetchthread, args=(q, abort, minrev, maxrev))
t.setDaemon(True)
t.daemon = True
insql = set()
try: