From 927904c73f93856d2e17225575b4ead9649f91d9 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Fri, 12 Jul 2024 19:08:30 +0200 Subject: [PATCH] Apply suggestion to use packaging.version --- python/cudf/cudf/tests/test_doctests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/cudf/cudf/tests/test_doctests.py b/python/cudf/cudf/tests/test_doctests.py index 0acc374b7e1..794660cffcb 100644 --- a/python/cudf/cudf/tests/test_doctests.py +++ b/python/cudf/cudf/tests/test_doctests.py @@ -8,6 +8,7 @@ import numpy as np import pytest +from packaging import version import cudf @@ -84,7 +85,7 @@ def chdir_to_tmp_path(cls, tmp_path): def prinoptions(cls): # TODO: NumPy now prints scalars as `np.int8(1)`, etc. this should # be adapted evantually. - if np.lib.NumpyVersion(np.__version__) >= "2.0.0rc1": + if version.parse(np.__version__) >= version.parse("2.0"): with np.printoptions(legacy="1.25"): yield else: