Skip to content

Commit c238063

Browse files
authored
Merge pull request #178 from openzim/py312
Dependencies updates and Python 3.12
2 parents 68ed8ef + 2dce834 commit c238063

File tree

10 files changed

+38
-31
lines changed

10 files changed

+38
-31
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- published
77

88
env:
9-
LIBZIM_DL_VERSION: "8.2.1-1"
10-
MACOSX_DEPLOYMENT_TARGET: "11.0"
9+
LIBZIM_DL_VERSION: "9.0.0"
10+
MACOSX_DEPLOYMENT_TARGET: "12.0"
1111
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
1212
# APPLE_SIGNING_KEYCHAIN_PATH set in prepare keychain step
1313
APPLE_SIGNING_KEYCHAIN_PROFILE: "build-profile"
@@ -22,19 +22,19 @@ jobs:
2222
runs-on: ${{ matrix.os }}
2323
strategy:
2424
matrix:
25-
os: [ubuntu-20.04, macos-12] # macos-11, windows-2019
25+
os: [ubuntu-20.04, macos-13] # windows-2019
2626

2727
steps:
2828
- uses: actions/checkout@v3
2929

3030
- name: Set up QEMU
3131
if: runner.os == 'Linux'
32-
uses: docker/setup-qemu-action@v2
32+
uses: docker/setup-qemu-action@v3
3333
with:
3434
platforms: all
3535

3636
- name: Prepare Apple Keychain for Signing
37-
if: matrix.os == 'macos-12'
37+
if: matrix.os == 'macos-13'
3838
shell: bash
3939
run: |
4040
# store certificate on filesystem
@@ -68,10 +68,10 @@ jobs:
6868
security unlock-keychain -p mysecretpassword ${APPLE_SIGNING_KEYCHAIN_PATH}
6969
7070
- name: Build wheels
71-
uses: pypa/cibuildwheel@v2.14
71+
uses: pypa/cibuildwheel@v2.16
7272

7373
- name: Cleanup Apple Keychain
74-
if: matrix.os == 'macos-12'
74+
if: matrix.os == 'macos-13'
7575
shell: bash
7676
run: |
7777
security lock-keychain ${APPLE_SIGNING_KEYCHAIN_PATH}
@@ -107,7 +107,7 @@ jobs:
107107
name: artifact
108108
path: dist
109109

110-
- uses: pypa/gh-action-pypi-publish@v1.5.0
110+
- uses: pypa/gh-action-pypi-publish@v1.8.10
111111
with:
112112
user: __token__
113113
# password: ${{ secrets.PYPI_TEST_API_TOKEN }}

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ name: test
22
on: [push]
33

44
env:
5-
LIBZIM_DL_VERSION: "nightly"
5+
LIBZIM_DL_VERSION: "9.0.0"
6+
MACOSX_DEPLOYMENT_TARGET: "12.0"
67

78
jobs:
89
lint:
9-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1011
steps:
1112
- uses: actions/checkout@v3
1213

1314
- name: Set up Python ${{ matrix.python }}
1415
uses: actions/setup-python@v4
1516
with:
16-
python-version: "3.11"
17+
python-version: "3.12"
1718
architecture: x64
1819

1920
- name: Check formatting and linting
@@ -26,8 +27,8 @@ jobs:
2627
runs-on: ${{ matrix.os }}
2728
strategy:
2829
matrix:
29-
os: [ubuntu-22.04, macos-12]
30-
python: ["3.8", "3.9", "3.10", "3.11"]
30+
os: [ubuntu-22.04, macos-13]
31+
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
3132

3233
steps:
3334
- uses: actions/checkout@v3

.github/workflows/wheels.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
- main
88

99
env:
10-
LIBZIM_DL_VERSION: "nightly"
11-
MACOSX_DEPLOYMENT_TARGET: "11.0"
10+
LIBZIM_DL_VERSION: "9.0.0"
11+
MACOSX_DEPLOYMENT_TARGET: "12.0"
1212
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
1313
CIBW_BUILD_VERBOSITY: "3"
1414

@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
os: [ubuntu-20.04, macos-12] # macos-11, windows-2019
22+
os: [ubuntu-20.04, macos-13] # windows-2019
2323

2424
steps:
2525
- uses: actions/checkout@v3
@@ -31,7 +31,7 @@ jobs:
3131
platforms: all
3232

3333
- name: Build wheels
34-
uses: pypa/cibuildwheel@v2.14
34+
uses: pypa/cibuildwheel@v2.16
3535

3636
- uses: actions/upload-artifact@v3
3737
with:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- Using C++ libzim 9.0.0
13+
814
## [3.2.0] - 2023-09-15
915

1016
### Added

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[build-system]
2-
requires = [ "setuptools == 68.0.0", "wheel == 0.41.0", "cython == 0.29.36" ]
2+
requires = [ "setuptools == 68.2.2", "wheel == 0.41.3", "cython == 3.0.5" ]
33
build-backend = "setuptools.build_meta"
44

55
[tool.black]
6-
target-version = ['py38', 'py39', 'py310', 'py311']
6+
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
77

88

99
[tool.pytest.ini_options]

requirements-dev.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
isort>=5.10.1,<6.0
2-
black>=22.10.0,<23.0
2+
black~=23.11
33
flake8>=6.0.0,<7.0
4-
invoke>=1.7.3,<2.0
5-
coverage>=6.5.0,<7.0
4+
invoke>=1.7.3,<3.0
5+
coverage>=6.5.0,<8.0
66
pytest>=7.2,<8.0
77
pytest-cov>=4.0.0,<5.0
8-
Cython>=0.29.32
8+
Cython>=3.0.5

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ classifiers =
2828
Programming Language :: Python :: 3.9
2929
Programming Language :: Python :: 3.10
3030
Programming Language :: Python :: 3.11
31+
Programming Language :: Python :: 3.12
3132
Typing :: Stubs Only
3233
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
3334
Operating System :: MacOS
@@ -39,16 +40,16 @@ zim_safe = False
3940
packages =
4041
libzim
4142
python_requires =
42-
>=3.8,<3.12
43+
>=3.8,<3.13
4344
setup_requires =
44-
cython == 0.29.36
45+
cython == 3.0.5
4546
test_requires =
4647
pytest
4748

4849
[options.package_data]
4950
libzim =
50-
libzim.8.dylib
51-
libzim.so.8
51+
libzim.9.dylib
52+
libzim.so.9
5253

5354
[isort]
5455
profile = black

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
class Config:
32-
libzim_dl_version: str = os.getenv("LIBZIM_DL_VERSION", "8.2.1-1")
32+
libzim_dl_version: str = os.getenv("LIBZIM_DL_VERSION", "9.0.0")
3333
use_system_libzim: bool = bool(os.getenv("USE_SYSTEM_LIBZIM", False))
3434
download_libzim: bool = not bool(os.getenv("DONT_DOWNLOAD_LIBZIM", False))
3535

@@ -62,7 +62,7 @@ class Config:
6262
@property
6363
def libzim_major(self) -> str:
6464
# assuming nightlies are for version 8.x
65-
return 8 if self.is_nightly else self.libzim_dl_version[0]
65+
return 9 if self.is_nightly else self.libzim_dl_version[0]
6666

6767
@property
6868
def found_libzim(self) -> str:

tests/test_libzim_creator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ def test_creator_additem(fpath, lipsum_item):
362362
c.add_item(None)
363363
with pytest.raises(RuntimeError):
364364
c.add_item("hello")
365-
with pytest.raises(TypeError, match="takes no keyword arguments"):
365+
with pytest.raises(TypeError, match="takes exactly 1 positional argument"):
366366
c.add_item(mimetype="text/html")
367367

368368

tests/test_libzim_reader.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ def test_reader_archive(all_zims, filename, filesize, new_ns, mutlipart, zim_uui
358358
def test_reader_metadata(
359359
all_zims, filename, metadata_keys, test_metadata, test_metadata_value
360360
):
361-
362361
zim = Archive(all_zims / filename)
363362

364363
# make sure metadata_keys is empty

0 commit comments

Comments
 (0)