Mercurial > hg
changeset 45726:d1072cba8aff
pycompat: update comment about unnamedtempfile
I found the comment clearer. I end up having to think about this for
`TemporaryFile` and I update that one in the process.
Differential Revision: https://phab.mercurial-scm.org/D9210
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Oct 2020 21:47:14 +0200 |
parents | 99b8b73eb622 |
children | d4c4391aa7f2 |
files | mercurial/pycompat.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/pycompat.py Tue Sep 08 18:16:24 2020 +0900 +++ b/mercurial/pycompat.py Wed Oct 14 21:47:14 2020 +0200 @@ -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 ):