Skip to content

Commit

Permalink
Do not use the deprecated distutils xarray-contrib/datatree#247
Browse files Browse the repository at this point in the history
* Do not use the deprecated distutils

* Update docs/source/whats-new.rst

* Fix import sorting

---------

Co-authored-by: Tom Nicholas <tom@cworthy.org>
  • Loading branch information
avalentino and TomNicholas committed Oct 24, 2023
1 parent 95393f3 commit 490002c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions datatree/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import importlib
from distutils import version

import pytest
from packaging import version


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


has_zarr, requires_zarr = _importorskip("zarr")
Expand Down
2 changes: 2 additions & 0 deletions docs/source/whats-new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Documentation
Internal Changes
~~~~~~~~~~~~~~~~

* No longer use the deprecated `distutils` package.

.. _whats-new.v0.0.12:

v0.0.12 (03/07/2023)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ classifiers = [
requires-python = ">=3.9"
dependencies = [
"xarray >=2022.6.0",
"packaging",
]
dynamic = ["version"]

Expand Down

0 comments on commit 490002c

Please sign in to comment.