changeset 47178:63286e0886a6

vfs: Fix deprecation warning in Python 3.10 (issue6520) Differential Revision: https://phab.mercurial-scm.org/D10710
author Karthikeyan Singaravelan <tir.karthi@gmail.com>
date Fri, 14 May 2021 10:01:29 +0000
parents 5d5abfdc32d8
children 6f976d54946c
files mercurial/vfs.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/vfs.py	Wed May 12 10:24:17 2021 +0200
+++ b/mercurial/vfs.py	Fri May 14 10:01:29 2021 +0000
@@ -307,7 +307,7 @@
         # multiple instances puts us at risk of running out of file descriptors
         # only allow to use backgroundfilecloser when in main thread.
         if not isinstance(
-            threading.currentThread(),
+            threading.current_thread(),
             threading._MainThread,  # pytype: disable=module-attr
         ):
             yield
@@ -483,7 +483,7 @@
             fp = checkambigatclosing(fp)
 
         if backgroundclose and isinstance(
-            threading.currentThread(),
+            threading.current_thread(),
             threading._MainThread,  # pytype: disable=module-attr
         ):
             if (