diff -r b39958d6b81b -r aac4be30e250 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/debugcommands.py Sat May 26 12:14:04 2018 +0900 @@ -1142,7 +1142,7 @@ opts = pycompat.byteskwargs(opts) def writetemp(contents): - (fd, name) = tempfile.mkstemp(prefix="hg-debuginstall-") + (fd, name) = pycompat.mkstemp(prefix="hg-debuginstall-") f = os.fdopen(fd, r"wb") f.write(contents) f.close()