changeset 52417:7a5b026c88df

releasenotes: stop using the `pycompat.open()` shim
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 05 Dec 2024 12:49:02 -0500
parents d075b300504b
children 6856d88410b2
files hgext/releasenotes.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/releasenotes.py	Thu Dec 05 12:48:21 2024 -0500
+++ b/hgext/releasenotes.py	Thu Dec 05 12:49:02 2024 -0500
@@ -17,7 +17,6 @@
 import re
 
 from mercurial.i18n import _
-from mercurial.pycompat import open
 from mercurial.node import hex
 from mercurial import (
     cmdutil,
@@ -684,14 +683,14 @@
         return ui.write(serializenotes(sections, incoming))
 
     try:
-        with open(file_, b'rb') as fh:
+        with open(file_, 'rb') as fh:
             notes = parsereleasenotesfile(sections, fh.read())
     except FileNotFoundError:
         notes = parsedreleasenotes()
 
     notes.merge(ui, incoming)
 
-    with open(file_, b'wb') as fh:
+    with open(file_, 'wb') as fh:
         fh.write(serializenotes(sections, notes))
 
 
@@ -701,7 +700,7 @@
     if path == b'-':
         text = procutil.stdin.read()
     else:
-        with open(path, b'rb') as fh:
+        with open(path, 'rb') as fh:
             text = fh.read()
 
     sections = releasenotessections(ui, repo)