Skip to content

Commit

Permalink
Merge branch '6.x-maintenance'
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker committed Jan 6, 2017
2 parents e6f22c6 + df0e37d commit a50befd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ Version 7.0
Version 6.7
-----------

(bugfix release; yet to be released)
(bugfix release; released on January 6th 2017)

- Make `click.progressbar` work with `codecs.open` files. See #637.
- Fix bug in bash completion with nested subcommands. See #639.
- Fix test runner not saving caller env correctly. See #644.
- Fix handling of SIGPIPE. See #626
- Deal with broken Windows environments such as Google App Engine's. See #711.

Version 6.6
-----------
Expand Down
12 changes: 9 additions & 3 deletions click/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,16 @@ def is_bytes(x):
#
# This code also lives in _winconsole for the fallback to the console
# emulation stream.
if WIN:
#
# There are also Windows environments where the `msvcrt` module is not
# available (which is why we use try-catch instead of the WIN variable
# here), such as the Google App Engine development server on Windows. In
# those cases there is just nothing we can do.
try:
import msvcrt
except ImportError:
set_binary_mode = lambda x: x
else:
def set_binary_mode(f):
try:
fileno = f.fileno()
Expand All @@ -172,8 +180,6 @@ def set_binary_mode(f):
else:
msvcrt.setmode(fileno, os.O_BINARY)
return f
else:
set_binary_mode = lambda x: x

def isidentifier(x):
return _identifier_re.search(x) is not None
Expand Down
5 changes: 2 additions & 3 deletions click/_unicodefun.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,5 @@ def _verify_python3_env():

raise RuntimeError('Click will abort further execution because Python 3 '
'was configured to use ASCII as encoding for the '
'environment. Either run this under Python 2 or '
'consult http://click.pocoo.org/python3/ for '
'mitigation steps.' + extra)
'environment. Consult http://click.pocoo.org/python3/'
'for mitigation steps.' + extra)

0 comments on commit a50befd

Please sign in to comment.