Skip to content

Commit

Permalink
Fix pd util version
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Oct 30, 2024
1 parent 7115f20 commit f70a48c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions python/cudf/cudf/pandas/_wrappers/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,15 @@ def _pandas_util_dir():
# __getattr__ but no __dir__ to find them
# https://github.com/pandas-dev/pandas/blob/2.2.x/pandas/util/__init__.py
return list(importlib.import_module("pandas.util").__dict__.keys()) + [
"hash_array",
"hash_pandas_object",
"Appender",
"Substitution",
"_exceptions",
"_print_versions",
"cache_readonly",
"capitalize_first_letter",
"hash_array",
"hash_pandas_object",
"version",
]


Expand Down
8 changes: 8 additions & 0 deletions python/cudf/cudf_pandas_tests/test_cudf_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1759,3 +1759,11 @@ def test_fallback_raises_error(monkeypatch):
monkeycontext.setenv("CUDF_PANDAS_FAIL_ON_FALLBACK", "True")
with pytest.raises(ProxyFallbackError):
pd.Series(range(2)).astype(object)


@pytest.mark.parametrize(
"attrs",
["_exceptions", "version", "_print_versions", "capitalize_first_letter"],
)
def test_cudf_pandas_util_version(attrs):
assert hasattr(pd.util, attrs)

0 comments on commit f70a48c

Please sign in to comment.