From aa14f530eb00a8f25a309c3080509ee8b3bbd4e6 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 17 Jan 2022 19:08:14 -0600 Subject: [PATCH] chore: Remove python 3.6 fix for io (python-poetry#4038) --- src/poetry/console/application.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/poetry/console/application.py b/src/poetry/console/application.py index a74a68b0ff1..96f2e953cf5 100644 --- a/src/poetry/console/application.py +++ b/src/poetry/console/application.py @@ -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 @@ -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"))