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"))