BUG: Fixed tput output on windows #16496

Merged
merged 1 commit into from May 30, 2017

Conversation

Projects
None yet
2 participants
@TomAugspurger
Contributor

TomAugspurger commented May 25, 2017

This came up in dask. For reasons I don't understand, you can end up with a bunch of warnings like tput: terminal attributes: No such device or address when pandas calls get_terminal_size

I was able to monkey patch those calls with shutil.get_terminal_size and verify that the warnings were fixed. However that's python3 only. This change uses shutil.get_terminal_size when possible, and falls back to our prior implementation otherwise.

Not sure about unit tests, but manually, the output matches on my mac.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot May 25, 2017

Codecov Report

Merging #16496 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16496      +/-   ##
==========================================
- Coverage   90.43%   90.38%   -0.05%     
==========================================
  Files         161      161              
  Lines       51045    51049       +4     
==========================================
- Hits        46161    46140      -21     
- Misses       4884     4909      +25
Flag Coverage Δ
#multiple 88.22% <100%> (-0.05%) ⬇️
#single 40.12% <100%> (-0.05%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/terminal.py 16.43% <100%> (-31.39%) ⬇️

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 e41fe7f...d35dcad. Read the comment docs.

codecov bot commented May 25, 2017

Codecov Report

Merging #16496 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16496      +/-   ##
==========================================
- Coverage   90.43%   90.38%   -0.05%     
==========================================
  Files         161      161              
  Lines       51045    51049       +4     
==========================================
- Hits        46161    46140      -21     
- Misses       4884     4909      +25
Flag Coverage Δ
#multiple 88.22% <100%> (-0.05%) ⬇️
#single 40.12% <100%> (-0.05%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/terminal.py 16.43% <100%> (-31.39%) ⬇️

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 e41fe7f...d35dcad. Read the comment docs.

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot May 25, 2017

Codecov Report

Merging #16496 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16496      +/-   ##
==========================================
- Coverage   90.43%   90.38%   -0.05%     
==========================================
  Files         161      161              
  Lines       51045    51049       +4     
==========================================
- Hits        46161    46140      -21     
- Misses       4884     4909      +25
Flag Coverage Δ
#multiple 88.22% <100%> (-0.05%) ⬇️
#single 40.12% <100%> (-0.05%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/terminal.py 16.43% <100%> (-31.39%) ⬇️

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 e41fe7f...d35dcad. Read the comment docs.

codecov bot commented May 25, 2017

Codecov Report

Merging #16496 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16496      +/-   ##
==========================================
- Coverage   90.43%   90.38%   -0.05%     
==========================================
  Files         161      161              
  Lines       51045    51049       +4     
==========================================
- Hits        46161    46140      -21     
- Misses       4884     4909      +25
Flag Coverage Δ
#multiple 88.22% <100%> (-0.05%) ⬇️
#single 40.12% <100%> (-0.05%) ⬇️
Impacted Files Coverage Δ
pandas/io/formats/terminal.py 16.43% <100%> (-31.39%) ⬇️

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 e41fe7f...d35dcad. Read the comment docs.

@TomAugspurger

This comment has been minimized.

Show comment
Hide comment
@TomAugspurger

TomAugspurger May 30, 2017

Contributor

Any thoughts on this @jreback? I don't think it should break anything.

Contributor

TomAugspurger commented May 30, 2017

Any thoughts on this @jreback? I don't think it should break anything.

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 30, 2017

Contributor

lgtm.

Contributor

jreback commented May 30, 2017

lgtm.

@jreback jreback merged commit 7efc4e8 into pandas-dev:master May 30, 2017

5 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 50%)
Details
codecov/project 90.38% (target 82%)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

TomAugspurger added a commit to TomAugspurger/pandas that referenced this pull request Jun 1, 2017

TomAugspurger added a commit that referenced this pull request Jun 4, 2017

@TomAugspurger TomAugspurger deleted the TomAugspurger:shutil-terminal-size branch Jun 4, 2017

Kiv added a commit to Kiv/pandas that referenced this pull request Jun 11, 2017

stangirala added a commit to stangirala/pandas that referenced this pull request Jun 11, 2017

yarikoptic added a commit to neurodebian/pandas that referenced this pull request Jul 12, 2017

Merge tag 'v0.20.2' into releases
Version 0.20.2

* tag 'v0.20.2': (68 commits)
  RLS: v0.20.2
  DOC: Update release.rst
  DOC: Whatsnew fixups (#16596)
  ERRR: Raise error in usecols when column doesn't exist but length matches (#16460)
  BUG: convert numpy strings in index names in HDF #13492 (#16444)
  PERF: vectorize _interp_limit (#16592)
  DOC: whatsnew 0.20.2 edits (#16587)
  API: Make is_strictly_monotonic_* private (#16576)
  BUG: reimplement MultiIndex.remove_unused_levels (#16565)
  Strictly monotonic (#16555)
  ENH: add .ngroup() method to groupby objects (#14026) (#14026)
  fix linting
  BUG: Incorrect handling of rolling.cov with offset window (#16244)
  BUG: select_as_multiple doesn't respect start/stop kwargs GH16209 (#16317)
  return empty MultiIndex for symmetrical difference on equal MultiIndexes (#16486)
  BUG: Bug in .resample() and .groupby() when aggregating on integers (#16549)
  BUG: Fixed tput output on windows (#16496)
  Strictly monotonic (#16555)
  BUG: fixed wrong order of ordered labels in pd.cut()
  BUG: Fixed to_html ignoring index_names parameter
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment