Skip to content

Fix Windows prompt err=True stdout leak in_readline_prompt#3663

Closed
asnamobin-hue wants to merge 5 commits into
pallets:mainfrom
asnamobin-hue:fix-windows-prompt
Closed

Fix Windows prompt err=True stdout leak in_readline_prompt#3663
asnamobin-hue wants to merge 5 commits into
pallets:mainfrom
asnamobin-hue:fix-windows-prompt

Conversation

@asnamobin-hue

Copy link
Copy Markdown

Fixes issue where Windows _readline_prompt bypassed stderr redirection when err=True,
causing prompt output to leak into stdout in CliRunner-based tests.

This change ensures consistent behavior with POSIX by correctly applying
redirect_stdout(sys.stderr) for prompt execution when err=True.

Fixes #3662

@davidism

davidism commented Jul 6, 2026

Copy link
Copy Markdown
Member

I don't want to deal with backporting this.

@davidism davidism closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8.4.x: prompt/confirm(err=True) leaks prompt tail and CliRunner reply echo to stdout on Windows

2 participants