From 88a9a4e97a58e6db1a0ad5ae74bc125ead45e9bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Tue, 2 Dec 2025 20:15:33 +0545 Subject: [PATCH] bump minimum dulwich version to 0.24.3 --- pyproject.toml | 2 +- src/scmrepo/git/backend/dulwich/__init__.py | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3950d7a..49129d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ requires-python = ">=3.9" dynamic = ["version"] dependencies = [ "gitpython>3", - "dulwich>=0.24.0", + "dulwich>=0.24.3", "pygit2>=1.14.0", "pygtrie>=2.3.2", "fsspec[tqdm]>=2024.2.0", diff --git a/src/scmrepo/git/backend/dulwich/__init__.py b/src/scmrepo/git/backend/dulwich/__init__.py index 654f760..bb30972 100644 --- a/src/scmrepo/git/backend/dulwich/__init__.py +++ b/src/scmrepo/git/backend/dulwich/__init__.py @@ -369,18 +369,13 @@ def _expand_paths(self, paths: list[str], force: bool = False) -> Iterator[str]: yield rel def commit(self, msg: str, no_verify: bool = False): - from dulwich import __version__ as dulwich_version from dulwich.errors import CommitError from dulwich.porcelain import Error, TimezoneFormatError, commit from dulwich.repo import InvalidUserIdentity - commit_kwargs: dict[str, Any] = {} - if dulwich_version >= (0, 24, 3): - commit_kwargs["sign"] = False - with reraise((Error, CommitError), SCMError("Git commit failed")): try: - commit(self.repo, message=msg, no_verify=no_verify, **commit_kwargs) + commit(self.repo, message=msg, no_verify=no_verify, sign=False) except InvalidUserIdentity as exc: raise SCMError("Git username and email must be configured") from exc except TimezoneFormatError as exc: