mirror of
https://github.com/zulip/zulip.git
synced 2025-10-24 00:23:49 +00:00
python: Replace universal_newlines with text.
This is supported in Python ≥ 3.7. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
fd6d048efd
commit
97e4e9886c
@@ -178,9 +178,7 @@ def try_to_copy_venv(venv_path: str, new_packages: Set[str]) -> bool:
|
||||
venv_python3 = os.path.join(curr_venv_path, "bin", "python3")
|
||||
if not os.path.exists(venv_python3):
|
||||
continue
|
||||
venv_python_version = subprocess.check_output(
|
||||
[venv_python3, "-VV"], universal_newlines=True
|
||||
)
|
||||
venv_python_version = subprocess.check_output([venv_python3, "-VV"], text=True)
|
||||
if desired_python_version != venv_python_version:
|
||||
continue
|
||||
|
||||
@@ -282,7 +280,7 @@ def do_patch_activate_script(venv_path: str) -> None:
|
||||
|
||||
def generate_hash(requirements_file: str) -> str:
|
||||
path = os.path.join(ZULIP_PATH, "scripts", "lib", "hash_reqs.py")
|
||||
output = subprocess.check_output([path, requirements_file], universal_newlines=True)
|
||||
output = subprocess.check_output([path, requirements_file], text=True)
|
||||
return output.split()[0]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user