Skip to content

Commit

Permalink
remove distutils for python > 3.11 compatibility, uses 'packaging' wh…
Browse files Browse the repository at this point in the history
…ich is already a dependency
  • Loading branch information
nocollier committed Dec 23, 2024
1 parent 1a85969 commit 7a31bb4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions birdy/client/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

import tempfile
from collections.abc import Sequence
from distutils.version import StrictVersion
from importlib import import_module
from pathlib import Path
from typing import Union

from owslib.wps import Output
from packaging.version import Version

from birdy.utils import is_opendap_url

Expand Down Expand Up @@ -170,8 +170,8 @@ def check_dependencies(self): # noqa: D102
self._check_import("netCDF4")
from netCDF4 import getlibversion

version = StrictVersion(getlibversion().split(" ")[0])
if version < StrictVersion("4.5"):
version = Version(getlibversion().split(" ")[0])
if version < Version("4.5"):
raise ImportError("netCDF4 library must be at least version 4.5")

def convert(self): # noqa: D102
Expand Down

0 comments on commit 7a31bb4

Please sign in to comment.