h-vetinari commented on issue #48961:
URL: https://github.com/apache/arrow/issues/48961#issuecomment-3793940509

   It's not just doc tests. In conda-forge, I'm seeing the following kind of 
test failures for arrow v23 (& v22) with pandas v3
   
   ```
   FAILED 
pyarrow/tests/parquet/test_basic.py::test_fastparquet_cross_compatibility - 
AssertionError: Attributes of DataFrame.iloc[:, 0] (column name="a") are 
different
   
   Attribute "dtype" are different
   [left]:  <StringDtype(na_value=nan)>
   [right]: object
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt0-America/New_York-s]
 - ValueError: fromutc: dt.tzinfo is not self
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt0-America/New_York-ms]
 - ValueError: fromutc: dt.tzinfo is not self
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt0-America/New_York-us]
 - ValueError: fromutc: dt.tzinfo is not self
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt1-America/New_York-s]
 - ValueError: fromutc: dt.tzinfo is not self
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt1-America/New_York-ms]
 - ValueError: fromutc: dt.tzinfo is not self
   FAILED 
pyarrow/tests/test_pandas.py::test_timestamp_as_object_non_nanosecond[dt1-America/New_York-us]
 - ValueError: fromutc: dt.tzinfo is not self
   ```
   
   Except for the fastparquet one, the failures always look the same
   
   ```
   _______ test_timestamp_as_object_non_nanosecond[dt1-America/New_York-us] 
_______
   
   resolution = 'us', tz = 'America/New_York'
   dt = datetime.datetime(2020, 1, 1, 0, 0)
   
       @pytest.mark.parametrize("resolution", ["s", "ms", "us"])
       @pytest.mark.parametrize("tz", [None, "America/New_York"])
       # One datetime outside nanosecond range, one inside nanosecond range:
       @pytest.mark.parametrize("dt", [datetime(1553, 1, 1), datetime(2020, 1, 
1)])
       def test_timestamp_as_object_non_nanosecond(resolution, tz, dt):
           # Timestamps can be converted Arrow and reloaded into Pandas with no 
loss
           # of information if the timestamp_as_object option is True.
           arr = pa.array([dt], type=pa.timestamp(resolution, tz=tz))
           table = pa.table({'a': arr})
       
           for result in [
               arr.to_pandas(timestamp_as_object=True),
               table.to_pandas(timestamp_as_object=True)['a']
           ]:
               assert result.dtype == object
               assert isinstance(result[0], datetime)
               if tz:
                   assert result[0].tzinfo is not None
   >               expected = result[0].tzinfo.fromutc(dt)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   E               ValueError: fromutc: dt.tzinfo is not self
   
   pyarrow/tests/test_pandas.py:4970: ValueError
   ```
   
   The errors go away if I pin `pandas <3`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to