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

BUG: Fixed tput output on windows #16496

Merged
merged 1 commit into from
May 30, 2017

Conversation

TomAugspurger
Copy link
Contributor

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.

@TomAugspurger TomAugspurger added Output-Formatting __repr__ of pandas objects, to_string Windows Windows OS labels May 25, 2017
@TomAugspurger TomAugspurger added this to the 0.20.2 milestone May 25, 2017
@codecov
Copy link

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
Copy link

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
Copy link
Contributor Author

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

@jreback
Copy link
Contributor

jreback commented May 30, 2017

lgtm.

@jreback jreback merged commit 7efc4e8 into pandas-dev:master May 30, 2017
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 shutil-terminal-size branch June 4, 2017 20:29
Kiv pushed a commit to Kiv/pandas that referenced this pull request Jun 11, 2017
stangirala pushed 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
Version 0.20.2

* tag 'v0.20.2': (68 commits)
  RLS: v0.20.2
  DOC: Update release.rst
  DOC: Whatsnew fixups (pandas-dev#16596)
  ERRR: Raise error in usecols when column doesn't exist but length matches (pandas-dev#16460)
  BUG: convert numpy strings in index names in HDF pandas-dev#13492 (pandas-dev#16444)
  PERF: vectorize _interp_limit (pandas-dev#16592)
  DOC: whatsnew 0.20.2 edits (pandas-dev#16587)
  API: Make is_strictly_monotonic_* private (pandas-dev#16576)
  BUG: reimplement MultiIndex.remove_unused_levels (pandas-dev#16565)
  Strictly monotonic (pandas-dev#16555)
  ENH: add .ngroup() method to groupby objects (pandas-dev#14026) (pandas-dev#14026)
  fix linting
  BUG: Incorrect handling of rolling.cov with offset window (pandas-dev#16244)
  BUG: select_as_multiple doesn't respect start/stop kwargs GH16209 (pandas-dev#16317)
  return empty MultiIndex for symmetrical difference on equal MultiIndexes (pandas-dev#16486)
  BUG: Bug in .resample() and .groupby() when aggregating on integers (pandas-dev#16549)
  BUG: Fixed tput output on windows (pandas-dev#16496)
  Strictly monotonic (pandas-dev#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
Labels
Output-Formatting __repr__ of pandas objects, to_string Windows Windows OS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants