diff --git a/py-polars/polars/dataframe/frame.py b/py-polars/polars/dataframe/frame.py index 220a0b5edf3ad..f30a9a8bd8a30 100644 --- a/py-polars/polars/dataframe/frame.py +++ b/py-polars/polars/dataframe/frame.py @@ -4,7 +4,6 @@ import contextlib import os import random -import warnings from collections import OrderedDict, defaultdict from collections.abc import Sized from io import BytesIO, StringIO, TextIOWrapper @@ -2290,33 +2289,15 @@ def to_pandas( # noqa: D417 record_batches = self._df.to_pandas() tbl = pa.Table.from_batches(record_batches) if use_pyarrow_extension_array: - with warnings.catch_warnings(): - # Needs fixing upstream in pyarrow - # Silence here as it's something Polars users can't do - # anything about. - warnings.filterwarnings( - "ignore", - message="make_block is deprecated and will be removed", - category=DeprecationWarning, - ) - return tbl.to_pandas( - self_destruct=True, - split_blocks=True, - types_mapper=lambda pa_dtype: pd.ArrowDtype(pa_dtype), - **kwargs, - ) + return tbl.to_pandas( + self_destruct=True, + split_blocks=True, + types_mapper=lambda pa_dtype: pd.ArrowDtype(pa_dtype), + **kwargs, + ) date_as_object = kwargs.pop("date_as_object", False) - with warnings.catch_warnings(): - # Needs fixing upstream in pyarrow - # Silence here as it's something Polars users can't do - # anything about. - warnings.filterwarnings( - "ignore", - message="make_block is deprecated and will be removed", - category=DeprecationWarning, - ) - return tbl.to_pandas(date_as_object=date_as_object, **kwargs) + return tbl.to_pandas(date_as_object=date_as_object, **kwargs) def to_series(self, index: int = 0) -> Series: """