# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr@gmail.com>
# Date 1625837116 -7200
#      Fri Jul 09 15:25:16 2021 +0200
# Node ID 38fc6927ae1bc1c56c3536c5c79399c7bcf2a447
# Parent  9e7a0ce4eacd16160282e64b829632f0ab178835
compat: remove a few leftover checks for Python 2

diff --git a/hggit/git_handler.py b/hggit/git_handler.py
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -2023,13 +2023,7 @@
                         b"warning: proxy authentication is unsupported\n",
                     )
 
-            if pycompat.ispy3:
-                # urllib3.util.url._encode_invalid_chars() converts the path
-                # back to bytes using the utf-8 codec
-                str_uri = uri.decode('utf-8')
-            else:
-                str_uri = uri
-
+            str_uri = uri.decode('utf-8')
             pwmgr = url.passwordmgr(self.ui, self.ui.httppasswordmgrdb)
 
             # not available in dulwich 0.19
diff --git a/tests/test-doctest.py b/tests/test-doctest.py
--- a/tests/test-doctest.py
+++ b/tests/test-doctest.py
@@ -7,8 +7,6 @@
 import re
 import sys
 
-ispy3 = (sys.version_info[0] >= 3)
-
 # add hggit/ to sys.path
 sys.path.insert(0, os.path.join(os.environ["TESTDIR"], ".."))
 
@@ -35,9 +33,7 @@
 
     # minimal copy of doctest.testmod()
     finder = doctest.DocTestFinder()
-    checker = None
-    if ispy3:
-        checker = py3docchecker()
+    checker = py3docchecker()
     runner = doctest.DocTestRunner(checker=checker, optionflags=optionflags)
     for test in finder.find(mod, name):
         runner.run(test)