]> git.ipfire.org Git - thirdparty/git.git/commitdiff
git-p4: remove string type aliasing
authorYang Zhao <yang.zhao@skyboxlabs.com>
Fri, 13 Dec 2019 23:52:37 +0000 (15:52 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Jan 2020 20:53:39 +0000 (12:53 -0800)
Now that python2.7 is the minimum required version and we no longer use
the basestring type, it is not necessary to use type aliasing to ensure
python3 compatibility.

Signed-off-by: Yang Zhao <yang.zhao@skyboxlabs.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-p4.py

index 2f177fb43b6dbd1ef49445e71cfc19b4d823d811..153aff16f39eb8b1d8fa1c636d20de055e3d4f54 100755 (executable)
--- a/git-p4.py
+++ b/git-p4.py
@@ -26,22 +26,6 @@ import zlib
 import ctypes
 import errno
 
-# support basestring in python3
-try:
-    unicode = unicode
-except NameError:
-    # 'unicode' is undefined, must be Python 3
-    str = str
-    unicode = str
-    bytes = bytes
-    basestring = (str,bytes)
-else:
-    # 'unicode' exists, must be Python 2
-    str = str
-    unicode = unicode
-    bytes = str
-    basestring = basestring
-
 verbose = False
 
 # Only labels/tags matching this will be imported/exported