| 1 |
--- a/datalad/support/gitrepo.py |
| 2 |
+++ b/datalad/support/gitrepo.py |
| 3 |
@@ -90,7 +90,7 @@ from datalad.typing import ( |
| 4 |
Literal, |
| 5 |
P, |
| 6 |
Protocol, |
| 7 |
- Self, |
| 8 |
+ # Self, |
| 9 |
T, |
| 10 |
TypedDict, |
| 11 |
) |
| 12 |
@@ -961,7 +961,7 @@ class GitRepo(CoreGitRepo): |
| 13 |
return self.pathobj == self.dot_git |
| 14 |
|
| 15 |
@classmethod |
| 16 |
- def clone(cls, url: str, path: str, *args: Any, clone_options: Optional[list[str] | dict[str, Option]] = None, **kwargs: Any) -> Self: |
| 17 |
+ def clone(cls, url: str, path: str, *args: Any, clone_options: Optional[list[str] | dict[str, Option]] = None, **kwargs: Any) -> GitRepo: # -> Self: |
| 18 |
"""Clone url into path |
| 19 |
|
| 20 |
Provides workarounds for known issues (e.g. |
| 21 |
--- a/datalad/typing.py |
| 22 |
+++ b/datalad/typing.py |
| 23 |
@@ -17,10 +17,12 @@ from typing import ( |
| 24 |
TypeVar, |
| 25 |
) |
| 26 |
|
| 27 |
-if sys.version_info >= (3, 11): |
| 28 |
- from typing import Self |
| 29 |
-else: |
| 30 |
- from typing_extensions import Self |
| 31 |
+# Debian: Requires typing extensions >= 4.x and backporting was not streamlined, |
| 32 |
+# so let's just not use it |
| 33 |
+#if sys.version_info >= (3, 11): |
| 34 |
+# from typing import Self |
| 35 |
+#else: |
| 36 |
+# from typing_extensions import Self |
| 37 |
|
| 38 |
__all__ = ["Literal", "ParamSpec", "T", "K", "V", "P"] |
| 39 |
|