Skip to content

Commit 453996e

Browse files
authored
Merge branch 'main' into main
2 parents 748ad72 + 066a4f7 commit 453996e

File tree

12 files changed

+404
-122
lines changed

12 files changed

+404
-122
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,7 @@ Other Deprecations
716716
- Deprecated using ``epoch`` date format in :meth:`DataFrame.to_json` and :meth:`Series.to_json`, use ``iso`` instead. (:issue:`57063`)
717717
- Deprecated allowing ``fill_value`` that cannot be held in the original dtype (excepting NA values for integer and bool dtypes) in :meth:`Series.unstack` and :meth:`DataFrame.unstack` (:issue:`12189`, :issue:`53868`)
718718
- Deprecated allowing ``fill_value`` that cannot be held in the original dtype (excepting NA values for integer and bool dtypes) in :meth:`Series.shift` and :meth:`DataFrame.shift` (:issue:`53802`)
719+
- Deprecated option "future.no_silent_downcasting", as it is no longer used. In a future version accessing this option will raise (:issue:`59502`)
719720
- Deprecated slicing on a :class:`Series` or :class:`DataFrame` with a :class:`DatetimeIndex` using a ``datetime.date`` object, explicitly cast to :class:`Timestamp` instead (:issue:`35830`)
720721

721722
.. ---------------------------------------------------------------------------
@@ -1016,8 +1017,8 @@ Strings
10161017
Interval
10171018
^^^^^^^^
10181019
- :meth:`Index.is_monotonic_decreasing`, :meth:`Index.is_monotonic_increasing`, and :meth:`Index.is_unique` could incorrectly be ``False`` for an ``Index`` created from a slice of another ``Index``. (:issue:`57911`)
1020+
- Bug in :class:`Index`, :class:`Series`, :class:`DataFrame` constructors when given a sequence of :class:`Interval` subclass objects casting them to :class:`Interval` (:issue:`46945`)
10191021
- Bug in :func:`interval_range` where start and end numeric types were always cast to 64 bit (:issue:`57268`)
1020-
-
10211022

10221023
Indexing
10231024
^^^^^^^^

pandas/_libs/lib.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,7 +2255,8 @@ cpdef bint is_interval_array(ndarray values):
22552255
for i in range(n):
22562256
val = values[i]
22572257

2258-
if isinstance(val, Interval):
2258+
if type(val) is Interval:
2259+
# GH#46945 catch Interval exactly, excluding subclasses
22592260
if closed is None:
22602261
closed = val.closed
22612262
numeric = (

pandas/core/config_init.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
is_text,
2929
)
3030

31+
from pandas.errors import Pandas4Warning
32+
3133
# compute
3234

3335
use_bottleneck_doc = """
@@ -899,10 +901,10 @@ def register_converter_cb(key: str) -> None:
899901
cf.register_option(
900902
"no_silent_downcasting",
901903
False,
902-
"Whether to opt-in to the future behavior which will *not* silently "
903-
"downcast results from Series and DataFrame `where`, `mask`, and `clip` "
904-
"methods. "
905-
"Silent downcasting will be removed in pandas 3.0 "
906-
"(at which point this option will be deprecated).",
904+
"This option is deprecated and will be removed in a future version. "
905+
"It has no effect.",
907906
validator=is_one_of_factory([True, False]),
908907
)
908+
909+
# GH#59502
910+
cf.deprecate_option("future.no_silent_downcasting", Pandas4Warning)

0 commit comments

Comments
 (0)