Mercurial > public > mercurial-scm > hg-stable
changeset 52392:fca7d38e040b
util: stop using the `pycompat.open()` shim
It looks like we don't actually need this leftover from the py2 days.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 04 Dec 2024 19:50:32 -0500 |
parents | 3f0cf7bb3086 |
children | 07a5a249faf8 |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Wed Dec 04 23:31:46 2024 +0100 +++ b/mercurial/util.py Wed Dec 04 19:50:32 2024 -0500 @@ -57,9 +57,6 @@ # noinspection PyPackageRequirements import attr -from .pycompat import ( - open, -) from hgdemandimport import tracing from . import ( encoding, @@ -2754,17 +2751,17 @@ def readfile(path: bytes) -> bytes: - with open(path, b'rb') as fp: + with open(path, 'rb') as fp: return fp.read() def writefile(path: bytes, text: bytes) -> None: - with open(path, b'wb') as fp: + with open(path, 'wb') as fp: fp.write(text) def appendfile(path: bytes, text: bytes) -> None: - with open(path, b'ab') as fp: + with open(path, 'ab') as fp: fp.write(text)