diff --git a/python/cudf/cudf/pandas/_wrappers/pandas.py b/python/cudf/cudf/pandas/_wrappers/pandas.py index 6d03063fa27..0c69c5964fc 100644 --- a/python/cudf/cudf/pandas/_wrappers/pandas.py +++ b/python/cudf/cudf/pandas/_wrappers/pandas.py @@ -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", ] diff --git a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py index 7aefdc386bb..1c1e86808dc 100644 --- a/python/cudf/cudf_pandas_tests/test_cudf_pandas.py +++ b/python/cudf/cudf_pandas_tests/test_cudf_pandas.py @@ -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)