Skip to content

Commit 0525755

Browse files
committed
Dependencies updates and Python 3.12
Updating all our dependencies and building targets to make sure we support and publish for 3.12 Building on macos-13 as well and bump macOS min version to 12.0 to harmonize with other projects
1 parent 68ed8ef commit 0525755

File tree

8 files changed

+25
-24
lines changed

8 files changed

+25
-24
lines changed

.github/workflows/release.yaml

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

88
env:
99
LIBZIM_DL_VERSION: "8.2.1-1"
10-
MACOSX_DEPLOYMENT_TARGET: "11.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: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ on: [push]
33

44
env:
55
LIBZIM_DL_VERSION: "nightly"
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
env:
1010
LIBZIM_DL_VERSION: "nightly"
11-
MACOSX_DEPLOYMENT_TARGET: "11.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:

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: 3 additions & 2 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,9 +40,9 @@ 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

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)