[Updated] D9210: pycompat: update comment about unnamedtempfile

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu Oct 15 12:38:55 UTC 2020


Closed by commit rHGd1072cba8aff: pycompat: update comment about unnamedtempfile (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D9210?vs=23211&id=23220

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D9210/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D9210

AFFECTED FILES
  mercurial/pycompat.py

CHANGE DETAILS

diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py
--- a/mercurial/pycompat.py
+++ b/mercurial/pycompat.py
@@ -506,7 +506,8 @@
     return tempfile.mkstemp(suffix, prefix, dir)
 
 
-# mode must include 'b'ytes as encoding= is not supported
+# NamedTemporaryFile does not support an "encoding=" argument on python2.
+# This wrapper file are always open in byte mode.
 def namedtempfile(
     mode=b'w+b', bufsize=-1, suffix=b'', prefix=b'tmp', dir=None, delete=True
 ):



To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20201015/e8500000/attachment-0002.html>


More information about the Mercurial-patches mailing list