jorisvandenbossche commented on code in PR #39498:
URL: https://github.com/apache/arrow/pull/39498#discussion_r1444599551


##########
python/pyarrow/tests/test_pandas.py:
##########
@@ -255,6 +255,12 @@ def test_range_index_force_serialization(self):
         tm.assert_frame_equal(restored, df)
 
     def test_rangeindex_doesnt_warn(self):
+        if Version("2.2.0") <= Version(pd.__version__):
+            # make_block deprecation in pandas, still under discussion
+            # https://github.com/pandas-dev/pandas/pull/56422
+            # https://github.com/pandas-dev/pandas/issues/40226
+            pytest.skip("make_block deprecated in pandas 2.2.0")

Review Comment:
   This should work I think:
   
   ```
   with warnings.catch_warnings():
       warnings.simplefilter("error")
       warnings.filterwarnings("ignore", "make_block is deprecated", 
DeprecationWarning)
       _check_pandas_roundtrip(df, preserve_index=True)
   ```
   
   That will still error for any other warning.



-- 
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