Skip to content

Commit 2263ba3

Browse files
committed
Removed deprecation warning and whatsnew entry
1 parent 7a560c0 commit 2263ba3

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ Other Deprecations
420420
- Deprecated lowercase strings ``d``, ``b`` and ``c`` denoting frequencies in :class:`Day`, :class:`BusinessDay` and :class:`CustomBusinessDay` in favour of ``D``, ``B`` and ``C`` (:issue:`58998`)
421421
- Deprecated lowercase strings ``w``, ``w-mon``, ``w-tue``, etc. denoting frequencies in :class:`Week` in favour of ``W``, ``W-MON``, ``W-TUE``, etc. (:issue:`58998`)
422422
- Deprecated parameter ``method`` in :meth:`DataFrame.reindex_like` / :meth:`Series.reindex_like` (:issue:`58667`)
423-
- Deprecated passing multiple option-value pairs parameter in :meth:`DataFrame.set_option` (:issue:`61093`)
424423
- Deprecated strings ``w``, ``d``, ``MIN``, ``MS``, ``US`` and ``NS`` denoting units in :class:`Timedelta` in favour of ``W``, ``D``, ``min``, ``ms``, ``us`` and ``ns`` (:issue:`59051`)
425424
- Deprecated using ``epoch`` date format in :meth:`DataFrame.to_json` and :meth:`Series.to_json`, use ``iso`` instead. (:issue:`57063`)
426425

pandas/_config/config.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def set_option(*args) -> None:
200200
Parameters
201201
----------
202202
*args : str | object | dict
203-
Arguments provided in a pair, which will be interpreted as (pattern, value),
203+
Arguments provided in pairs, which will be interpreted as (pattern, value),
204204
or as a single dictionary containing multiple option-value pairs.
205205
pattern: str
206206
Regexp which should match a single option
@@ -294,19 +294,10 @@ def set_option(*args) -> None:
294294
opt.cb(key)
295295
return
296296

297-
# Deprecated (# GH 61093): multiple option-value pairs as separate arguments
298297
nargs = len(args)
299298
if not nargs or nargs % 2 != 0:
300299
raise ValueError("Must provide an even number of non-keyword arguments")
301300

302-
warnings.warn(
303-
"Setting multiple options using multiple arguments is deprecated and will be "
304-
"removed in a future version. Use a dictionary instead.",
305-
FutureWarning,
306-
stacklevel=2,
307-
)
308-
309-
# Backward compatibility
310301
for k, v in zip(args[::2], args[1::2]):
311302
key = _get_single_key(k)
312303

pandas/tests/config/test_config.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,7 @@ def test_set_option_multiple(self):
189189
assert cf.get_option("b.c") == "hullo"
190190
assert cf.get_option("b.b") is None
191191

192-
with tm.assert_produces_warning(
193-
FutureWarning,
194-
match="Setting multiple options using multiple arguments is deprecated",
195-
):
196-
cf.set_option("a", "2", "b.c", None, "b.b", 10.0)
192+
cf.set_option("a", "2", "b.c", None, "b.b", 10.0)
197193

198194
assert cf.get_option("a") == "2"
199195
assert cf.get_option("b.c") is None

0 commit comments

Comments
 (0)