Skip to content
Myr

Shabbily deal with GAE dev server on Windows

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

Fix #711

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parent bfa4cc0 · Browse files · 2 files+10 added−3 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+10 added−3 removed

  • other:+10 added−3 removed

2 files+10 added−3 removed

modified:click/_compat.py+9 added-3 removed
158 unmodified lines
159 # correct option here.160 #161 # This code also lives in _winconsole for the fallback to the console162 # emulation stream.163 if WIN:163 #164 # There are also Windows environments where the `msvcrt` module is not165 # available (which is why we use try-catch instead of the WIN variable166 # here), such as the Google App Engine development server on Windows. In167 # those cases there is just nothing we can do.168 try:169 import msvcrt170 except ImportError:171 set_binary_mode = lambda x: x172 else:173 def set_binary_mode(f):174 try:175 fileno = f.fileno()176 except Exception:177 pass178 else:179 msvcrt.setmode(fileno, os.O_BINARY)180 return f173 else:174 set_binary_mode = lambda x: x181182 def isidentifier(x):183 return _identifier_re.search(x) is not None184
464 unmodified lines
modified:CHANGES+1 added
10 unmodified lines
11- Make `click.progressbar` work with `codecs.open` files. See #637.12- Fix bug in bash completion with nested subcommands. See #639.13- Fix test runner not saving caller env correctly. See #644.14- Fix handling of SIGPIPE. See #62615- Deal with broken Windows environments such as Google App Engine's. See #711.1617Version 6.618-----------19
332 unmodified lines