@@ -843,28 +843,25 @@ def infer_dtype_from_scalar(val) -> tuple[DtypeObj, Any]:
843
843
pa_dtype = pa .time64 ("us" )
844
844
dtype = ArrowDtype (pa_dtype )
845
845
846
- elif isinstance (val , dt .time ):
847
- if val .tzinfo is None :
848
- # pyarrow doesn't have a dtype for timetz.
849
- opt = get_option ("future.infer_time" )
850
- if opt is None :
851
- warnings .warn (
852
- "Pandas type inference with a `datetime.time` "
853
- "object is deprecated. In a future version, this will give "
854
- "time32[pyarrow] dtype, which will require pyarrow to be "
855
- "installed. To opt in to the new behavior immediately set "
856
- "`pd.set_option('future.infer_time', True)`. To keep the "
857
- "old behavior pass `dtype=object`." ,
858
- FutureWarning ,
859
- stacklevel = find_stack_level (),
860
- )
861
- elif opt is True :
862
- import pyarrow as pa
846
+ elif isinstance (val , dt .date ):
847
+ opt = get_option ("future.infer_date" )
848
+ if opt is None :
849
+ warnings .warn (
850
+ "Pandas type inference with a `datetime.date` "
851
+ "object is deprecated. In a future version, this will give "
852
+ "date32[pyarrow] dtype, which will require pyarrow to be "
853
+ "installed. To opt in to the new behavior immediately set "
854
+ "`pd.set_option('future.infer_date', True)`. To keep the "
855
+ "old behavior pass `dtype=object`." ,
856
+ FutureWarning ,
857
+ stacklevel = find_stack_level (),
858
+ )
859
+ elif opt is True :
860
+ import pyarrow as pa
863
861
864
- pa_dtype = pa .time64 ("us" )
865
- from pandas .core .arrays .arrow import ArrowDtype
862
+ pa_dtype = pa .date32 ()
866
863
867
- dtype = ArrowDtype (pa_dtype )
864
+ dtype = ArrowDtype (pa_dtype )
868
865
869
866
elif is_bool (val ):
870
867
dtype = np .dtype (np .bool_ )
0 commit comments