summaryrefslogtreecommitdiff
path: root/src/virtualenv/create/debug.py
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2023-04-19 16:05:21 -0700
committerGitHub <noreply@github.com>2023-04-19 16:05:21 -0700
commit04af5026d8eff9ab34cd6f4a47e2f9de4f10a25c (patch)
tree7a7beb20e885285b6838f75db5c647a4d20317fc /src/virtualenv/create/debug.py
parentcdd7eb129e5a31b5ff6779f00bc7621908962626 (diff)
downloadvirtualenv-04af5026d8eff9ab34cd6f4a47e2f9de4f10a25c.tar.gz
Drop Python 2 support (#2548)
Diffstat (limited to 'src/virtualenv/create/debug.py')
-rw-r--r--src/virtualenv/create/debug.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/virtualenv/create/debug.py b/src/virtualenv/create/debug.py
index 583d999..a922fb1 100644
--- a/src/virtualenv/create/debug.py
+++ b/src/virtualenv/create/debug.py
@@ -1,7 +1,7 @@
"""Inspect a target Python interpreter virtual environment wise"""
-import sys # built-in
+from __future__ import annotations
-PYPY2_WIN = hasattr(sys, "pypy_version_info") and sys.platform != "win32" and sys.version_info[0] == 2
+import sys # built-in
def encode_path(value):
@@ -12,7 +12,7 @@ def encode_path(value):
value = repr(value)
else:
value = repr(type(value))
- if isinstance(value, bytes) and not PYPY2_WIN:
+ if isinstance(value, bytes):
value = value.decode(sys.getfilesystemencoding())
return value