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

Windows output capture fix #2055

Merged
merged 6 commits into from
Mar 14, 2022
Merged

Windows output capture fix #2055

merged 6 commits into from
Mar 14, 2022

Conversation

darrenburns
Copy link
Member

@darrenburns darrenburns commented Mar 14, 2022

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fixes #2053

Moves from Windows Console API for writing to stdout, to using stdout.write.

Also opens stdout directly as requested to avoid issues with wrapped file objects passed into Console.

@darrenburns darrenburns changed the title Windows capture fix Windows output capture fix Mar 14, 2022
@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2022

Codecov Report

Merging #2055 (e552771) into master (91e0146) will increase coverage by 0.02%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2055      +/-   ##
==========================================
+ Coverage   99.49%   99.52%   +0.02%     
==========================================
  Files          73       72       -1     
  Lines        7361     7335      -26     
==========================================
- Hits         7324     7300      -24     
+ Misses         37       35       -2     
Flag Coverage Δ
unittests 99.52% <87.50%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
rich/align.py 100.00% <ø> (ø)
rich/layout.py 100.00% <ø> (ø)
rich/table.py 100.00% <ø> (ø)
rich/console.py 99.50% <80.00%> (-0.13%) ⬇️
rich/_win32_console.py 91.44% <100.00%> (+1.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae12e09...e552771. Read the comment docs.

@darrenburns darrenburns requested a review from willmcgugan March 14, 2022 11:10
@willmcgugan willmcgugan merged commit 51121fe into master Mar 14, 2022
@willmcgugan willmcgugan deleted the windows-capture-fix branch March 14, 2022 11:48
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.

[BUG] Rich 12.0.0 fails to write to stdout attached to a pipe on Windows
3 participants