googleapis/python-db-dtypes-pandas

tests.compliance.date.test_date_compliance.TestMethods: test_hash_pandas_object failed

flaky-bot opened this issue · 5 comments

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: 614d309
buildURL: Build Status, Sponge
status: failed

Test output
self = 
data = 
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
def test_hash_pandas_object(self, data):
    # _hash_pandas_object should return a uint64 ndarray of the same length
    # as the data
    res = data._hash_pandas_object(
        encoding="utf-8",
      hash_key=pd.core.util.hashing._default_hash_key,
        categorize=False,
    )

E AttributeError: module 'pandas.core.util' has no attribute 'hashing'

.nox/compliance_prerelease/lib/python3.11/site-packages/pandas/tests/extension/base/methods.py:26: AttributeError

Don't see anything too wonky in https://github.com/pandas-dev/pandas/commits/main/pandas/core/util/hashing.py, unclear what may have changed

commit: afd993a
buildURL: Build Status, Sponge
status: failed

Test output
self = 
data = 
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
def test_hash_pandas_object(self, data):
    # _hash_pandas_object should return a uint64 ndarray of the same length
    # as the data
    res = data._hash_pandas_object(
        encoding="utf-8",
      hash_key=pd.core.util.hashing._default_hash_key,
        categorize=False,
    )

E AttributeError: module 'pandas.core.util' has no attribute 'hashing'

.nox/compliance_prerelease/lib/python3.11/site-packages/pandas/tests/extension/base/methods.py:26: AttributeError

because these are compliance tests, we are, in some cases, reaching out and running the pandas test suite, which is what is happening here.

We are failing on three tests. The first to fail is this one:
https://github.com/pandas-dev/pandas/blob/8cf4ab491b06274f555d1ea305c172354208747a/pandas/tests/extension/base/methods.py#L21

def test_hash_pandas_object(self, data):
    # _hash_pandas_object should return a uint64 ndarray of the same length
    # as the data
    res = data._hash_pandas_object(
        encoding="utf-8",
        hash_key=pd.core.util.hashing._default_hash_key,
        categorize=False,
    )
    assert res.dtype == np.uint64
    assert res.shape == data.shape

It is not clear why the system is not finding the hashing.py file in the pandas repo.

This is a failing test in our compliance testing (i.e. testing compliance with prerelease code.)

I am working this, but since this does not impact existing customers, etc, moving this to a P2.

commit: 2ce44c0
buildURL: Build Status, Sponge
status: failed

Test output
self = 
data = 
[ datetime.date(1900, 1, 1),  datetime.date(1902, 1, 2),
  datetime.date(1904, 1, 3),  datetime.date(1906,...2, 19), datetime.date(2094, 2, 19),
 datetime.date(2096, 2, 20), datetime.date(2098, 2, 20)]
Length: 100, dtype: dbdate
def test_hash_pandas_object(self, data):
    # _hash_pandas_object should return a uint64 ndarray of the same length
    # as the data
    res = data._hash_pandas_object(
        encoding="utf-8",
      hash_key=pd.core.util.hashing._default_hash_key,
        categorize=False,
    )

E AttributeError: module 'pandas.core.util' has no attribute 'hashing'

.nox/compliance_prerelease/lib/python3.11/site-packages/pandas/tests/extension/base/methods.py:26: AttributeError