Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependencies updates and Python 3.12 #178

Merged
merged 2 commits into from
Nov 15, 2023
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
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
- published

env:
LIBZIM_DL_VERSION: "8.2.1-1"
MACOSX_DEPLOYMENT_TARGET: "11.0"
LIBZIM_DL_VERSION: "9.0.0"
MACOSX_DEPLOYMENT_TARGET: "12.0"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
# APPLE_SIGNING_KEYCHAIN_PATH set in prepare keychain step
APPLE_SIGNING_KEYCHAIN_PROFILE: "build-profile"
Expand All @@ -22,19 +22,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-12] # macos-11, windows-2019
os: [ubuntu-20.04, macos-13] # windows-2019

steps:
- uses: actions/checkout@v3

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Prepare Apple Keychain for Signing
if: matrix.os == 'macos-12'
if: matrix.os == 'macos-13'
shell: bash
run: |
# store certificate on filesystem
Expand Down Expand Up @@ -68,10 +68,10 @@ jobs:
security unlock-keychain -p mysecretpassword ${APPLE_SIGNING_KEYCHAIN_PATH}

- name: Build wheels
uses: pypa/cibuildwheel@v2.14
uses: pypa/cibuildwheel@v2.16

- name: Cleanup Apple Keychain
if: matrix.os == 'macos-12'
if: matrix.os == 'macos-13'
shell: bash
run: |
security lock-keychain ${APPLE_SIGNING_KEYCHAIN_PATH}
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@v1.5.0
- uses: pypa/gh-action-pypi-publish@v1.8.10
with:
user: __token__
# password: ${{ secrets.PYPI_TEST_API_TOKEN }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ name: test
on: [push]

env:
LIBZIM_DL_VERSION: "nightly"
LIBZIM_DL_VERSION: "9.0.0"
MACOSX_DEPLOYMENT_TARGET: "12.0"

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
architecture: x64

- name: Check formatting and linting
Expand All @@ -26,8 +27,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
python: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-22.04, macos-13]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- main

env:
LIBZIM_DL_VERSION: "nightly"
MACOSX_DEPLOYMENT_TARGET: "11.0"
LIBZIM_DL_VERSION: "9.0.0"
MACOSX_DEPLOYMENT_TARGET: "12.0"
CIBW_ENVIRONMENT_PASS_LINUX: "LIBZIM_DL_VERSION"
CIBW_BUILD_VERBOSITY: "3"

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

steps:
- uses: actions/checkout@v3
Expand All @@ -31,7 +31,7 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.14
uses: pypa/cibuildwheel@v2.16

- uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Using C++ libzim 9.0.0

## [3.2.0] - 2023-09-15

### Added
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[build-system]
requires = [ "setuptools == 68.0.0", "wheel == 0.41.0", "cython == 0.29.36" ]
requires = [ "setuptools == 68.2.2", "wheel == 0.41.3", "cython == 3.0.5" ]
build-backend = "setuptools.build_meta"

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


[tool.pytest.ini_options]
Expand Down
8 changes: 4 additions & 4 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
isort>=5.10.1,<6.0
black>=22.10.0,<23.0
rgaudin marked this conversation as resolved.
Show resolved Hide resolved
black~=23.11
flake8>=6.0.0,<7.0
invoke>=1.7.3,<2.0
coverage>=6.5.0,<7.0
invoke>=1.7.3,<3.0
coverage>=6.5.0,<8.0
pytest>=7.2,<8.0
pytest-cov>=4.0.0,<5.0
Cython>=0.29.32
Cython>=3.0.5
9 changes: 5 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
Typing :: Stubs Only
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Operating System :: MacOS
Expand All @@ -39,16 +40,16 @@ zim_safe = False
packages =
libzim
python_requires =
>=3.8,<3.12
>=3.8,<3.13
setup_requires =
cython == 0.29.36
cython == 3.0.5
test_requires =
pytest

[options.package_data]
libzim =
libzim.8.dylib
libzim.so.8
libzim.9.dylib
libzim.so.9

[isort]
profile = black
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


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

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

@property
def found_libzim(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_libzim_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ def test_creator_additem(fpath, lipsum_item):
c.add_item(None)
with pytest.raises(RuntimeError):
c.add_item("hello")
with pytest.raises(TypeError, match="takes no keyword arguments"):
with pytest.raises(TypeError, match="takes exactly 1 positional argument"):
c.add_item(mimetype="text/html")


Expand Down
1 change: 0 additions & 1 deletion tests/test_libzim_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ def test_reader_archive(all_zims, filename, filesize, new_ns, mutlipart, zim_uui
def test_reader_metadata(
all_zims, filename, metadata_keys, test_metadata, test_metadata_value
):

zim = Archive(all_zims / filename)

# make sure metadata_keys is empty
Expand Down