Closed
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
import pyarrow as pa
pa_arr = pa.array([
datetime.date(2024, 1, 1),
datetime.date(2024, 1, 2),
datetime.date(2024, 1, 3),
])
ser = pd.Series(pa_arr, dtype=pd.ArrowDtype(pa.date32()))
ser.iloc[0] = datetime.datetime(2024, 12, 31, 12, 20, 0)
Issue Description
Assigning a datetime value to a pyarrow date array type seems to implicitly drop the time components
Expected Behavior
Should raise TypeError
Installed Versions
In [24]: pd.version
Out[24]: '3.0.0.dev0+681.g434fda08cf'
In [25]: pa.version
Out[25]: '15.0.0'