Skip to content

Commit 5fb018b

Browse files
authored
DEPR: remove display.line_width and display.height as old prior deprecations (#19107)
1 parent b1a9421 commit 5fb018b

File tree

3 files changed

+7
-18
lines changed

3 files changed

+7
-18
lines changed

ci/lint.sh

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ if [ "$LINT" ]; then
120120

121121
echo "Check for deprecated messages without sphinx directive"
122122
grep -R --include="*.py" --include="*.pyx" -E "(DEPRECATED|DEPRECATE|Deprecated)(:|,|\.)" pandas
123+
124+
if [ $? = "0" ]; then
125+
RET=1
126+
fi
123127
echo "Check for deprecated messages without sphinx directive DONE"
124128
else
125129
echo "NOT Linting"

doc/source/whatsnew/v0.23.0.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ Removal of prior version deprecations/changes
313313
- The ``freqstr`` keyword has been removed from ``pandas.tseries.frequencies.to_offset`` in favor of ``freq`` (:issue:`13874`)
314314
- The ``Panel4D`` and ``PanelND`` classes have been removed (:issue:`13776`)
315315
- The ``Panel``class has dropped the ``to_long``and ``toLong`` methods (:issue:`19077`)
316+
- The options ``display.line_with`` and ``display.height`` are removed in favor of ``display.width`` and ``display.max_rows`` respectively (:issue:`4391`, :issue:`19107`)
316317

317318
.. _whatsnew_0230.performance:
318319

@@ -369,7 +370,7 @@ Conversion
369370
- Bug in :class:`Series` floor-division where operating on a scalar ``timedelta`` raises an exception (:issue:`18846`)
370371
- Bug in :class:`FY5253Quarter`, :class:`LastWeekOfMonth` where rollback and rollforward behavior was inconsistent with addition and subtraction behavior (:issue:`18854`)
371372
- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)
372-
- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)
373+
- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)
373374
- Bug in :class:`Series`` with ``dtype='timedelta64[ns]`` where addition or subtraction of ``TimedeltaIndex`` had results cast to ``dtype='int64'`` (:issue:`17250`)
374375
- Bug in :class:`TimedeltaIndex` where division by a ``Series`` would return a ``TimedeltaIndex`` instead of a ``Series`` (issue:`19042`)
375376
- Bug in :class:`Series` with ``dtype='timedelta64[ns]`` where addition or subtraction of ``TimedeltaIndex`` could return a ``Series`` with an incorrect name (issue:`19043`)

pandas/core/config_init.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"""
1212
import pandas.core.config as cf
1313
from pandas.core.config import (is_int, is_bool, is_text, is_instance_factory,
14-
is_one_of_factory, get_default_val,
15-
is_callable)
14+
is_one_of_factory, is_callable)
1615
from pandas.io.formats.console import detect_console_encoding
1716

1817
# compute
@@ -170,11 +169,6 @@ def use_numexpr_cb(key):
170169
frame is truncated (e.g. not display all rows and/or columns)
171170
"""
172171

173-
pc_line_width_doc = """
174-
: int
175-
Deprecated.
176-
"""
177-
178172
pc_east_asian_width_doc = """
179173
: boolean
180174
Whether to use the Unicode East Asian Width to calculate the display text
@@ -223,11 +217,6 @@ def use_numexpr_cb(key):
223217
terminal and hence it is not possible to correctly detect the width.
224218
"""
225219

226-
pc_height_doc = """
227-
: int
228-
Deprecated.
229-
"""
230-
231220
pc_chop_threshold_doc = """
232221
: float or None
233222
if set to a float value, all float values smaller then the given threshold
@@ -344,13 +333,8 @@ def table_schema_cb(key):
344333
validator=is_one_of_factory([True, False, 'truncate']))
345334
cf.register_option('chop_threshold', None, pc_chop_threshold_doc)
346335
cf.register_option('max_seq_items', 100, pc_max_seq_items)
347-
cf.register_option('height', 60, pc_height_doc,
348-
validator=is_instance_factory([type(None), int]))
349336
cf.register_option('width', 80, pc_width_doc,
350337
validator=is_instance_factory([type(None), int]))
351-
# redirected to width, make defval identical
352-
cf.register_option('line_width', get_default_val('display.width'),
353-
pc_line_width_doc)
354338
cf.register_option('memory_usage', True, pc_memory_usage_doc,
355339
validator=is_one_of_factory([None, True,
356340
False, 'deep']))

0 commit comments

Comments
 (0)