Repository navigation
gh-161039: fix detection of less >= 706 in _pyrepl/pager.py - #161040
tmzullinger wants to merge 1 commit into
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
This could be handled in various ways. Using |
…_pager` Since less tag v706¹, less exits with a failure status when no filename is provided. Pass the `-?` option and redirect both stdout and stderr to /dev/null. Failure to detect `less` results in using `more` for users who don't have MANPAGER or PAGER set, which is unexpected. ¹ gwsw/less@7c85230 (Exit with a failure status in more cases, 2026-06-14)
72a8316 to
67fb193
Compare
|
Apparently, I should not have bothered adding a NEWS snippet after the initial feedback from the bot. Or at the least, I don't know enough about the syntax to write one that passes the doc checks. If someone can offer advice on fixing whatever is wrong with the snippet or whether it's even needed for the simple code fix, I'll happily change it either way. |
Since less tag v706¹, less exits with a failure status when no filename is provided. Pass the
-?option and redirect both stdout and stderr to /dev/null.Failure to detect
lessresults in usingmorefor users who don't have MANPAGER or PAGER set, which is unexpected.¹ gwsw/less@7c85230 (Exit with a failure
status in more cases, 2026-06-14)