Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-16908

[Python] Pandas warning for np.bool is failing nightly builds for wheel-manylinux20xx-cp37-amd64

    XMLWordPrintableJSON

Details

    Description

      Some of our nightly test builds are failing:

      wheel-manylinux2010-cp37-amd64
      wheel-manylinux2014-cp37-amd64

      with the following two errors:

      =================================== FAILURES ===================================
      _______________ TestConvertMetadata.test_rangeindex_doesnt_warn ________________
      self = <pyarrow.tests.test_pandas.TestConvertMetadata object at 0x7fe1e6fcc290>
          def test_rangeindex_doesnt_warn(self):
              # ARROW-5606: pandas 0.25 deprecated private _start/stop/step
              # attributes -> can be removed if support < pd 0.25 is dropped
              df = pd.DataFrame(np.random.randn(4, 2), columns=['a', 'b'])
              with pytest.warns(None) as record:
                  _check_pandas_roundtrip(df, preserve_index=True)
      >       assert len(record) == 0, [r.message for r in record]
      E       AssertionError: [DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by it...cated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations')]
      E       assert 4 == 0
      E        +  where 4 = len(WarningsChecker(record=True))
      usr/local/lib/python3.7/site-packages/pyarrow/tests/test_pandas.py:245: AssertionError
      _______________ TestConvertMetadata.test_multiindex_doesnt_warn ________________
      self = <pyarrow.tests.test_pandas.TestConvertMetadata object at 0x7fe1e6fccd50>
          def test_multiindex_doesnt_warn(self):
              # ARROW-3953: pandas 0.24 rename of MultiIndex labels to codes
              columns = pd.MultiIndex.from_arrays([['one', 'two'], ['X', 'Y']])
              df = pd.DataFrame([(1, 'a'), (2, 'b'), (3, 'c')], columns=columns)
              with pytest.warns(None) as record:
                  _check_pandas_roundtrip(df, preserve_index=True)
      >       assert len(record) == 0, [r.message for r in record]
      E       AssertionError: [DeprecationWarning('`np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by it...cated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations')]
      E       assert 6 == 0
      E        +  where 6 = len(WarningsChecker(record=True))
      usr/local/lib/python3.7/site-packages/pyarrow/tests/test_pandas.py:296: AssertionError 

      Attachments

        Issue Links

          Activity

            People

              raulcd Raúl Cumplido
              raulcd Raúl Cumplido
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m