Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flaky-bot bot opened this issue May 16, 2023 · 5 comments · Fixed by #189
Closed

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

flaky-bot bot opened this issue May 16, 2023 · 5 comments · Fixed by #189
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. kokoro:force-run Add this label to force Kokoro to re-run the tests. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented May 16, 2023

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

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels May 16, 2023
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. label May 16, 2023
@shollyman
Copy link

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

@flaky-bot
Copy link
Author

flaky-bot bot commented May 25, 2023

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

@chalmerlowe
Copy link
Collaborator

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.

@chalmerlowe chalmerlowe added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 30, 2023
@chalmerlowe
Copy link
Collaborator

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.

@chalmerlowe chalmerlowe added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Jun 1, 2023
@flaky-bot
Copy link
Author

flaky-bot bot commented Jun 3, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-db-dtypes-pandas API. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. kokoro:force-run Add this label to force Kokoro to re-run the tests. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants