Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
a434e7ef
Unverified
Commit
a434e7ef
authored
Nov 14, 2021
by
Brandon Chinn
Committed by
GitHub
Nov 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix IO under Python 3.6 with locale not set (#4038)
Resolves: #3412
parent
2f4841da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
poetry/console/application.py
+15
-0
No files found.
poetry/console/application.py
View file @
a434e7ef
...
@@ -21,6 +21,7 @@ from cleo.io.io import IO
...
@@ -21,6 +21,7 @@ from cleo.io.io import IO
from
cleo.io.outputs.output
import
Output
from
cleo.io.outputs.output
import
Output
from
poetry.__version__
import
__version__
from
poetry.__version__
import
__version__
from
poetry.core.utils._compat
import
PY37
from
.command_loader
import
CommandLoader
from
.command_loader
import
CommandLoader
from
.commands.command
import
Command
from
.commands.command
import
Command
...
@@ -143,6 +144,20 @@ class Application(BaseApplication):
...
@@ -143,6 +144,20 @@ class Application(BaseApplication):
)
->
IO
:
)
->
IO
:
io
=
super
()
.
create_io
(
input
,
output
,
error_output
)
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
# Set our own CLI styles
formatter
=
io
.
output
.
formatter
formatter
=
io
.
output
.
formatter
formatter
.
set_style
(
"c1"
,
Style
(
"cyan"
))
formatter
.
set_style
(
"c1"
,
Style
(
"cyan"
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment