diff options
author | Bernát Gábor <gaborjbernat@gmail.com> | 2023-04-19 16:05:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 16:05:21 -0700 |
commit | 04af5026d8eff9ab34cd6f4a47e2f9de4f10a25c (patch) | |
tree | 7a7beb20e885285b6838f75db5c647a4d20317fc /tasks/make_zipapp.py | |
parent | cdd7eb129e5a31b5ff6779f00bc7621908962626 (diff) | |
download | virtualenv-04af5026d8eff9ab34cd6f4a47e2f9de4f10a25c.tar.gz |
Drop Python 2 support (#2548)
Diffstat (limited to 'tasks/make_zipapp.py')
-rw-r--r-- | tasks/make_zipapp.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tasks/make_zipapp.py b/tasks/make_zipapp.py index 67286f6..5303f41 100644 --- a/tasks/make_zipapp.py +++ b/tasks/make_zipapp.py @@ -1,4 +1,6 @@ """https://docs.python.org/3/library/zipapp.html""" +from __future__ import annotations + import argparse import io import json @@ -20,7 +22,7 @@ from packaging.requirements import Requirement HERE = Path(__file__).parent.absolute() -VERSIONS = [f"3.{i}" for i in range(10, 5, -1)] +VERSIONS = [f"3.{i}" for i in range(10, 6, -1)] def main(): @@ -223,7 +225,13 @@ class WheelDownloader: def run_suppress_output(cmd, stop_print_on_fail=False): - process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) + process = subprocess.Popen( + cmd, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + universal_newlines=True, + encoding="utf-8", + ) out, err = process.communicate() if stop_print_on_fail and process.returncode != 0: print(f"exit with {process.returncode} of {' '.join(quote(i) for i in cmd)}", file=sys.stdout) |