Remove usage of vistir.to_bytes

Remove backward compatability code
This commit is contained in:
Oz Tiram
2023-02-04 16:01:37 +01:00
parent 8ebb5ed1e4
commit e362bb01ea
3 changed files with 4 additions and 5 deletions
+1
View File
@@ -43,6 +43,7 @@ if os.name == "nt":
from pipenv.vendor import colorama
# Backward compatability with vistir
# These variables will be removed in vistir 0.8.0
no_color = False
for item in ("ANSI_COLORS_DISABLED", "VISTIR_DISABLE_COLORS"):
if os.getenv(item):
+3 -3
View File
@@ -1468,7 +1468,7 @@ def write_requirement_to_file(
click.echo(
f"Writing supplied requirement line to temporary file: {line!r}", err=True
)
f.write(vistir.misc.to_bytes(line))
f.write(line)
r = f.name
f.close()
return r
@@ -1661,8 +1661,8 @@ def pip_install_deps(
err=True,
)
target = editable_requirements if vcs_or_editable else standard_requirements
target.write(vistir.misc.to_bytes(line))
target.write(vistir.misc.to_bytes("\n"))
target.write(line)
target.write("\n")
standard_requirements.close()
editable_requirements.close()
-2
View File
@@ -1,5 +1,3 @@
from __future__ import annotations
import contextlib
import importlib
import importlib.util