Skip to content

Commit 490002c

Browse files
Do not use the deprecated distutils xarray-contrib/datatree#247
* Do not use the deprecated distutils * Update docs/source/whats-new.rst * Fix import sorting --------- Co-authored-by: Tom Nicholas <[email protected]>
1 parent 95393f3 commit 490002c

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

datatree/tests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import importlib
2-
from distutils import version
32

43
import pytest
4+
from packaging import version
55

66

77
def _importorskip(modname, minversion=None):
@@ -21,7 +21,7 @@ def LooseVersion(vstring):
2121
# Our development version is something like '0.10.9+aac7bfc'
2222
# This function just ignores the git commit id.
2323
vstring = vstring.split("+")[0]
24-
return version.LooseVersion(vstring)
24+
return version.parse(vstring)
2525

2626

2727
has_zarr, requires_zarr = _importorskip("zarr")

docs/source/whats-new.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ Documentation
5757
Internal Changes
5858
~~~~~~~~~~~~~~~~
5959

60+
* No longer use the deprecated `distutils` package.
61+
6062
.. _whats-new.v0.0.12:
6163

6264
v0.0.12 (03/07/2023)

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers = [
2020
requires-python = ">=3.9"
2121
dependencies = [
2222
"xarray >=2022.6.0",
23+
"packaging",
2324
]
2425
dynamic = ["version"]
2526

0 commit comments

Comments
 (0)