Skip to content
Myr

Merge branch '4.x-maintenance'

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

authored by Markus Unterwaditzer · committed by Markus Unterwaditzer · parents c1944e5, e71f0a0 · Browse files · 2 files+17 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+17 added−1 removed

  • other:+17 added−1 removed

2 files+17 added−1 removed

modified:click/_termui_impl.py+16 added-1 removed
306 unmodified lines
307 c.stdin.write(text.encode(encoding, 'replace'))308 c.stdin.close()309 except IOError:310 pass311 c.wait()311312 # Less doesn't respect ^C, but catches it for its own UI purposes (aborting313 # search or other commands inside less).314 #315 # That means when the user hits ^C, the parent process (click) terminates,316 # but less is still alive, paging the output and messing up the terminal.317 #318 # If the user wants to make the pager exit on ^C, they should set319 # `LESS='-K'`. It's not our decision to make.320 while True:321 try:322 c.wait()323 except KeyboardInterrupt:324 pass325 else:326 break327328329def _tempfilepager(text, cmd, color):330 """Page through text by invoking a program on a temporary file."""331 import tempfile332 filename = tempfile.mktemp()
195 unmodified lines
modified:CHANGES+1 added
17 unmodified lines
18- Fix a bug where error messages would include a trailing `None` string.19- Fix a bug where Click would crash on docstrings with trailing newlines.20- Support streams with encoding set to `None` on Python 3 by barfing with21 a better error.22- Handle ^C in less-pager properly.2324Version 4.025-----------26
207 unmodified lines