Skip to content

Commit 165a7a0

Browse files
authored
bump minimum dulwich version to 0.24.3 (#459)
1 parent 3bd868a commit 165a7a0

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ requires-python = ">=3.9"
2525
dynamic = ["version"]
2626
dependencies = [
2727
"gitpython>3",
28-
"dulwich>=0.24.0",
28+
"dulwich>=0.24.3",
2929
"pygit2>=1.14.0",
3030
"pygtrie>=2.3.2",
3131
"fsspec[tqdm]>=2024.2.0",

src/scmrepo/git/backend/dulwich/__init__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,18 +369,13 @@ def _expand_paths(self, paths: list[str], force: bool = False) -> Iterator[str]:
369369
yield rel
370370

371371
def commit(self, msg: str, no_verify: bool = False):
372-
from dulwich import __version__ as dulwich_version
373372
from dulwich.errors import CommitError
374373
from dulwich.porcelain import Error, TimezoneFormatError, commit
375374
from dulwich.repo import InvalidUserIdentity
376375

377-
commit_kwargs: dict[str, Any] = {}
378-
if dulwich_version >= (0, 24, 3):
379-
commit_kwargs["sign"] = False
380-
381376
with reraise((Error, CommitError), SCMError("Git commit failed")):
382377
try:
383-
commit(self.repo, message=msg, no_verify=no_verify, **commit_kwargs)
378+
commit(self.repo, message=msg, no_verify=no_verify, sign=False)
384379
except InvalidUserIdentity as exc:
385380
raise SCMError("Git username and email must be configured") from exc
386381
except TimezoneFormatError as exc:

0 commit comments

Comments
 (0)