changeset 52399:89126d55e18c

extensions: stop using the `pycompat.open()` shim
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 04 Dec 2024 20:57:35 -0500
parents c9baa3541b20
children 9746e618c151
files mercurial/extensions.py
diffstat 1 files changed, 2 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/extensions.py	Wed Dec 04 20:54:35 2024 -0500
+++ b/mercurial/extensions.py	Wed Dec 04 20:57:35 2024 -0500
@@ -19,9 +19,6 @@
     _,
     gettext,
 )
-from .pycompat import (
-    open,
-)
 
 from . import (
     cmdutil,
@@ -805,7 +802,7 @@
 def _disabledhelp(path):
     '''retrieve help synopsis of a disabled extension (without importing)'''
     try:
-        with open(path, b'rb') as src:
+        with open(path, 'rb') as src:
             doc = _moduledoc(src)
     except IOError:
         return
@@ -888,7 +885,7 @@
 
     This may raise IOError or SyntaxError.
     """
-    with open(path, b'rb') as src:
+    with open(path, 'rb') as src:
         root = ast.parse(src.read(), path)
     cmdtable = {}