From 6a8514200f81a2c9b860247bb87775275591a296 Mon Sep 17 00:00:00 2001 From: Miguel Rochefort Date: Sun, 19 Apr 2020 12:19:23 -0400 Subject: [PATCH] replace PosixPath with PurePosixPath (fixes #28) --- my/kython/kompress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/my/kython/kompress.py b/my/kython/kompress.py index 3d43f76..73326d9 100644 --- a/my/kython/kompress.py +++ b/my/kython/kompress.py @@ -1,7 +1,7 @@ """ Various helpers for compression """ -from pathlib import Path, PosixPath +from pathlib import Path, PurePosixPath from typing import Union PathIsh = Union[Path, str] @@ -33,7 +33,7 @@ def kopen(path: PathIsh, *args, **kwargs): # TODO is it bytes stream?? return pp.open(*args, **kwargs) -class CPath(PosixPath): +class CPath(PurePosixPath): """ Ugh. So, can't override Path because of some _flavour thing. Path only has _accessor and _closed slots, so can't directly set .open method