diff mercurial/vfs.py @ 38197:aac4be30e250

py3: wrap tempfile.mkstemp() to use bytes path This patch just flips the default to use a bytes path on Python 3. ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 26 May 2018 12:14:04 +0900
parents 8fb9985382be
children da2a7d8354b2
line wrap: on
line diff
--- a/mercurial/vfs.py	Thu May 03 18:39:58 2018 +0900
+++ b/mercurial/vfs.py	Sat May 26 12:14:04 2018 +0900
@@ -11,7 +11,6 @@
 import os
 import shutil
 import stat
-import tempfile
 import threading
 
 from .i18n import _
@@ -171,7 +170,7 @@
         return os.mkdir(self.join(path))
 
     def mkstemp(self, suffix='', prefix='tmp', dir=None):
-        fd, name = tempfile.mkstemp(suffix=suffix, prefix=prefix,
+        fd, name = pycompat.mkstemp(suffix=suffix, prefix=prefix,
                                     dir=self.join(dir))
         dname, fname = util.split(name)
         if dir: