Skip to content

Commit 1abff0d

Browse files
authored
Merge pull request #19 from openzim/python_3_13
Upgrade to Python 3.13 and other deps
2 parents 9ae2314 + 33b77a9 commit 1abff0d

File tree

9 files changed

+43
-27
lines changed

9 files changed

+43
-27
lines changed

.github/workflows/Tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-22.04]
14-
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
14+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1515
runs-on: ${{ matrix.os }}
1616

1717
steps:
@@ -51,4 +51,4 @@ jobs:
5151
- name: Ensure we can build Python targets
5252
run: |
5353
pip install -U pip build
54-
python3 -m build --sdist --wheel
54+
python3 -m build --sdist --wheel

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.4.0
5+
rev: v5.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/psf/black
10-
rev: "24.4.2"
10+
rev: "24.10.0"
1111
hooks:
1212
- id: black
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.4.3
14+
rev: v0.9.1
1515
hooks:
1616
- id: ruff
1717
- repo: https://github.com/RobertCraigie/pyright-python
18-
rev: v1.1.361
18+
rev: v1.1.392.post0
1919
hooks:
2020
- id: pyright
2121
name: pyright (system)

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Add support for 3.13, remove support for 3.8
13+
1014
## [0.2.1] - 2024-05-06
1115

1216
### Fixed

pyproject.toml

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,56 @@
11
[build-system]
2-
requires = ["hatchling", "hatch-openzim"]
2+
requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
66
name = "hatch-openzim"
7-
requires-python = ">=3.8,<3.13"
7+
requires-python = ">=3.9,<3.14"
88
description = "openZIM hatch plugin to set metadata automatically and download files at build time"
99
readme = "README.md"
1010
dependencies = [
11-
"hatchling==1.21.1",
12-
"packaging==23.2",
11+
"hatchling==1.27.0",
12+
"packaging==24.2",
1313
"toml==0.10.2", # to be removed once only 3.11 and above is supported
1414
]
15-
dynamic = ["authors", "keywords", "license", "version", "urls", "classifiers"]
16-
17-
[tool.hatch.metadata.hooks.openzim-metadata]
18-
additional-keywords = ["hatch","plugin","download","file"]
19-
additional-classifiers = [
20-
"Framework :: Hatch",
15+
authors = [
16+
{ "name" = "openZIM", "email" = "[email protected]"},
17+
]
18+
keywords = ["hatch","plugin","download","file"]
19+
license = {text = "GPL-3.0-or-later"}
20+
classifiers = [
21+
"Framework :: Hatch",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.9",
24+
"Programming Language :: Python :: 3.10",
25+
"Programming Language :: Python :: 3.11",
26+
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
2129
]
30+
dynamic = ["version"]
31+
32+
[project.urls]
33+
Donate = "https://www.kiwix.org/en/support-us/"
34+
Homepage = "https://github.com/openzim/hatch-openzim"
2235

2336
[project.optional-dependencies]
2437
scripts = [
2538
"invoke==2.2.0",
2639
]
2740
lint = [
28-
"black==24.4.2",
29-
"ruff==0.4.3",
41+
"black==24.10.0",
42+
"ruff==0.9.2",
3043
]
3144
check = [
32-
"pyright==1.1.361",
45+
"pyright==1.1.392.post0",
3346
]
3447
test = [
35-
"pytest==8.2.0",
36-
"coverage==7.5.1",
48+
"pytest==8.3.4",
49+
"coverage==7.6.10",
3750
]
3851
dev = [
39-
"pre-commit==3.7.0",
40-
"debugpy==1.8.1",
52+
"pre-commit==4.0.1",
53+
"debugpy==1.8.11",
4154
"hatch-openzim[scripts]",
4255
"hatch-openzim[lint]",
4356
"hatch-openzim[test]",

src/hatch_openzim/files_install.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ def _process_execute_after(base_target_dir: Path, actions: List[str]):
110110

111111
for action in actions:
112112
logger.info(f" Executing '{action}'")
113-
process = subprocess.run( # noqa: PLW1510
113+
process = subprocess.run( # noqa: PLW1510,S602
114114
action,
115-
shell=True, # noqa: S602 # nosec: B602
115+
shell=True, # nosec: B602
116116
cwd=base_target_dir,
117117
text=True,
118118
stderr=subprocess.STDOUT,

src/hatch_openzim/shared.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
# setup console logging
1212
console_handler = logging.StreamHandler(sys.stdout)
1313
console_handler.setFormatter(logging.Formatter(DEFAULT_FORMAT))
14-
log_level = logging.getLevelName(os.getenv("HATCH_OPENZIM_LOG_LEVEL", "INFO"))
15-
console_handler.setLevel(log_level)
14+
console_handler.setLevel(os.getenv("HATCH_OPENZIM_LOG_LEVEL", "INFO"))
1615
logger.addHandler(console_handler)

tests/data/file1.txt

Whitespace-only changes.

tests/data/testset1.zip

1.81 KB
Binary file not shown.

tests/data/testset2.zip

1.38 KB
Binary file not shown.

0 commit comments

Comments
 (0)