Skip to content

Commit

Permalink
Apply suggestion to use packaging.version
Browse files Browse the repository at this point in the history
  • Loading branch information
seberg committed Jul 12, 2024
1 parent d0dee3e commit 927904c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/cudf/cudf/tests/test_doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pytest
from packaging import version

import cudf

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 927904c

Please sign in to comment.