Skip to content

Commit 32dab78

Browse files
committed
Fix compatibility with Python 3.10 beta 1
1 parent 8adedaf commit 32dab78

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

domdf_python_tools/paths.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,12 @@ class PathPlus(pathlib.Path):
361361
.. versionchanged:: 0.5.1 Defaults to Unix line endings (``LF``) on all platforms.
362362
"""
363363

364-
__slots__ = ("_accessor", )
364+
__slots__ = ()
365+
_accessor = pathlib._normal_accessor # type: ignore
366+
_closed = False
367+
368+
def _init(self, *args, **kwargs):
369+
pass
365370

366371
def __new__(cls, *args, **kwargs): # noqa D102
367372
if cls is PathPlus:
@@ -746,7 +751,7 @@ def unlink(self, missing_ok: bool = False) -> None:
746751
"""
747752

748753
try:
749-
self._accessor.unlink(self) # type: ignore
754+
self._accessor.unlink(self)
750755
except FileNotFoundError:
751756
if not missing_ok:
752757
raise

0 commit comments

Comments
 (0)