We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4ac45c commit 11ec2a3Copy full SHA for 11ec2a3
src/pip/_internal/utils/compat.py
@@ -9,7 +9,7 @@
9
import shutil
10
import sys
11
12
-from pip._vendor.six import PY2, PY3, text_type
+from pip._vendor.six import PY3, text_type
13
from pip._vendor.urllib3.util import IS_PYOPENSSL
14
15
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
@@ -72,9 +72,8 @@
72
# backslash replacement for all versions.
73
def backslashreplace_decode_fn(err):
74
raw_bytes = (err.object[i] for i in range(err.start, err.end))
75
- if PY2:
76
- # Python 2 gave us characters - convert to numeric bytes
77
- raw_bytes = (ord(b) for b in raw_bytes)
+ # Python 2 gave us characters - convert to numeric bytes
+ raw_bytes = (ord(b) for b in raw_bytes)
78
return u"".join(u"\\x%x" % c for c in raw_bytes), err.end
79
codecs.register_error(
80
"backslashreplace_decode",
0 commit comments