@@ -832,28 +832,25 @@ def infer_dtype_from_scalar(val) -> tuple[DtypeObj, Any]:
832832                pa_dtype  =  pa .time64 ("us" )
833833                dtype  =  ArrowDtype (pa_dtype )
834834
835-     elif  isinstance (val , dt .time ):
836-         if  val .tzinfo  is  None :
837-             # pyarrow doesn't have a dtype for timetz. 
838-             opt  =  get_option ("future.infer_time" )
839-             if  opt  is  None :
840-                 warnings .warn (
841-                     "Pandas type inference with a `datetime.time` " 
842-                     "object is deprecated. In a future version, this will give " 
843-                     "time32[pyarrow] dtype, which will require pyarrow to be " 
844-                     "installed. To opt in to the new behavior immediately set " 
845-                     "`pd.set_option('future.infer_time', True)`. To keep the " 
846-                     "old behavior pass `dtype=object`." ,
847-                     FutureWarning ,
848-                     stacklevel = find_stack_level (),
849-                 )
850-             elif  opt  is  True :
851-                 import  pyarrow  as  pa 
835+     elif  isinstance (val , dt .date ):
836+         opt  =  get_option ("future.infer_date" )
837+         if  opt  is  None :
838+             warnings .warn (
839+                 "Pandas type inference with a `datetime.date` " 
840+                 "object is deprecated. In a future version, this will give " 
841+                 "date32[pyarrow] dtype, which will require pyarrow to be " 
842+                 "installed. To opt in to the new behavior immediately set " 
843+                 "`pd.set_option('future.infer_date', True)`. To keep the " 
844+                 "old behavior pass `dtype=object`." ,
845+                 FutureWarning ,
846+                 stacklevel = find_stack_level (),
847+             )
848+         elif  opt  is  True :
849+             import  pyarrow  as  pa 
852850
853-                 pa_dtype  =  pa .time64 ("us" )
854-                 from  pandas .core .arrays .arrow  import  ArrowDtype 
851+             pa_dtype  =  pa .date32 ()
855852
856-                  dtype  =  ArrowDtype (pa_dtype )
853+             dtype  =  ArrowDtype (pa_dtype )
857854
858855    elif  is_bool (val ):
859856        dtype  =  np .dtype (np .bool_ )
0 commit comments