diff mercurial/pure/mpatch.py @ 48873:5aafc3c5bdec

py3: use io.BytesIO directly Previously, pycompat.bytesio and pycompat.stringio referred to io.BytesIO. And util.bytesio and util.stringio aliased the pycompat symbols. This commit switches everything to use io.BytesIO directly. util.bytesio and util.stringio still exist to provide backwards compatibility, as they were the preferred symbols. Differential Revision: https://phab.mercurial-scm.org/D12252
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Feb 2022 15:03:26 -0700
parents d4ba4d51f85f
children 6000f5b25c9b
line wrap: on
line diff
--- a/mercurial/pure/mpatch.py	Sun Feb 20 14:52:40 2022 -0700
+++ b/mercurial/pure/mpatch.py	Sun Feb 20 15:03:26 2022 -0700
@@ -7,11 +7,11 @@
 
 from __future__ import absolute_import
 
+import io
 import struct
 
-from .. import pycompat
 
-stringio = pycompat.bytesio
+stringio = io.BytesIO
 
 
 class mpatchError(Exception):