Skip to content
Myr

Fix OSError when running on MinGW64 with MSYS2

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fixes #1338. In version 6.0, echo and prompt functions were modified to work with full unicode in the windows console by emulating an output stream. Since MSYS2 uses a bash console it was creating an OSError to apply these modifications when running in this environment.

authored by Dan Yeaw · committed by David Lord · parent 02756dd · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:click/_compat.py+2 added-1 removed
6 unmodified lines
789PY2 = sys.version_info[0] == 210CYGWIN = sys.platform.startswith('cygwin')11MSYS2 = sys.platform.startswith('win') and ('GCC' in sys.version)12# Determine local App Engine environment, per Google's own suggestion13APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and14 'Development/' in os.environ['SERVER_SOFTWARE'])14WIN = sys.platform.startswith('win') and not APP_ENGINE15WIN = sys.platform.startswith('win') and not APP_ENGINE and not MSYS216DEFAULT_COLUMNS = 80171819_ansi_re = re.compile(r'\033\[((?:\d|;)*)([a-zA-Z])')
696 unmodified lines
modified:CHANGES.rst+1 added
14 unmodified lines
15 :issue:`1116`16- Fix output on Windows Python 2.7 built with MSVC 14. :pr:`1342`17- Always return of of the passed choices for ``click.Choice``18 :issue:`1277`, :pr:`1318`19- Fix ``OSError`` when running in MSYS2. :issue:`1338`202122Version 7.023-----------
540 unmodified lines