# HG changeset patch # User Matt Harbison # Date 2024-12-05 02:15:30 # Node ID bb07b1ca23ebe6bff5a0b7ff26407bf0d9cf088a # Parent 472c30a4df0eb33a8c2fbad03c232bb4f3ce2882 convert: stop using the `pycompat.open()` shim diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -22,7 +22,6 @@ from typing import ( ) from mercurial.i18n import _ -from mercurial.pycompat import open from mercurial import ( encoding, error, @@ -91,7 +90,7 @@ def shlexer( whitespace: Optional[bytes] = None, ): if data is None: - data = open(filepath, b'r', encoding='latin1') + data = open(filepath, 'r', encoding='latin1') else: if filepath is not None: raise error.ProgrammingError( @@ -574,7 +573,7 @@ class mapfile(dict): if not self.path: return try: - fp = open(self.path, b'rb') + fp = open(self.path, 'rb') except FileNotFoundError: return @@ -600,7 +599,7 @@ class mapfile(dict): def __setitem__(self, key, value) -> None: if self.fp is None: try: - self.fp = open(self.path, b'ab') + self.fp = open(self.path, 'ab') except IOError as err: raise error.Abort( _(b'could not open map file %r: %s')