diff --git a/ndbioimage/__init__.py b/ndbioimage/__init__.py index d8efcf6..28ac758 100755 --- a/ndbioimage/__init__.py +++ b/ndbioimage/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations import multiprocessing import re +import os import warnings from abc import ABC, ABCMeta, abstractmethod from argparse import ArgumentParser @@ -12,7 +13,7 @@ from importlib.metadata import version from itertools import product from numbers import Number from operator import truediv -from pathlib import Path +from pathlib import Path, PosixPath, WindowsPath, PurePath from traceback import print_exc from typing import Any, Callable, Mapping, Optional @@ -132,7 +133,7 @@ class Shape(tuple): return tuple(self[i] for i in 'yxczt') # type: ignore -class CachedPath(type(Path())): +class CachedPath(WindowsPath if os.name == 'nt' else PosixPath): """ helper class for checking whether a file has changed, used by OmeCache """ def __init__(self, path: Path | str) -> None: diff --git a/pyproject.toml b/pyproject.toml index 8f5251e..0b6f830 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ndbioimage" -version = "2024.4.1" +version = "2024.4.2" description = "Bio image reading, metadata and some affine registration." authors = ["W. Pomp "] license = "GPLv3"