Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ jobs:
- os: ubuntu-24.04
python-version: '3.11'
toxenv: mypy
- os: ubuntu-24.04
python-version: '3.10'
toxenv: py310
- os: ubuntu-24.04
python-version: '3.11'
toxenv: py311
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ classifiers = [
"Operating System :: POSIX",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -21,7 +20,7 @@ classifiers = [
]
license = "BSD-3-Clause"
license-files = ["LICENSE.rst"]
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
]

Expand Down Expand Up @@ -60,7 +59,7 @@ write_to_template = "__version__ = version = {version!r}\n"
[tool.black]
line-length = 120
skip-magic-trailing-comma = true
target-version = ['py310']
target-version = ['py311']

[tool.pytest.ini_options]
minversion = "6.0"
Expand All @@ -80,7 +79,7 @@ line-length = 120
ignore = ["E402"]

[tool.mypy]
python_version = '3.10'
python_version = '3.11'
strict_optional = false
local_partial_types = true
show_error_codes = true
Expand Down
8 changes: 2 additions & 6 deletions src/borgstore/backends/posixfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,16 +325,12 @@ def hash(self, name: str, algorithm: str = "sha256") -> str:
path = self._validate_join(name)
self._check_permission(name, "r")
try:
h = hashlib.new(algorithm)
hashlib.new(algorithm)
except ValueError:
raise ValueError(f"Unsupported hash algorithm: {algorithm}") from None
try:
with path.open("rb") as f:
while True:
data = f.read(1024 * 1024)
if not data:
break
h.update(data)
h = hashlib.file_digest(f, algorithm)
except FileNotFoundError:
raise ObjectNotFound(name) from None
return h.hexdigest()
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# tox configuration - if you change anything here, run this to verify: tox --recreate

[tox]
envlist = py{310,311,312,313,314},flake8,mypy
envlist = py{311,312,313,314},flake8,mypy

[testenv]
deps =
Expand Down
Loading