Skip to content
Snippets Groups Projects
Commit 38fc6927 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

compat: remove a few leftover checks for Python 2

parent 9e7a0ce4
No related branches found
No related tags found
1 merge request!128Stylistic issues
Pipeline #28458 passed
......@@ -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
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment