Skip to content

Remove deprecation warning about 'display.height' option. #4027

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions pandas/core/config_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@
terminal and hence it is not possible to correctly detect the width.
"""

pc_height_doc = """
: int
Deprecated.
"""

pc_chop_threshold_doc = """
: float or None
if set to a float value, all float values smaller then the given threshold
Expand Down Expand Up @@ -239,8 +234,6 @@ def mpl_style_cb(key):
cf.register_option('mpl_style', None, pc_mpl_style_doc,
validator=is_one_of_factory([None, False, 'default']),
cb=mpl_style_cb)
cf.register_option('height', 60, pc_height_doc,
validator=is_instance_factory([type(None), int]))
cf.register_option('width',80, pc_width_doc,
validator=is_instance_factory([type(None), int]))
# redirected to width, make defval identical
Expand All @@ -252,7 +245,7 @@ def mpl_style_cb(key):

cf.deprecate_option('display.height',
msg=pc_height_deprecation_warning,
rkey='display.height')
rkey='display.max_rows')

tc_sim_interactive_doc = """
: boolean
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ def get_console_size():
Returns (None,None) in non-interactive session.
"""
display_width = get_option('display.width')
display_height = get_option('display.height')
display_height = get_option('display.max_rows')

# Consider
# interactive shell terminal, can detect term size
Expand All @@ -1739,7 +1739,7 @@ def get_console_size():
# match default for width,height in config_init
from pandas.core.config import get_default_val
terminal_width = get_default_val('display.width')
terminal_height = get_default_val('display.height')
terminal_height = get_default_val('display.max_rows')
else:
# pure terminal
terminal_width, terminal_height = get_terminal_size()
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ def test_repr_non_interactive(self):

with option_context('mode.sim_interactive', False,
'display.width', 0,
'display.height', 0,
'display.max_rows',5000):
self.assertFalse(has_info_repr(df))
self.assertFalse(has_expanded_repr(df))
Expand Down