Files
python-pygit2.3.11/python36.patch

116 lines
3.6 KiB
Diff

Index: pygit2-1.14.0/pygit2/blob.py
===================================================================
--- pygit2-1.14.0.orig/pygit2/blob.py
+++ pygit2-1.14.0/pygit2/blob.py
@@ -57,7 +57,7 @@ class _BlobIO(io.RawIOBase):
def seekable(self):
return False
- def readinto(self, b, /):
+ def readinto(self, b):
try:
while self._chunk is None:
self._ready.wait()
Index: pygit2-1.14.0/pygit2/remotes.py
===================================================================
--- pygit2-1.14.0.orig/pygit2/remotes.py
+++ pygit2-1.14.0/pygit2/remotes.py
@@ -23,7 +23,6 @@
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-from __future__ import annotations
from typing import TYPE_CHECKING
# Import from pygit2
@@ -70,7 +69,7 @@ class TransferProgress:
class Remote:
- def __init__(self, repo: BaseRepository, ptr):
+ def __init__(self, repo, ptr):
"""The constructor is for internal use only.
"""
self._repo = repo
@@ -289,7 +288,7 @@ class RemoteCollection:
>>> repo.remotes["origin"]
"""
- def __init__(self, repo: BaseRepository):
+ def __init__(self, repo):
self._repo = repo;
def __len__(self):
Index: pygit2-1.14.0/pygit2/branches.py
===================================================================
--- pygit2-1.14.0.orig/pygit2/branches.py
+++ pygit2-1.14.0/pygit2/branches.py
@@ -23,7 +23,6 @@
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-from __future__ import annotations
from typing import TYPE_CHECKING
from .enums import BranchType, ReferenceType
@@ -36,7 +35,7 @@ if TYPE_CHECKING:
class Branches:
- def __init__(self, repository: BaseRepository, flag: BranchType = BranchType.ALL, commit=None):
+ def __init__(self, repository, flag: BranchType = BranchType.ALL, commit=None):
self._repository = repository
self._flag = flag
if commit is not None:
Index: pygit2-1.14.0/pygit2/references.py
===================================================================
--- pygit2-1.14.0.orig/pygit2/references.py
+++ pygit2-1.14.0/pygit2/references.py
@@ -23,7 +23,6 @@
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-from __future__ import annotations
from typing import TYPE_CHECKING
from .enums import ReferenceFilter
@@ -35,7 +34,7 @@ if TYPE_CHECKING:
class References:
- def __init__(self, repository: BaseRepository):
+ def __init__(self, repository):
self._repository = repository
def __getitem__(self, name: str):
Index: pygit2-1.14.0/pygit2/submodules.py
===================================================================
--- pygit2-1.14.0.orig/pygit2/submodules.py
+++ pygit2-1.14.0/pygit2/submodules.py
@@ -23,7 +23,6 @@
# the Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
-from __future__ import annotations
from typing import TYPE_CHECKING, Iterable, Iterator, Optional, Union
from ._pygit2 import Oid
@@ -41,7 +40,7 @@ if TYPE_CHECKING:
class Submodule:
@classmethod
- def _from_c(cls, repo: BaseRepository, cptr):
+ def _from_c(cls, repo, cptr):
subm = cls.__new__(cls)
subm._repo = repo
@@ -149,7 +148,7 @@ class Submodule:
class SubmoduleCollection:
""" Collection of submodules in a repository. """
- def __init__(self, repository: BaseRepository):
+ def __init__(self, repository):
self._repository = repository
def __getitem__(self, name: str) -> Submodule: