# HG changeset patch # User Matt Harbison # Date 1733359832 18000 # Node ID fca7d38e040b41b787e2f7937399b25931764bb3 # Parent 3f0cf7bb30869151af092735a066aaa01dc88723 util: stop using the `pycompat.open()` shim It looks like we don't actually need this leftover from the py2 days. diff -r 3f0cf7bb3086 -r fca7d38e040b mercurial/util.py --- 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)