]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/io.py
Drop support for python 2
[bup.git] / lib / bup / io.py
index a384f1007e5d5f0452d646633a658b01b1dad9f0..79a6d83d5468c0e026a53415ce5dd91bf5d9bafc 100644 (file)
@@ -1,27 +1,16 @@
 
-from __future__ import absolute_import, print_function
 import mmap as py_mmap
 
-from bup import compat
 from bup.compat import pending_raise
 
 
-if compat.py_maj > 2:
-    def byte_stream(file):
-        return file.buffer
+def byte_stream(file):
+    return file.buffer
 
-    def path_msg(x):
-        """Return a string representation of a path."""
-        # FIXME: configurability (might git-config quotePath be involved?)
-        return x.decode(errors='backslashreplace')
-else:
-    def byte_stream(file):
-        return file
-
-    def path_msg(x):
-        """Return a string representation of a path."""
-        # FIXME: configurability (might git-config quotePath be involved?)
-        return x
+def path_msg(x):
+    """Return a string representation of a path."""
+    # FIXME: configurability (might git-config quotePath be involved?)
+    return x.decode(errors='backslashreplace')
 
 
 assert not hasattr(py_mmap.mmap, '__del__')