mercurial/posix.py
changeset 48885 a2c59b361e0f
parent 48875 6000f5b25c9b
child 48946 642e31cb55f0
--- a/mercurial/posix.py	Mon Feb 21 10:21:18 2022 -0700
+++ b/mercurial/posix.py	Thu Mar 03 08:04:33 2022 -0800
@@ -59,21 +59,7 @@
 umask = os.umask(0)
 os.umask(umask)
 
-if not pycompat.ispy3:
-
-    def posixfile(name, mode='r', buffering=-1):
-        fp = open(name, mode=mode, buffering=buffering)
-        # The position when opening in append mode is implementation defined, so
-        # make it consistent by always seeking to the end.
-        if 'a' in mode:
-            fp.seek(0, os.SEEK_END)
-        return fp
-
-
-else:
-    # The underlying file object seeks as required in Python 3:
-    # https://github.com/python/cpython/blob/v3.7.3/Modules/_io/fileio.c#L474
-    posixfile = open
+posixfile = open
 
 
 def split(p):