Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

echo_via_pager broken on Windows in 7.1 #1514

Closed
Chadiaw opened this issue Mar 28, 2020 · 6 comments
Closed

echo_via_pager broken on Windows in 7.1 #1514

Chadiaw opened this issue Mar 28, 2020 · 6 comments
Milestone

Comments

@Chadiaw
Copy link

Chadiaw commented Mar 28, 2020

Calls to click.echo_via_pager are failing on Windows since upgrading to 7.1

Expected behavior (7.0)

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import click
>>> click.__version__
'7.0'
>>> text = [f"hello {i} \n" for i in range(1000)]
>>> click.echo_via_pager(text)
hello 0
hello 1
hello 2
hello 3
hello 4
-- MORE --

Actual behavior (7.1)

Python 3.8.1 (tags/v3.8.1:1b293b6, Dec 18 2019, 23:11:46) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import click
>>> click.__version__
'7.1.1'
>>> text = [f"hello {i} \n" for i in range(1000)]
>>> click.echo_via_pager(text)
The system cannot find the file specified.
>>>

Notes

  • Only seems broken on Windows: tested with Ubuntu WSL and click 7.1, works as expected

Environment

  • Python version: 3.7, 3.8 (same results)
  • Click version: 7.1.1
@thorstenkampe
Copy link

Same issue as here - and same root cause:

>>> os.environ['PAGER'] = 'less -SRXF'
>>> import click
>>> text = [f"hello {i} \n" for i in range(1000)]
>>> click.echo_via_pager(text)
The system cannot find the file specified.

>>> os.environ['PAGER'] = 'less'
>>> click.echo_via_pager(text)
  hello 0
  hello 1
  hello 2
  hello 3
[...]

@davidism davidism added this to the 7.1.2 milestone Apr 13, 2020
@thorstenkampe
Copy link

click.edit() exhibits the same problem

@davidism
Copy link
Member

Due to #1470. I'll see about reverting that or fixing it on Windows.

@davidism
Copy link
Member

Click 7.1.2 is available on PyPI.

@ivankravets
Copy link

@davidism could you take a look at #1501? We reverted back @platformio to 7.0. Click is broken on Windows.

@davidism
Copy link
Member

Missed that issue, but it's due to the same thing, so that's should be fixed too.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants