From c69448b5ce3b6f36162d1861757ee49cb903c070 Mon Sep 17 00:00:00 2001 From: John Kirkham Date: Tue, 29 Sep 2020 16:21:30 -0700 Subject: [PATCH] Use `pandas.testing` `pandas.util.testing` is deprecated. The preferred way forward is to use `pandas.testing`. So this updates our usage accordingly. --- distributed/tests/test_collections.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/distributed/tests/test_collections.py b/distributed/tests/test_collections.py index b9af1ef0222..c0aae5d5ea6 100644 --- a/distributed/tests/test_collections.py +++ b/distributed/tests/test_collections.py @@ -1,3 +1,5 @@ +from distutils.version import LooseVersion + import pytest pytest.importorskip("numpy") @@ -11,7 +13,14 @@ from distributed.utils_test import client, cluster_fixture, loop # noqa F401 import numpy as np import pandas as pd -import pandas.testing as tm + +PANDAS_VERSION = LooseVersion(pd.__version__) +PANDAS_GT_100 = PANDAS_VERSION >= LooseVersion("1.0.0") + +if PANDAS_GT_100: + import pandas.testing as tm # noqa: F401 +else: + import pandas.util.testing as tm # noqa: F401 dfs = [