--- a/datalad/support/gitrepo.py +++ b/datalad/support/gitrepo.py @@ -90,7 +90,7 @@ from datalad.typing import ( Literal, P, Protocol, - Self, + # Self, T, TypedDict, ) @@ -961,7 +961,7 @@ class GitRepo(CoreGitRepo): return self.pathobj == self.dot_git @classmethod - def clone(cls, url: str, path: str, *args: Any, clone_options: Optional[list[str] | dict[str, Option]] = None, **kwargs: Any) -> Self: + def clone(cls, url: str, path: str, *args: Any, clone_options: Optional[list[str] | dict[str, Option]] = None, **kwargs: Any) -> GitRepo: # -> Self: """Clone url into path Provides workarounds for known issues (e.g. --- a/datalad/typing.py +++ b/datalad/typing.py @@ -17,10 +17,12 @@ from typing import ( TypeVar, ) -if sys.version_info >= (3, 11): - from typing import Self -else: - from typing_extensions import Self +# Debian: Requires typing extensions >= 4.x and backporting was not streamlined, +# so let's just not use it +#if sys.version_info >= (3, 11): +# from typing import Self +#else: +# from typing_extensions import Self __all__ = ["Literal", "ParamSpec", "T", "K", "V", "P"]