Skip to content

Commit

Permalink
chore: Remove python 3.6 fix for io (python-poetry#4038)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Jan 18, 2022
1 parent 4cd8006 commit aa14f53
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/poetry/console/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from cleo.exceptions import CleoException
from cleo.formatters.style import Style
from cleo.io.inputs.argv_input import ArgvInput
from poetry.core.utils._compat import PY37

from poetry.__version__ import __version__
from poetry.console.command_loader import CommandLoader
Expand Down Expand Up @@ -138,20 +137,6 @@ def create_io(
) -> "IO":
io = super().create_io(input, output, error_output)

# Remove when support for Python 3.6 is removed
# https://github.com/python-poetry/poetry/issues/3412
if (
not PY37
and hasattr(io.output, "_stream")
and hasattr(io.output._stream, "buffer")
and io.output._stream.encoding != "utf-8"
):
import io as io_

io.output._stream = io_.TextIOWrapper(
io.output._stream.buffer, encoding="utf-8"
)

# Set our own CLI styles
formatter = io.output.formatter
formatter.set_style("c1", Style("cyan"))
Expand Down

0 comments on commit aa14f53

Please sign in to comment.